Use a Repeat loop that runs a fixed number of times instead of forever.
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 number variable called seconds.
- Inside the loop we set seconds back to 0.
- Behind it we add a Repeat loop of 10 turns.
- Inside the Repeat we wait one second.
- Behind the delay we set seconds to a sum.
- The sum is seconds plus 1, so it counts up to 10.
- On the dashboard we draw a label and name it Seconds:
- And we drag the variable seconds onto the label.
When you finish, the app takes you straight to the next tutorial in the path.