✨
This commit is contained in:
10
examples/guessing_game.plthy
Normal file
10
examples/guessing_game.plthy
Normal file
@ -0,0 +1,10 @@
|
||||
hello|
|
||||
$do random<1;128;> -> n|
|
||||
$0 -> guess|
|
||||
until variable guess = variable n [
|
||||
$do input<'guess: ';> -> guess|
|
||||
do print<'too high';> if variable guess > variable n|
|
||||
do print<'too low';> if variable guess < variable n|
|
||||
do print<'correct!';> if variable guess = variable n|
|
||||
]|
|
||||
goodbye|
|
Reference in New Issue
Block a user