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
Write a program that accepts a positive integer N as command-line argument, and outputs True if N is the square of some integer,
Ann [662]

Answer:

In Python:

N = int(input("Positive integer: "))

if N > 0:

   flag = False

   for i in range(1,N+1):

       if i * i == N:

           flag = True

           break

   print(str(flag))

else:

   print("Positive integer only")

   

Explanation:

N = int(input("Positive integer: "))

If the number is positive

if N > 0:

This initializes a boolean variable to false

   flag = False

This iterates from 1 to the input integer

   for i in range(1,N+1):

This checks if th number is a square of some integer

       if i * i == N:

If yes, flag is set to true

           flag = True

The loop is exited

           break

This prints either true or false, depending on the result of the loop

   print(str(flag))

If otherwise, that the number is not positive

<em>else:</em>

<em>    print("Positive integer only")</em>

3 0
2 years ago
The number 84 is divisible by 2,3,4 and 6. true or false
Eva8 [605]
84÷2=42. 84÷3=28. 84÷4=21. 84÷6=14. So your answer is true.
8 0
3 years ago
Read 2 more answers
The points a b c and d lie on a straight line ab:bd = 1:4
pochemuha

The points a b c and d lie on a straight line ab:bd = 1:4 are A line that extends to infinity on both sides and has no curves is called a straight line.AB:BC=3:4.

<h3>What do you call a straight line?  </h3>

A line is simply an object in geometry denoted as an object with no width that extends on both sides. A straight line is just a line with no curves.

  • AC=AB+BC=3+4=7;  AC:CD=2:1, i.e. AC=2;   because we get 2 different lengths for AC, we change the given ratio AC:CD to an equivalent one with AC=7 .
  • As follows: AC:CD = 2 : 1 = 7 : 3.5 (multiply both sides by 3.5 )   Now we have AC:CD = 7 : 3.5 and AD = AC+CD= 7+3.5 = 10.5,, and the answer is: the ratio  BC:AD = 4:10.5.

Read more about the straight line:

brainly.com/question/3493733

#SPJ1

3 0
2 years ago
Why is the OSI reference model useful?
sveticcg [70]
The answer to this question is B.

3 0
3 years ago
you are a new lenovo service provider and need to use the recovery utility information on the lenovo support website. this infor
yawa3891 [41]

Based on the above, the person that  you  should contact to request a service provider user id and password is Regional leads

<h3>Who is a Regional leads?</h3>

The stores, merchandise, and general presence of the company in a given region are managed by region leaders. They make sure the objectives are achieved. If not, they come up with plans to achieve the goals. Leaders in a region are expected to comprehend both the local economy and its historical context.

A regional lead is a manager, educator, or administrator who is in charge of finding and supporting workforce champions within organizations within their assigned region. Hence, he or she is the best person for you to contact.

Learn more about Region from

brainly.com/question/2001834
#SPJ1

8 0
1 year ago
Other questions:
  • Assume that getPlayer2Move works as specified, regardless of what you wrote in part (a) . You must use getPlayer1Move and getPla
    14·1 answer
  • The automotive system that connects the engine and the transmission to the wheels is called the
    14·1 answer
  • i see tabs named mowed and Ramsey i tried shredding them and deleting them and ending all the processes but they start duplicati
    13·1 answer
  • Instructions
    12·1 answer
  • In one to two sentences, explain why citizens pay taxes
    8·1 answer
  • What privacy risks do new technologies present,<br> and how do we decide if they're worth it?
    11·1 answer
  • The term structure, as it relates to programming, refers to the decisions you make to design your program to best meet its objec
    11·1 answer
  • Type the correct answer in the box. Spell the word correctly. A company has its branches spread over five places in a state. It
    14·1 answer
  • Can someone tell me what this means Higfaa
    6·1 answer
  • SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SU
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!