My code is correct but the answer is wrong for Exercise 2 for the 1st programming assignment in Week 2- maybe the lib is incorrect?

I am having issues with the Exercise 2 of the Week 2 programming assignment. I have checked and rechecked the code and cannot nail down any issues so need help now: Please help so that I can clear this Lab.

Here is the code:
{moderator edit: code removed}

Please do not post your code on the forum. That’s not allowed by the community standard.

If your code was correct, you would be getting the correct results.

Be sure that you have correctly indented all of the code correctly. Python is extremely specific about indentation - that is how it identifies code blocks.

Sorry, I was not aware that I was not supposed to post code here. Thanks for letting me know. I blanked out everything and rewrote the code using tabs for indentation and it worked. So thanks for the hint on indentation…