0Pricing
Coding for Kids · Lesson

Computer Picks

Random computer choice.

Computer Picks is a free Coding for Kids lesson on CoddyKit — lesson 2 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.

The Computer's Turn! 🤖

Hi coder! 🤖 In Rock, Paper, Scissors, the COMPUTER needs to pick too! And it should be a surprise, just like a real opponent! 🎲

Let's teach the computer to choose!

print('I am the computer. Let me pick! 🤖')

A List of Choices 📋

First we make a list of the three choices. A list holds many items inside square brackets [ ]! 📋

choices = ['rock', 'paper', 'scissors']
print('My options:', choices)

Bring in random 📦

To pick randomly, we need the random toolbox again! Import it at the top. 📦

import random
print('Random toolbox loaded! 🧰')

random.choice Picks One 🎯

The tool random.choice grabs ONE item from a list at random! 🎯 Perfect for the computer!

import random
choices = ['rock', 'paper', 'scissors']
computer = random.choice(choices)
print('Computer picked', computer)

A Different Pick Each Time 🔄

Run this a few times! The computer's pick changes — sometimes rock, sometimes paper, sometimes scissors. 🔄

import random
choices = ['rock', 'paper', 'scissors']
print(random.choice(choices))
print(random.choice(choices))
print(random.choice(choices))

Show With an Emoji 🎨

Let's show the computer's pick with a fun emoji! We check which one it picked. 🎨

computer = 'rock'
if computer == 'rock':
    print('Computer chose ✊')
elif computer == 'paper':
    print('Computer chose ✋')
elif computer == 'scissors':
    print('Computer chose ✌️')

Keep It a Surprise! 🤫

In a real game, we let the player guess first, THEN reveal the computer's pick. Surprise makes it fun! 🤫

import random
choices = ['rock', 'paper', 'scissors']
computer = random.choice(choices)
print('I have made my choice... 🤫')

Player and Computer Both Pick 🤝

Let's get the player's choice AND the computer's choice together! 🤝 Now we have two picks to compare!

import random
choices = ['rock', 'paper', 'scissors']
player = input('Your pick: ')
computer = random.choice(choices)
print('You:', player, '| Computer:', computer)

The Big Reveal! 🎭

Drumroll please! 🥁 Reveal both picks with style and emojis! 🎭

player = 'rock'
computer = 'scissors'
print('🥁 You picked', player)
print('🥁 I picked', computer)

Computer Is Fair ⚖️

Because random.choice is random, the computer doesn't cheat! Every option has an equal chance. Totally fair! ⚖️

import random
choices = ['rock', 'paper', 'scissors']
computer = random.choice(choices)
print('Fair and square, I chose', computer, '🤖')

Computer Pick Pro! 🚀

Now the computer can make its own random choice! 🚀 Run it many times to see the surprise. Next we'll find out who WINS!

import random
choices = ['rock', 'paper', 'scissors']
computer = random.choice(choices)
print('Computer is ready with', computer, '! 🤖')

Quick Check! 🧠

Test your random-choice skills! 🎲

Computer Picks Champion! 🎉

Great job! 🎉 The computer can choose!

  • A list holds choices in [ ] 📋
  • import random loads the toolbox 📦
  • random.choice picks one at random 🎯
  • It's fair — every option has a chance ⚖️

Next: deciding the winner! 🏆

import random
choices = ['rock', 'paper', 'scissors']
print('Computer chose', random.choice(choices), '! 🤖')

Frequently asked questions

Is the “Computer Picks” lesson free?

Yes — the full text of “Computer Picks” 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 “Computer Picks”?

Random computer choice. 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 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Computer Picks” 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. The Rules
  2. Computer Picks
  3. Deciding the Winner
  4. Play Again
← Back to Coding for Kids