Getting error in week 2 practice lab

My code is correct but the grader has given:-(Can’t compile the student’s code. Error: SyntaxError(‘invalid syntax’, (‘/tmp/student_solution_cells/cell_2.py’, 6, 11, ‘Suppose you are the CEO of a restaurant franchise and are considering different cities for opening a new outlet.\n’)))
what to do??

Maybe you have accidentally changed the cell type in the 2nd cell in the notebook?
It should be set to “Markup”. Select that cell and use the Cell menu, check what it is set for.

I didn’t understand what you meant

The error from the grader could happen if the cell type attribute in the cell labeled “2 - Problem Statement” in the notebook had its type changed from “Markdown” to “Code”. That would cause the grader to try to run that cell as though it was Python code.

To check for this, do the following:

  • Open the notebook.
  • Left-click on that cell.
  • Select the “Cell” menu, then “Cell Type”. Select “Markdown”.

Then save the notebook, and then submit it for grading.

1 Like

This error has been solved but now the grader has given:- Comment line with index: UNQ_C1 wasn’t found in code.
what to do??

That means you have deleted the comment from the first line of the cell that contains a graded function.

You need to restore that line. It is the key the grader uses to assess your work.

As Tom mentioned, you need to read this.