class Account:
def __init__(self, balance):
self._balance = balance
def deposit(self, amount):
self._balance += amount
def withdraw(self, amount):
self._balance -= amount
if self._balance < 0:
print("잔액 부족!")
def get_balance(self):
return self._balance
account = Account(1000)
account.deposit(500)
account.withdraw(200)
print("잔액:", account.get_balance())
To embed this project on your website, copy the following code and paste it into your website's HTML: