Create a python program that does the following: need to use def main(): make 3 menu options, 1. savings[] , 2. checking[], and must return/display a deposit and withdrawal balance for both accounts in the return result.. return results must be in $. main() Use the createMenu function to make 3 menus: Main Menu should contain choices for Savings, Checking, Quit Savings Menu should contain choices for Display Interest Earned, Display Savings Balance, Back to Main Checking Menu should contain choices for Deposit, Withdrawal, Display Checking Balance, Back to Main Call the getValidChoice function to obtain the user’s selection Continue until the user selects the option to Quit Act upon the user’s choice as shown: From the main menu: if the choice is 1 (Savings), display the Savings menu and call the getValidChoice function with the savingsMenuString and a title if the choice is 2 (Checking), display the Checking menu and call the getValidChoice function with the checkingMenuString and a title if the choice is 3 (Quit), end the program. From the Savings menu, depending on the users choice: choice 1 (Display Interest Earned) call a showInterestEarned function that adds interest to the savingsBalance – 2% of the balance. choice 2 (Display Savings Balance) – call a showSavingsBalance function that displays the savingsBalance. Choice 3: exits the savingsMenu  Upon returning to the main menu, the main menu will be displayed. From the Checking menu: Choice 1: Deposit: ask user for amt to deposit and update the checkingBalance Choice 2: Withdrawal: ask the user for amt to withdraw, and make sure there is enough money in the account, updating the balance on the account. NOTE: do NOT allow overdrafts, but rather print a message that the withdrawal isn’t possible – overdrafts not allowed. Choice 3: Display the balance in the account Choice 4:  exits the checkingMenu.  Upon returning to the main menu, the main menu will be displayed.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 7RQ
icon
Related questions
icon
Concept explainers
Question

Create a python program that does the following:

need to use def main(): make 3 menu options, 1. savings[] , 2. checking[], and must return/display a deposit and withdrawal balance for both accounts in the return result.. return results must be in $. main()

  1. Use the createMenu function to make 3 menus:
    • Main Menu should contain choices for
      Savings, Checking, Quit
    • Savings Menu should contain choices for
      Display Interest Earned, Display Savings Balance, Back to Main
    • Checking Menu should contain choices for
      Deposit, Withdrawal, Display Checking Balance, Back to Main

  2. Call the getValidChoice function to obtain the user’s selection
  3. Continue until the user selects the option to Quit
  4. Act upon the user’s choice as shown:
    • From the main menu:
      • if the choice is 1 (Savings), display the Savings menu and call the getValidChoice function with the savingsMenuString and a title
      • if the choice is 2 (Checking), display the Checking menu and call the getValidChoice function with the checkingMenuString and a title
      • if the choice is 3 (Quit), end the program.
    • From the Savings menu, depending on the users choice:
      • choice 1 (Display Interest Earned) call a showInterestEarned function that adds interest to the savingsBalance – 2% of the balance.
      • choice 2 (Display Savings Balance) – call a showSavingsBalance function that displays the savingsBalance.
      • Choice 3: exits the savingsMenu  Upon returning to the main menu, the main menu will be displayed.
    • From the Checking menu:
      • Choice 1: Deposit: ask user for amt to deposit and update the checkingBalance
      • Choice 2: Withdrawal: ask the user for amt to withdraw, and make sure there is enough money in the account, updating the balance on the account.
        NOTE: do NOT allow overdrafts, but rather print a message that the withdrawal isn’t possible – overdrafts not allowed.
      • Choice 3: Display the balance in the account
      • Choice 4:  exits the checkingMenu.  Upon returning to the main menu, the main menu will be displayed.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 8 steps with 7 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage