Solved

You Created the Following Dictionary Relationships = {'Jimmy':'brother'}

Question 24

Multiple Choice

You created the following dictionary relationships = {'Jimmy':'brother'}. You then executed the following code, and received a KeyError exception. What is the reason for the exception?
Relationships['jimmy']


A) String comparisons are case sensitive so 'jimmy' does not equal 'Jimmy'.
B) You used the wrong syntax for creating the dictionary.
C) You should have used the code relationships['brother'].
D) There is a bug in Python.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions