0Pricing
Coding for Kids · Lesson

Tracking Dice Points

Track points.

Tracking Dice Points 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.

Keep Score! 📊

A game is more fun when you keep points! 🏆 Let's add up your dice rolls into a score.

Start at Zero 0️⃣

Every score starts at 0. Make a points box.

points = 0
print('Score:', points)

Add a Roll ➕

Roll a die and add it to your points!

import random
points = 0
roll = random.randint(1, 6)
points += roll
print('You rolled', roll, 'Score:', points)

Add Another Roll 🎲

Keep adding rolls to grow your score.

import random
points = 0
points += random.randint(1, 6)
points += random.randint(1, 6)
print('Score after 2 rolls:', points)

Loop to Add Rolls 🔂

Use a loop to roll and add points many times!

import random
points = 0
for i in range(3):
    points += random.randint(1, 6)
print('Total score:', points)

Show Each Step 👀

Print the score growing after each roll!

import random
points = 0
for i in range(3):
    roll = random.randint(1, 6)
    points += roll
    print('Rolled', roll, '- score is now', points)

Two Players 🧑‍🤝‍🧑

Give each player their own score box!

import random
alex = random.randint(1, 6)
sam = random.randint(1, 6)
print('Alex:', alex, 'Sam:', sam)

Who's Winning? 🥇

Compare scores to see who is ahead!

alex = 8
sam = 5
if alex > sam:
    print('Alex is winning! 🥇')
else:
    print('Sam is winning! 🥇')

It's a Tie! 🤝

What if scores are equal? Check for a tie!

alex = 7
sam = 7
if alex == sam:
    print('It is a tie! 🤝')

Bonus Points! ⭐

Roll a 6? Give bonus points!

import random
points = 0
roll = random.randint(1, 6)
points += roll
if roll == 6:
    points += 5
    print('Bonus! +5 ⭐')
print('Score:', points)

Full Score Round 🎯

Roll 5 times and show your final score!

import random
points = 0
for i in range(5):
    points += random.randint(1, 6)
print('Final score:', points, '🎯')

Quick Check ✅

Why do we start points = 0?

Score Keeper! 🏆

Awesome! You learned to:

  • Start a score at 0 0️⃣
  • Add each roll with +=
  • Compare players to find the winner 🥇
  • Give bonus points ⭐

Next: build the full First to Twenty game! 🎮

Frequently asked questions

Is the “Tracking Dice Points” lesson free?

Yes — the full text of “Tracking Dice Points” 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 “Tracking Dice Points”?

Track points. 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 “Tracking Dice Points” 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. Rolling One Die
  2. Rolling Two Dice
  3. Tracking Dice Points
  4. First to Twenty
← Back to Coding for Kids