Compare what the player types against a secret number and say when they get it.
This tutorial is part of the Nairda learning path. You can build it step by step inside the app, which checks every block you place before letting you move on.
The steps
- We add a While loop, which repeats forever.
- We create a text variable called message.
- We create a number variable called guess.
- Inside the loop we set guess to whatever is typed, using Wait.
- We add an If with a comparison in its condition.
- We compare the variable guess against the secret number 7.
- If they get it, we write You got it into message.
- On the dashboard we draw a terminal and give it the variable message.
When you finish, the app takes you straight to the next tutorial in the path.