Quiz on Python Dictionaries
FREE Online Courses: Knowledge Awaits – Click for Free Access!
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 15
1. Question
- Which of the following can be used as keys for dictionaries?
CorrectIncorrect -
Question 2 of 15
2. Question
What will be the output of the following code?
dic={1:’r’,2:6,1:5,3:’y’}
dicCorrectIncorrect -
Question 3 of 15
3. Question
- Which of the following is/are features of dictionaries?
CorrectIncorrect -
Question 4 of 15
4. Question
- Which of the following symbols form the body of a dictionary?
CorrectIncorrect -
Question 5 of 15
5. Question
What will be the output of the following code?
dic={‘a’:4,’t’:9,’e’:7}
dic[0]CorrectIncorrect -
Question 6 of 15
6. Question
Which of the following deletes the 3rd key-value pair in the following dictionary?
dic={1:1,2:4,3:9,4:16,5:25}
CorrectIncorrect -
Question 7 of 15
7. Question
What will be the output of the following code?
dic={0:’r’,4:’y’,7.6:5}
dic[2]=5
dicCorrectIncorrect -
Question 8 of 15
8. Question
- Which of the following built-in methods/functions try to modify a dictionary?
CorrectIncorrect -
Question 9 of 15
9. Question
What will be the output of the following code?
dic={1:1,2:2,3:4,4:5}
dic.popitem(4)CorrectIncorrect -
Question 10 of 15
10. Question
What will be the output of the following code?
dic={‘a’:4,’h’:2,’w’:0,5:4.3}
dic.clear()
dicCorrectIncorrect -
Question 11 of 15
11. Question
Which of the following gives the out put as 3 if the dictionary is
dic={‘a’:{3:4,6:2},’t’:5,7:{1:3,9:1}}
CorrectIncorrect -
Question 12 of 15
12. Question
What will be the output of the following code?
dic={1:’a’,2:’e’,3:’i’,4:’o’,5:’u’}
type(dic.keys())CorrectIncorrect -
Question 13 of 15
13. Question
- Which of the following operations can be performed on a dictionary?
CorrectIncorrect -
Question 14 of 15
14. Question
- Which of the following is correct code to create a dictionary comprehension?
CorrectIncorrect -
Question 15 of 15
15. Question
What will be the output of the following code?
dic={1.2:2,0.4:4,6.5:5}
for i in dic:
print(i,end=” “)CorrectIncorrect