ACTIVITY 9 / 50
Try as many times as you needCalculate energy
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)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
- 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.
Мой профиль