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
nikklg [1K]
3 years ago
9

Taylor and Rory are hosting a party. They sent out invitations, and each one collected responses into dictionaries, with names o

f their friends and how many guests each friend is bringing. Each dictionary is a partial list, but Rory's list has more current information about the number of guests. Fill in the blanks to combine both dictionaries into one, with each friend listed only once, and the number of guests from Rory's dictionary taking precedence, if a name is included in both dictionaries. Then print the resulting dictionary.
Computers and Technology
1 answer:
disa [49]3 years ago
7 0

Answer:

Following are the code to this question:

def combine_guest(guest1, guest2):#defining a method combine_guest that accepts two dictionary

   guest2.update (guest1)#use dictionary guest2 that use update method to update guest2 dictionary

   return guest2#return guest2 dictionary values

Rory_guest= { "Ada":2, "Ben":3, "Dav":1, "Jo":3, "Charry":2, "Terry":1, "bob":4}#defining a dictionary and add value

Taylor_guest = { "Dav":4, "Nan":1, "bobert":2, "Ada":1, "Samantha":3, "Chr":5}#defining a dictionary and add value

print(combine_guest(Rory_guest,Taylor_guest))#calling the combine_guest method

Output:

{'Nan': 1, 'Samantha': 3, 'Ada': 2, 'bob': 4, 'Terry': 1, 'Jo': 3, 'Ben': 3, 'Dav': 1, 'Charry': 2, 'bobert': 2, 'Chr': 5}

Explanation:

In the code a method, "combine_guest" is defined, that accepts two dictionaries "guest1, guest2" inside the method, in which the "guest2" dictionary uses the update method to combine the value of the guest1 dictionary and use a return keyword to return guest2 values.

In the next step, two dictionaries are declared, that holds some values and use a print method to call the "combine_guest" method and prints its return values.  

You might be interested in
After a conditional formatting rule is created using the ____ dialog box, the rule is then available for use in the database fro
Setler [38]

Answer:

New Formatting Rule.

Explanation:

Using New Formatting Rule the rule can be used in the database .Conditional formatting is used to highlight cells with different color according to the value of the cell. Conditional formatting can be done using formulas.In conditional formatting you can use if statements ,if else staements ,formulas etc.

5 0
3 years ago
What is the name of the file manager in microsoft windows?
Ivan
It is called Windows Explorer referred as explorer.exe<span />
7 0
3 years ago
Read 2 more answers
Which symbol would be used in a flowchart to represent a connection to another part of the flowchart on the same page
AlekseyPX

Answer:

The answer is "Connectors".

Explanation:

Please find the Connectors image in the attached file.

In this question, the connectors symbol is usually small throughout the flowcharts. It is used as a connection to display and changes throughout the flux. It was usually marked by major letters that indicate jump points. This diagram visually shows the sequence of events in a system and who is accountable.

7 0
3 years ago
Question 5 of 10
Drupady [299]
The programs you need for you are not even done yet
3 0
2 years ago
Consider the graph of the function f(x) = 2(x + 3)2 + 2. Over which interval is the graph decreasing? (–∞, –3) (–∞, 2) (–3, ∞) (
Vaselesa [24]

Answer:

The interval over which the graph is decreasing is;

(-∞, -3)

Explanation:

The given function is f(x) = 2·(x + 3)² + 2

By expanding the function, we have;

2·x² + 12·x + 20

From the characteristics of a quadratic equation, we have;

The shape of a quadratic equation = A parabola

The coefficient of x² = +2 (positive), therefore the parabola opens up

The parabola has a minimum point

Points to the left of the minimum point are decreasing

The minimum point is obtained as the x-coordinate value when f'(x) = 0

∴ f'(x) = d(2·x² + 12·x + 20)/dx = 4·x + 12

At the minimum point,  f'(x) = 4·x + 12 = 0

∴ x = -12/4 = -3

Therefore;

The graph is decreasing over the interval from -infinity (-∞) to -3 which is (-∞, -3)

Please find attached the graph of the function created with Microsoft Excel

The graph is decreasing over the interval (-∞, -3).

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which Game Is Better &amp; Favorite For You?
    12·2 answers
  • In Word, tables can be styled much like text can.<br> True<br> False
    6·1 answer
  • Create a public non-final class named Streamer. You should implement one class method: filterStrings. It should accept a single
    8·1 answer
  • A ____ database supports data distributed across several different sites.
    7·1 answer
  • How many hosts are in each subnet?
    15·1 answer
  • Someone once observed that "the difference between roles and groups is that a user can shift into and out of roles, whereas that
    13·1 answer
  • Which K-Drama was made in 2009?
    5·2 answers
  • Provide a status report to your classmates and instructor. Describe any modifications that you have made to the design or docume
    10·1 answer
  • A program with a graphical user inter-face for displaying HTML files, used to navigate the World Wide Web.
    8·1 answer
  • Hi am feeling really happy just passed a test after a lot of tries :-)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!