NEW
Font size
Worksheets2.3.1 For Loops Check for Understanding
Total questions: 8
Worksheet time: 4mins
Which of the following is NOT a reason for loops are useful when writing code?
Loops help us write the same program with fewer lines of code
Loops let us make shapes of multiple sizes
Loops make it easier to alter code once it’s written
Loops make our code easier to read
The following loop draws 3 circles on the screen. If I wanted to alter this loop to draw 10 circles, how many lines would my code be?
1 line
3 lines
10 lines
30 lines
How many times will the loop in the code be executed?
4 times
8 times
10 times
50 times
Which lines of the code below will be repeated 4 times?
3 and 4
2, 3, and 4
3, 4, and 5
3, 4, 5, and 6
Why do certain words change color in Python?
To show that they are recognized as keywords
To tell you that these words cannot be used in Python code
To show you that these words can be clicked
To tell Python to skip these words when running the code
What is the purpose of the 'penup()' function in the code?
To start drawing
To stop drawing
To change the pen color
To increase the pen size
What does the 'circle(25)' function do in the code?
Draws a square with side 25
Draws a circle with radius 25
Moves forward by 25 units
Draws a line of length 25
If Tracy starts at the left edge of the canvas and moves forward 50 pixels, how many times will this code need to be repeated to have Tracy reach the right edge of the canvas?
4 times
8 times
10 times
50 times
