Amory
0
Q:

trunc in python

# Python program to show output of floor(), ceil() 
# truncate() for a positive number. 
import math 
print math.floor(3.5) # floor 
print math.trunc(3.5) # work as floor 
print math.ceil(3.5)  # ceil 
1

New to Communities?

Join the community