Presentation is loading. Please wait.

Presentation is loading. Please wait.

random number between 1 and 5.

Similar presentations


Presentation on theme: "random number between 1 and 5."— Presentation transcript:

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.

4

5

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.

10

11 game.

12 Start of the solution.


Download ppt "random number between 1 and 5."

Similar presentations


Ads by Google