cloud 9 python hw2
Use Module6: Hw1 homework to do this homework. You are going to build new features to this simple banking program. All the additional features that I am asking are in Bold. Please note that program that are written without functions will loose 25% of the grade.
- Write a program to display the menu with the following options and ask for the user input.
Type P to populate accounts
Type S to search for account.
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit.
- · If the user types P.
- · Populate all the three arrays.
- ·And display the menu again.
- · If the user types D then:
- ·Ask the user for the account number.
- ·Search the accountnumbers() array for that account number and find its position.
- · Ask the user for the amount to be deposited.
- ·Add the deposit amount to the balance for that account.
- · If the user types W then:
- · Ask the user for the account number.
- · Search the accountnumbers() array for that account number and find its position.
- · Ask the user for the amount to be withdrawn.
- · Subtract withdrawal amount from the balance for that account only if there is enough balance. Other wise display the message "ERROR: Not enough balance"
- If the user types S then:
- · Ask the user for the account number.
- · Search the array for that account number and find its position.
- · Display the Name, and balance at the position found during the above search.
- · If the user types E. then:
- ·Terminate the program after displaying the message "Thank you for using the program. Bye" Please see the sample test case scenario for exact message.
- ·If the user types any other option:
- · Display the message “Invalid Choice. Try again” and go back and display the menu.
PS: You program must keep displaying the menu until the user types the option E, to exit the program.'
Mimir Requirement: The file name must be CS902Module6Homework2.py
For exact input and output messages, please refer to the test case scenario below:
Test Scenario:
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'P'
Please enter a name: 'John'
Please enter an account number: 1
Please enter a balance: 100
Please enter a name: 'Susan'
Please enter an account number: 2
Please enter a balance: 200
Please enter a name: 'Maria'
Please enter an account number: 3
Please enter a balance: 300
Please enter a name: 'Sammy'
Please enter an account number: 4
Please enter a balance: 400
Please enter a name: 'Ravi'
Please enter an account number: 5
Please enter a balance: 500
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'S'
Please enter the account number to search: 1
Name is: John and the balance is: 100
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'D'
Please enter the account number to add deposit: 1
Please enter the amount to be deposited: 100
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'S'
Please enter the account number to search: 1
Name is: John and the balance is: 200
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'W'
Please enter the account number to withdraw: 1
Please enter the amount to be withdraw: 50
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'S'
Please enter the account number to search: 1
Name is: John and the balance is: 150
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'W'
Please enter the account number to withdraw: 1
Please enter the amount to be withdraw: 200
ERROR: Not enough balance
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'S'
Please enter the account number to search: 1
Name is: John and the balance is: 150
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'D'
Please enter the account number to add deposit: 5
Please enter the amount to be deposited: 500
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'S'
Please enter the account number to search: 5
Name is: Ravi and the balance is: 1000
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'A'
Invalid choice. Please try again
**** MENU OPTIONS ****
Type P to populate accounts
Type S to search for account
Type D to deposit Amount
Type W to withdraw Amount
Type E to exit
Please enter your choice: 'E'
Thank you for using the program
Bye
8 years ago 10
Purchase the answer to view it
- Cloud9PythonHw2.docx
- Research organizational benefits of using databases and DBMS's. Supplement your research with a review of your lessons.
- Quantitative Methods for Business
- FOR LADY HAWKINS
- marketing
- Criminal Justice Quiz
- SPONSORSHIP LETTER FOR EVENT
- chemistry
- Capital
- need help in simple assignment
- PLEASE ANSWER EACH QUESTION CORRECT AND MAKE SURE EACH ANSWER HAS IS OWN TITLE