Numbers & Math
6 min · Python
Use Python as a calculator — and do math with your variables.
Python is a calculator. If you print a math expression, it works out the answer first and prints the result.
Run this — notice it prints 5, not the text 2 + 3, because there are no quotes around it.
Operators and variables together
The basic operators are + (add), - (subtract), * (multiply), and / (divide). They work on variables too, which is where math gets useful: store the parts, then combine them.
Your turn
Print the result of 12 multiplied by 12.