0
There should be 2 also in output?
I=1 while I<=5 print(i) I=I+3 print (end)
2 odpowiedzi
+ 1
your question gives us i as an initial value of 1 ok
and then tells us to print i to the screen while i<=5
but we should add 3 to i before it prints to the screen
so i + 3=4 for the answer
0
I'm gonna rewrite your code but "with" indentation:
I=1
while I<=5:
print(I)
I=I+3
print("end")
in this case you'll have 2 outputs; the first one being I and the second being "end"..
however if you want to get "end" only once when the program is done, remove the print from the loop:
I=1
while I<=5:
print(I)
I=I+3
print("end")