0Pricing
Coding for Kids · Lesson

Making Choices

Branch the story.

Choose Your Path! 🌳

Ahoy again! 🏴‍☠️ The best adventures let YOU choose what happens next! 🌳

Today we learn to branch the story using choices and if! 🤔

print("Time to make choices! 🌳")

Offer Two Paths 🛤️

Give the player two paths to pick from! 🛤️

Then ask them which one they choose!

print("A fork in the road! 🛤️")
print("Left = cave 🕳️")
print("Right = river 🌊")
choice = input("Which way? (left/right) ")
print("You chose:", choice)

All lessons in this course

  1. Planning the Adventure
  2. Making Choices
  3. Finding Treasure
  4. Game Over
← Back to Coding for Kids