Choose Your Own Adventure
posted by: Ms. Martin
3 April 2011
No Comment
You will write a text-based adventure game in Python. The story line is entirely up to you, so have some fun with it! In a text-based adventure game, information about the state of the world is printed out to the user and the user is given options to act. For example:
What would you like to do? 1) Go North 2) Go West 3) Open mailbox
3
You open the mailbox and see mail...
Goals
You now have quite a bit of Python under your belt and it’s time to put it all together and consolidate your knowledge before moving on to even more exciting things. Specifically, this is a good exercise for making sure you are very comfortable with the idea of Python ‘container’ statements that control other statements (loops and conditionals).
Adventure Ideas
- A day at Garfield
- Solve the robbery
- Journey to another planet
- Find the treasure
Requirements
- The story must be appropriate
- Your program must have a comment at the top
- There must be something the user can type that always exits (“Quit” or “bail” or “get me out”) …
- You must use at least three variables (Name, age, score, shoe_color, number of jewels found, number of classes stayed awake in…)
- You must have at least one complex condition (If my health is less than 5 and I get attacked by a bear, I die)
- There must be at least one way to die and at least one way to win (Save the princess, get the date to prom, get eaten by a dinosaur, eat poison)
- It must be possible to keep playing the game forever (type ‘again’ to play again)
- There must be at least one “puzzle” the user has multiple tries to get
What is 2 * 5? 3
No, try again! 6
No, try again! 10
Please try to make it more fun than multiplication!




