Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON PLEASE Lab 4 C: Cha - Ching For this lab, use a while loop. A sentinel loop is a loop that continues to process
PYTHON PLEASE
LabC: ChaChing
For this lab, use a while loop.
A sentinel loop is a loop that continues to process data until it reaches a specific values that signals that it should stop looping; this special values is usually indicated as the condition of the while loop. A very common application for this is allowing a user to rerun a program.
Write a very simple program that mimics a bank account. The program should start the user out with $ It should print out a welcome message once, followed by the options present for the user. The program should allow the user to make a deposit, withdrawal, and see their current balance. Every time the user deposits or withdraws, the program should show the user their new balance; it should also ask the user if they want to return to the main menu. As long as the user types or the program should keep running.
The user input is indicated in bold.
Sample output:
Welcome!
You have $ in your account.
Menu
Make a deposit
Make a withdrawal
Display account value
Please make a selection:
How much would you like to withdraw?:
Your current balance is $
Would you like to return to the main menu YN :
Menu
Make a deposit
Make a withdrawal
Display account value
Please make a selection:
How much would you like to deposit?:
Your current balance is $
Would you like to retum to the main menu YN:
Menu
Make a deposit
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started