Rewrite the following while loop into for loop. i = 10 while i<250: print i i = i+50
Advertisements
Advertisements
Question
Rewrite the following while loop into for loop.
i = 10
while i<250:
print i
i = i+50Code Writing
Advertisements
Solution
for i in range(10, 250, 50):
print(i)shaalaa.com
Is there an error in this question or solution?
