Question: Create a function named get _ name that, given a dictionary, returns the value associated with the key Name. Make sure you unit test the
Create a function named getname that, given a dictionary, returns the value associated with the key "Name". Make sure you unit test the function.
For the type parameter, use dict for now representing any generic dictionary This function should return a string value.
Console:
Feedback: Syntax Error
Syntax Error
Bad syntax on line
The traceback was:
Line of file answer. py
assertequal
get.name: Name 'John doe'
Suggestion: Check line the line before it and the line after it
from cisc import assertequal
def getnamedictionary: dict str:
return dictionary.getName
assertequal
get.name:Name 'John doe'
I
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
