Welcome to the payments team. The bank in bank/ implements all four levels described in README.md: accounts and payments, the top spenders ranking, transfers that wait to be accepted, and merging accounts. Since the last…
Welcome to the payments team. The bank in bank/ implements all four levels described in README.md: accounts and payments, the top spenders ranking, transfers that wait to be accepted, and merging accounts. Since the last release, four reports have come in.
Fix as much as you can in 40 minutes. The checks are graded one by one, so each report you fix counts even if the rest is not done.
acc1 holds exactly 250. pay(..., "acc1", "acc2", 250) returns None, and so does a transfer request for 250. Paying 249 works.
pay and request_transfer accept an amount equal to the source's balance, leaving it at 0.Three accounts a, b and c have each paid out 100. top_spenders lists them as c(100), b(100), a(100).
A transfer of 400 that nobody accepted expired after its hour, but the 400 never came back to the sender's balance.
acc3 sent a transfer to acc2, then support merged acc2 into acc1. acc1 cannot accept the transfer. When a new acc2 was opened later, it could.
pytest tests/visible. Three tests fail on the current code; not every report has a failing test yet.Visible test command
pytest tests/visibleThe repository’s own tests. Run all tests includes them, and so does every submission.
Repository
bank-system-whole-balance-ranking-expiry-and-merge-bugs
Changes under src/ are evaluated.