Are floor and ceiling available in python? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 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 Réponses
+ 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