+ 1

whats wrong with my code

i=2 while i>=1: print(i) i=i+2 print("program done")

20th Jul 2017, 4:05 PM
Darwin
Darwin - avatar
2 Réponses
+ 9
nothing. except it will run endlessly)) if you want it being limited to some number of iterations make a do-while loop or for(;;) loop
20th Jul 2017, 4:19 PM
Illusive Man
Illusive Man - avatar
+ 1
your 'i' value is increased and it will be never less than 1 hence infinity loop occurs try this---while i>= 5
21st Jul 2017, 3:36 AM
Prajwal Deep
Prajwal Deep - avatar