+ 1
I wanna correct 🥲pleas tell me what is wrong
i=1 While true if i%3 == 0: Break print (i) i +=1
5 Antworten
+ 5
Colon and spelling mistakes
+ 3
i=1
while True: #debug
if i%3 == 0:
break #debug
print (i)
i +=1
+ 3
indentation, colon, keyword first letter.. while, True, break
0
The syntax error in your code is caused by the lack of indentation after the `while` statement.
i = 1
while True:
if i % 3 == 0:
break
print(i)
i += 1