Question: OVERVIEW & PURPOSE To review Python Lists. ACTIVITIES Build a program that modifies a shoppinglist.txt file by using a module called shopDBmod which contains the
OVERVIEW & PURPOSE To review Python Lists. ACTIVITIES Build a program that modifies a shoppinglist.txt file by using a module called shopDBmod which contains the functions used in the main program. Your main program needs to handle the following operations by using menu choices. a: to add an item to list P to print the shopping list g: to get the price of an item, in The functions that should be defined in shop DBmod.py are described below: o prnDB: Prints the product names and prices on to the screen. Takes the product names list and product prices list as argument and returns nothing. o addDB: Adds the name and the price of a new product to the end of name and price lists. Takes the product names list and product prices list as argument and returns the updated lists. o wrtDB: Writes the updated name and price lists to the database file. Takes the database file name and the two lists as arguments and returns nothing o getPriceDB: Find out the price of the user want to know and print the price
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
