CBSE Class 11 Computer Science
Question 59 of 161
Flow of Control — Question 41
Back to all questions 41
Question Question 41
Consider the following loop:
j = 10
while j >= 5:
print("X")
j=j-1Which of the following for loops will generate the same output as the loop shown previously?
- for j in range(-1, -5, -1):
print("X") - for j in range(0, 5):
print("X") - for j in range(10, -1, -2):
print("X") ✓ - for j in range(10, 5):
print("X") - for j in range(10, 5, -1):
print("X")