top of page


Image by Jonathan Kemper

You are in a Harry Potter land full of dragons. In front of you

 you see two caves. In one cave, the dragon is friendly and will share his treasure with you. The other dragon is greedy and hungry and will eat you on sight. 

Give user (Harry and his friends) a choice to pick the cave and display their  fate.

Plan for the program with a flow chart.

1.Create a function to display the intro for user

2.Create a function for user input and choice. Which cave will you go into? (1 or 2)

3. Create a function to check if user input will lead to bad        dragon or good dragon randomly. Every time user plays the game the result should be different.

First Display

You approach the cave...

 It is dark and spooky...

 A large dragon jumps out in front of you! He opens his jaws and...

Use time module to display the above one line at a time after a second each.

Check for user choice and display ‘eats you up’ or ‘shares his treasure’

4. Give user an option to play game again.

bottom of page