QUESTION IMAGE
Question
question 3
count = 5
length = 20
while count > 0:
for i in range(4):
forward(length)
left(90)
length = length - 5
count = count - 1
which description best matches what this code draws?
five squares, each larger than the previous, all starting at the same corner (nested squares).
a single large square
five identical small squares drawn on top of each other.
a zigzag line that gets longer each time.
El código tiene un bucle while con count = 5, lo que significa que se ejecutará 5 veces. Dentro del bucle while, hay un bucle for que dibuja un cuadrado (ya que forward(length) y left(90) se repiten 4 veces, lo que es la forma de dibujar un cuadrado). Además, length = length + 5 incrementa la longitud en cada iteración del bucle while, lo que significa que cada cuadrado es más grande que el anterior.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
Five squares, each larger than the previous, all starting at the same corner (nested squares).