Suppose we enter | Sololearn: Learn to code for FREE!


Suppose we enter

i=2 while i <=5 print (i) i+=2....whats the output

2/5/2020 4:59:04 PM

Rafey Ah

3 Answers

New Answer


If you enter i=2 while i <=5: print (i) i+=2 in Python the output is: 2 4


As you haven't used brackets .... In case of java, c it will be an infinite loop as i will not be incremented. A suggestion: while asking question specify the language you are using.


Yeah sry ...its in python