213k views
12 votes
How many times is the second for loop going to loop in this block of code? Write your answer in numeric form in the box provided.

for steps in range(5):
turtle.forward(100)
turtle.right(90)
for moresteps in rage(4):
turtle.forward(50)
turtle.right(90)​

User Nikhil K S
by
4.9k points

1 Answer

3 votes

Step-by-step explanation:

The second for loop does 1 of 4 iterations for every 1 of 5 iterations of the parent loop. meaning it is 4 x 5 which is 20.

User Habiat
by
4.5k points