what is difference between math.ceil() and round () in python?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is difference between math.ceil() and round () in python??

22nd Jan 2021, 5:24 AM
Satyam Kumar Jha
Satyam Kumar Jha - avatar
3 Answers
+ 8
math.ceil() rounds up. eg: 2.6 to 3 2.2 to 3 2.9 to 3 math.round is the rounding of numbers just like you do in math. No need to explain Happy Coding. If you understood the concept please mark as best answer
22nd Jan 2021, 5:56 AM
∆BH∆Y
∆BH∆Y - avatar
23rd Jan 2021, 12:39 AM
∆BH∆Y
∆BH∆Y - avatar
0
And is there math.floor() finction in python which rounds downwards?
23rd Jan 2021, 12:11 AM
kitabski 🇺🇿
kitabski 🇺🇿 - avatar