Question: 4. Convert the following for loop to a while loop. total = 0 for i in range(10): total = total + i print(total) 5. Write
4. Convert the following for loop to a while loop.
total = 0 for i in range(10): total = total + i
print(total)
5. Write a while loop to display from 0 to 100, step up 5 each time.
0, 5, 10, 15, 20, ... , 100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
