I completed the task in the problem. When I execute the check50 and I get an error that an output of 50 was not found when the amount entered was 30 but when I check this manually, my code gives an output of 50 when I enter the amount of 30. And similarly, I also get an error saying that an output of 45 was not found when the amount entered was 5 but this also works fine when I test it manually.
I have attached my code for reference:
[code removed to avoid spoiler]