Hello friends!!!!!
Problem of the day
PYTHON
11/8/20241 min read
#Account Management:
class account:
def __init__(self, acc_no, bal):
self.acc_no = acc_no
self.bal = bal
def debit(self, amount):
self.bal += amount
print(f"{amount} is debited")
def credit(self, amount):
self.bal -= amount
print(f"{amount} is credited")
def final(self):
print(f"Amount present is {self.bal}")
s = account(123456, 100000)
s.debit(25000)
s.final()
s.credit(50000)
s.final()