Computer Science, asked by aftu77, 5 months ago

Convert the following program code to while loop. 2

for i in range(2,50,2)

print i​

Answers

Answered by Oreki
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 BrainlyProgrammer
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