-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodeATM.py
More file actions
148 lines (101 loc) · 5.37 KB
/
codeATM.py
File metadata and controls
148 lines (101 loc) · 5.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
print(" \n\t $$$$$$$ WELCOME to ATM sevice .py $$$$$$$ \t \n \t >>>GET AND CARRY WITH GREAT CARE \n\t OUR MOTTO:WE ARE HERE TO SERVE YOU")
#function defined that runs the ATM system
def atmSystem(pinCode,pinCode01,pinCode02,pinCode03,pinCode04,pinCode05,names,name01,name02,name03,name04,name05,acountNums,acountnum01,acountnum02,acountnum03,acountnum04,acountnum05,balance,balance01,balance02,balance03,balance04,balance05):
for i in range(1,1000000000000000000000000000000000):
pinCodeinput = int(input("PLEASE ENTER YOUR PIN CODE:\n"))
if pinCodeinput == pinCode01 :
print("\nwelcome", name01 ,"\n your account number is :", acountnum01 ,"\n your balance is:",balance01)
deposition = input("DO YOU WANT TO DEPOSITE MONEY(Y / N):")
deposition = deposition.upper()
withDrawing = input("DO YOU WANT TO WITHDRAW MONEY FROM YOUR ACCOUNT(Y/N):")
withDrawing = withDrawing.upper()
if deposition == "Y":
depositionAmt = int(input("ENTER THE AMOUNT FOR DEPOSITION:"))
print("ok your new AMOUNT after deposition of RS:", depositionAmt ," is:", balance01 + depositionAmt)
if withDrawing == "Y":
withDrawingAmt = int(input("ENTER THE AMOUNT TO BE WITHDRAW:"))
print("AFTER withDrawing ", withDrawingAmt ,"YOUR ACCOUNT LEFT WITH RS:",balance01 - withDrawingAmt)
print("thanks")
elif pinCodeinput == pinCode02 :
print("\nwelcome", name02 ,"\n your account number is :",acountnum02,"\n your balance is:",balance02)
deposition = input("DO YOU WANT TO DEPOSITE MONEY(Y / N):")
deposition = deposition.upper()
withDrawing = input("DO YOU WANT TO WITHDRAW MONEY FROM YOUR ACCOUNT(Y/N):")
withDrawing = withDrawing.upper()
if deposition == "Y":
depositionAmt = int(input("ENTER THE AMOUNT FOR DEPOSITION:"))
print("ok your new AMOUNT after deposition of ",depositionAmt," is:", balance02 + depositionAmt)
if withDrawing == "Y":
withDrawingAmt = int(input("ENTER THE AMOUNT TO BE WITHDRAW:"))
print("AFTER withDrawing ",withDrawingAmt ,"YOUR ACCOUNT LEFT WITH:",balance02 - withDrawingAmt)
print("thanks")
elif pinCodeinput == pinCode03 :
print("\nwelcome", name03 ,"\n your account number is :",acountnum03,"\n your balance is:",balance03)
deposition = input("DO YOU WANT TO DEPOSITE MONEY(Y / N):")
deposition = deposition.upper()
withDrawing = input("DO YOU WANT TO WITHDRAW MONEY FROM YOUR ACCOUNT(Y/N):")
withDrawing = withDrawing.upper()
if deposition == "Y":
depositionAmt = int(input("ENTER THE AMOUNT FOR DEPOSITION:"))
print("ok your new AMOUNT after deposition of ",depositionAmt," is:", balance03 + depositionAmt)
if withDrawing == "Y":
withDrawingAmt = int(input("ENTER THE AMOUNT TO BE WITHDRAW:"))
print("AFTER withDrawing ",withDrawingAmt ,"YOUR ACCOUNT LEFT WITH:",balance03 - withDrawingAmt)
print("thanks")
elif pinCodeinput == pinCode04 :
print("\nwelcome", name04 ,"\n your account number is :",acountnum04,"\n your balance is:",balance04)
if deposition == "Y":
depositionAmt = int(input("ENTER THE AMOUNT FOR DEPOSITION:"))
print("ok your new AMOUNT after deposition of ",depositionAmt," is:", balance04 + depositionAmt)
else:
print("thanks")
if withDrawing == "Y":
withDrawingAmt = int(input("ENTER THE AMOUNT TO BE WITHDRAW:"))
print("AFTER withDrawing ",withDrawingAmt ,"YOUR ACCOUNT LEFT WITH:",balance04 - withDrawingAmt)
print("thanks")
elif pinCodeinput == pinCode05 :
print("\nwelcome", name05 ,"\n your account number is :",acountnum05,"\n your balance is:",balance05)
deposition = input("DO YOU WANT TO DEPOSITE MONEY(Y / N):")
deposition = deposition.upper()
withDrawing = input("DO YOU WANT TO WITHDRAW MONEY FROM YOUR ACCOUNT(Y/N):")
withDrawing = withDrawing.upper()
if deposition == "Y":
depositionAmt = int(input("ENTER THE AMOUNT FOR DEPOSITION:"))
print("ok your new AMOUNT after deposition of ",depositionAmt," is:", balance05 + depositionAmt)
if withDrawing == "Y":
withDrawingAmt = int(input("ENTER THE AMOUNT TO BE WITHDRAW:"))
print("AFTER withDrawing ",withDrawingAmt ,"YOUR ACCOUNT LEFT WITH:",balance05 - withDrawingAmt)
print("thanks")
else :
print("\n PLEASE ENTER VALID pinCode \n")
main()
print("\n Thank you for using our ATM service \n")
#main function that hard coded the pincodes , names , account numbers and balance of five users
def main():
list = [[5678,4089,4568,5987,2078],['AKRAM','ASLAM','UMAR','UMAIR','ASAD'],[52123376524,76583518768,12678945172,67728818265,87266266568],[20000,100000,890000,4500000,9080000]]
pinCode = list[0]
pinCode01 = pinCode[0]
pinCode02 = pinCode[1]
pinCode03 = pinCode[2]
pinCode04 = pinCode[3]
pinCode05 = pinCode[4]
names = list[1]
name01 = names[0]
name02 = names[1]
name03 = names[2]
name04 = names[3]
name05 = names[4]
acountNums = list[2]
acountnum01 = acountNums[0]
acountnum02 = acountNums[1]
acountnum03 = acountNums[2]
acountnum04 = acountNums[3]
acountnum05 = acountNums[4]
balance =list[3]
balance01 = balance[0]
balance02 = balance[1]
balance03 = balance[2]
balance04 = balance[3]
balance05 = balance[4]
atmSystem(pinCode,pinCode01,pinCode02,pinCode03,pinCode04,pinCode05,names,name01,name02,name03,name04,name05,acountNums,acountnum01,acountnum02,acountnum03,acountnum04,acountnum05,balance,balance01,balance02,balance03,balance04,balance05)
main()