Skip to content

Commit 90722ab

Browse files
Add files via upload
1 parent 5e6f2e2 commit 90722ab

File tree

1 file changed

+151
-0
lines changed

1 file changed

+151
-0
lines changed

atm_mini_project.py

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# ATM MINI PROJECT by Sarthak
2+
3+
import numpy as np
4+
import time
5+
6+
user=np.array(['Sarthak','Pranit']) #User id
7+
pin=np.array([2284,2297]) #Passwords
8+
bal=np.array([10000,20000]) #Account Balance
9+
ac=np.array([357,378]) #A/C No
10+
OTP=np.array([100,200]) #OTP
11+
12+
13+
14+
15+
print(" Please Insert Your CARD...")
16+
time.sleep(3)
17+
print("\n Please Enter your Login Credentials:\n")
18+
u=input('Enter user id: ')
19+
a=int(input('Enter Your A/C No: '))
20+
p=int(input('Enter Your password: '))
21+
22+
print(" \n Wait for a second...")
23+
time.sleep(3)
24+
25+
if u==user[0] and p==pin[0] and a==ac[0]:
26+
print("\n")
27+
print("***************************************")
28+
print("* *")
29+
print("*****WELCOME SARTHAK TO ATM SYSTEM*****")
30+
print("* *")
31+
print("***************************************")
32+
print("\n How can we Help You:")
33+
print(" 1)Balance Enquiry\n 2)Cash Withdrawl\n 3)Forget Password\n 4)Logout")
34+
choice=int(input("\nEnter your Choice: "))
35+
if choice==1:
36+
print("Your Current Balance is RS",bal[0],"\nTHANKYOU!!! for Visiting us")
37+
elif choice==2:
38+
d=eval(input("Enter Amount You want to Withdraw: "))
39+
print("\n Wait... Your transaction is being proceed")
40+
time.sleep(3)
41+
if d>bal[0]:
42+
print("You cannot Withdraw Amount more than Your current Balance")
43+
else:
44+
print("\nYour A/C is debited by RS",d)
45+
print("Your Current Balance is RS",bal[0]-d,"\n \nTHANKYOU!!!")
46+
elif choice==3:
47+
u=input('Enter user id: ')
48+
if u==user[0]:
49+
print("1)Mobile No\n2)Email id")
50+
choice=int(input("Please Enter Your Choice through which We can send your Password: "))
51+
if choice==1:
52+
mo=eval(input("Enter Your Mobile No: "))
53+
print("OTP has been sent to your Mobile No")
54+
o=int(input("Enter OTP: "))
55+
print(" \n Wait for a second...\n")
56+
time.sleep(2)
57+
if o==OTP[0]:
58+
print("Password has been successfully!!! sent to your Mobile number, please Remember your Password for Future Reference\nPlease Login Again if you want to perform Another Task")
59+
else:
60+
print("Incorrect OTP\nPlease Login Again")
61+
elif choice==2:
62+
e=input("Enter Your Email id: ")
63+
print("OTP has been sent to your Email id")
64+
o=int(input("Enter OTP: "))
65+
print(" Wait for a second...")
66+
time.sleep(2)
67+
if o==OTP[0]:
68+
print("Password has been successfully!!! sent to your Email id, please Remember your Password for Future Reference\nPlease Login Again if you want to perform Another Task")
69+
else:
70+
print("Incorrect OTP\nPlease Login Again")
71+
else:
72+
print("You have Entered Incorrect Choice\nPlease Login Again")
73+
74+
else:
75+
print("User id is Incorrect\nPlease Login Again")
76+
elif choice==4:
77+
print("1)YES\n2)NO")
78+
choice=int(input("Are you Sure: "))
79+
if choice==1:
80+
print("Thankyou!! for transactions with Our ATM SYSTEM")
81+
print("Never share Your Password with Anyone, Bank will never ask For Your Password")
82+
elif choice==2:
83+
print("Sorry!! Your session has Expired You Need to Login again")
84+
else:
85+
print("You have Entered Incorrect Choice")
86+
else:
87+
print("Sorry You have Entered Incorrect Choice\nPlease Login Again")
88+
elif u==user[1]and p==pin[1]and a==ac[1]:
89+
print("\n")
90+
print("**************************************")
91+
print("* *")
92+
print("*****WELCOME PRANIT TO ATM SYSTEM*****")
93+
print("* *")
94+
print("**************************************")
95+
print("\n How can we Help You:")
96+
print(" 1)Balance Enquiry\n 2)Cash Withdrawl\n 3)Forget Password\n 4)Logout")
97+
choice=int(input("\nEnter your Choice: "))
98+
if choice==1:
99+
print("Your Current Balance is RS",bal[1],"\nTHANKYOU!!! for Visiting us")
100+
elif choice==2:
101+
d=eval(input("Enter Amount You want to Withdraw: "))
102+
print("\n Wait... Your transaction is being proceed")
103+
time.sleep(3)
104+
if d>bal[1]:
105+
print("You cannot Withdraw Amount more than Your current Balance")
106+
else:
107+
print("\nYour A/C is Debited by RS",d)
108+
print("Your Current Balance is RS",bal[1]-d,"\n\n THANKYOU!!!")
109+
elif choice==3:
110+
u=input('Enter user id: ')
111+
if u==user[1]:
112+
print("1)Mobile No\n2)Email id")
113+
choice=int(input("\nPlease Enter Your Choice through which We can send your Password: "))
114+
if choice==1:
115+
mo=eval(input("Enter Your Mobile No: "))
116+
print("OTP has been sent to your Mobile No")
117+
o=int(input("Enter OTP: "))
118+
print(" Wait for a second...")
119+
time.sleep(2)
120+
if o==OTP[1]:
121+
print("Password has been successfully!!! sent to your Mobile number, please Remember your Password for Future Reference\nPlease Login Again if you want to perform Another Task")
122+
else:
123+
print("Incorrect OTP\nPlease Login Again")
124+
elif choice==2:
125+
e=input("Enter Your Email id: ")
126+
print("OTP has been sent to your Email id")
127+
o=int(input("Enter OTP: "))
128+
print(" \n Wait for a second...\n")
129+
time.sleep(2)
130+
if o==OTP[1]:
131+
print("Password has been successfully!!! sent to your Email id, please Remember your Password for Future Reference\nPlease Login Again if you want to perform Another Task")
132+
else:
133+
print("Incorrect OTP")
134+
else:
135+
print("Sorry You have Entered Incorrect Choice\nPlease Login Again")
136+
else:
137+
print("User id is Incorrect\nPlease Login Again")
138+
elif choice==4:
139+
print("1)YES\n2)NO")
140+
choice=int(input("Are you Sure: "))
141+
if choice==1:
142+
print("Thankyou!! for transactions with Our ATM SYSTEM")
143+
print("Never share Your Password with Anyone, Bank will never ask your Password")
144+
elif choice==2:
145+
print("Sorry!! Your session has Expired You Need to Login again")
146+
else:
147+
print("You have Entered Incorrect Choice")
148+
else:
149+
print("You have Entered Incorrect Choice\nPlease Login Again")
150+
else:
151+
print("\nOOPS! Incorrect Login details")

0 commit comments

Comments
 (0)