Suppose we enter | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Suppose we enter

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

5th Feb 2020, 4:59 PM
Rafey Ah
Rafey Ah - avatar
3 Answers
0
If you enter i=2 while i <=5: print (i) i+=2 in Python the output is: 2 4
5th Feb 2020, 5:02 PM
Blabla Blablabla
0
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.
5th Feb 2020, 7:10 PM
Chetali Shah
Chetali Shah - avatar
0
Yeah sry ...its in python
6th Feb 2020, 5:33 AM
Rafey Ah
Rafey Ah - avatar