38.3k views
11 votes
What is output by the following code?

for x in range (4):
for y in range (3):
print("*", end=" ")
print("")
Group of answer choices

* * * *
* * * *
* * * *
* * * *
* * * *

* * *
* * *
* * *
* * *

* * * * *
* * * * *
* * * * *
* * * * *

* * * *
* * * *
* * * *

User Eric Zhou
by
7.8k points

1 Answer

6 votes

Answer:

* * *

* * *

* * *

* * *

Step-by-step explanation:

The inner loop will print 3 times *

For every outer loop, that 3 times * will be printed again => 4 times in this case

The end=" " is to add new line in each inner loop

User Chew
by
7.6k points