🧩Arithmetic Operator
Also known as Math Operator
A sign that does maths with numbers: +, -, *, / and more, like %.
Think of it like
Think of it like doing sums on paper. The computer just does them fast.
Example
A shop splits 7 sweets between 3 children. 7 // 3 gives 2 each, and 7 % 3 says 1 is left over.
Why it matters
Totals, prices, scores and sizes are all worked out with these. They are the first operators anyone learns.
Definition
Example code
python
>>> 7 % 3
1
>>> 2 ** 3
8
>>> 7 / 2
3.5Common mistake
Key takeaways
- 1Numbers in, number out. Each one makes a new number.
- 2Remainder is %. It gives what is left after dividing.
- 3Times before plus. Use brackets to change the order.