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
charle [14.2K]
3 years ago
5

Write a function called no_you_pick. no_you_pick should have two parameters. The first parameter is a dictionary where the keys

are restaurant names and the values are lists of attributes of those restaurants as strings, such as "vegetarian", "vegan", and "gluten-free".
#
#The second parameter is a list of strings representing of necessary attributes of the restaurant you select.
#
#Return a list of restaurants from the dictionary who each contain all the diet restrictions listed in the list, sorted alphabetically. If there are no restaurants that meet all the restrictions, return the string
#"Sorry, no restaurants meet your restrictions". Types of diet restrictions that exist in this question's universe are: vegetarian, vegan, kosher, gluten-free, dairy-free
#
#For example:
#grading_scale = {"blossom": ["vegetarian", "vegan", "kosher", "gluten-free", "dairy-free"], \
# "jacob's pickles": ["vegetarian", "gluten-free"], \
# "sweetgreen": ["vegetarian", "vegan", "gluten-free", "kosher"]}
#guests_diet = ["dairy-free"]
#no_you_pick(grading_scale, guests_diet) -> ["blossom"]


#Write your code here!
def no_you_pick(restaurants, preferred_diet):
result = []
for i in preferred_diet:
for key, value in restaurants.items():
# print(value)
if i in value:
result.append(key)
result.sort()
return result
return "Sorry, no restaurants meet your restrictions"

#Below are some lines of code that will test your function.
#You can change the value of the variable(s) to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: blossom
grading_scale = {"blossom": ["vegetarian", "vegan", "kosher", "gluten-free", "dairy-free"], \
"jacob's pickles": ["vegetarian", "gluten-free"], \
"sweetgreen": ["vegetarian", "vegan", "gluten-free", "kosher"]}
guests_diet = ["dairy-free"]
print(no_you_pick(grading_scale, guests_diet))
**My code doesn't seem to work, any help with it I'll really appreciate it!**
Computers and Technology
1 answer:
Pachacha [2.7K]3 years ago
6 0

Answer:

...

Explanation:

You might be interested in
structured analysis is called a(n) _____ technique because it focuses on processes that transform data into useful information.
zzz [600]

Answer:

Process - centered technique

Explanation:

Process - centered technique -

It is the method , where the useless or waste data is converted to some useful information , is referred to as process - centered technique .

This conversion process requires some activities , like  maintenance/support  , implementation , design , analysis and  planning .

Hence , from the given information of the question,

The correct option is Process - centered technique .

4 0
3 years ago
Which best describes IMEI?
Delicious77 [7]

Answer:

A unique identifier for a mobile phone

Explanation:

There are different codes and tracking number assigned to different devices such as laptop, mobiles and other devices. The purpose of this task is to make sure the security of device in all aspects. The tracking number that is used to track mobile phone is named as IMEI that stands for International Mobile Equipment Identity.

IMEI is the the unique identity of mobile phone device that consists of 15 digits. It is the unique number that is assigned to phones.

8 0
2 years ago
Information such as audio or video files are broken down into
liberstina [14]
...packets. I hope this helps.
5 0
2 years ago
Line 9 and 10
Reika [66]

Answer:

22,332

Explanation:

The taxable income :

Line 8 = Standard deduction or itemized deduction

Line 9 = Qualified business income deduction

Line 7 = Adjusted gross income

Taxable income = Adjusted gross income - (Qualified business income deduction + standard deduction)

Taxable income = 34732 - (12400 + 0)

Taxable income = 34732 - 12400

Taxable income = 22,332

4 0
2 years ago
Which software is designed to prevent malicious software from accessing your computer?
Mandarinka [93]
In what way might i ask?
Either its
Firewalls
Anti-virus
Anti-malware
Anti-Randsomware 
Either one
7 0
3 years ago
Other questions:
  • A(n) _____ bus enables the central processing unit (CPU) to communicate with a system’s primary storage.
    5·1 answer
  • 3. Which one of the following statements is correct? _____ variables are those whose storage bindings are created when their dec
    12·1 answer
  • This matches the domain name with the correct IP address:
    12·1 answer
  • Use the Date object and the Array object to determine and diplay information about the current date on your webpage. Your output
    11·1 answer
  • STAY AWAY FROM AND REPORT mariaivanovaloveyou!!!!!!! SHE IS A BRAINLY USER AND KEEPS POSTING INAPPROPRIATE PICTURES OF HER BODY
    13·1 answer
  • Which of the following is not a data visualization technique?
    6·1 answer
  • Why does the peot use a simular pharase at the beggining of each stanza
    8·1 answer
  • Define the term hardwar<br><br>​
    9·2 answers
  • QUESTION 1
    6·1 answer
  • ASSIGNMENT FORM 2 1. Evaluate the following without using mathematical tables 0.36 x 6(142 +58) 21.44 - 10.64​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!