NEW
Font size
WorksheetsTracey the Turtle
Total questions: 25
Worksheet time: 13mins
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
Answered
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
The setposition() command moves Tracy to a coordinate and:
turns her to face down
turns her to face up
turns her to face left
does not turn her
If I use the command right(180), which way will Tracy turn?
She will turn to face up
She will turn to face left
She will turn in a circle
She will turn around
Which of the names below follow all naming rules?
make_square
Draw a Circle
my_function
4_circles
How would I change Tracy’s trail to a yellow line with a thickness of 10 pixels?
Color(Yellow) thickness(10)
color(“yellow”) pensize(10)
color yellow() pensize(10)
color yellow(): pensize(10)
Top Down Design makes it easier to solve a problem by:
Starting with the biggest function and then moving to smaller ones
Making each function hold only one command
Starting your code from the first command
Breaking the problem down into smaller parts
Variables allow us to:
Name different parts of our programs
Use english words to communicate with Tracy
Store information to use in our programs
Change the words Tracy recognizes
How would I collect a number from the user to use for the radius of a circle?
int(input("What is the radius?: "))
radius = int("What is the radius?: ")
radius = int(input("What is the radius?: "))
radius = int input("What is the radius?: ")
The name color cannot be used for our variable because:
Variable names cannot only be 1 word
The word color is already used as a Tracy command
The word color needs to be capitalized to be used as a variable name
Variable names must include underscores
Why are parameters useful?
They allow us to tailor functions to be used in multiple situations
They allow us to change the order of commands in a function
They give us the ability to use variables in loops
They allow the user to give input
How many parameters can we use in each function?
1
2
2
many as we need
What is the default starting value of i in a for loop?
0
1
2
10
What will the values of i be at each iteration of the loop below?
(for i in range(3)
1, 2, 3
0, 1, 2, 3
0, 1, 2
2, 3
What will the values of i be at each iteration of the loop below?
for i in range (2, 10, 2):
0, 2, 4, 6, 8
2, 3, 4, 5, 6, 7, 8, 9
2, 4, 6, 8
2, 4, 6, 8, 10
How would I tell Tracy to move forward 100 pixels?
forward 100
move(100)
Tracy, move forward 100 pixels
forward(100)
When Tracy is facing right, from what location does she start drawing her circle?
The top of the circle
The bottom of the circle
The left side of the circle
The middle of the circle
Where does Tracy always start in the grid world?
At the (0,0) coordinate in the bottom left hand corner of the canvas
At the (-200,-200) coordinate in the bottom left hand corner of the canvas
At the (0,0) coordinate in the middle of the canvas
At the (-200,-200) coordinate in the middle of the canvas
What are the dimensions of Tracy’s world?
200 pixels x 200 pixels
400 pixels x 200 pixels
400 pixels x 400 pixels
200 pixels x 400 pixels
Which commands would move Tracy forward 100 pixels?
A. forward(100)
B. backward(-100)
C. forward(-100)
A, B, and C
A only
B and C
A and B
How far does Tracy need to move from the starting position to reach the right side of the canvas?
100 pixels
200 pixels
400 pixels
500 pixels
If you want Tracy to move forward 100 pixels without making a line, what set of commands should you write?
penup()
forward(100)
forward(100)
penup()
penup(100)
forward(-100)
Tracy always starts facing which direction?
North
South
East
West
If Tracy started facing right, which direction would she be facing after we ran the following code?
Up
Down
Right
Left
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
