The building blocks of Python programming
Rules:
age and Age are different| Type | Example | Description |
|---|---|---|
| int | 42, -7, 0 | Whole numbers |
| float | 3.14, -2.5 | Decimal numbers |
| str | "Hello", 'Python' | Text (strings) |
| bool | True, False | Boolean values |
| Operator | Meaning | Example |
|---|---|---|
| + | Addition | 5 + 3 = 8 |
| - | Subtraction | 10 - 4 = 6 |
| * | Multiplication | 6 * 7 = 42 |
| / | Division | 15 / 3 = 5.0 |
| // | Integer Division | 17 // 5 = 3 |
| % | Modulus (remainder) | 17 % 5 = 2 |
| ** | Exponent (power) | 2 ** 3 = 8 |