Choose Your Own Adventure
Learn how to combine functions, input, and logic into a simple game.
We'll cover the following
Now that you can build your functions and take input, let’s make something fun: a mini adventure game in which the user chooses the story!
This lesson combines everything we’ve learned: input()
, variables, if
/else
, and functions.
Our first story path
Let’s create a mini game where we write a function that asks the player to make a choice and reacts based on their answer.
We’ll focus on:
How the
input()
is used inside the function.How the
if
,elif
, andelse
statements decide the outcome.
Get hands-on with 1400+ tech skills courses.