Question
You are going to write a program called BankApp to simulate a banking application. (Python 3 Program) Create a list of 3 users called Customers
You are going to write a program called BankApp to simulate a banking application. (Python 3 Program)
Create a list of 3 users called "Customers" [Mike, Jane, Steve] Create a list of Balances [300, 300, 300] corresponding to the initial balances for each customer. When a user runs your program, it should ask for the users name first. Check if the name matches a customer in the list. Store the index number of this customer in a variable. Use this variable to reference the correct balance in the balance list later in the program. After asking for the user name, display a menu with the following options and ask the user for input (Use a While Loop).
Type D to deposit money Type W to withdraw money
Type B to display Balance
Type C to change user, display user name
Type E to exit
If the user types D (Deposit Function) Ask the user to enter the amount to deposit. Then call the Deposit Function, passing the deposit amount as a parameter. The function should update the Balance. Then display the new balance (this should not happen in the function). Then display the menu again If the user types W then (Withdraw Function) Ask the user to enter the amount he/she wants to withdraw. Before calling the withdraw function, make sure there is enough balance. Call the Balance function before Withdraw function!! Then call the Withdraw Function, passing the withdraw amount as a parameter. The function should update the Balance. Display the new balance to the user (this should not happen in the function). Then display the menu again If the user enters B, then ?Display the Balance. ?If the user enters C then ?Ask for the user name and change the index number variable to match. If the user types E. then? Terminate the program. If the user types any other option:
PS: You program must keep displaying the menu until the user types the option E, to exit the program.
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