Changing a Value
Update what a variable remembers.
Changing a Value is a free Coding for Kids lesson on CoddyKit. This is 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, and your progress syncs across the web and the CoddyKit app. The Coding for Kids course includes 4 lessons in total.
Change the Box! 🔄
Here is something cool: you can change what is inside a box anytime!
Take the old thing out, put a new thing in. Like swapping toys! 🧸
box = "apple"
box = "banana"
print(box)Out With the Old 📤
When you put something new in a box, the old thing leaves!
The box only keeps the newest thing. Bye-bye old value! 👋
snack = "chips"
snack = "cookies"
print(snack)New Value Wins 🏅
The last thing you put in the box is what stays.
So the newest value always wins! 🥇
pet = "cat"
pet = "dog"
print(pet)Changing Numbers Too 🔢
You can change number boxes as well!
Start with 5, change it to 10. The box updates! 📈
score = 5
score = 10
print(score)Growing Up! 🎂
Imagine a box for your age. On your birthday, you change it!
From 8 to 9. Happy birthday! 🎉
age = 8
age = 9
print(age)Change It Many Times 🔁
You can change a box as many times as you want!
Each change replaces the old value. So flexible! 🤸
mood = "sleepy"
mood = "hungry"
mood = "happy"
print(mood)Print Before and After 👀
You can print the box, change it, then print again to see the difference!
Watch it transform! 🪄
color = "red"
print(color)
color = "blue"
print(color)Old Value Is Gone 🫧
Once you change a box, the old value disappears like a bubble!
The computer only remembers the new one. Pop! 🫧
level = 1
level = 2
print(level)Like Erasing a Whiteboard 🧽
Changing a box is like erasing a whiteboard and writing something new.
The old writing is gone, the new writing stays! ✏️
word = "hi"
word = "bye"
print(word)Try Changing! 🎮
Make a box, then change it to something new, then print it!
See the magic of change. ✨
fruit = "grape"
fruit = "mango"
print(fruit)Change Master! 🌟
You learned to change values in your boxes! Super flexible coding!
You are unstoppable! 💪
status = "winning!"
print(status)Quick Check ✅
Change question! 🔄
Awesome Change Work! 🎊
You learned that boxes can change, and the newest value stays!
Next, you will use many boxes together in print. 🤝
Learn Python with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 35
- Lessons
- 140
Frequently Asked Questions
Is the “Changing a Value” lesson free?
Yes — the full text of “Changing a Value” is free to read here on the web. 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. The Coding for Kids course includes 4 lessons in total.
What will I learn in “Changing a Value”?
Update what a variable remembers. 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, so you can start here or from the beginning and move at your own pace. This is lesson 3 of 4.
How long does the “Changing a Value” 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
- What Is a Variable?
- Naming Your Variables
- Changing a Value
- Using Variables Together