Guided Notes
Numbers & Arithmetic
Arithmetic operators, two kinds of division, order of operations, and min/max/abs.
Arithmetic operators
Slide 1 / 5Python covers every button on a calculator ā and a few more.
| Operator | Name | Example | Result |
|---|---|---|---|
| a + b | Addition | 7 + 2 | 9 |
| a - b | Subtraction | 7 - 2 | 5 |
| a * b | Multiplication | 7 * 2 | 14 |
| a / b | True division | 7 / 2 | 3.5 |
| a // b | Floor division | 7 // 2 | 3 |
| a % b | Modulus (remainder) | 7 % 2 | 1 |
| a ** b | Exponentiation | 7 ** 2 | 49 |
| -a | Negation | -7 | -7 |
