Question: Q 3 2 Points Grading comment: You are given the following code. Why is the while loop running indefinitely? i = 1 while i <

Q3
2 Points
Grading comment:
You are given the following code.
Why is the while loop running indefinitely?
i=1
while i<=100:
print (i)
Choice 1 of 4:The value of i is never incremented, so it stays as 1 forever.
Choice 2 of 4:The print statement inside the loop causes the loop to repeat endlessly.
Choice 3 of 4:The condition i <=100 is always true.
Choice 4 of 4:The value of i exceeds 100 immediately, causing the loop to never end.

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 Programming Questions!