forked from gulnara/unicorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
guess_game.british
39 lines (28 loc) · 869 Bytes
/
guess_game.british
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
mutter "What's your name?"
name as pardon
mutter "Hello ", name
mutter "Let's play a game! Pick any number between 1 and 20."
mutter "You have 5 tries!"
number as randomise using 1 to 20
carry on whilst guessing:
starting with
guess as 0
stop that
guess as guess plus 1
usernumber as how many
is usernumber less than number ? then:
mutter 'The number is too low. Try again.'
stop that
or perhaps usernumber is larger than number ? then:
mutter 'The number is too high. Try again.'
stop that
otherwise:
mutter 'You guessed it! Great job! You found my number!'
stop guessing
mutter "You guessed the number with this many tries: ", guess
stop that
is guess equals with 5 ? then:
stop guessing
mutter "That was your last guess."
stop that
cheerio()