subject

Imagine that you are helping to build a store management system for a fast food restaurant. Given the following lists, write a program that asks the user for a product name. Next, find out if the restaurant sells that item and report the status to the user. Allow the user to continually inquire about product names until they elect to quit the program. Here are some lists to get you started:
# product lists
product_names = ["hamburger", "cheeseburger", "small fries"]
product_costs = [0.99, 1.29, 1.49]
And here's a sample running of your program:
(s)earch for product or (q)uit: s
Enter a product name: hamburger
We sell "hamburger" at 0.99 per unit
(s)earch for product or (q)uit: s
Enter a product name: salad
Sorry, we don't sell "salad"
(s)earch for product or (q)uit: voldemort
Invalid option, try again
(s)earch for product or (q)uit: q

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 12:30, gerardoblk5931
An atom's diameter is about 0.1 nanometer (1×10-9m), and a human hair is about 1×10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
image
Computers and Technology, 22.06.2019 20:30, fickllyd000
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
image
Computers and Technology, 23.06.2019 00:30, lm18618
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
image
Computers and Technology, 23.06.2019 03:00, tay9122
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
You know the right answer?
Imagine that you are helping to build a store management system for a fast food restaurant. Given th...

Questions in other subjects:

Konu
Advanced Placement (AP), 02.02.2021 20:00