Average with a table

Split the work into four functions: clear the table, fill it with random numbers, add them up and print the average. 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 create a table called data. We create two number variables, index and result. We create a text variable called terminal. We create the four functions: clear, fill, compute and print. And the other two functions, compute and print. In the clear canvas we empty the terminal. Behind it we add a Repeat. It runs as many times as the table is wide. Inside the Repeat we remove one column, so the table ends up empty. In the fill canvas we set index back to 0. Behind it a Repeat of 10 turns, one per number. Inside it we write a random number into the table. The random number goes from 0 to 100. The column it writes into is the variable index. Behind it we add a Set with an operation inside. The operation adds one to index, to move to the next column. And we add a new column, so there is room for the next one. In the compute canvas we set index back to 0. Behind it a Repeat of 10 turns, one per number. Inside it we add a Set with an operation inside. What it sums is result itself, so the numbers pile up. What it adds is what the table holds at the column index. Behind it we add another Set with an operation inside. That one adds one to index, to move to the next column. After the Repeat we add one more Set, with an operation inside. We change that operation to a division. It divides result by 10, which is the average of the ten numbers. In the print canvas we set index back to 0. Behind it another Repeat of 10 turns. Inside it we add a Join, which writes into the terminal. What it writes is what the table holds. And the column it reads is the variable index. Behind it we add a Set with an operation inside. The operation adds one to index, to move to the next column. After the Repeat we write the word result. And behind it the value of result. Back in the main canvas we add a While loop, which repeats forever. Above it we call fill, which loads the table. And above that, clear, so the table starts empty. And behind them we call compute and print. On the dashboard we draw a terminal. And we drag the variable terminal onto it. When you finish, the app takes you straight to the next tutorial in the path. ...

August 12, 2026 · 3 min · 474 words · Nairda

Remote controlled car

Drive a two-motor car from a dashboard joystick, with one function per direction. 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 declare motor1 on pins 2, 3 and 4. We declare motor2 on pins 5, 6 and 7. We create the functions forward and back. And the functions right, left and stop. In the forward canvas motor1 goes at speed 50. And motor2 goes at 50 too, so the car moves forward. In the back canvas motor1 goes at speed -50. And motor2 at -50 as well, so the car reverses. In the right canvas motor1 goes at speed 50. And motor2 goes at -50, the opposite way, so the car turns. In the left canvas motor1 goes at speed -50. And motor2 at 50, the opposite way, so it turns the other side. And in the stop canvas both go at speed 0. On the dashboard we draw a joystick. Pressing up calls forward. Pressing down calls back. Pressing right calls right. Pressing left calls left. Releasing up calls stop, so the car does not run away. Releasing down calls stop too. Releasing right calls stop. And releasing left calls stop as well. When you finish, the app takes you straight to the next tutorial in the path. ...

August 12, 2026 · 2 min · 246 words · Nairda