189k views
3 votes
Which option would complete the statement?

for row in range(0,3):
line = "";
for col in range(0,5):
line += "*";
print(line);

A. outer loop
B. inner loop
C. while loop
D. Reverse loop (not real im pretty sure)

User Roygvib
by
4.3k points

1 Answer

2 votes

Answer:

A. outer loop

Step-by-step explanation:

in this case, the outer loop is the for loop that is executed first, then the inner loop is executed. the outer loop is the one that is repeated 3 times, and the inner loop is the one that is repeated 5 times

the output should look like this

*

**

***

****

*****

*

**

***

****

*****

*

**

***

****

*****

User Jimoc
by
4.0k points