-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatm.py
More file actions
38 lines (32 loc) · 1.1 KB
/
Copy pathatm.py
File metadata and controls
38 lines (32 loc) · 1.1 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
print("Welcome to bank of Spain.")
print("Insert your card ")
psw=int(input("enter your password: "))
balance=int(input("enter your balance: "))
choice=0
pin=int(input("enter your pin: "))
if pin==psw:
while choice!=4:
print("select transaction:")
print("Balance")
print("Withdraw")
print("Deposit")
print("Cancel")
choice=int(input("enter your choice:"))
if choice==1:
print("Balance=",balance)
elif choice==2:
deposit=int(input("enter you deposit amount:"))
balance+=deposit
print("deposited amount:",deposit)
print("balance = ",balance)
elif choice==3:
withdraw=int(input("enter how much you want to withdraw:"))
balance -=withdraw
print("withdrawn amount:",withdraw)
print("balance = ",balance)
elif choice==4:
print("Transaction completed")
else:
print("invalid entry!!!")
else:
print("Thankyou")