Cloud 9 python hw2 | Computer Science homework help

 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 accountsType S to search for account.Type D to deposit AmountType W to withdraw AmountType 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.pyFor exact input and output messages, please refer to the test case scenario below:Test Scenario:**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘P’Please enter a name: ‘John’Please enter an account number: 1Please enter a balance: 100Please enter a name: ‘Susan’Please enter an account number: 2Please enter a balance: 200Please enter a name: ‘Maria’Please enter an account number: 3Please enter a balance: 300Please enter a name: ‘Sammy’Please enter an account number: 4Please enter a balance: 400Please enter a name: ‘Ravi’Please enter an account number: 5Please enter a balance: 500**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘S’Please enter the account number to search: 1Name is: John and the balance is: 100**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘D’Please enter the account number to add deposit: 1Please enter the amount to be deposited: 100**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘S’Please enter the account number to search: 1Name is: John and the balance is: 200**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘W’Please enter the account number to withdraw: 1Please enter the amount to be withdraw: 50**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘S’Please enter the account number to search: 1Name is: John and the balance is: 150**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘W’Please enter the account number to withdraw: 1Please enter the amount to be withdraw: 200ERROR: Not enough balance**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘S’Please enter the account number to search: 1Name is: John and the balance is: 150**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘D’Please enter the account number to add deposit: 5Please enter the amount to be deposited: 500**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘S’Please enter the account number to search: 5Name is: Ravi and the balance is: 1000**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘A’Invalid choice. Please try again**** MENU OPTIONS ****Type P to populate accountsType S to search for accountType D to deposit AmountType W to withdraw AmountType E to exitPlease enter your choice: ‘E’Thank you for using the programBye

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *