Download presentation
Presentation is loading. Please wait.
1
random number between 1 and 5.
This is a guessing game problem - the audio was a problem so the 10:00 class would be better to listen to and obviously therefore to look at the accompanying Smartboard.
2
Note undefined in box.
3
Since I did not give the box an initial value by putting 0 or "" in the prompt then you see undefined.
6
Now I am adding a loop so I can guess until I get the right answer.
7
Within the loop you need to do something to change the condition to let you out. I changed myGuess with the prompt and user input.
8
The next program allows you to choose to play the game again.
9
Leave if you enter N.
11
game.
12
Start of the solution.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.