-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathATM Project.py
66 lines (58 loc) · 2.1 KB
/
ATM Project.py
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
balance = 9000
print("welcome to STATE BANK OF INDIA")
while True:
if input("Insert Your Card:").lower() not in {'y' or 'yes'}:
break
try:
pin=(int(input('Enter A 4 Digit Number:')))
except ValueError:
print('Wrong Pin')
break
options=("""
1: Balance Enquiry
2: Withdraw
3: Card To Card Transfer
4: Change Pin
5: Exit """)
Goback=options
print(Goback)
choice = (int(input('Please Select any option:')))
if choice == 1:
print(f'your balance is {balance}')
print(Goback)
choice = (int(input('Please Select any option:')))
elif choice == 2:
amount = (int(input('Enter Your amount:')))
if amount <= balance:
updated_balance = balance - amount
print(f'take your cash and your update balance is {updated_balance}')
else:
print("you have insufficient balance")
break
elif choice==3:
try:
card_number=(int(input('Please Enter Card Number:')))
transfer_amount=(int(input('Enter How Much Amount To Be Transfered:')))
if transfer_amount<balance:
print(f'Amount {transfer_amount}is Transfered')
print(Goback)
choice = (int(input('Please Select any option:')))
else:
print('you have insufficient balance')
print(Goback)
choice = (int(input('Please Select any option:')))
except ValueError:
print('please enter 12 numeric digits only')
break
elif choice==4:
new_pin=input("enter your new pin number:")
reenter_newpin=input("enter your new pin number:")
if new_pin==reenter_newpin:
print("pin changed successfully")
break
else:
print("New pin dosent Match,please try to re-enter again")
print(Goback)
choice = (int(input('Please Select any option:')))
elif choice==5:
exit()