When the following for loop is complete, how many spaces will Tracy have
moved?
for i in range(5):
forward(10)
50 spaces
Suppose you write a function. How many times can you call the function in your
code?
As many times as you want
In which of the following situations would it be best to make a function?
You want Tracy to draw a blue line, and your program requires lots of blue lines.
Which of the following pieces of code will make Tracy do the following actions
three times: go forward, change colors, and then turn around.
forward(30)
color("blue")
left(180)
forward(30)
color("green")
left(180)
forward(30)
color("orange")
left(180)
Suppose you want to make Tracy draw a mountain range, like the one shown
below, starting from the left side.
Which of the following functions would be the most useful function to write in
order to solve this problem?
# Has Tracy draw a single triangle
def make_triangle():
Which of the following is NOT a command you can give to Tracy?
turn
Which of the statements below is true about indentation in Python?
Indentation always matters in Python. Every statement must be aligned correctly.
Which of the following statements are true about for loops?
A. By default, the range function starts at 0
B. Using for i in range(4) will result in i taking the values 0, 1, 2, 3, 4
C. For loops let you repeat something any number of times
D. Statements in a for loop do not need to be indented
E. It is not possible to have the range value count 6, 12, 18, 24
F. It is not possible to have the range values count 1, 2, 4, 8, 16
A, C, and F
Which of the following functions is declared correctly?