A payments app needs a small Wallet object that keeps a balance and blocks payments the user can't afford.
Write a class Wallet with:
Wallet(owner, balance=0) that stores owner and balanceadd(amount) that adds money to the balancepay(amount) that takes money out, but raises ValueError("not enough money") if the amount is more than the balance (and leaves the balance unchanged)How it's checked
Your code runs, then the check below runs and its printed output is compared with ours.
w = Wallet("Ana", 20) and w.add(5), w.balance is 25Hints, the later steps and the answer come with Pro.
class Wallet:
def __init__(self, owner, balance=0):
...