+ 8
Hello people,how do you round off numbers in python?( e.g to the nearest whole number 66.6 to 67 and 66.1 to 66)
2 ответов
+ 2
Let me attempt it. I had used
int (66.6 ) but it gave me 66 as an answer.
+ 1
Round off fuctions
round()
math.ceil()
math.floor()
To use math.ceil and math.floor, you must first put the code ( import math) on its on line.