Ask Question
19 May, 21:15

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

+5
Answers (1)
  1. 19 May, 23:18
    0
    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.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What would be the result of the following code? ages = {'Aaron' : 6, 'Kelly' : 3, 'Abigail' : 1 } value = ages['Brianna'] ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers