Cell #21. Can't compile the student's code. Error: TypeError("'NoneType' object cannot be interpreted as an integer")

Have you completed the entire assignment before you submit it for grading?

I ask because the error message relates to “None” statements. Your job in the assignment is to replace the “None” with correct code.

You can’t submit an assignment that is incomplete.

Yess i have completed each and every assignment.And every test case are also passed

That does not mean your code is perfect. The grader uses completely different test cases.

The “noneType” error can also happen if you have created new cells, deleted any cells, or modified any of the notebook metadata. Often this will happen if you download the notebook, work in it in some other platform, and upload it back to Coursera. You can also have problems if you get a new copy of the notebook and paste in all of the contents from your old one.

Do any of these situations apply?

1 Like

Thank you very much for your solution sir.But when i go through each and every line of the code,then i find that there was typo error and test case wasnot able to capture it.It is fixed now

2 Likes

Good that you solved the problem.

If you can message me with what the typo was, we can perhaps improve the test cases to catch it.