Question: Fix the following loop: i = 10 while i>0: print(float(i)) if i%2==0: i = 1/2 else: 5.0 6.0 3.0 4.0 2.0 1.0 i=i-1 to

Fix the following loop: i = 10 while i>0: print(float(i)) if i%2==0:

Fix the following loop: i = 10 while i>0: print(float(i)) if i%2==0: i = 1/2 else: 5.0 6.0 3.0 4.0 2.0 1.0 i=i-1 to provide the following output: 10.0

Step by Step Solution

3.39 Rating (155 Votes )

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!