Review every matched question before generating. Flag a wrongly categorised question to
quarantine it from both study and PPT prompts until it is corrected in CBSE Paper Analyzer.
Included in reference
ID 6496 · 2021 · 1 mark(s)
Which of these about a dictionary is false?
a) The values of a dictionary can be accessed using keys
b) The keys of a dictionary can be accessed using values
c) Dictionaries aren't ordered
d) Dictionaries are mutable
Given the following dictionaries:
dict_exam={"Exam":"AISSCE", "Year":2023}
dict_result={"Total":500, "Pass_Marks":165}
Which statement will merge the contents of both dictionaries?
a) dict_exam.update(dict_result)
b) dict_exam + dict_result
c) dict_exam.add(dict_result)
d) dict_exam.merge(dict_result)
(a) Given is a Python string declaration:
myexam="@@CBSE Examination 2022@@"
Write the output of: print(myexam[::-2])
(b) Write the output of the code given below:
my_dict = {"name": "Aman", "age": 26}
my_dict['age'] = 27
my_dict['address'] = "Delhi"
print(my_dict.items())
Which of the following statement(s) would give an error after executing the following code ?
Stud={"Murugan":100, "Mithu":95} # Statement 1
print (Stud[95]) # Statement 2
Stud ["Murugan"]=99 # Statement 3
print (Stud.pop() ) # Statement 4
print (Stud) # Statement 5
(a) Statement 2
(b) Statement 3
(c) Statement 4
(d) Statements 2 and 4
Given the following dictionary
Day={1:"Monday", 2: "Tuesday", 3: "Wednesday" }
Which statement will return "Tuesday".
(a) Day.pop()
(b) Day.pop(2)
(c) Day.pop(1)
(d) Day.pop("Tuesday")
Which of the following will delete key-value pair for key = "Red" from a dictionary D1?
a) delete D1("Red")
b) del D1["Red"]
c) del.D1["Red"]
d) D1.del["Red"]
(a) Given is a Python string declaration :
NAME = "Learning Python is Fun"
Write the output of : print (NAME [-5:-10:-1])
(b) Write the output of the code given below :
dict1={1: ["Rohit",20], 2: ["Siya",90]}
dict2={1: ["Rahul",95], 5: ["Rajan",80]}
dict1.update (dict2)
print (dict1.values())
Predict the output of the following code:
S = "LOST"
L = [10,21,33,4]
D={}
for I in range(len(S)):
if I%2==0:
D[L.pop()] = S[I]
else:
D[L.pop()] = I+3
for K,V in D.items():
print(K,V,sep="*")
If my_dict is a dictionary as defined below, then which of the following statements will raise an exception?
my_dict = {'apple': 10, 'banana': 20, 'orange': 30}
a) my_dict.get('orange')
b) print(my_dict['apple', 'banana'])
c) my_dict['apple']=20
d) print(str(my_dict))
Predict the output of the following code :
d={"IND":"DEL","SRI":"COL","CHI":"BEI"}
str1=""
for i in d:
str1=str1+str(d[i])+"@"
str2=str1[:-1]
print (str2)
(b) A dictionary dict2 is copied into the dictionary dict1 such that the common key's value gets updated. Write the Python commands to do the task and after that empty the dictionary dict1.
Consider the statements given below and then choose the correct output from the given options:
D={'S01':95, 'S02':96}
for I in D:
print(I,end='#')
(A) S01#S02#
(B) 95#96#
(C) s01,95#S02,96#
(D) S01#95#S02#96#
If the dictionary D1 is defined as :
D1={1:'a',2:'b'}
then which of the following statements is incorrect and hence will result in an error ?
(A) D1.get(1)
(B) D1.get(3)
(C) D1.del(1)
(D) D1.clear()
Assuming that D1 and D2 are Python dictionaries, write the required statement using built-in functions/methods.
Update dictionary D2 with the elements of D1.
What will be the output of the following Python code?
my_dict = {"name": "Alicia", "age": 27, "city": "DELHI"}
print(my_dict.get("profession", "Not Specified"))
a) Alicia
b) DELHI
c) None
d) Not Specified
Predict the output of the Python code given below:
emp = {"Arv": (85000,90000),"Ria": (78000,88000),"Jay": (72000,80000),"Tia": (80000,70000)}
selected = [ ]
for name in emp:
salary = emp[name]
average = (salary[0] + salary[1]) / 2
if average > 80000:
selected.append(name)
print(selected)
Which of the following statements is true about dictionaries in Python ?
(A) A dictionary is an example of sequence datatype.
(B) A dictionary cannot have two elements with same key.
(C) A dictionary cannot have two elements with same value.
(D) The key and value of an element cannot be the same.
If L is a list with 6 elements, then which of the following statements will raise an exception ?
(A) L.pop(1)
(B) L.pop(6)
(C) L.insert(1,6)
(D) L.insert(6,1)
Assuming that D1 is a dictionary in Python, write the required Python expression/statement.
Write a Python expression to check if the key, 'RNo' is present in D1.
Assuming that D1 is a dictionary in Python, write the required Python expression/statement.
Write a Python expression to check if any key in D1 has a value 12.
Assuming that D1 is a dictionary in Python, write the required Python expression/statement.
Write a single statement using a built-in function to add the key:value pair 'RNo':12 if the key 'RNo' is not present in D1. If the key is present, the function should return its value.
Assuming that D1 is a dictionary in Python, write the required Python expression/statement.
Write a single statement to delete all the elements from D1.
Pick a lecture from the panel on the left, configure the board and student level,
then click Generate Prompt. The result includes PYQ data,
frequency analysis, exam trends, and a full 15-section teaching package request —
ready to paste into any AI assistant.
ChatGPTClaudeGeminiDeepSeek
PYQ Analysis
Frequency, marks & high-yield concepts
Lecture Flow
Exact time-allocation plan
15 Sections
From objectives to ranked exam questions
Export
Copy or download as .txt
Reset All Progress?
This will clear all Done and Missed marks and rebuild the schedule from scratch.
A backup will be created automatically before resetting. You can restore it from the Backups page.