Random Choices
Pick from a list.
Random Choices 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.
Random Choices 🎁
Sometimes we want a surprise from a list, not just a number. Meet random.choice! 🎉
Pick One 👉
random.choice grabs one random item from a list.
import random
fruits = ["apple", "banana", "cherry"]
print(random.choice(fruits))Pick a Color 🌈
Let Python choose a color for you!
import random
colors = ["red", "blue", "green", "pink"]
print(random.choice(colors))Yes or No 🤷
Choose between just two options.
import random
print(random.choice(["Yes", "No"]))Random Friend 🧑🤝🧑
Pick who goes first in a game!
import random
friends = ["Mia", "Leo", "Zoe"]
print(random.choice(friends), "goes first!")Pick Many 🎰
random.choices (with an s!) picks several, and can repeat.
import random
print(random.choices([1, 2, 3], k=3))Random Emoji 😀
Surprise yourself with an emoji!
import random
faces = ["😀", "😎", "🤖", "🦄"]
print(random.choice(faces))Save the Pick 💾
Store the chosen item to use it.
import random
snack = random.choice(["chips", "cookie"])
print("You get a", snack)Pick a Number Word 🔢
Lists can hold numbers too!
import random
print(random.choice([10, 20, 30]))Random Animal 🐾
Make a surprise animal appear!
import random
animals = ["cat", "dog", "fox"]
print("A wild", random.choice(animals), "appears!")Choices Everywhere 💡
Use random.choice for spinners, draws, and decisions. Anytime you have a list of options! 🎡
Quick Check ✅
Choice brain snack! 🍪
Choice Champion! 🌟
You can grab a surprise from any list with random.choice. Build spinners and lucky draws now! 🎡🎉
Frequently asked questions
Is the “Random Choices” lesson free?
Yes — the full text of “Random Choices” 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 “Random Choices”?
Pick from a list. 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 “Random Choices” 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
- The random Module
- Random Numbers
- Random Choices
- A Fortune Teller