forked from onyudo/intro_pscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient-a.txt
More file actions
41 lines (24 loc) · 1.02 KB
/
Copy pathclient-a.txt
File metadata and controls
41 lines (24 loc) · 1.02 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
29
30
31
32
33
34
35
36
37
38
39
40
41
# Client Task A #
# Add your pseudocode to this file below this line: #
# ------------------------------------------------- #
START
Display Text "Would you like to play a game? (YES/NO)"
if answer equals "YES"
Set variable 'Winning Number' to 0
Set variable 'User Number' to 0
Update 'Winning Number' using Random Number Generate to a value between 1-10
Display Text "Pick a number between 1 and 10."
Set 'User Number' value to equal response.
if 'Winning Number' equals 'User Number' // 1st Attempt
Display Text "You Win!"
else Display Text "Guess Again."
Set 'User Number' value to equal response.
if 'Winning Number' equals 'User Number' // 2nd Attempt
Display Text "You Win!"
else Display Text "Guess Again."
Set 'User Number' value to equal response.
if 'Winning Number' equals 'User Number' // 3rd Attempt
Display Text "You Win!"
else Display Text "Game Over, You Lose."
else Display Text "Maybe Next Time."
END