Define a class with __init__, self, and instance methods. The foundation of Python OOP.
Step 1 of 100%
Step 1 of 10
Define a class called BankAccount
pythonLn 1, Col 1
1
2
3
4
5
6
7
# Build a BankAccount class from scratch## Requirements:# - __init__(self, owner, balance=0): store owner and balance# - deposit(self, amount): add to balance# - withdraw(self, amount): subtract from balance, raise ValueError if insufficient# - get_balance(self): return current balance