Issue Description
This test
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".
is a fail.
The test in the description says ...
Return the string "Insufficient Funds" if cash-in-drawer is less than the change due.
The change in the register is $1.01 and the change needed is $0.50, therefore there is enough change in the register. The problem is there are not the correct denominations to give exact change.
i'm facing the same problem and i'm in doubt that test case is correct or not.
please help me to go through this
So it looks like the test is written so it will return insufficient funds for this case so in essence, it's the instructions that need to be changed from:
Return the string "Insufficient Funds" if cash-in-drawer is less than the change due.
to:
Return the string "Insufficient Funds" if cash-in-drawer is less than the change due or the denominations in the drawer do not allow the correct change to be given.
Is that correct?
thanks for help
On Tue, Aug 16, 2016 at 8:11 PM, Dylan H [email protected] wrote:
So it looks like the test is written so it will return insufficient funds
for this case so in essence, it's the instructions that need to be changed
from:Return the string "Insufficient Funds" if cash-in-drawer is less than the
change due.to:
Return the string "Insufficient Funds" if cash-in-drawer is less than the
change due or the denominations in the drawer do not allow the correct
change to be given.Is that correct?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/10232#issuecomment-240122406,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANTjY1stsEFOlVuJrXKGGA4-9rKbNZALks5qgcwxgaJpZM4JlN99
.
See also #9580 and #9657. This challenge does need some adjustment.
Yeah @dhcodes your sentence clarifies it more. How does
Return the string "Insufficient Funds" if cash-in-drawer is less than the change due or if you cannot return exact change.
sound though? That way, the two conditions you need to satisfy are made both clear and succinct.
Another way to present it is that if the change available does not match the change needed, the status is "Correct change not available" instead of "Insufficient Funds".
@JohnnyBizzel The thing is, I feel like that's oversimplifying it to the point where you have to think further than simply "you don't have enough money."
@oalhait I don't know what you mean but thanks for making the change to the wording of the test.
The Exact Change challenge doesn't reflect the merged PR #10246, which is a bit confusing.
cc @atjonathan
@jonataswalker, it's possible that because the current status of https://freecodecamp.com
doesn't reflect the staging
branch, the change hasn't been pushed to production yet. Hopefully we will have this up shortly 😃
Most helpful comment
@jonataswalker, it's possible that because the current status of
https://freecodecamp.com
doesn't reflect thestaging
branch, the change hasn't been pushed to production yet. Hopefully we will have this up shortly 😃