Question: Any for - loop can be converted into a while - loop. The following program is intended to print each character in the string CMPUT

Any for-loop can be converted into a while-loop. The following program is intended to print each character in the string "CMPUT 175" on a line.
Does the following code terminate (eventually stop running)?
course = "CMPUT 175"
i =0
while i < len(course):
print(course[i])
Question 4Select one:
a.
Yes, this code terminates
cross out
b.
No, this code runs forever

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!