Solved

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

Question 8

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents