Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 14 (1 point) What is the result of the following statement? contacts = { Fred: 7235591, Mary: 3841212, Bob: 3841212, Sarah: 2213278) Fred in
Question 14 (1 point) What is the result of the following statement? contacts = { "Fred": 7235591, "Mary": 3841212, "Bob": 3841212, "Sarah": 2213278) "Fred" in contacts Error False True None Question 15 (1 point) What is the result of the following statement? Mycontacts = [ "Fred": 7235591, "Mary": 3841212) print(list(Mycontacts.keys)) O ["Fred": 7235591, "Mary": 3841212] O('Fred', 'Mary) O ("Fred": 7235591. "Mary": 3841212) Ol'Fred'. "Mary] Question 16 (1 point) Consider the following variable. Mycontacts = [ "Fred": 7235591, "Mary": 3841212) what happens when we try to retrieve a value using the expression Mycontacts Isusan"]? 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 syntax error Since "susan" is not a key in the set. Python raises a keyError exception. Since susan" is not a value in the set. Python raises a keyError exception
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started