Snooze
0
Q:

floor division python 3

#normal division
5 / 4
#1.25

#integer division
5 // 4
#1
10
# the double '//' is used for floor division
result = x//y 
4
#discards the decimal value of the output
7 // 3
# 2
5
# Floor division is a normal division operation except that it returns the largest possible integer. 
# This integer is either less than or equal to the normal division result.

print("Floor of 36 / 5 is:")
print(36 // 5) # 7
1

New to Communities?

Join the community