Skip to content

Commit

Permalink
Loan - functionality has been added
Browse files Browse the repository at this point in the history
loan functionality has been added
  • Loading branch information
Khanejo authored Oct 10, 2019
1 parent 3f0c535 commit 6c530fa
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions ATM-1-successfull.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ def home():
print('\r')
print(" PRESS 2 TO DEPOSIT AMOUNT ->")
print('\r')
print(" PRESS 3 TO WITHDRAW AMOUNT ->")
print(" PRESS 3 TO ASK FOR LOAN ->")
print('\r')
print(" PRESS 4 TO WITHDRAW AMOUNT ->")
print('\r')

def balance():
global b
return(b)
Expand All @@ -23,6 +26,19 @@ def deposit(amt):
print("You have successfully deposited = Rs. '",amt,"' in your account.")
return(b)
home()

def loan_lelo(amt):
global b
if (amt <= 1/2(b)):
print("Successful ur loan has been granted")
b = (b+amt)
print(b)
return(b)
home()
else:
print("Increase your balance ,loan cannot be granted")
home()

def withdraw(amt):
global b
if(amt<=b):
Expand All @@ -41,7 +57,11 @@ def withdraw(amt):
c=int(input("Enter the amount you want to deposit ->"))
d=deposit(c)
print(b)
elif(a==3):
elif(a=3):
c=int(input("Enter the loan amount that you want ->"))
d=loan(c)
print(balance())
elif(a==4):
e=int(input("Enter the amt you want to withdraw ->"))
withdraw(e)
a=input("Do you want to check your total balance ->.(y/n)")
Expand Down

0 comments on commit 6c530fa

Please sign in to comment.