Professional Documents
Culture Documents
LAB EXPERIMENT No 4 Solve
LAB EXPERIMENT No 4 Solve
LAB EXPERIMENT No 4 Solve
Task(s)
def create_pin(self):
self.pin=input("set your pin :")
print("You create your pin successfully")
def deposit(self):
temp=input("Enter you are pin :")
if temp==self.pin:
amount=int(input("Enter your amount for depositing :"))
self.balance=self.balance+amount
print("Deposit successfully")
else:
print("Invalid pin")
def withdraw(self):
temp=input("Enter you are pin ")
if temp==self.pin:
amount=int(input("Enter amount for withdraw :"))
if amount<=self.balance:
self.balance=self.balance-amount
print("Operation successful")
else:
print("Insufficient balance")
else:
print("Invalid pin")
def check_balance(self):
temp=input("Enter you are pin")
if temp==self.pin:
print(self.balance)
else:
print("Invalid pin")
Shabir=Atm()
Shabir.deposit()
Shabir.withdraw()
Shabir.check_blance()