Join two comparisons with the logical And to know whether a number is between 10 and 20.

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

  1. We add a While loop, which repeats forever.
  2. We create a number variable called number.
  3. We create another number variable called inside.
  4. Inside the loop we set inside to an And block.
  5. In the first slot of the And we put a greater-than comparison.
  6. That comparison says number is greater than 10.
  7. In the second slot of the And we put a less-than comparison.
  8. That other one says number is less than 20.
  9. On the dashboard we put a slider and give it the variable number.
  10. We add a label with inside, which is 1 only when it is in range.

When you finish, the app takes you straight to the next tutorial in the path.

Build it in Nairda