question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exact change test criteria

See original GitHub issue

Exact Change

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Oct 13, 2016

@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 😃

2reactions
dhcodescommented, Aug 16, 2016

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exact change - functions lab help needed : r/learnpython
Define a function called exact_change that takes the total change amount in cents and calculates the change using the fewest coins. The coin ......
Read more >
3 Ways to Count Out Change - wikiHow
1. State aloud the purchase price. If you work as a cashier or with a cash register, you should always state the purchase...
Read more >
Fisher's exact test - Wikipedia
Fisher's exact test is a statistical significance test used in the analysis of contingency tables. Although in practice it is employed when sample...
Read more >
Paying with exact/close to exact change - Gynzy
Students will learn how to count change to the exact amount or close to the exact amount. For example, something that costs $8.75...
Read more >
Exact Change card game - Barnes & Noble
The goal is to play all of your cards first. You can discard cards by matching the color of the last card played,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found