DS160123 Creating Bank Account:

Date:-20/03/2023
class BankAccount:
def init(self, account_number: int, balance: int) → None:
self.account_number = account_number
def deposit(self, account: int)-> None:
self.balance += amount
def withdraw(self, amount: int) → None:
if self._balance >= amount:
self.balance -= amount
else:
print(“Insufficient funds.”)

3 Likes

@sms18680

Thanks for sharing :slightly_smiling_face:

1 Like