Skip to content

Commit 53804dd

Browse files
committed
withdraw menu
1 parent 2c90846 commit 53804dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lab-11/atm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ def main_menu(id):
3030
selection = int(input("Enter your selection here: "))
3131
if (selection == 1):
3232
print(eval(f"account_{id}.get_balance()"))
33-
33+
else if(selection == 2):
34+
withdraw_amount = float(prompt("Enter the amount of money you would like to withdraw: "))
35+
eval(f"account_{id}.withdraw({withdraw_amount})")
36+
print(f"${withdraw_amount} was withdrawed successfully")
37+
3438

3539

3640
get_id()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy