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
hram777 [196]
3 years ago
6

You have a group of friends coming to visit you for your high school reunion, and you want to take them out to eat at a local re

staurant. You aren't sure if any of them have dietary restrictions, but your restaurant choices are as follows:
Joe's Gourmet Burgers-Vegetarian: No, Vegan: No, Gluten-Free: Yes

Main Street Pizza Company-Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes

Corner Cafe-Vegetarian: Yes, Vegan: No, Gluten-Free: Yes

Mama's Fine Italian-Vegetarian: Yes, Vegan: No, Gluten-Free: No

The Che'fs Kitchen-Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes

Write a program that asks whether any members of your party are vegetarian, vegan, or gluten-free, to which then displays only the restaurants to which you may take the group.
Computers and Technology
1 answer:
-BARSIC- [3]3 years ago
4 0

Answer:

Python code is explained below

Explanation:

def RestaurentSelector():

               #stroring the restaurants data

               restaurents=[["Joe's Gourmet Burgers","no","no","yes"],["Main Street Pizza Company","yes","yes","yes"],["Corner Cafe","yes","no","yes"],["Mama's Fine Italian","yes","no","no"],["The Che'fs Kitchen","yes","yes","yes"]]

               #taking the requirements for party

               isVeg=input("Is anyone at your party a vegetarian? ")

               isVegan=input("Is anyone at your party a vegan? ")

               isGF=input("Is anyone at your party a gluten-free? ")

               #printing the info

               print("Hera are your restaurant choices :")

               #loop to check each restaurent

               for x in restaurents:

                               #checking for veg requirement

                               if isVeg=="yes" and x[1]=="no":

                                               #skipping the current restaurent if is satisfying

                                               continue

                               #checking for vegan requirement

                               if isVegan=="yes" and x[2]=="no":

                                               #skipping the current restaurent if is satisfying

                                               continue

                               #checking for glutan free requirement

                               if isGF=="yes" and x[3]=="no":

                                               #skipping the current restaurent if is satisfying

                                               continue

                               #if all requirementws are satisfied

                               #printing the restaurent name

                               print("\t",x[0])

               #exiting the function\

#calling the function

RestaurentSelector()

You might be interested in
Why do you need to cite your sources? (check all that apply)
Shalnov [3]

the answer to this is  2 and 3

Hope this helped

-scav

4 0
2 years ago
To change the backround color of a page, which tab would you use?
ivann1987 [24]
I have concluded the answer is a
4 0
3 years ago
Read 2 more answers
After this week im gonna be moderator who ever needs help let me know
Sav [38]

Answer:

ok

Explanation:

thanks, for offering help through here. Have a nice day.

4 0
3 years ago
Give any 3 examples of mainframe computers .
Eddi Din [679]
3 Examples of mainframe computers
z900
System z9
System z10
5 0
3 years ago
Which of these practices should you follow while creating your resume?
avanturin [10]

B is better than any other one's I think.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is a valid format symbol in Microsoft Excel? Dollar Sign, Comma, Percent Sign or all of them? I can't fig
    14·1 answer
  • Which of the following is a list of input devices?
    11·1 answer
  • Which method of accessing FTP has the most limited capabilities?
    9·2 answers
  • Explain why, with fast moving mobiles, speed is more dominant in characterizing the use mobility pattern than direction?
    8·1 answer
  • What are examples of templates the Input Mask Wizard offers? Check all that apply.
    12·2 answers
  • Lol WAKE UP!!! and get ready to answer my questions.
    12·1 answer
  • Lab Goal : This lab was designed to demonstrate the similarities and differences in a for loop and a while loop.Lab Description
    9·1 answer
  • Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, in which a and b a
    11·1 answer
  • What is incorrect about the following code? Suggest a possible revision of the code to correct the error.
    13·1 answer
  • Convert the following binary to decimal number . <br>a). 101101 ​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!