Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function SecondD() that takes as parameters two dictionaries and returns a dictionary built out of the parameter dictionaries. The returned dictionary should contain

Write a function SecondD() that takes as parameters two dictionaries and returns a dictionary built out of the parameter dictionaries. The returned dictionary should contain the intersection of the two dictionaries, meaning the key-value pairs that can be found in both dictionaries. Any key-value pair that is not found in identical form in both dictionaries will not be included in the returned dictionary. If the two dictionaries do not have any key-value pairs in common, the function will return the empty dictionary. Neither of the parameter dictionaries should be changed by the function.

This is the output in python please

image text in transcribed

Python 3.6.4 Shell File Edit She Debug Options Window Help >>> d1 -f'testi': 1, test2': 2, 'test3': 3) >>> d2 -testi' 1, 'test2': 2.5, test4': 41 >>> d - intersect (d1, d2) f'testl: >>> d1 'testi: 1, >>d2 'test1': 1, test2': 2.5, 'test4':4 >>> d3 - ( (1, 2): three') >>> d - intersect (d1, d3) 'test 2':2,'test3 : 3) >>> d-intersect (d2, d2) 'test4' 4} { 'test1': 1, 'test2" : 2.5, >>> idid) 2152193 617136 >>d2 : >>> id(d2) 2152 193 617568 Ln: 120 Col: 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is meant by planning or define planning?

Answered: 1 week ago

Question

Define span of management or define span of control ?

Answered: 1 week ago

Question

What is meant by formal organisation ?

Answered: 1 week ago

Question

What is meant by staff authority ?

Answered: 1 week ago