0
I saw a code that has "math.ceil" what does math.ceil do? Is there another way to write "ceil"
3 odpowiedzi
+ 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
+ 1
Thanks
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))