Module 1

Simple calculations

Python is a great calculator.

Python does math instantly

Python can calculate for you. The symbols +, -, * and / are operators for adding, subtracting, multiplying, and dividing.

print(10 + 5)
print(7 * 3)
print(100 / 4)
Try it

Order of operations

Python follows the usual math order: multiply and divide before add and subtract. Use parentheses to be clear: print((2 + 3) * 4).

Your task

Do a calculation

  • Print the result of (2 + 3) * 4.
  • Let Python do the math for you.
Remember

+ -, *, / do math. print(2 + 3) shows the result. Use parentheses to control the order.