No student devices needed. Know more
49 questions
How would I tell Tracy to move forward 100 pixels?
forward 100
move(100)
Tracy, move forward 100 pixels
forward(100)
When using the circle() command, what value do we put inside the parentheses?
The radius of the circle
The center of the circle
The diameter of the circle
The width of the circle
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 end of the right side of the canvas?
50 pixels
100 pixels
200 pixels
400 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 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(270)
D. setposition(90)
A only
A and C
A, B, and C
A, B, C, and D
If Tracy started facing right, which direction would she be facing after we ran the following code?
Up
Down
Right
Left
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
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 line
3 lines
10 lines
30 kines
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
Which lines of the code below will be repeated 4 times?
3 and 4
2, 3, and 4
3, 4, and 5
3, 4, 5, and 6
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
If I use the command right(180), which way will Tracy turn?
She will turn in a circle
She will turn around
She will turn to face up
She will turn to face left
The setposition() command moves Tracy to a coordinate and:
turns her to face left
does not turn her
turns her to face up
turns her to face down
If you wanted Tracy to complete her command immediately, which speed value would you use?
0
1
5
10
If you want three circles to be drawn next to each other (as seen in the image below), after drawing the first circle, how far would you need to move Tracy before drawing the next circle?
100 pixels
50 pixels
The circle’s radius
The circle’s diameter
Comments are:
Written for humans to read and understand
Only needed when a program is over 50 lines
Commands performed by the computer
Always blue when Python recognizes them
What symbol is used at the beginning of an in-line comment?
"
!
#
:
What punctuation is needed to begin a multi-line comment?
#
"
" " "
*
Which of the names below follow all naming rules?
my_function
Draw a Circle
4_circles
make_square
If I am creating a function that is going to draw 2 squares, which of the following would be the best name option?
Draw_Two_Squares
draw_squares
draw_shapes
2_squares
Which of the following is NOT a way functions make our code more readable?
Function names can describe what the function is completing
Functions break our code into smaller, separate parts
Each function only contains one command
Functions shorten our code by reusing code that has already been written
What two things must be included in your function definition?
A function name and commands to be performed
Function variables and commands to be performed
Commands to be performed and function arguments
A function name and function variables
Which is the proper way to call the function three_circles?
def three_circles:
three_circles():
def three_circles():
three_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)
What is true of Tracy’s color command?
You can only use hex color codes
There are 10 different colors that Tracy knows
The color name must have underscores between words (ex: light_blue)
The color name must be in quotation marks
What is the correct way to draw a circle that is filled in?
begin_fill() circle(20)
end_fill()
circle(20) begin_fill() end_fill()
circle(begin_fill, 20, end_fill)
circle(20)
end_fill()
What would be the output of the following command?
circle(50,360,5)
What would be the output of the following command?
circle(50,180,3)
Top Down Design makes it easier to solve a problem by:
Breaking the problem down into smaller parts
Starting your code from the first command
Starting with the biggest function and then moving to smaller ones
Making each function hold only one command
Which of the following is NOT an example of using Top Down Design?
Breaking a large code up into functions
Writing code for one part of a function before tackling the whole thing
Using descriptive names for variables
Separating a large problems into smaller ones
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
Which program will have Tracy move forward 10, then turn left and move forward 20?
distance = 10 forward(distance) left(90) distance = distance * 2 forward(distance)
distance = 10 forward(distance) left(90) forward(distance)
distance = 10 distance=
distance*2 forward(distance) left(90) forward(distance)
distance = 10 forward(distance) left(90) forward(distance) distance = distance * 2
Which of the following programs would produce this output?
square_length = 20 for i in range(4): forward(square_length) left(90) square_length = square_length * 2
square_length = 20 for i in range(4): for i in range(4): forward(square_length) left(90) square_length = square_length * 2
square_length = 20 for i in range(4): forward(square_length) left(90) square_length = square_length * 2
square_length = 20 for i in range(4): for i in range(4): forward(square_length) left(90) square_length = square_length * 2
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?: ")
What is the correct way to ask a user for a color and store the answer as a variable?
color = input("Give a color: ")
user_color = "Give a color: "
input("Give a color: ")
user_color = input("Give a color: ")
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
4
As many as needed
What is the best way to write a program that uses parameters to draw a square with sides that are 50 pixels long?
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?
1, 2, 3
0, 1, 2, 3
0, 1, 2
2, 3
What will happen when the value of i reaches 5 in the loop below?
Tracy will turn 5 degrees to the right
Tracy will turn 5 degrees to the left
Tracy will turn 90 degrees to the right
Tracy will turn 90 degrees to the left
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
What will be the output of the code below?
penup()
backward(150)
for i in range(10, 50 ,10):
forward(i * 2)
pendown()
circle(i)
penup()
Explore all questions with a free account