-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCash Machine
More file actions
27 lines (24 loc) · 772 Bytes
/
Cash Machine
File metadata and controls
27 lines (24 loc) · 772 Bytes
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
#calculator
myaccount={
"name":"dogukan",
"balance":1000,
"numofaccount":"120",
}
choice=0
while choice != 4:
print("1-withdraw money\n2-deposit money\n3-balance information\n4-quit")
choice=int(input("please enter your choice's number"))
if(choice==1):
print("how much money do you want to invest")
myaccount["balance"]+=int(input())
exit
if(choice==2):
print("how much money do you want to withdraw")
request=int(input())
if(request>myaccount["balance"]):
print("there is not that much money in your account")
else:
myaccount["balance"]-=request
print("your request done")
if(choice==3):
print("your balance is ",format(myaccount["balance"])," dollar")