Exam PCAP All QuestionsBrowse all questions from this exam
Question 51

Executing the following snippet -

will cause the dct:

    Correct Answer: C

    In a dictionary, keys must be unique. When you assign a new value to an existing key, the new value overwrites the old one. Therefore, after executing the given code, the dictionary will hold one key named 'pi' linked to the value 3.1415.

Discussion
SuvabrataOption: C

Correct answer is C. Reason is, for keys with same name, the value get overwritten.

macxszOption: C

C. to hold one key named 'pi' linked to 3.1415