File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,11 @@ def home():
11
11
print ('\r ' )
12
12
print (" PRESS 2 TO DEPOSIT AMOUNT ->" )
13
13
print ('\r ' )
14
- print (" PRESS 3 TO WITHDRAW AMOUNT ->" )
14
+ print (" PRESS 3 TO ASK FOR LOAN ->" )
15
15
print ('\r ' )
16
+ print (" PRESS 4 TO WITHDRAW AMOUNT ->" )
17
+ print ('\r ' )
18
+
16
19
def balance ():
17
20
global b
18
21
return (b )
@@ -23,6 +26,19 @@ def deposit(amt):
23
26
print ("You have successfully deposited = Rs. '" ,amt ,"' in your account." )
24
27
return (b )
25
28
home ()
29
+
30
+ def loan_lelo (amt ):
31
+ global b
32
+ if (amt <= 1 / 2 (b )):
33
+ print ("Successful ur loan has been granted" )
34
+ b = (b + amt )
35
+ print (b )
36
+ return (b )
37
+ home ()
38
+ else :
39
+ print ("Increase your balance ,loan cannot be granted" )
40
+ home ()
41
+
26
42
def withdraw (amt ):
27
43
global b
28
44
if (amt <= b ):
@@ -41,7 +57,11 @@ def withdraw(amt):
41
57
c = int (input ("Enter the amount you want to deposit ->" ))
42
58
d = deposit (c )
43
59
print (b )
44
- elif (a == 3 ):
60
+ elif (a = 3 ):
61
+ c = int (input ("Enter the loan amount that you want ->" ))
62
+ d = loan (c )
63
+ print (balance ())
64
+ elif (a == 4 ):
45
65
e = int (input ("Enter the amt you want to withdraw ->" ))
46
66
withdraw (e )
47
67
a = input ("Do you want to check your total balance ->.(y/n)" )
You can’t perform that action at this time.
0 commit comments