Мой профиль
ACTIVITY 45 / 50

Import one function

Try as many times as you need

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))
YOUR MISSION

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
  1. Read the last line of the error message.
  2. Find the indicated line. Check quotes, parentheses and indentation.
  3. Change one thing and run again.

main.py

4 spaces

Your draft stays in this browser.

Result

Python
Your program’s output will appear here. Click Run.