Using Iteration (For Loops) - Word Drop
Drop the words into the correct position in the paragraph. Press submit to check your answers.
Drawing a shape one line at a time makes your code very long. A ______ runs the same block of code more than once, so the program is shorter to write and more ______. A for loop repeats a fixed number of times, so it is a ______ loop. It is written as for i in range(n). The for line must end with a ______. The code that repeats must start with spaces, so it is ______ under the for line.
The number inside ______ sets how many times the loop repeats. To draw a regular shape, repeat once for each side and turn by the ______, which is 360 divided by the number of sides. A circle is drawn by repeating ______ times, moving forward 1 and turning right 1 degree.
If a shape comes out wrong, check the number of repeats and the turn. A range with no number inside, such as range(), is ______, so the loop does not work. To draw separate shapes in one loop, lift the pen with ______ and put it down again before the next shape.
Log in or sign-up to access the word drop
Don't have a login?
You can still revise this topic