Question: Write a function that has three parameters: the dictionary name key name value name Write a function that checks if the given value name matches

Write a function that has three parameters:
the dictionary name
key name
value name
Write a function that checks if the given value name matches the value of the key name in the supplied dictionary. If it does, your function should return True
and if not it should return False.
Use the function header:
def doesitMatch(dictionary, keyName, valueName):
For example:
doesitMatch({ "color": "Blue", "item": "chair", "year": 1964}, 'color' , 'red')
should return False because the value for the key "color" in the dictionary is "Blue" not "red"
doesitMatch(,{ "color": "blue", "item": "chair", "year": 1964}, 'color' , 'blue')
should return True because the value of the key "color" in the dictionary is "blue"
Write a function that has three parameters: the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!