🐸

The Calculator

Python Basicspython-basics-05-the-calculator
Reward: 50 XP
|

Math Magic

Hoppy needs to calculate how much food he has. Python is a very powerful calculator.

Operators

  • + : Plus

  • - : Minus

  • * : Multiply (Star)

  • / : Divide (Slash)

Your Mission

1
Calculate

Calculate 10 times 5, and store it in a variable named total.

2
Print

Print the total.

Suggested Solution
Click to expand
total = 10 * 5
print(total)
Advanced Tips
Want more? Click to expand

Python follows standard math rules (PEMDAS). Multiplication * and division / happen before addition + and subtraction -.

print(2 + 3 * 4)   # Result: 14 (not 20)
pymain.py
Loading...
Terminal
Terminal
Ready to run...