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

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!