Exact Change Challenge - Strange tests?

The exact change challenge has a wrong test in my view.
They say the following:

checkCashRegister(19.50, 20.00, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1.00], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]) should return "Insufficient Funds".

When the parameters are function checkCashRegister(price, cash, cid), where cid is the money in the drawer, so cid has a total of $1.01, and the change is $0.50 there is sufficient funds in the drawer!

The drawer’s amount is just a one dollar bill and a penny, though. You wouldn’t be able to give the customer .50 in change with that. Your drawer counter needs to account for having the right dollar amount but the wrong coins to produce the change.

1 Like

Right did not see that! Thanks

1 Like