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 name >> Voice Changer Enter item 2's unit price >> 5.5 Enter item 2's 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 >» 15 Enter item 3's quantity >> eight Stock must be a number. Please enter again >> -8

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
100%
I have to make an e-list in Python. It’s an unlimited loop to make sure the user place the correct answers. And I don’t know how to get my inputs to where it allows me to do so.
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 name >> Voice Changer
Enter item 2's unit price >> 5.5
Enter item 2's 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 >» 15
Enter item 3's quantity » eight
Stock must be a number. Please enter again >> -8
17°C
Transcribed Image Text: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 name >> Voice Changer Enter item 2's unit price >> 5.5 Enter item 2's 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 >» 15 Enter item 3's quantity » eight Stock must be a number. Please enter again >> -8 17°C
Stock must be positive. Please enter again >> 8
Great!
Here is the e-list for Mart 007.
Welcome
=======
Please select the item you want
to buy from the following menu:
1. Spiked Umbrella ($7.25 each), 5 available
2. Voice Changer ($5.5 each), 10 available
3. Spy Camera ($15.0 each), 8 available
Press 4 when you are done!
===
Note: users are always allowed to enter any type of data when asked for input. Your program
must always verify the user input. Invalid input should be handled with suitable error messages
for each type of invalid input and the prompt should be repeated. To keep things simple, we will
consider that when prompted a user can enter either an integer, a string, or a float (i.e., not a
combination of letters and digits).
Hint: you may want to use while loops to validate user inputs, i.e., repeat the loop until user
enters the correct (type of) input.
a 4)
17°C
Transcribed Image Text:Stock must be positive. Please enter again >> 8 Great! Here is the e-list for Mart 007. Welcome ======= Please select the item you want to buy from the following menu: 1. Spiked Umbrella ($7.25 each), 5 available 2. Voice Changer ($5.5 each), 10 available 3. Spy Camera ($15.0 each), 8 available Press 4 when you are done! === Note: users are always allowed to enter any type of data when asked for input. Your program must always verify the user input. Invalid input should be handled with suitable error messages for each type of invalid input and the prompt should be repeated. To keep things simple, we will consider that when prompted a user can enter either an integer, a string, or a float (i.e., not a combination of letters and digits). Hint: you may want to use while loops to validate user inputs, i.e., repeat the loop until user enters the correct (type of) input. a 4) 17°C
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
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