Question: (I have already completed program 6_1 - but I can not figure out how to code the second program) program6_1.py This program creates a file
(I have already completed program 6_1 - but I can not figure out how to code the second program)
program6_1.py This program creates a file of inventory items in a clothing store. Use a loop to store three merchandise items to file. The file should contain three data for each item, each datum on its own line in the file:
- the name of the item
- the unit price of the item
- the quantity in stock for the item

program6_2.py This program reads the file created by program6_1.py above. It should output the item name, unit price, quantity, and calculated inventory value for all items on file. After all items have been processed, the program should display the total value of the inventory and identify the most valuable inventory item. See Sample Output below.

Enter item name shirt Enter price of that item 24.99 Enter quantity of that item in stock 12 Enter item name hat Enter price of that item 19.95 Enter quantity of that item in stock 20 Enter item name shorts Enter price of that item 29.99 Enter quantity of that item in stock 15 Three items were added to stochk Item:shirt inventory value $299.88 Item: hat inventory value $399.00 Item: shorts inventory value $449.85 Total value of inventory is $1,148.73 Most valuable inventory item: shorts Three items were added to stock
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
