check50 is expecting the exact text, as it says in the pset:
Incidentally, so that we can automate some tests of your code, we ask that your program’s last line of output be only the minimum number of coins possible: an integer followed by
\n. Consider the below representative of how your own program should behave; highlighted in bold is some user’s input.
jharvard@appliance (~/Dropbox/pset1): ./greedy
O hai! How much change is owed? <----- program prints this
0.41 <---- user types this
4 <------ program prints this
Even thought it says "your last line", that doesn't mean you can have any other lines before that. It should match the staff example given.
So you should be returning
Your change is: \n$1.60\n7\n