CodeLab Academy 📞 9936 6696
← Lessons 🐍 Python for Beginners

Arithmetic operations

## Operations | Sign | Meaning | Example | Answer | |---|---|---|---| | `+` | Add | `7 + 2` | 9 | | `-` | Subtract | `7 - 2` | 5 | | `*` | Multiply | `7 * 2` | 14 | | `/` | Divide | `7 / 2` | 3.5 | | `//` | Whole-number division | `7 // 2` | 3 | | `%` | Remainder | `7 % 2` | 1 | | `**` | Power | `7 ** 2` | 49 | ## Example: the last digit ```python n = int(input()) print(n % 10) ``` ## Rounding decimals ```python x = 10 / 3 print(f"{x:.2f}") # 3.33 ```
← Previous Next →

💡 Want to track which lessons you've read and solve problems for points? Sign up for free or log in.