Help! Assignment Week 3, Invalid Syntax Error

For the programming assignment for week 3, why do I keep getting an invalid syntax error? I ran all the cells before this one.

{moderator edit - solution code removed}

Whoops, sorry, just saw the parentheses issue.

2 Likes

Note that the notebook editor is syntax aware: you can use it to check for matching parens. Just click on one and watch what happens.

The lesson here is that anytime you have trouble finding the syntax error, it probably means you are looking in the wrong place. Look on the previous line for something hanging …