Anthropic

Based on real interviews

Build a bank transfer lifecycle

Keep bank balances correct while transfers wait to be accepted, expire or outlive an account change.

Unlock with Full Access

The challenge

Build a bank in which sending a transfer and accepting it are separate events. Funds can remain held, transfers can expire, and later levels introduce account merges and reusable account IDs.

Extend the same implementation across four levels. The exercise tests whether its state still makes sense when money is waiting for an action or when an account's identity changes, rather than only when transfers complete immediately.

What you'll practise

  • Held funds

    Model the transitions between pending, accepted and expired transfers.

  • Account identity

    Handle merges and reused identifiers without confusing older operations with new accounts.

Your coding workspacePreview
Current partFurther parts unlock as you progress
solution.pyPython 3.13
# Build on your implementation

# Run checks for the current part

# Full starter code included
Current-part checks

Run your code to see results.

The complete sequence, starter code and checks are included with Full Access.