W3docs

How do you round UP a number?

In Python, you can use the ceil() function from the math module to round a number up.

In Python, you can use the ceil() function from the math module to round a number up. Here is an example:

Ceiling a number in Python

import math

x = 3.14
rounded_x = math.ceil(x)
print(rounded_x)

This will output 4, because 3.14 rounds up to 4.