wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CODEHS 9th PHYTON 1.1 - 3.3

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

How would I tell Tracy to move forward 100 pixels?

a)

forward 100

b)

move(100)

c)

Tracy, move forward 100 pixels

d)

forward(100)

2.

When using the circle() command, what value do we put inside the parentheses?

a)

The radius of the circle

b)

The center of the circle

c)

The diameter of the circle

d)

The width of the circle

3.

When Tracy is facing right, from what location does she start drawing her circle?

a)

The top of the circle

b)

The bottom of the circle

c)

The left side of the circle

d)

The middle of the circle

4.

Where does Tracy always start in the grid world?

a)

At the (0,0) coordinate in the bottom left hand corner of the canvas

b)

At the (-200,-200) coordinate in the bottom left hand corner of the canvas

c)

At the (0,0) coordinate in the middle of the canvas

d)

At the (-200,-200) coordinate in the middle of the canvas

5.

What are the dimensions of Tracy’s world?

a)

200 pixels x 200 pixels

b)

400 pixels x 200 pixels

c)

400 pixels x 400 pixels

d)

200 pixels x 400 pixels

6.

Which commands would move Tracy forward 100 pixels?

A. forward(100)

B. backward(-100)

C. forward(-100)

a)

A, B, and C

b)

A only

c)

B and C

d)

A and B

7.

How far does Tracy need to move from the starting position to reach the right side of the canvas?

a)

50 pixels

b)

100 pixels

c)

200 pixels

d)

400 pixels

8.

If you want Tracy to move forward 100 pixels without making a line, what set of commands should you write?

a)

penup()

forward(100)

b)

forward(100)

penup()

c)

penup(100)

d)

forward(-100)

9.

Tracy always starts facing which direction?

a)

North

b)

South

c)

East

d)

West

10.

If Tracy is facing right, which of the following commands can be used to turn her to face up?

A. left(90)

B. turn(up)

C. right(-90)

D. setposition(90)

a)

A only

b)

A and C

c)

A, B, and C

d)

A, B, C, and D

11.

If Tracy started facing right, which direction would she be facing after we ran the following code?

1 left(90)

2 left(90)

3 right(90)

a)

Up

b)

Down

c)

Right

d)

Left

12.

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

13.

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 for i in range(3):

circle(25)

forward(50)

a)

1 line

b)

3 lines

c)

10 linees

d)

30 lines

14.

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

15.

Why do certain words change color in Python?

a)

To show that they are recognized as key words

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

16.

If I use the command right(180), which way will Tracy turn?

a)

She will turn in a circle

b)

She will turn around

c)

She will turn to face up

d)

She will turn to face left

17.

The setposition() command moves Tracy to a coordinate and:

a)

turns her to face left

b)

does not turn her

c)

turns her to face up

d)

turns her to face down

18.

If you wanted Tracy to complete her command immediately, which speed value would you use?

a)

0

b)

1

c)

5

d)

10

19.

Which of the names below follow all naming rules?

a)

my_function

b)

Draw a Circle

c)

4_circles

d)

make_square

20.

If I am creating a function that is going to draw 2 squares, which of the following would be the best name option?

a)

Draw_Two_Squares

b)

draw_squares

c)

draw_shapes

d)

2_squares