22. Consider the following dictionary it and answer any four questions from () to (v):
xit - ('A':'POOJA','B':'KAVITA','C:SHANTANU', 'D':'POONAM','E':'TARUN'|
Write a command that will give the output.
1
A : POOJA
C: SHANTANU
B: KAVITA
D: POONAM
E: TARUN
3
(ii) The scshool wants to delete the data of section E from the dictionary xit and
display the corresponding value as output. Help her to identify the correct set
of statement(s) from the given options :
1
(a) del xit('E')
(b) del xit(5)
(c) pop( xit(E)
(d) xit.pop('E')
(iii) The Coordinator of the school wants to know the names of all class teachers of
class XI. Which command list values from dictionary ?
1
(a) xit.get
(b) xit.value)
(e) xit.getvalues()
(d) xit.values()
(iv) Create a new section F whose class teacher will be KARUNA. Help her to
choose command.
1
(b) xit['F"]=KARUNA
(a) xit.append("F":"KARUNA')
(c) xit=[F"]=KARUNA
(d) None of the above
(v)
Which command can count and display no. of section in class XI ?
(a) len(xit)
(b) xit.leno
(c) for i in xit :
count=count+1
(d) both (s) and (c)
Answers
Answered by
0
Answer:
Shiskine uwjiw lb with him with worship eye OKs us is situated it's easy so in she i
Similar questions
English,
1 month ago
World Languages,
3 months ago
Science,
10 months ago
English,
10 months ago
English,
10 months ago