(set: $number to (random: 1,100))
Welcome to a number guessing game. I am thinking of a number between 1 and 100. You will be asked to guess it. I will tell you if your guess is higher or lower than the number I've chosen. You win by guessing my number.
[[let's goooo]](set: $guess to (prompt: "What number do you guess?","0"))
(set: $guess to (num: $guess))
(if: $guess is $number)[(goto: "win")]
(if: $guess is >$number)[(goto: "too high")]
(if: $guess is <$number)[(goto: "too low")]Hooray! You guessed the correct number. Your prize is the following statistic:
It took you (print: (history:)'s length-1) turn(s) to guess the correct number.(set: $guess to (prompt: "Too high! Try again. What number do you guess?","0"))
(set: $guess to (num: $guess))
(if: $guess is $number)[(goto: "win")]
(if: $guess is >$number)[(goto: "too high")]
(if: $guess is <$number)[(goto: "too low")](set: $guess to (prompt: "Too low! Try again. What number do you guess?","0"))
(set: $guess to (num: $guess))
(if: $guess is $number)[(goto: "win")]
(if: $guess is >$number)[(goto: "too high")]
(if: $guess is <$number)[(goto: "too low")]