Cash Register did not understand test statement

Hi,

I am working on cash register solution at the moment. On the test section it says the below statement (please see below).

checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]) should return {status: "INSUFFICIENT_FUNDS", change: []} .

Change is 0.5 and cash drawer has a total amount of 1.01 why is the test saying insufficient funds. Am I reading this the wrong way around ?

How would you do it if it was physical coins/bills?

The numbers represent physical coins/bills and the code must obey the limitations. You can’t just take a coin or a bill and rip it in half to get half its value.

Makes sense. Thanks.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.