The Rules
How the game works.
The Rules is a free Coding for Kids lesson on CoddyKit — lesson 1 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.
Rock, Paper, Scissors! ✊✋✌️
Hi player! ✊✋✌️ Let's build the classic game Rock, Paper, Scissors! You against the computer!
First, let's learn the rules and set up our game!
print('Welcome to Rock, Paper, Scissors! ✊✋✌️')How to Win 🏆
Here are the rules:
- Rock ✊ beats Scissors ✌️ (rock smashes scissors!)
- Scissors ✌️ beats Paper ✋ (scissors cut paper!)
- Paper ✋ beats Rock ✊ (paper wraps rock!)
Same choice = a tie! 🤝
print('Rock beats Scissors ✊✌️')
print('Scissors beats Paper ✌️✋')
print('Paper beats Rock ✋✊')Storing Choices in Words 📦
We'll keep the choices as words in boxes (variables): 'rock', 'paper', or 'scissors'. 📦
player = 'rock'
print('You chose', player, '✊')Ask the Player 🗣️
We use input() to ask the player what they pick! 🗣️
player = input('Pick rock, paper, or scissors: ')
print('You picked', player)Show Their Choice 👀
Let's show the player's choice with a matching emoji so it feels real! 👀
player = 'paper'
if player == 'paper':
print('You chose paper! ✋')Match Word to Emoji 🎨
We can show the right emoji for each choice using if and elif! 🎨
player = 'scissors'
if player == 'rock':
print('✊')
elif player == 'paper':
print('✋')
elif player == 'scissors':
print('✌️')Check for Silly Input 🤪
What if someone types 'banana'? 🍌 We can check if the choice is valid and give a friendly message! 🤪
player = 'banana'
if player == 'rock' or player == 'paper' or player == 'scissors':
print('Good choice! 👍')
else:
print('Please pick rock, paper, or scissors! 🙂')The or Word 🔗
That or word lets us check MANY things at once! "Is it rock OR paper OR scissors?" 🔗 If any is true, it counts!
color = 'blue'
if color == 'blue' or color == 'green':
print('Cool color! 🎨')Lowercase Helper 🔡
People might type 'ROCK' or 'Rock'. We can make everything lowercase with .lower() so it always matches! 🔡
player = 'ROCK'
player = player.lower()
print('Cleaned up:', player)Setting Up the Game 🎮
Let's put the start together: greet, ask, clean up, and confirm the choice! 🎮
print('Rock, Paper, Scissors! ✊✋✌️')
player = input('Your pick: ')
player = player.lower()
print('You chose', player)Rules Master! 🚀
Now you know the rules and how to get the player's choice! 🚀 Next we'll let the computer make its OWN secret choice!
player = 'paper'
print('You are ready to play with', player, '! ✋')Quick Check! 🧠
Test your knowledge of the rules! ✊✋✌️
Rules Champion! 🎉
Awesome! 🎉 You know the rules and setup!
- Rock beats Scissors, Scissors beats Paper, Paper beats Rock 🔁
- Store choices as words 📦
orchecks many things at once 🔗.lower()cleans up the input 🔡
Next: the computer picks its move! 🤖
print('Let the games begin! ✊✋✌️')Frequently asked questions
Is the “The Rules” lesson free?
Yes — the full text of “The Rules” 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 “The Rules”?
How the game works. 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 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The Rules” 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.