1. Implement a class named BankAccount. Every bank account has astarting balance of $0.00. The class should implement methods toaccept deposits and make withdrawals, but an exception should beraised if a withdrawal is attempted for more money than iscurrently in the account. __init__(self) Sets the balance to 0.deposit(self, amount) Deposits money. Raises an exception if amountis less than zero. widthdraw(self) Withdraws money. Raises anexception if the account is overdrawn balance(self) Returns theamount of money in the account. (Python)
Answer
class BankAccount: def __init__(self): self.bal = 0.0 def
OR
OR