+ 1

Are floor and ceiling available in python?

What are the functions in python for rounding the float/double value in floor and ceiling?

10th Feb 2019, 1:57 PM
Md. Tahmid Hasan
Md. Tahmid Hasan - avatar
2 ответов
+ 9
try: import math math.floor() math.ceil()
10th Feb 2019, 2:02 PM
Hubert Dudek
Hubert Dudek - avatar
+ 1
Also for floor you can use the operator // (/ will return a float).
10th Feb 2019, 3:07 PM
HonFu
HonFu - avatar