Goal: To blink "Hello World" 10 times.
A repeat loop is a statement that allows code to be executed for given number of times. The repeat construct consists of a block of statements and a counter value. The counter value is incremented from zero for each block of execution. The statements are executed till the counter value is reached.
Syntax:
repeat (counter) { statements; }
On the actions window, there is a button on the upper right hand corner with a "#" and a circle on it. This is a repeat block.
Click on that to get two blocks on the screen. The top one receives a counter value and everything between it and the bottom block executes till it counter value is reached.
Click on the red arrow on the while block. Click on the "#" block to give counter a numeric value 10.
Add blocks to blink "Hello World" between the two blocks for repeat. The complete program is shown below.