Question: Q 3 2 Points Grading comment: You are given the following code. Why is the while loop running indefinitely? i = 1 while i <
Q
Points
Grading comment:
You are given the following code.
Why is the while loop running indefinitely?
i
while i:
print i
Choice of :The value of i is never incremented, so it stays as forever.
Choice of :The print statement inside the loop causes the loop to repeat endlessly.
Choice of :The condition i is always true.
Choice of :The value of i exceeds 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
