Lesson 1 (Dice Roll Guesser)
Lesson 1 (Dice Roll Guesser)
Today's objective is to create a mini game that produces the below output.
Learning Intention:
- I can construct a decision tree diagram to show the logic in my dice roll guesser.
- I can follow the steps below to create a functioning dice roll guesser.
- Ext. I can add additional features to my game to enhance the user experience
| Activity | Description | Assessment Criteria |
|---|---|---|
| Decision Tree |
The below decision tree clearly demonstrates the different elements of the dice roll guesser game.
Activity: Copy the above decision tree for the dice roll guesser. The decision tree should clearly show the flow of your program and the user's inputs. Remember to use the accurate conventions including:
|
purposeful design of algorithms and game map.
|
| Creating the game |
Step 1: Creating the game loop
Step 2: Checking the user input against the dice roll Before we check the user input and dice roll, we need to make sure the users lives are set to 3 at the beginning of the program. We do this by creating a variable and setting the value. Now we can check to see if the user has guessed correctly or incorrectly. An if statement inside our while loop with a condition that the user_guess == roll_result will check whether the user has won. |
proficient implementation of game that includes functioning and purposeful use of iteration, conditional statements, variables and user input. |