0Pricing
Coding for Kids · Lesson

Adding and Changing

Update your word boxes.

Adding and Changing 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.

Adding and Changing ✏️

Dictionaries are not frozen! You can add new drawers and change what is inside. 🔧

Add a New Pair ➕

Use a new key in square brackets and give it a value!

pet = {"name": "Rex"}
pet["age"] = 4
print(pet)

Change a Value 🔄

Use an existing key to change its value.

pet = {"age": 4}
pet["age"] = 5
print(pet)

Start Empty, Fill Up 📥

Begin with {} and add as you go.

box = {}
box["color"] = "red"
print(box)

Add Many 🧺

Add as many pairs as you want!

me = {}
me["name"] = "Ada"
me["age"] = 8
print(me)

Grow a Number 📈

You can add to a number value using its key.

game = {"score": 10}
game["score"] = game["score"] + 5
print(game["score"])

Remove a Drawer 🗑️

Use del to throw away a pair you do not need.

box = {"a": 1, "b": 2}
del box["a"]
print(box)

Pop It Out 🎈

.pop() removes a key and hands you its value.

box = {"toy": "car", "snack": "chips"}
gone = box.pop("snack")
print(gone)
print(box)

Update by Hand 🛠️

Changing is just setting a key that already exists.

hero = {"power": "fly"}
hero["power"] = "super speed"
print(hero["power"])

How Many Drawers? 🔢

Use len() to count the pairs.

box = {"a": 1, "b": 2, "c": 3}
print(len(box))

Always Changing 🌊

Dictionaries can grow, shrink, and change anytime. They are perfect for things that keep updating, like a game score! 🎮

Quick Check ✅

Pick the right move! 🎯

Master Editor! 🌟

You can add with box["new"] = value, change the same way, and remove with del or .pop(). Your boxes are alive! 🎉

Frequently asked questions

Is the “Adding and Changing” lesson free?

Yes — the full text of “Adding and Changing” 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 “Adding and Changing”?

Update your word boxes. 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 “Adding and Changing” 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. What Is a Dictionary?
  2. Looking Things Up
  3. Adding and Changing
  4. A Mini Phone Book
← Back to Coding for Kids