Write a program 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

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
in the program Python
Write a program 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
Transcribed Image Text:in the program Python Write a program 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
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY