ACTIVITY 45 / 50
Try as many times as you needImport one function
Let’s understand
from math import ceil imports one name. You can then write ceil without math. ceil rounds upwards to the nearest integer. This is useful when a partial group still needs a whole container.
Listen to the explanation
Example
from math import floor
print(floor(2.8))Import ceil with from. Print ceil(2.3).
I need a hint
Place from math import ceil on its own line before the calculation.
How to find an error
- Read the last line of the error message.
- Find the indicated line. Check quotes, parentheses and indentation.
- Change one thing and run again.
main.py
4 spaces
Your draft stays in this browser.
Result
PythonYour program’s output will appear here. Click Run.
Мой профиль