0

Please help with my python code

I’m getting a syntax error in line 24. It thinks elif is invalid syntax. This is in python btw. https://code.sololearn.com/cX5UqiA3zkCl/?ref=app

23rd Aug 2018, 10:06 PM
Person
Person - avatar
4 Answers
+ 1
break does not take brackets in python. Use just break. https://www.programiz.com/python-programming/break-continue I made some changes in your code to adapt it. Feel free to check it if you need it https://code.sololearn.com/cDBKykHjVJim/#py
24th Aug 2018, 12:07 AM
Ruben Rodriguez
Ruben Rodriguez - avatar
+ 1
Bad guesses += 1 indentation. He thinks, he is out of the if loop and that you start a new one with elif
23rd Aug 2018, 10:35 PM
Ruben Rodriguez
Ruben Rodriguez - avatar
0
Thanks. Now it doesn’t understand the break() statement. I’ve been fidling with it, moving it in different areas and indents, but it still doesn’t work.
23rd Aug 2018, 11:46 PM
Person
Person - avatar
0
Thank you so much. It’s much better now.
24th Aug 2018, 11:53 AM
Person
Person - avatar