Select Page

Python Prog Assignment

Please follow the instruction below carefully and see the attached for what the output should be: A. The Grocery Store program operates with a dictionary of food items and prices. The Grocery store interfaces with the user who is typing. Watch this example of a final product: Show the shopper the inventory of the grocery store and their prices.  Repeatedly ask the user what they would like to add to their list. Every time you ask the user shopper to add something to their list, make sure to print the options. When the user types done, show them the total cost of the items on their shopping list and the entire list. The program ends. You must use functions to strategically organize your code. If there are actions to repeatedly do with different inputs, they should go to a function. Strategically use loops to repeatedly prompt the shoppers, and manipulate lists and dictionaries appropriately. Feel free to add your own spin! Change up the food items and prices in the inventory! You can have different prompts and greeting messages! B. The ATM Machine program operates with a dictionary of usernames and account totals. The ATM interfaces with the user who is typing. Watch this example of a final product: Prompts for user’s name The user can withdraw from or deposit into their account. The user is asked how much they would like to deposit or withdraw. The transaction is complete IF there is enough money in the account to do so. The user is shown the standing total in their accounts. The process repeats and the user can continue to work with different accounts until they answer “end” when prompted. The program ends. You must use functions to strategically organize your code. If there are actions to repeatedly do with different inputs, they should go to a function. Strategically use loops to repeatedly prompt the users, and manipulate lists and dictionaries appropriately. Feel free to add your own spin! Change up the names and totals in the accounts! You can have different prompts and greeting messages! WHAT TO TURN IN You must turn in two Python files. You must comment key aspects of code (function definitions, explain your logic before conditionals, comment inner and outer loops). You should briefly explain your logic and what’s happening where you’re commenting. You must turn in one set of test data. Try to consider edge cases! (What’s an edge case?  (Links to an external site.) ) These programs have elements that repeat until the user determines to stop.