2.6.4 Ice Cream
Question: Comments are written for…
Answer: Humans to read and to understand
==================================================
Question: What symbol is used at the beginning of an in-line comment?
Answer: #
==================================================
Question: What punctuation is used to begin a multi-line comment?
Answer: “““
==================================================
Question: What name follows all naming rules?
Answer: make_square
==================================================
Question: If I am creating a function that makes two squares, what would be the best name option?
Answer: draw_squares
==================================================
Question: What 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: What 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?
Answer: circle(50,360,5)
==================================================
Question: What would be the output of the following command?
Answer: circle(50,180,3)
==================================================
Question: Top down design makes it easier to solve a problem by…
Answer: Breaking the problem down into smaller parts
==================================================
Question: What 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 program would produce the following output?
Answer: square_length = 20
for i in range(4):
forward(square_length)
left(90)
squarelength = squarelength * 2
==================================================