7.3.7 Owls

Question: How would I tell Tracy to move forward 100 pixels
Answer: forward(100)
==================================================
Question: When using the circle() command, what value do we put inside the parentheses?
Answer: The radius of the circle
==================================================
Question: When Tracy is facing right, from what location does she start drawing her circle?
Answer: The bottom of the circle
==================================================
Question: Where does Tracy always start in the grid world?
Answer: At the (0,0) coordinate in the middle of the canvas
==================================================
Question: What are the dimensions of Tracy's world?
Answer: 400 pixels x 400 pixels
==================================================
Question: Which commands would move Tracy forward 100 pixels?A. forward(100)B. backward(-100)C. forward(-100)
Answer: A and B
==================================================
Question: Tracy always starts facing which direction?
Answer: East
==================================================
Question: 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(-90)D. setposition(90)
Answer: A and C
==================================================
Question: If Tracy started facing right, which direction would she be facing after we ran the following code?
left(90)
left(90)
right(90)
Answer: Up
==================================================
Question: Which of the following is NOT a reason for loops are useful when writing code?
Answer: Loops let us make shapes of multiple sizes
==================================================
Question: 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?
for i in range(3):
circle(25)
forward(50)
Answer: 3 lines
==================================================
Question: 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?
Answer: 8 times
==================================================
Question: Which lines of the code below will be repeated 4 times?
penup()
for i in range(4):
pendown()
circle(25)
forward(50)
backward(200)
Answer: 3, 4, and 5
==================================================
Question: Why do certain words change color in Python?
Answer: To show that they are recognized as key words
==================================================
Question: If I use the command right(180), which way will Tracy turn?
Answer: She will turn around
==================================================
Question: The setposition() command moves Tracy to a coordinate and:
Answer: does not turn her
==================================================
Question: If you wanted Tracy to complete her command immediately, which speed value would you use?
Answer: 0
==================================================
Question: 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?
Answer: The circle's diameter
==================================================
Question: Comments are:
Answer: Written for humans to read and understand
==================================================
Question: What symbol is used at the beginning of an in-line comment?
Answer: #
==================================================
Question: What punctuation is needed to begin a multi-line comment?
"“
==================================================
Question: Which of the names below follow all naming rules?
Answer: make_square
==================================================
Question: 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
==================================================
Question: Which of the following is NOT a way functions make our code more readable?
Answer: Each function only contains one command
==================================================
Question: What two things must be included in your function definition?
Answer: A function name and commands to be performed
==================================================
Question: Which is the proper way to call the function three_circles?
Answer: three_circles()
==================================================
Question: How would I change Tracy's trail to a yellow line with a thickness of 10 pixels?
Answer: color("yellow") pensize(10)
==================================================
Question: What is true of Tracy's color command?
Answer: The color name must be in quotation marks
==================================================
Question: What is the correct way to draw a circle that is filled in?
Answer: begin_fill() circle(20) end_fill()
==================================================
Question: What would be the output of the following command?circle(50,360,5)
Answer: pentagon
==================================================
Question: What would be the output of the following command?
Answer: half of a hexagon
==================================================
Question: Top Down Design makes it easier to solve a problem by:
Answer: Breaking the problem down into smaller parts
==================================================
Question: Which of the following is NOT an example of using Top Down Design?
Answer: Using descriptive names for variables
==================================================
Question: Variables allow us to:
Answer: Store information to use in our programs
==================================================
Question: Which program 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)
==================================================
Question: Which of the following programs would produce this output?
Answer: square_length = 20 for i in range(4): for i in range(4): forward(square_length) left(90) square_length = square_length * 2
==================================================
Question: 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?: "))
==================================================
Question: 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: ")
==================================================
Question: user_color = input("Give a color: ")
Answer: The word 'color' is already used as a Tracy command
==================================================
Question: Why are parameters useful?
Answer: They allow us to tailor functions to be used in multiple situations
==================================================
Question: How many parameters can we use in each function?
Answer: As many as we need
==================================================
Question: What is the best way to write a program that uses parameters to draw a square with sides that are 50 pixels long?
Answer: def square_length():
for i in range(4):
forward(length)
left(90)
make_square(50)
==================================================
Question: What is the default starting value of i in a for loop?
Answer: 0
==================================================
Question: What will the values of i be at each iteration of the loop below? for i in range(3):
Answer: 0, 1, 2
==================================================
Question: What will happen when the value of i reaches 5 in the loop below? for i in range(5):
left(i)
right(90)
Answer: Tracy will turn 90 degrees to the right
==================================================
Question: What will the values of i be at each iteration of the loop below?
for i in range(2, 10, 2):
Answer: 2, 4, 6, 8
==================================================
Question: 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()
Answer: four circles
==================================================