-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassessment
More file actions
26 lines (25 loc) · 1.05 KB
/
assessment
File metadata and controls
26 lines (25 loc) · 1.05 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
user_name = "Andrea"
print(f"Welcome to our ATM {user_name}")
current_balance = 500
keep_going = True
while keep_going == True:
menu = int(input("Would you like to Check Balance[1], Deposit[2], Withdraw[3], Exit[4]?: "))
if menu == 1:
print(f"Your current balance is ${current_balance} USD")
elif menu == 2:
deposit = int(input("Enter amount to deposit: "))
current_balance = int(current_balance + deposit)
print(f"Your new balance is = ${current_balance} USD")
elif menu == 3:
withdrawal = int(input("Enter amount to withdraw: "))
current_balance = int(current_balance - withdrawal)
print(f"Your new balance is = ${current_balance} USD")
elif menu == 4:
print("Thank you for choosing our ATM. Have a nice day!!")
else:
print("Please choose Check Balance[1], Deposit[2], Withdraw[3], Exit[4]: ")
go_again = input("Would you like to make another transaction? yes or no: ")
if go_again != "yes":
go_again = False
print("Thank you. Come again.")
break