0Pricing
Coding for Kids · Lesson

Math with Variables

Calculate using stored values.

Math with Variables is a free Coding for Kids lesson on CoddyKit — lesson 4 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.

Math With Boxes! 📦🧮

Now for the grand finale: doing math with your memory boxes!

Put numbers in boxes, then add them up! 🎉

a = 5
b = 3
print(a + b)

Add Two Boxes ➕

If a box holds 5 and another holds 3, you can add them!

The computer adds what is inside. 5 + 3 = 8! 🧠

apples = 4
oranges = 6
print(apples + oranges)

Boxes Make Math Easy 🎯

Boxes let you do math with names instead of just numbers!

It makes your code easy to read. So smart! 📖

cats = 2
dogs = 3
print(cats + dogs)

Subtract Boxes ➖

You can subtract boxes too!

Start with a candy box, take some away! 🍬

candies = 10
eaten = 4
print(candies - eaten)

Multiply Boxes ✖️

Boxes can be multiplied!

Bags box times marbles box. So many marbles! 🔵

bags = 3
per_bag = 5
print(bags * per_bag)

Divide Boxes ➗

You can share box values by dividing!

Pizza slices shared by friends. Fair! 🍕

slices = 8
friends = 4
print(slices / friends)

Save the Answer 💾

You can even save the answer in a NEW box!

total holds the sum. Then print total! 🎁

a = 6
b = 4
total = a + b
print(total)

Score Keeper 🏆

Let us keep score in a game!

Add points to your score box. You are winning! 🎮

score = 10
points = 5
score = score + points
print(score)

Counting Money 💰

Add up your coins using boxes!

Pennies plus more pennies. Cha-ching! 💵

piggy = 20
gift = 10
print(piggy + gift)

Your Own Math Box 🎲

Make two number boxes and do math with them!

Add, subtract, multiply, or divide. Your choice! 🌈

x = 12
y = 3
print(x * y)

Math Box Master! 🌟

You can do math with variables! You combined everything you learned!

You are an amazing coder! 🎉

mine = 50
bonus = 50
print(mine + bonus)

Quick Check ✅

Final question! 📦

You Are a Coder! 🎊🎉

WOW! You finished all four courses! You learned print, variables, and math!

You are officially a Python coder! 🐍 Be proud of yourself, superstar! 🌟👏

Frequently asked questions

Is the “Math with Variables” lesson free?

Yes — the full text of “Math with Variables” 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 “Math with Variables”?

Calculate using stored values. 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 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Math with Variables” 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

  1. Adding and Subtracting
  2. Multiplying and Dividing
  3. Whole Numbers and Decimals
  4. Math with Variables
← Back to Coding for Kids