Feb-04-2020, 08:25 PM
class ABC: def __init__(self,name,accno): self.name=name self.accno=accno def main(self): print("Welcome to ABC bank , we care for you") print("Exciting offers , Loans , Gold schemes and Interest Rates awaits for you") trans='y' while trans=='y': t=input("deposit r withdraw?: ") if t=='w': withdraw() if t=='d': deposit() else: print("wrong selection try again") trans=input("Any other transaction?") def deposit(self): balance=0.0 amount=int(input("enter the amount to deposit")) balance+=amount print('the balance is',balance) def withdraw(self): balance=0.0 amount=int(input("enter the amount to deposit")) balance-=amount print("the balance is",balance) c1=ABC("RAGHAVA",1000123) c1.main()