🔢 Arithmetic Operators

Learn how to perform calculations in Python using arithmetic operators.

What you'll learn:

  • The basic arithmetic operators: +, -, *, /
  • Integer division (//) and modulo (%)
  • Order of operations (BIDMAS/BODMAS)
  • Using brackets to control calculation order

Learning Path

Follow these activities in order.

Key Vocabulary

operator

A symbol that performs an operation on values. +, -, *, /

operand

The values that an operator works on. In 5 + 3, 5 and 3 are operands.

integer division

Division that gives a whole number result. 7 // 2 = 3

modulo

The remainder after division. 7 % 2 = 1

expression

A combination of values, variables, and operators. x + 5 * 2

BIDMAS

Order of operations: Brackets, Indices, Division, Multiplication, Addition, Subtraction.

Quick Reference

operators_examples.py
# Basic arithmetic operators
print(10 + 3)   # Addition: 13
print(10 - 3)   # Subtraction: 7
print(10 * 3)   # Multiplication: 30
print(10 / 3)   # Division: 3.333...

# Integer division and modulo
print(10 // 3)  # Integer division: 3
print(10 % 3)   # Modulo (remainder): 1

# Exponentiation (powers)
print(2 ** 3)   # 2 to the power of 3: 8

# Order of operations (BIDMAS)
print(2 + 3 * 4)     # 14 (multiplication first)
print((2 + 3) * 4)   # 20 (brackets first)