Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming with Turtle Graphics Review 2

Total questions: 24

Worksheet time: 13mins

Name
Class
Date
1.

What punctuation is needed to begin a multi-line comment?

a)

#

b)

"

c)

"""

d)

*

2.

Comments are:

a)

Written for humans to read and understand

b)

Only needed when a program is over 50 lines

c)

Commands performed by the computer

d)

Always blue when Python recognizes them

3.

What symbol is used at the beginning of an in-line comment?

a)

"

b)

!

c)

#

d)

:

4.

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

5.

Which of the names below follow all naming rules?

a)

my_function

b)

Draw a Circle

c)

4_circles

d)

make_square

6.

Which of the following is NOT a way functions make our code more readable?

a)

Function names can describe what the function is completing

b)

Functions break our code into smaller, separate parts

c)

Each function only contains one command

d)

Functions shorten our code by reusing code that has already been written

7.

What two things must be included in your function definition?

a)

A function name and commands to be performed

b)

Function variables and commands to be performed

c)

Commands to be performed and function arguments

d)

A function name and function variables

8.

Which is the proper way to call the function three_circles?

a)

def three_circles:

b)

three_circles():

c)

def three_circles():

d)

three_circles()

9.

How would I change Tracy’s trail to a yellow line with a thickness of 10 pixels?

a)

Color(Yellow)

thickness(10)

b)

color(“yellow”)

pensize(10)

c)

color yellow()

pensize(10)

d)

color yellow():

pensize(10)

10.

What would be the output of the following command?

circle(50,180,3)

a)

b)

c)

d)

11.

What is true of Tracy’s color command?

a)

You can only use hex color codes

b)

There are 10 different colors that Tracy knows

c)

The color name must have underscores between words (ex: light_blue)

d)

The color name must be in quotation marks

12.

What would be the output of the following command?

circle(50,360,5)

a)

b)

c)

d)

13.

What is the correct way to draw a circle that is filled in?

a)

begin_fill()

circle(20)

end_fill()

b)

circle(20)

begin_fill()

end_fill()

c)

circle(begin_fill, 20, end_fill)

d)

circle(20)

end_fill()

14.

Which of the following is NOT an example of using Top Down Design?

a)

Breaking a large code up into functions

b)

Writing code for one part of a function before tackling the whole thing

c)

Using descriptive names for variables

d)

Separating a large problems into smaller ones

15.

Top Down Design makes it easier to solve a problem by:

a)

Breaking the problem down into smaller parts

b)

Starting your code from the first command

c)

Starting with the biggest function and then moving to smaller ones

d)

Making each function hold only one command

16.

Which of the following programs would produce this output?

a)

b)

c)

d)

17.

Variables allow us to:

a)

Name different parts of our programs

b)

Use english words to communicate with Tracy

c)

Store information to use in our programs

d)

Change the words Tracy recognizes

18.

Which program will have Tracy move forward 10, then turn left and move forward 20?

a)

b)

c)

d)

19.

How would I collect a number from the user to use for the radius of a circle?

a)

int(input("What is the radius?: "))

b)

radius = int("What is the radius?: ")

c)

radius = int(input("What is the radius?: "))

d)

radius = int input("What is the radius?: ")

20.

What is the correct way to ask a user for a color and store the answer as a variable?

a)

color = input("Give a color: ")

b)

user_color = "Give a color: "

c)

input("Give a color: ")

d)

user_color = input("Give a color: ")

21.

The name color cannot be used for our variable because:

a)

Variable names cannot only be 1 word

b)

The word color is already used as a Tracy command

c)

The word color needs to be capitalized to be used as a variable name

d)

Variable names must include underscores

22.

How many parameters can we use in each function?

a)

1

b)

2

c)

4

d)

As many as we need

23.

Why are parameters useful?

a)

They allow us to tailor functions to be used in multiple situations

b)

They allow us to change the order of commands in a function

c)

They give us the ability to use variables in loops

d)

They allow the user to give input

24.

What is the best way to write a program that uses parameters to draw a square with sides that are 50 pixels long?

a)

b)

c)

d)