Stage 1 of 4: Fix creating a loan
Background. A small lending service: users hold balances, a borrower asks for a loan, another user funds it, and the borrower repays it. API.md is the contract every endpoint is held to. app.py routes requests to the handlers in handlers.py, which leave the money rules to funding.py and repayments.py; rows live in the store in db.py.
The ticket's first item: users cannot create a loan. Three tests in tests/test_part1_create.py fail.
Find out why and fix it. Don't change the read-only files.
Done when Submit goes green.
Constraints
- Python 3.12+ standard library only
- Time limit: 5 seconds per test file
- Editable:
handlers.py,funding.py,repayments.py - Read-only:
API.md,framework.py,db.py,models.py,auth.py,app.py,test_helpers.py, alltests/test_*.pyfiles
What comes after stage 1
The next stages open once the tests for the one before them pass. Each raises the bar, the way an interviewer does in the room.
- Stage 2: Fix viewing loans.
- Stage 3: Fix funding a loan.
- Stage 4: Fix what the ticket left out.
The files you get
- Yours to edit: handlers.py, funding.py, repayments.py.
- Read-only: API.md, app.py, framework.py, db.py, models.py, auth.py, test_helpers.py, tests/__init__.py.
- Tests you can read and run: tests/test_part1_create.py. Hidden tests run on Submit.
The round: an assistant that cannot write code
In this round the assistant answers your questions and reviews your code when you ask, but it can't write a single line of it. Every line is yours. This is how Amazon runs its assessment, and it is the harder format if you are used to letting the model type. You can switch the format when you press Begin.
Frequently asked, briefly answered
Is Loan App: Create, Fund and Repay free?
It is a Pro problem. Free plan includes one complete problem, plus the first stage of several more, so you can see how a round works before you pay.
Which company asks something like this?
Amazon. It is modelled on Amazon's round: Online assessment: a 60-minute repository debugging task in a browser IDE with a built-in AI assistant (you pick the stack) that explains the code and the errors but does not edit files or hand over the fix, next to a classic coding question, work simulation and work style surveys.
Do I bring my own AI tool?
No. The assistant is in the editor, same as in the interview IDEs at Meta, Stripe and Amazon. What you choose at Begin is the format: an agent that proposes changes you accept or reject, an answer-only assistant that can't write code, or no assistant at all.
What does the interviewer ask?
4 questions along the way about your own code, and one at the end about the whole session. A weak answer gets one follow up. The answers go into the report, which ends with a hire or no hire verdict.
Start the problem
Sign in and the problem opens where you left it. New here? An account takes a minute to create, and the Pro plan starts at the first stage of this problem.
More like it: every practice problem, how Amazon runs its AI round, the AI coding interview guide.