forked from CodeYouOrg/intro_pscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient-a.txt
More file actions
28 lines (20 loc) · 1.32 KB
/
client-a.txt
File metadata and controls
28 lines (20 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Client Task A #
# Add your pseudocode to this file below this line: #
# ------------------------------------------------- #
WRITE PSEUDOCODE FOR A RANDOM NUMBER GUESSING GAME ASSIGNMENT
START
Display a message inviting a player to play the game.
Prompt the player to enter their first guess using a number between 1 and 10.
Create a random number generator using numbers 1 through 10, including 1 and 10.
Next ask the number generator program to select a number between 1 and 10.
Compare the number the player entered to the random number selected by the program.
If it is a match, print out 'Congrats! That is Correct! '
Else, if it is not a match, print out, 'Sorry, that is not the number. Please enter the number for your second guess.'
Compare the number the player entered to the random number selected by the program.
If it is a match, print out 'Congrats! That is Correct! '
Else, if it is not a match, print out, 'Sorry, that is not the number. Please enter the number for your third guess.'
Compare the number the player entered to the random number selected by the program.
If the third number is a match, print out 'Congrats! That is Correct! '
Else, if it is not a match, print out, 'Sorry, you did not guess the number. Please play again.'
Wait 30 seconds, then return to the Home Display page inviting the player to play.
END