answer.
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]
1 year 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]1 year 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
Which of the following blocks is least similar to the others?
GuDViN [60]
The answer is A or B
4 0
1 year ago
Read 2 more answers
Which would be the most efficient way to store files on your computer?
Tamiku [17]

Answer:

4

Explanation: All the other ones are a rushed way of storing files

5 0
1 year ago
Read 2 more answers
When conducting research, protecting the privacy of patients requires careful attention to ensure ?
Eddi Din [679]
When conducting research, protecting the privacy of patients requires careful attention to ensure PRIVACY/CONFIDENTIALITY.
3 0
2 years ago
Read 2 more answers
Suppose that a scheduling algorithm (at the level of short-term CPU scheduling) favors those processes that have used the least
alekssr [168]

Answer:

Answer of the given question is :

I/O-bound

programs would not require much CPU usage, having short CPU bursts.

CPU-bound programs require large CPU bursts. CPU-bound processes do not

have to worry about starvation because I/O bound programs finish running

quickly allowing CPU-bound programs to use the CPU often.

Explanation:

I/O-bound

is a thread generally has a tight latency that needs a compare to computer bond thread on the windows workload.

When a mouse click then it response ASAP as compared to batch job which is running in the background.

If the outcome is slower, then the user switch the operating systems and server workload does not care about UI

8 0
1 year ago
Which Internet of Things (IoT) challenge involves the difficulty of developing and implementing protocols that allow devices to
dolphi86 [110]

Answer:

Option C i.e., Interoperability is the correct option

Explanation:

Interoperability performs for computers or its components for the purpose to communicate and it is important to improve the development of the Internet of Things. It performs the communication as well as share their services between computer or its components.

It also contains challenges occurred at the time of developing and implementing the protocols by which they communicate.

7 0
2 years ago
Other questions:
  • In 2–3 sentences, describe how you would change the background of a group of cell
    6·2 answers
  • In a spreadsheet, the instructions for carrying out calculations are called __________. recalculations formulas templates macros
    13·1 answer
  • Which act was used to penalize Sara? Sara was found to be in possession of a controlled substance for which she had no justifica
    5·1 answer
  • James is an employee at the packaging unit of a chocolate factory that has come up with a new concept of packaging and marketing
    11·2 answers
  • Which of the following is true of information systems?
    15·1 answer
  • You have installed a point-to-point connection using wireless bridges and Omni directional antennas between two buildings. The t
    9·1 answer
  • Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
    7·1 answer
  • Susie works for an architectural firm and the partners have always drawn the plans for projects by hand. Though Susie learned ho
    11·1 answer
  • You are modeling a small part of an online flight reservation system, according to the following description. A flight is a sing
    11·1 answer
  • Where can the Field Service Manual containing Critical Callout, Disassembly and Reassembly instructions be found?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!