0

I saw a code that has "math.ceil" what does math.ceil do? Is there another way to write "ceil"

5th Apr 2017, 4:45 PM
Penny Jacobs
Penny Jacobs - avatar
3 Answers
+ 12
---------------------------------- | Math.ceil rounds a number UPWARDS! | ---------------------------------- examples: Math.ceil(.95); // 1 Math.ceil(4); // 4 Math.ceil(7.004); // 8 Math.ceil(-0.95); // -0 Math.ceil(-4); // -4 Math.ceil(-7.004); // -7
5th Apr 2017, 5:12 PM
Kamil
Kamil - avatar
+ 1
Thanks
5th Apr 2017, 5:48 PM
Penny Jacobs
Penny Jacobs - avatar
0
import math print(math.ceil(1.1)) from math import ceil print(ceil(1.1)) from math import ceil as newname print(newname(1.1))
5th Apr 2017, 9:04 PM
ĐĐœĐŽŃ€Đ”Đč