Python/Python Mcq Set 11 MCQs :- multiple choice questions and answers. e.g Python MCQS,Python Mock Tests , Python Practice Papers ,Python Sample Test,Python Sample questions

Your Session ID :-Guest5769502

Question 1: Suppose d = {“john”:40, “peter”:45}, what happens when we try to retrieve a value using the expression d[“susan”]?

Since “susan” is not a value in the set, Python raises a KeyError exception

It is executed fine and no exception is raised, and it returns None

Since “susan” is not a key in the set, Python raises a KeyError exception

Since “susan” is not a key in the set, Python raises a syntax error

Total MCQS Questions are 50 in this paper Python Mcq Set 11