Write a program in python w/ no imports that the owner of Chica Chic could use to store data about her inventory in a text file. The program should prompt her to input the name, cost price, and quantity of each item of inventory. Each of these three data has to be written to its own line in the file. The program should loop to enable any number of inventory items to be stored and end when the item name is left blank (see Sample Output. User inputs are shown in blue). The program should end by closing the file and printing a file status message.Sample OutputEnter the name of the inventory item or ENTER to quit topsEnter the cost price of this item 24.99Enter the quantity in stock of this item 10A record was written to fileEnter the name of the inventory item or ENTER to quit shortsEnter the cost price of this item 29.95Enter the quantity in stock of this item 12A record was written to fileEnter the name of the inventory item or ENTER to quit sandalsEnter the cost price of this item 19.79Enter the quantity in stock of this item 8A record was written to fileEnter the name of the inventory item or ENTER to quitThe file was created successfully and closed program6_2.pyNow write another program that reads her inventory file, displays all data for each item, and reports on the inventory value. The cost value of each item and the cost value of the total inventory should be reported. Strive to duplicate the Sample Output below.Sample OutputChica Chic Inventory tops, $24.99 each, 10 in stock, value $249.90shorts, $29.95 each, 12 in stock, value $359.40sandals, $19.79 each, 8 in stock, value $158.32End of fileTotal inventory value $767.62   ANSWER #2

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a program in python w/ no imports that the owner of Chica Chic could use to store data about her inventory in a text file. The program should prompt her to input the name, cost price, and quantity of each item of inventory. Each of these three data has to be written to its own line in the file. The program should loop to enable any number of inventory items to be stored and end when the item name is left blank (see Sample Output. User inputs are shown in blue). The program should end by closing the file and printing a file status message.
Sample Output
Enter the name of the inventory item or ENTER to quit tops
Enter the cost price of this item 24.99
Enter the quantity in stock of this item 10
A record was written to file
Enter the name of the inventory item or ENTER to quit shorts
Enter the cost price of this item 29.95
Enter the quantity in stock of this item 12
A record was written to file
Enter the name of the inventory item or ENTER to quit sandals
Enter the cost price of this item 19.79
Enter the quantity in stock of this item 8
A record was written to file
Enter the name of the inventory item or ENTER to quit
The file was created successfully and closed

program6_2.py
Now write another program that reads her inventory file, displays all data for each item, and reports on the inventory value. The cost value of each item and the cost value of the total inventory should be reported. Strive to duplicate the Sample Output below.
Sample Output
Chica Chic Inventory

tops, $24.99 each, 10 in stock, value $249.90
shorts, $29.95 each, 12 in stock, value $359.40
sandals, $19.79 each, 8 in stock, value $158.32
End of file
Total inventory value $767.62

 

ANSWER #2

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education