information and creates an electronic list (e-list) of items. In part-2 of this assignment, customer should be able to use this e-list to purchase multiple products of varying quantities while product 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

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

L2. 

 

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
9
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 9 Page 4 of 10 ED
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Structure
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