Create a python program that does the following: Set the starting balance for the checking account to 0, Set the starting balance for the savings account to 100 Use the main 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.
Operations
In mathematics and computer science, an operation is an event that is carried out to satisfy a given task. Basic operations of a computer system are input, processing, output, storage, and control.
Basic Operators
An operator is a symbol that indicates an operation to be performed. We are familiar with operators in mathematics; operators used in computer programming are—in many ways—similar to mathematical operators.
Division Operator
We all learnt about division—and the division operator—in school. You probably know of both these symbols as representing division:
Modulus Operator
Modulus can be represented either as (mod or modulo) in computing operation. Modulus comes under arithmetic operations. Any number or variable which produces absolute value is modulus functionality. Magnitude of any function is totally changed by modulo operator as it changes even negative value to positive.
Operators
In the realm of programming, operators refer to the symbols that perform some function. They are tasked with instructing the compiler on the type of action that needs to be performed on the values passed as operands. Operators can be used in mathematical formulas and equations. In programming languages like Python, C, and Java, a variety of operators are defined.
Create a python program that does the following:
Set the starting balance for the checking account to 0,
Set the starting balance for the savings account to 100
- Use the main 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.
- From the main menu:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps