Ask coding questions

← Back to all posts
How to round
ArmedWithStew (11)

How do you round a number in python? For example, say I have 5.85. I round up to 6. How do you do that in python?

Comments
hotnewtop
ash15khng (724)

https://realpython.com/python-rounding/
This website could probably help you out. For your example you could probably use math.ceil.