class BankAccount: def __init__(self, account_number, account_holder, balance): self.account_number = account_number self.account_holder = account_holder self.balance = balance def deposit(self, amount): self.balance += amount print(f"Deposit of {amount} successful. New balance: {self.balance}") def withdraw(self, amount): if amount > self.balance: print("Insufficient funds.") else: self.balance -= amount print(f"Withdrawal of {amount} successful. New balance: {self.balance}") def check_balance(self): print(f"Account balance: {self.balance}")
标签: 兼职