Convert the following program code to while loop. 2
for i in range(2,50,2)
print i
Answers
Answered by
5
Given:
for i in range(2,50,2):
print(i)
To while loop:
i = 2
while i < 50:
print(i)
i += 2
Answered by
2
Question:-
- Convert the following for loop to while loop
for i in range(2,50,2)
print(i)
Converting to while loop...
i=2
while(i<50):
print (i)
i+=2
Similar questions