I am getting this error although my code is right

When creating a post, please add:

  • Week # must be added in the tags option of the post.
  • Link to the classroom item you are referring to:
  • Description (include relevant info but please do not post solution code or your entire notebook):

The error says that you are dividing somewhere by zero, your code is probably not right implemented!

I don’t think your image shows the error message. It shows only that you failed one of the test cases.

Also I see your cell execution count is 154. That means it’s been a very long time since you reset the kernel and ran all the cells again. I recommend you do that, to help clean up any global variables that may have been modified in unexpected ways.

1 Like