REPETITION is a very useful function on coding and saves time rather than doing a long list of code. The basic idea is that you can have a variable and then write code so the variable increases by 1 (or another number) until a certain number is reached.
Example: To get Scratch to work out the 5x table
- Declare a variable called MULTIPLIER
- Make MULTIPLIER = 0
- Work out 5 x MULTIPLIER
- PRINT the answer
- Add 1 to MULTIPLIER
- Repeat steps 3 – 5
- STOP the code when MULTIPLIER = 12
This is how the code looks like in Scratch.