wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Intro to Programming: Tracy the Turtle 2

Total questions: 8

Worksheet time: 14mins

Name
Class
Date
1.

Which code makes Tracy move forward 10, then turn left and move forward 20?

a)

distance = 10

forward(distance)

left(90)

distance = distance * 2

forward(distance)

b)

distance = 10

forward(distance)

left(90)

forward(distance)

c)

distance = 10

distance = distance * 2

forward(distance)

left(90)

forward(distance)

d)

distance = 10

forward(distance)

left(90)

forward(distance)

distance = distance * 2

2.

Variables allow you to do what?

a)

Name different steps within code

b)

Use a convenient name to store information in code

c)

Name functions

d)

Use English words to control the computer

3.

Which code would produce this output?

a)
b)
c)
d)
4.

What statement collects a number from the user and places it in a variable?

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?: “)

5.

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: “)

6.

Why are parameters useful?

a)

They allow you to use the same function code for many different sets of input values

b)

They allow a function to execute more quickly

c)

They give the ability to create while loops

d)

They let users execute the function without any input

7.

How many parameters may be defined for a single function?

a)

1

b)

2

c)

3

d)

Any number

8.

What is the best example of how to use a function to draw a square with sides that are 50 pixels long?

a)
b)
c)
d)