Calculate the Balance - Deposit If the action is Deposit 'D', use a deposit function to add
Fantastic news! We've Found the answer you've been seeking!
Question:
Calculate the Balance - Deposit
If the action is Deposit 'D', use a deposit function to add funds to the account
Write a function called `deposit`.
Request from the user the amount to be deposited. This value should be stored in a variable called `deposit_amount`. Use both the `input` and `float` methods in order to ensure the `deposit_amount` is a float value.
Calculate a new account balance.
The calculation for depositing funds into the account is `account_balance = account_balance + deposit_amount`.
Print the new account balance.
Deposit Input
userchoice = input ("What would you like to do?\n") userchoice = 'B' deposit_amount = 200
Deposit Output
What would you like to do? How much would you like to deposit today? Deposit was $200, current balance is $700.25
Customer Deposit
Check It!Show diff
LAST RUN on 2/21/2020, 12:30:14 AM
Check 1 failed Output: What would you like to do? How much would you like to deposit today? Deposit was $200.00, current balance is $700 Expected: What would you like to do? How much would you like to deposit today? Deposit was $200.00, current balance is $700.25
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: