osayword4057 osayword4057
  • 06-08-2019
  • Computers and Technology
contestada

What would be the result of the following code? ages = {'Aaron' : 6, 'Kelly' : 3, 'Abigail' : 1 } value = ages['Brianna']

Respuesta :

ExieFansler ExieFansler
  • 07-08-2019

Answer:

This code will no get executed properly.It will give keyerror Brianna.

Explanation:

In this dictionary we defined in the code the there is no key Brianna hence there is no corresponding value to Brianna.So assigning ages['Brianna] to value will obviously give error since there exits no key with this name.So the code will give error.

Answer Link

Otras preguntas

Simplify. |–2.9| =_____
plz help me with my hw
what is Cayley graph?
Mark the statement if it is accurate about Queen Elizabeth I. A.She was the daughter of Henry VIII and was the second queen of England to rule. B.She declared
what is 2.29 as a fraction
The work of a student to solve a set of equations is shown: Equation 1: m = 8 + 2n Equation 2: 6m = 4 + 4n Step 1: −6(m) = −6(8 + 2n) [Equation 1 is multip
Which answer choice does not contain any punctuation errors? A.He added "that they drill holes in trees." B."Robins, on the other hand," said Mary, "are masons.
What was one effect of the plate movement on the Pacific region? A) Australia and New Zealand became connected to North America B) Plate movement isolated many
what does rural mean
Jose is attracted to a particular job because of the high salary and excellent health benefits. He is motivated by intrinsic values extrinsic values external v