Fixed+Loops

Doing something a fixed number of times

If you want a program to do something several times, you can use a loop i.e. print a warning on the screen three times:

Do Not Enter

Do Not Enter

Do Not Enter

Here you can use a 'Fixed Loop'. A loop will do something more than once. In this situation we know how many times the message is to be printed i.e. three, so we say the number of loops is fixed, it will never print the message twice, or four times, it will always be three.



For example: The code below will make the sprite 'meow' 5 times and then it will stop. It will always happen 5 times and only 5 times.



Hint: He should be upside down! ||
 * ~ Task  [[image:task.jpg width="279" height="300"]] ||
 * The challenge here is to get the sprite to rotate through 180 degrees, not just once but get it to do it 5 times!