คลาส BankAccount(__init__ balance) มี deposit(amount) และ get_balance() — รับ balance เริ่มต้น แล้วจำนวนเงินฝาก แสดงยอดใหม่
จำนวนเป็น int ≥ 0
100 50
150
class BankAccount:
def __init__(self, balance):
self.balance = balance
def deposit(self, amount):
self.balance += amount
def get_balance(self):
return self.balance
b=BankAccount(int(input()))
b.deposit(int(input()))
print(b.get_balance()) กด Run เพื่อรันโค้ด หรือ ตรวจคำตอบ เพื่อตรวจ test cases