How to find the floor value of a number using math.floor(x) in Python

1 Answer

0 votes
import math

print(math.floor(50))
print(math.floor(50.1))
print(math.floor(50.4))
print(math.floor(50.5))
print(math.floor(50.6))
print(math.floor(-10))
print(math.floor(-13.4))
print(math.floor(-13.5))
print(math.floor(-13.6))
print(math.floor(0))


'''
run:

50
50
50
50
50
-10
-14
-14
-14
0

'''

 



answered Oct 13, 2017 by avibootz
...