Ask Question
6 November, 12:52

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

+3
Answers (1)
  1. 6 November, 14:21
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers