Q5.Find the incorrect statement/s out of the following:
dictl={'A': 'Apple', 'B':'Boy', 'C':'Cat', 'D':'Dog'}
a) print(dictl["a"] )
b) print(dict1["B"] )
c) print(dict1["Cat"] )
d) print(dict1["E"] )
Answers
Answered by
3
They are all incorrect.
- Tries to access a non existent key.
- Undefined dictionary.
- Undefined dictionary.
- Undefined dictionary.
This makes the assumption that you didn't make any typos in the provided code snippet.
Similar questions