Define a class with deposit/withdraw.
Define class BankAccount with __init__(self, balance=0), deposit(amount), withdraw(amount), and balance attribute.
After definition: a = BankAccount(); a.deposit(100); a.withdraw(30); print(a.balance)
Expected output: 70
Sign in to save your code and track progress across devices.