wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

2.3.1 For Loops Check for Understanding

Total questions: 8

Worksheet time: 4mins

Name
Class
Date
1.

Which of the following is NOT a reason for loops are useful when writing code?

a)

Loops help us write the same program with fewer lines of code

b)

Loops let us make shapes of multiple sizes

c)

Loops make it easier to alter code once it’s written

d)

Loops make our code easier to read

2.

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?

a)

1 line

b)

3 lines

c)

10 lines

d)

30 lines

3.

How many times will the loop in the code be executed?

a)

4 times

b)

8 times

c)

10 times

d)

50 times

4.

Which lines of the code below will be repeated 4 times?

a)

3 and 4

b)

2, 3, and 4

c)

3, 4, and 5

d)

3, 4, 5, and 6

5.

Why do certain words change color in Python?

a)

To show that they are recognized as keywords

b)

To tell you that these words cannot be used in Python code

c)

To show you that these words can be clicked

d)

To tell Python to skip these words when running the code

6.

What is the purpose of the 'penup()' function in the code?

a)

To start drawing

b)

To stop drawing

c)

To change the pen color

d)

To increase the pen size

7.

What does the 'circle(25)' function do in the code?

a)

Draws a square with side 25

b)

Draws a circle with radius 25

c)

Moves forward by 25 units

d)

Draws a line of length 25

8.

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?

a)

4 times

b)

8 times

c)

10 times

d)

50 times