Considering the following dictionary: Num = {10: 'Ten', 100: 'Hundred', 10:…

2023

Considering the following dictionary: Num = {10: 'Ten', 100: 'Hundred', 10: 'Decimal'} print(Num) What shall be the output of print(Num)?

  1. A.

    {10: 'Ten', 100: 'Hundred', 10: 'Decimal'}

  2. B.

    {10: 'Ten', 100: 'Hundred'}

  3. C.

    {10: 'Decimal', 100: 'Hundred'}

  4. D.

    Error

Attempted by 1769 students.

Show answer & explanation

Correct answer: C

In a Python dictionary, duplicate keys are not allowed. If a key appears more than once, the last assigned value overwrites the previous one.

Explore the full course: Rssb Senior Computer Instructor