0
how to add if statement in while loop
5 Answers
+ 1
i = 1
f = False
while i < 6 and f == False:
i += 1
print(i)
if i == 2:
f = True
+ 1
đđ˘đ˘đđ¨ đđĄđđ˛đđĽ thanks for pointing it out. Pretty new to python so didn't know it doesn't support the "&&" and operator and the "++" addition operator.
Fixed my code.
0
i++ can also be written as i += 1