The ceil (ceiling) function:
import math
print(int(math.ceil(4.2)))
More Related Contents:
- Round a floating-point number down to the nearest integer?
- How do I get 4 instead of 4.0 in "Squirrels and nuts – 1" task? [closed]
- How do I parse a string to a float or int?
- How can I force division to be floating point? Division keeps rounding down to 0?
- Convert floats to ints in Pandas?
- Limiting floats to two decimal points
- How to properly round-up half float numbers?
- round() doesn’t seem to be rounding properly
- Pandas read csv file with float values results in weird rounding and decimal digits
- rounding errors in Python floor division
- Rounding a number in Python but keeping ending zeros
- How to manage division of huge numbers in Python?
- Why does the floating-point value of 4*0.1 look nice in Python 3 but 3*0.1 doesn’t?
- How to use a decimal range() step value?
- Generate random integers between 0 and 9
- Converting integer to string in Python
- The `is` operator behaves unexpectedly with non-cached integers
- How to round a floating point number up to a certain decimal place?
- Format floats with standard json module
- Range values to pseudocolor
- Convert integer to string in Python
- Convert hex to float
- Safest way to convert float to integer in python?
- round down to 2 decimal in python
- Convert all strings in a list to integers
- Python floating point number comparison
- How to get largest possible precision? (Python – Decimal)
- How can I convert string values from a dictionary, into int/float datatypes?
- mean from pandas and numpy differ
- Round to nearest 0.05 using Python