i=1
while(i<15):
if(i%2==0):
print(i)
i=i+1
Please Tell program output
Answers
Answered by
1
Answer:
It might give error because indentation is not there at the first place.
If indentation is correct, then possible output is that it wont print anything! This is because 1/2 ≠ 0 so it wont print any number but condition is that 1%2=0 which is not possible.
Remember, with the while loop we can execute a set of statements as long as a condition is true.
And % means modulus which only calculates the remainder.
Similar questions