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
Get step-by-step solutions from verified subject matter experts
