+ 1

This code returns syntax error. Help!

a = 0 while a>-1: print(i) a = a + 1 if a=6: print("break") break

17th Jun 2020, 10:47 AM
Rayian Fagun
Rayian Fagun - avatar
4 Antworten
0
What language is it ? Please put the languag you use in the tags. Can you create the code in the playground and post a link to the code in your here ? That helps people to help you. What the syntax error do you get ?
17th Jun 2020, 11:00 AM
sneeze
sneeze - avatar
0
Try using indentation. It gets confusing when you don't. The if statement is outside the while loop and has a break wich will cause an error on its own
17th Jun 2020, 11:04 AM
Slick
Slick - avatar