Write a program called a2_q1.py that asks the user (business owner) for their product information and creates an electronic list (e-list) of items. In part-2 of this assignment, customers should be able to use this e-list to purchase multiple products of varying quantities while products are available in stock. Your program should start by asking the business owner's name (string) and the name of the company (string). Next, it should ask for three (3) product names (strings), their unit prices (floats), and the total number of products in stock (ints). Finally, it should display the list of items.

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

A. 

J

 

 

Write a program called a2_q1.py that asks the user (business owner) for their product
information and creates an electronic list (e-list) of items. In part-2 of this assignment, customers
should be able to use this e-list to purchase multiple products of varying quantities while products
are available in stock.
Your program should start by asking the business owner's name (string) and the name of the
company (string). Next, it should ask for three (3) product names (strings), their unit prices
(floats), and the total number of products in stock (ints). Finally, it should display the list of items.
Below is a sample run of the program that demonstrates how your output could look (user input
is highlighted for emphasis):
Sample output (user input is highlighted for emphasize):
Please enter your name >> Bond
Hi Bond, please enter your company name >> Mart 007
Let's setup a sales menu for 'Mart 007'.
Enter item 1's name >> Spiked Umbrella
Enter item 1's unit price >> 7.25
Enter item 1's quantity >> 5
Enter item 2's
Enter item 2's
Enter item 2's
name >> Voice Changer
unit price >> 5.5
quantity >> 10
Enter item 3's name >> Spy Camera
Enter item 3's unit price >> fifteen
Price must be a number. Please enter again >> -15
Price must be positive. Please enter again >>
Enter item 3's quantity >> eight
Stock must be a number. Please enter again >> -8
A
8
Page 4 of 10
ED
Transcribed Image Text:Write a program called a2_q1.py that asks the user (business owner) for their product information and creates an electronic list (e-list) of items. In part-2 of this assignment, customers should be able to use this e-list to purchase multiple products of varying quantities while products are available in stock. Your program should start by asking the business owner's name (string) and the name of the company (string). Next, it should ask for three (3) product names (strings), their unit prices (floats), and the total number of products in stock (ints). Finally, it should display the list of items. Below is a sample run of the program that demonstrates how your output could look (user input is highlighted for emphasis): Sample output (user input is highlighted for emphasize): Please enter your name >> Bond Hi Bond, please enter your company name >> Mart 007 Let's setup a sales menu for 'Mart 007'. Enter item 1's name >> Spiked Umbrella Enter item 1's unit price >> 7.25 Enter item 1's quantity >> 5 Enter item 2's Enter item 2's Enter item 2's name >> Voice Changer unit price >> 5.5 quantity >> 10 Enter item 3's name >> Spy Camera Enter item 3's unit price >> fifteen Price must be a number. Please enter again >> -15 Price must be positive. Please enter again >> Enter item 3's quantity >> eight Stock must be a number. Please enter again >> -8 A 8 Page 4 of 10 ED
Expert Solution
steps

Step by step

Solved in 2 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