Unexpected error while parsing? Can someone please explain me my error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Unexpected error while parsing? Can someone please explain me my error?

Hello, I started learning python today and I made a little program but when I execute it it writes an error message, please help me. https://code.sololearn.com/cBwy2396ZDPO/?ref=app

23rd Feb 2019, 8:43 AM
_C1B3R_
_C1B3R_ - avatar
6 Answers
+ 3
There's a ) missing in line 7
23rd Feb 2019, 8:56 AM
Anna
Anna - avatar
+ 3
Yes, OP edited it. Originally, there was a closing bracket missing in a print statement
23rd Feb 2019, 10:51 AM
Anna
Anna - avatar
+ 2
Buhle Python doesn't need those...
23rd Feb 2019, 10:19 AM
Anna
Anna - avatar
+ 1
include the open and closing brackets after the if statement and on the elif then your code runs just fine
23rd Feb 2019, 10:16 AM
Buhle 💃💃💃
Buhle 💃💃💃 - avatar
+ 1
noted, i noticed there isnt an error in the code or did it get modified????
23rd Feb 2019, 10:40 AM
Buhle 💃💃💃
Buhle 💃💃💃 - avatar
0
Give proper indentation in your code after if and elif statements every line should be indented same otherwise it will throw indentation error so give one tab in each and everyline... Same would remain in loop , function , class etc. However one or more spaces works fine in sololearn code playground... 😄😄
23rd Feb 2019, 12:38 PM
Rizwan Diwan
Rizwan Diwan - avatar