0

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.enter image description here

I have attached my code for reference:

[code removed to avoid spoiler]

1 Answer 1

0

Interesting. There appears to be a slight problem with check50 on this one. Nevertheless, there's also a problem with your code. The program spec and the demo in the assignment says that the output should be "Insert coin: ". Your code says "Enter coin of 5, 10 or 25: ". This doesn't match the spec.

One of the hidden lessons in these classes is that a program must be written to EXACTLY match the specification - not be close, not contain "improvements", and definitely not contain extraneous or different text in output. Check50 (and submit50) rely on exact output, and snagged this as a failure, even though the explanation given was misleading.

Change the text of your prompt and it should be good. I'll pass this up the chain as something that needs to be modified in check50.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .