The Maze Game
In this task we have given you a starter program. It is a very simple game where you win if you find a pot of gold in the middle of a maze. Your task is to extend this what the program can do.
Watch the following video clip to see the starter program in action.
Your task is to extend this starter program to include more challenge and more twists and turns! Perhaps you could add three directions to choose from, or more choices to make.
After you have made some extensions you might like to use the random function. This will make your program more fun as the computer will randomly decide whether the option chosen by the user leads to the pot of gold or to a trap door!
To do this the following information will be useful.
import randomneeds to be added at the top of the program
random.randint(1,5)will generate a random number between 1 and 5
random.choice(["a","b","c"])will generate a random choice of either a, b or c
- 1. Introduction to Python
- 2. Data types and Operators
- 3. String Operation and Math Unit Exercises
- 4. The IF Statement
- 5. More on IF
- 6. The Maze Game
- 7. Selection Exercises
- 8. FOR Loops
- 9. While Loops
- 10. Making a quiz
- 11. Iteration Exercises
- 12. Lists, Functions and Files
- 13. Creating a list
- 14. Lists with a FOR Loop
- 15. List operations
- 16. Consolidation
- 17. Lists Exercises
- 18. Functions
- 19. Parameters
- 20. Functions with parameters
- 21. Menu Program
- 22. Functions Exercises
- 23. Reading from a file
- 24. Reading from a file - Part 2
- 25. Writing to a file
- 26. Extending the Quiz