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

Calculate energy

Try as many times as you need

Let’s understand

The operators +, -, * and / add, subtract, multiply and divide. Multiplication and division happen before addition. Parentheses change the order. Division with / returns a float even when the result is a whole number.

Listen to the explanation

Example

print((3 + 2) * 4)
YOUR MISSION

Four panels provide 6 energy units each. The base uses 9. Print what remains.

I need a hint

Calculate 4 * 6, then subtract 9.

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.