Computer Science, asked by lalithasirishat17, 10 months ago

Convert the following for loop into while loop,
for i in range (1,100):
if i % 4 == 2 :
print (i, “mod”, 4 , “= 2”)

Answers

Answered by alphauserx
11

Answer:

Explanation:

i = 1

while i < 100:

   if i % 4 ==2:

       print(i, "mod", 4, "= 2")

   i += 1

For the above the question its converted while loop is given. Feel free to ask any queries

Similar questions