Basic Arithmetic and Operators
Explore Python's arithmetic operators and how to perform calculations.
Basic Arithmetic and Operators is a free Python Academy lesson on CoddyKit. This is lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Python Academy learning path, and your progress syncs across the web and the CoddyKit app. The Python Academy course includes 4 lessons in total.
Introduction to Arithmetic and Operators
Operators are symbols that perform specific operations on values or variables. Arithmetic operators are used to perform mathematical calculations.
In this lesson, you’ll learn the basic arithmetic operators in Python.

Basic Arithmetic Operators
Here are some common arithmetic operators in Python:
+: Addition (e.g.,2 + 3gives5).-: Subtraction (e.g.,7 - 2gives5).*: Multiplication (e.g.,4 * 3gives12)./: Division (e.g.,10 / 2gives5.0).
Examples of Arithmetic Operators
Let’s look at some examples:
# Arithmetic operators in Python
a = 10
b = 5
print(a + b) # Addition
print(a - b) # Subtraction
print(a * b) # Multiplication
print(a / b) # DivisionInteger Division and Modulus
Python also provides:
//: Integer Division (e.g.,10 // 3gives3).%: Modulus (remainder) (e.g.,10 % 3gives1).
These operators are useful when you need precise control over division.
# Integer division and modulus
a = 10
b = 3
print(a // b) # Integer division
print(a % b) # ModulusExponentiation
You can raise a number to the power of another using **:
# Exponentiation
result = 2 ** 3
print(result) # 8Operator Precedence
Python follows the order of operations:
- Parentheses (
()) - Exponentiation (
**) - Multiplication, Division, Modulus (
*, /, %, //) - Addition, Subtraction (
+, -)
For example:
# Operator precedence
result = 2 + 3 * 4
print(result) # 14Using Parentheses to Change Precedence
You can use parentheses to change the order of operations:
# Changing precedence with parentheses
result = (2 + 3) * 4
print(result) # 20Combining Arithmetic with Variables
Arithmetic operations can be combined with variables:
# Combining arithmetic with variables
x = 5
y = 2
z = x ** y + x / y
print(z)What Did We Learn?
In this lesson, you learned:
- The basic arithmetic operators in Python:
+, -, *, /. - How to use
//,%, and**for integer division, modulus, and exponentiation. - The importance of operator precedence and using parentheses to change it.
Great job! Let’s move on to the next topic.

Learn Python with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 76
- Lessons
- 320
Frequently Asked Questions
Is the “Basic Arithmetic and Operators” lesson free?
Yes — the full text of “Basic Arithmetic and Operators” is free to read here on the web. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Python Academy course, upgrade to CoddyKit PRO. The Python Academy course includes 4 lessons in total.
What will I learn in “Basic Arithmetic and Operators”?
Explore Python's arithmetic operators and how to perform calculations. You practise Python Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Python Academy?
No prior experience is required. Python Academy on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 3 of 4.
How long does the “Basic Arithmetic and Operators” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Python Academy lesson?
Yes. Every Python Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Variables and Data Types
- Input and Output
- Basic Arithmetic and Operators
- Comments and Code Readability