C5W3A2: Syntax problems

I’m getting an error which says:
I even changed the syntax in other possible ways, however the error still persists.
Need some help here! anyone??

1 Like

If you can’t find a syntax error in python, it means you are looking in the wrong place. :laughing: That kind of error at the beginning of a line means you are missing a close paren or close bracket on the previous non-comment line.

1 Like

I’ll look into it! thanks for the heads up!

1 Like

Well I couldn’t find anything wrong here. so this is how I wrote the piece of code :sweat_smile:
So any idea wts wrong?

1 Like

It looks like you missed the point of my previous comment. That line is fine. The problem is on the previous line. Use the notebook editor to check your matching parentheses: click on a paren and it will highlight the matching one. Or not. :scream_cat:

1 Like

Got it sir!
Thanks a lot!!

1 Like

I’m getting zero grade even after I did every graded function as per requirements!
plz help !!

Hi @Saket_Choudary01,

Seems the grader problem you just reported is the same one as the error in your jupyter’s live session. They are both about invalid syntax, and about the same code.

If your live session no longer has the error, but the grader still does, then there are two possibilities that I can think of:

  1. The autograder only grades the notebook with the right name - did you make a copy of the original notebook, and only fix the error in that copy but not the original one?

  2. You have only one notebook with the right name, and you have fixed the error, but you have not saved the notebook after the fix, so the autograder was still looking at an older version of it.

I am tagging @TMosh here since you are discussing with him about this issue in another thread.


The issue has been resolved as while submission the notebook has not saved my changes
so After saving it and submitting It graded correctly.
Anyways thanks for your time @rmwkwok @TMosh

The notebooks are not automatically saved right away. It takes a few moments.

If you make a change and want to submit for grading immediately, you have to save manually then push “Submit”.

1 Like