1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
castortr0y [4]
3 years ago
15

Imagine that you are helping to build a store management system for a fast food restaurant. Given the following lists, write a p

rogram 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 continue to inquire about product names until they elect to quit the program.
Computers and Technology
1 answer:
Ivan3 years ago
7 0

Answer:

The program in python is as follows:

def checkstatus(food,foodlists):

   if food in foodlists:

       return "Available"

   else:

       return "Not Available"

foodlists = ["Burger","Spaghetti","Potato","Lasagna","Chicken"]

for i in range(len(foodlists)):

   foodlists[i] = foodlists[i]. lower()

food = input("Food (Q to quit): ").lower()

while food != "q":

   print("Status: ",checkstatus(food,foodlists))

   food = input("Food (Q to quit): ").lower()

Explanation:

The program uses function.

The function is defines here. It accepts as input, a food item and a food list

def checkstatus(food,foodlists):

This check if the food is in the food lists

   if food in foodlists:

Returns available, if true

       return "Available"

Returns Not available, if otherwise

   else:

       return "Not Available"

The main begins here.

The food list is not given in the question. So, I assumed the following list

foodlists = ["Burger","Spaghetti","Potato","Lasagna","Chicken"]

This converts all items of the food list to lowercase

<em>for i in range(len(foodlists)):</em>

<em>    foodlists[i] = foodlists[i]. lower()</em>

Prompt the user for food. When user inputs Q or q, the program exits

food = input("Food (Q to quit): ").lower()

This is repeated until the user quits

while food != "q":

Check and print the status of the food

   print("Status: ",checkstatus(food,foodlists))

Prompt the user for another food

   food = input("Food (Q to quit): ").lower()

You might be interested in
If your vehicle has fuel injection and the engine is cold,
olga nikolaevna [1]
D. Press the accelerator to the floor once and release it.
6 0
4 years ago
__________ ensure that hardware and software produced by different vendors work together.
inna [77]
Hi!

Standards are what help ensure that hardware and software made by different vendors can work together.

Hopefully, this helps! =)
4 0
3 years ago
How do you describe the importance of data in analytics? Can we think of analytics without data? Explain
Marat540 [252]

Answer:

a. It aids in the comprehension of the existing status of the business or process.

b. No, it not possible to we think of analytics without data

Explanation:

a. How do you describe the importance of data in analytics?

Data analytics can be described as the art and science of extracting useful information from data.

It aids in the comprehension of the existing status of the business or process and serves as a solid foundation for forecasting future results. Businesses can use data analytics to better comprehend the present market situation and adjust their processes or trigger the need for new product development to meet market demands.

b. Can we think of analytics without data?

No, it not possible to we think of analytics without data. This is because the raw material that is employed for analytic is data. Therefore, there would be nothing like analytics when there is no data.

7 0
3 years ago
PLEASE HELPPPPPPP What should you always disconnect before installing hardware inside a computer’s case?
Ad libitum [116K]

Answer:

a) all cabling hope it helps

3 0
3 years ago
What must devices that communicate with one another on the internet have in common?
Tomtit [17]

The most devices that communicate with one another on the internet have in common is Use the identical net protocols. Website IP addresses together with 74.125. 65.91 and 72.21.

<h3>What is the IP Address?</h3>

Every tool that communicates on the Internet, whether or not or not it's a non-public computer, a tablet, a smartphone, or something else, is assigned a completely unique figuring out range known as an IP (Internet Protocol) address.

Using the Internet, computer systems join and speak with one another, usually the usage of the TCP/IP (Transmission Control Protocol / Internet Protocol).

Read more about the internet :

brainly.com/question/1538272

#SPJ4

6 0
3 years ago
Other questions:
  • The spellchecker can be found in which two locations in most wordprocessing software?
    5·1 answer
  • CB workorder
    6·1 answer
  • You are the CISO of a company and you need to create logging policies. Please review NIST SP800-92, specifically sections 4–3 th
    12·1 answer
  • A company used computer auditing techniques to compare employees' telephone numbers with vendors' telephone numbers. This is an
    10·2 answers
  • Alice is an investor who has created a device controlled by an app that will water plants automatically. Alice has no experience
    9·1 answer
  • John wants to share resources and move a large volume of data quickly over the Internet. John should use which of the following
    9·1 answer
  • 2. You can ___ adjust to NOT sleeping at night.
    13·1 answer
  • Write a program in Cto define a structure Patient that has the following members
    12·1 answer
  • Can someone please help me with 6.8 Code Practice adhesive.
    14·2 answers
  • If you are connected to a network that uses DHCP, and you need to terminate your Windows workstation's DHCP lease, which command
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!