Answers for "python math.trunc"

0

python math.trunc

import math
print (math.trunc(2.5))  # 2 (behaves like math.floor)
print (math.trunc(-2.5))  # -2 (behaves like math.ceil)
Posted by: Guest on April-01-2022

Python Answers by Framework

Browse Popular Code Answers by Language