Daily Python
Day 3Python~35 min
Numbers & Math
Arithmetic operators and a mini calculator
Track progress0/15 days
What you'll learn
int()float()+-*///%**
- Read numeric input from the user
- Perform addition, subtraction, multiplication, and division
- Understand floor division, modulus, and exponents
- Build a calculator that processes two numbers
Lesson & examples
Read the code, then the explanation — try changing values before the project.
Sum two numbers
num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))
result = num1 + num2
print(f"The sum of {num1} and {num2} is {result}")All operators
a, b = 5, 3
print(f"Addition: {a + b}")
print(f"Subtraction: {a - b}")
print(f"Multiplication: {a * b}")
print(f"Division: {a / b}")
print(f"Floor Division: {a // b}")
print(f"Modulus: {a % b}")
print(f"Exponentiation: {a ** b}")