Question: Consider the following nested loop: for i in range(2): for j in range(i, 4): print(i + j) Which of the following statements are true? (There

Consider the following nested loop:

for i in range(2): for j in range(i, 4): print(i + j)

Which of the following statements are true?

(There could be more than one correct answer.)

The program prints 7 lines of output.
The outer loop runs two times.
The program prints the number 3 twice.
The outer loop runs three times.
The program prints 8 lines of output.
The program prints 9 lines of output.
The programs prints the number 5.
The programs prints the number 0.
The program prints the number 2 twice.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!