-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystem.py
More file actions
33 lines (30 loc) · 1.04 KB
/
Copy pathSystem.py
File metadata and controls
33 lines (30 loc) · 1.04 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
print("----------------------- ATM machine ---------------------------")
PIN = "0111"
while True :
print("1-Check balance")
print("2-Deposit money")
print("3-Withdrwan money")
print("4-Exit")
pin = int(input("Enter pin "))
if pin == PIN :
choice = int(input("Enter choice : "))
if choice == 1 :
balance = 0
print("Your current balance :",balance)
if choice == 2 :
deposit = float(input("Enter Deposit amount : "))
balance += deposit
print("you have deposit : ",deposit)
print("Your current balance :",balance)
if choice == 3 :
withdrawn = float(input("Enter Withdrawn amount : "))
if withdrawn <=balance :
balance -= withdrawn
print("you have withdrawn : ",withdrawn)
print("Your current balance :",balance)
else :
print("Insufficient balance .")
if choice == 4 :
exit(0)
else :
print("Invalid Pin")