Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION: How can I get both of the outputs that I\'m looking for with the code

ID: 3703027 • Letter: Q

Question

QUESTION: How can I get both of the outputs that I'm looking for with the code below?

Check 1 failed

What would you like to do? Enter amount to withdraw$100.00 was withdrawn, current balance is $400.25

Expected:

What would you like to do? How much would you like to withdraw today? Withdrawal amount was $100.00, current balance is $400.25

Check 2 failed

What would you like to do? Enter amount to withdraw$700.00 is greater than account balance $500.25

Expected:

What would you like to do? How much would you like to withdraw today? $700.00 is greater that your account balance of $500.25

Safari File Edit View History Bookmarks Window Help GIF ) 24% [D Sun 5:13 PM E codio.com How to Give ...ing Hand-Job Character De...rs Workshop Shap our fan.... Bad Dragon Junior Plus Si thing I rue21 Fiction Writi.ters Workshap Moroccan Caf...ibaba Group Abaya in Dub...ibaba Graup Chegg Study | Guided Solutions and Study Help Chegg.com Codio - it-140 project-3-draft--atm Macintosh HD Codio Project File Edit Find View Tools Education Help , Run Current? Google ? ?Configure LAPONTE ATM.py Calculate the import sys account balance account balancefloat (500.25) Allure 4 Calculate the Balance - #PPrint the balance 7 def printbalance: greater than your account balance of print ("Your current balance : %.2f" % account, balance) Allure 1 #the function for deposit 11def deposit): 12 13 14 15 16 17 def withdraw): 18 19 20 21 depositamount- float input ("How much would you like to deposit today?")) balanceaccount_balance +deposit_amount print ("Deposit was $% . 2f, current balance is $%.2f" %(deposit-amount , balance)) account balance Ensure you display the withdrawal amount and the account balance with the $' and two decimal points. Genki An #function for withdraw withdraw_amount float (input ("Enter amount to withdraw")) if(withdraw_amount> account_balance) is print ("$%.2f greater than account balance $%.2f " %(withdraw-amount , account-balance)) JBridge for Beginners else: balanceaccount balancewithdraw amount print("$%.2f was withdrawn, current balance is $%.2f" % (withdraw-amount, balance)) 23 24 25 26 userchoice -input("What would you like to do? ") 27 28 if (userchoice'D'): 29 30elif userchoice'W' 31 32elif userchoice'B' # User Input goes here, use if/else conditional statement to call function based on user input Pics deposit() withdraw() printbalance () sys.exit) Pimsleur 34 else: 35 4. If the withdrawal 92% (32:23)

Explanation / Answer

import sys account_balance=500.25 def printbalance(): print("Your current balance : %.2f" %account_balance) def deposit(): print(("How much would you like to deposit today?")) deposit_amount=float(input()) balance=account_balance+deposit_amount print("Deposit amount was %.2f, current balance is $%.2f"%(deposit_amount,balance)) def withdraw(): print(("How much would you like to withdraw today?")) withdraw_amount=float(input()) if(withdraw_amount>account_balance): print("$%.2f is greater than account balance of $%.2f "%(withdraw_amount,account_balance)) else: balance=account_balance-withdraw_amount print("Withdrawal amount was $%.2f, current balance is %.2f"%(withdraw_amount,balance)) print("What would you like to do?") userchoice=input() if userchoice=='D': deposit() elif userchoice=='W': withdraw() elif userchoice=='B': printbalance() else: sys.exit()