Operators: Make Code Calculate! ➕
Operators are the symbols that let your code do math, compare values, and make decisions. You already know them — from school!
Symbols That Do Things!
Operators tell your code what action to take — just like in maths class!
When I first started coding, I was so happy — I already knew operators from school! +, -, ×, ÷ — I used them every day in maths. In code, they work the same way. You give the computer two numbers and an operator — it gives you the answer instantly!
4 Types Every Kid Should Know!
Each type has a different job — let’s learn them all!
Arithmetic Operators — Do the Maths!
These are the ones you know from school! They add, subtract, multiply, and divide numbers. Simple and powerful!
# Arithmetic operators in Python score = 10 + 5 # → 15 lives = 3 - 1 # → 2 total = 4 * 3 # → 12 half = 10 / 2 # → 5.0
Comparison Operators — Compare Two Things!
These compare two values and always give you True or False. Used with if/else to make decisions!
# Comparison — always True or False! age = 12 print(age == 12) # True print(age > 18) # False print(age != 10) # True
Assignment Operators — Store Values!
These store values inside variables. The = sign doesn’t mean “equal” here — it means “put this value into the box”!
# Score tracking with += ! score = 0 score += 10 # score is now 10 score += 5 # score is now 15 print(score) # → 15
Logical Operators — Combine Decisions!
These combine two True/False conditions into one answer. Used to check multiple things at once!
# Logical operators with if/else age = 12 has_ticket = True if age >= 10 and has_ticket: print("You can enter! 🎉")
Interactive Operator Calculator!
Pick numbers, pick an operator — see the result instantly!
Build an expression and hit = to calculate!
Guess the Missing Operator!
Look at the expression — pick the right operator to complete it!
8 rounds · find the missing operator!
4 questions · pick an answer to check!
⭐ Remember This!
Arithmetic operators do maths: +, -, *, /
Comparison operators return True or False
= means “store this value” — not “is equal to”!
and/or/not combine True/False conditions together
