0
Make changes in the code so that it prints values<10 but not value 10, WITHOUT changing the test condition of while loop
The code is: i=0 while i<10: i+=1 if i%2==0: print(i)
2 ответов
+ 1
Try this bro:
i=0
while i<10:
i+=1
if i== 10:
continue
if i%2==0:
print(i)
0
Or more simple way:
i=0
while i<10:
if i%2==0:
print(i)
i = i + 2