Video games can be hard. But not this one!
In the editor below, fill in the blanks (________
) so that the program asks the user to type w
to win, and if they do, print back You win!
and loop according to the flowchart below:
Remember to use the Python reference sheet to help you with your code! Click on one of the buttons below:
w
in order to win the game and then display the text You win!
onto the screen if they do. If the user types anything else, then the program should print Game over!
and stop.label
and goto
to create the loop. You can name your label
whatever you want, but make sure your goto
statement is exactly the same!Below is an example of how the program should run:
Type 'w' to win: w
You win!
Type 'w' to win: w
You win!
Type 'w' to win: w
You win!
Type 'w' to win: f
Game over!
Need some help? Click here to reveal a video walkthrough for this task!
You must be logged in to post a comment.