





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






How would I tell Tracy to move forward 100 pixels? - ANSWER forward(100)
When Tracy is facing right, from what location does she start drawing her circle? - ANSWER The bottom of the circle
When using the circle() command, what value do we put inside the parentheses? - ANSWER The radius of the circle
How far does Tracy need to move from the starting position to reach the right side of the canvas? - ANSWER 200 pixels
If you want Tracy to move forward 100 pixels without making a line, what set of commands should you write? - ANSWER penup()
forward(100)
What are the dimensions of Tracy's world? - ANSWER 400 x 400 pixels
Which commands would move Tracy forward 100 pixels?
I. forward(100)
II. backward(-100)
III. forward(-100) - ANSWER I and II
Where does Tracy always start in the grid world? - ANSWER At the (0,0) coordinate in the middle of the canvas
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) - ANSWER Up
Tracy always starts facing which direction? - ANSWER East
If Tracy is facing right, which of the following commands can be used to turn her to face up?
I. left(90)
II. turn(up)
III. right(-90)
IV. setposition(90) - ANSWER I and II
Which lines of the code below will be repeated 4 times?
1 penup()
2 for i in range(4):
3 pendown()
4 circle(25)
5 forward(50)
6 backward(200) - ANSWER 3,4, and 5
would you use? - ANSWER 0
What symbol is used at the beginning of an in-line comment? - ANSWER #
Comments are: - ANSWER Written for humans to read and understand
What punctuation is needed to begin a multi-line comment? - ANSWER """
Which of the names below follow all naming rules? - ANSWER 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? - ANSWER draw_squares
What two things must be included in your function definition? - ANSWER A function name and commands to be performed
Which of the following is NOT a way functions make our code more readable? - ANSWER Each function only contains one command
Which is the proper way to call the function three_circles? - ANSWER three_circles()
What is true of Tracy's color command? - ANSWER The color name must be in quotation marks
How would I change Tracy's trail to a yellow line with a thickness of 10 pixels? - ANSWER color("yellow")
pensize(10)
What is the correct way to draw a circle that is filled in? - ANSWER begin_fill()
circle(20)
end_fill()
Which of the following is NOT an example of using Top Down Design? - ANSWER Using descriptive names for variables
Top Down Design makes it easier to solve a problem by: - ANSWER Breaking the problem down into smaller parts
Variables allow us to: - ANSWER Store information to use in our code
Which code will have Tracy move forward 10, then turn left and move forward 20? - ANSWER distance = 10
forward(distance)
left(90)
distance = distance * 2
forward(distance)
How would I collect a number from the user to use for the radius of a circle? - ANSWER 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? - ANSWER user_color = input("Give a color: ")
The name 'color' cannot be used for our variable because: - ANSWER The word 'color' is already used as a Tracy command
What is the limit of conditions that can be used in an if/else statement? - ANSWER unlimited
Which of the following is an example of an if/else statement scenario? - ANSWER If it is raining, bring an umbrella. If not, wear sunglasses.
Why do we use while loops? - ANSWER To repeat code an unknown number of times
How is an infinite loop created? - ANSWER By using a condition that will never become false in a while loop
Which of the following statements is true about control structures? - ANSWER If/else statements can be used inside for loops.
Which of the following does the clear command do?
I. Clears the screen of any markings left by Tracy
II. Turns Tracy to face right
III. Sends Tracy to position (0,0) - ANSWER I, only
Can a user's input control the size of a circle? - ANSWER Yes
Which of the following is NOT a command you can give to Tracy? - ANSWER turn
What does the number in the parentheses in a forward or backward command represent? - ANSWER How far Tracy is supposed to move
What shape will be drawn with the following command?
circle(50, 360, 3) - ANSWER A triangle
In which of the following situations would it be best to make a function? - ANSWER You want Tracy to draw a blue line, and your program requires lots of blue lines.
What is the difference between defining and calling a function? - ANSWER Defining a function means you are teaching the computer a new word. Calling a function means you are commanding the computer to complete defined actions.
Suppose you write a function. How many times can you call the function in your code? - ANSWER As many times as you want
Which of the statements below is true about indentation in Python? - ANSWER Indentation always matters in Python. Every statement must be aligned correctly.
Which of the following statements are true about for loops?
I. By default, the range function starts at 0
II. Using for i in range(4) will result in i taking the values 0, 1, 2, 3, 4
III. For loops let you repeat something any number of times
IV. Statements in a for loop do not need to be indented
V. It is not possible to have the range value count 6, 12, 18, 24
VI. It is not possible to have the range values count 1, 2, 4, 8, 16 - ANSWER I, III, VI