Comparing Values
Check bigger, smaller, and equal.
Comparing Values is a free Coding for Kids lesson on CoddyKit — 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 Coding for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Comparing Things ⚖️
Hello, brainy coder! 🧠 To make choices, we compare things. Is this bigger? Smaller? The same? Python has special signs for this! ✨
Bigger Than > 📈
The > sign means greater than (bigger). 5 > 3 is True because 5 is bigger!
print(5 > 3)
print(2 > 9)Smaller Than < 📉
The < sign means less than (smaller). 2 < 9 is True because 2 is smaller!
print(2 < 9)
print(8 < 1)Same Same == 🟰
The == sign (two equals) checks if things are equal (the same).
print(7 == 7)
print(7 == 4)Why Two Equals? 🤨
One = puts a value in a box. TWO == ask "are these the same?" Do not mix them up! 😄
x = 5
print(x == 5)True and False Again 🎲
Every comparison gives back True or False. These are like yes and no for computers!
print(10 > 1)
print(10 < 1)Comparing in an if 🪧
We use comparisons inside if to choose what happens!
apples = 8
if apples > 5:
print("Lots of apples! 🍎")Compare Words Too 🔤
We can use == to compare strings (words), not just numbers!
name = "Rex"
if name == "Rex":
print("Hi Rex! 🐶")Not Equal != ❌
Bonus trick! != means not equal (different). Useful for "if these are NOT the same".
color = "blue"
if color != "red":
print("Not red! 🔵")Bigger or Equal >= 🟰
Super bonus! >= means "bigger OR the same". And <= means "smaller OR the same"!
score = 50
if score >= 50:
print("You made it! 🎉")You Are a Comparer! 🎉
Awesome! Try comparing your age to 8.
age = 9
if age > 8:
print("Older than 8! 🎂")Quick Check 🧠
Quiz time! 🎯 What is the answer to 4 == 4?
Recap Time! 🌟
Fantastic! 🎓 Today you learned:
>bigger,<smaller==the same,!=different- Comparisons give True or False
- Use them inside
ifto choose!
You are a comparing genius! 🧠
Frequently asked questions
Is the “Comparing Values” lesson free?
Yes — the full text of “Comparing Values” is free to read here on the web, and the Coding for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Coding for Kids course, upgrade to CoddyKit PRO.
What will I learn in “Comparing Values”?
Check bigger, smaller, and equal. You practise Coding for Kids 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 Coding for Kids?
No prior experience is required. Coding for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Comparing Values” 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 Coding for Kids lesson?
Yes. Every Coding for Kids 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
- Choosing with if
- The else Backup Plan
- Comparing Values
- More Options with elif