-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathATM_project.py
More file actions
50 lines (42 loc) · 1.43 KB
/
ATM_project.py
File metadata and controls
50 lines (42 loc) · 1.43 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
while True :
balance = 10000
pin = 1234
password = "Mohit123@"
while True:
try:
user_pass = input("Enter your password : ")
if user_pass == password:
print(f"your password {user_pass.replace("ohit123","*******")} is correct")
else:
print("your password is not correct! please try again !")
continue
except:
print("Enter required password ")
continue
users_pin = int(input("Enter your Pin : "))
if users_pin != pin :
print("Invalid Pin , please try again")
continue
elif users_pin == pin:
while True :
amount = int(input("Enter amount to withdraw :"))
if amount == balance :
print("we can't withdraw full amount from ATM due to some bank policies")
print("please withdraw less than ",balance," ?")
continue
elif amount > balance :
print("Insufficient balance")
print("Available balance :",balance)
continue
else:
balance = balance - amount
print("Please collect your cash :",amount)
print("Available balance :",balance)
print("Do you want to withdraw more ? yes for 'y' and no for 'n'")
choice = input().lower()
if choice == 'y':
continue
else:
print("Thank you for using ATM service")
break
break