Skip to main content

Practice · 1 of 2

Atomic Transfer

CHALLENGE
Difficulty: intermediate+25 XP

Implement transfer(conn, src, dst, amount) moving money between rows of accounts(id INTEGER PRIMARY KEY, balance INTEGER). Raise ValueError if either account is missing or src has insufficient funds (and roll back). On success, commit.

Back to lesson: Practice: Transaction Drills