CBSE Class 12 Informatics Practices Multiple Choice Questions, with Answers
8 practice questions for CBSE Class 12 Informatics Practices. Every question whose answer is the output of a program was run before publishing, so the answer is what the code really prints — not what it looks like it should.
import pandas as pd s = pd.Series([10, 20, 30]) print(s[1] + s[2])
- 30
- 40
- 50
- Error
Show the answer
The default index starts at 0, so s[1] is 20 and s[2] is 30.
import pandas as pd
df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
print(df.shape)- (2, 2)
- (2,)
- (4,)
- (2, 1)
Show the answer
shape returns (rows, columns): two rows and two columns.
import pandas as pd
df = pd.DataFrame({'M': [10, 20, 30, 40]})
print(df['M'].mean())- 20.0
- 25.0
- 30.0
- 100
Show the answer
The mean of 10, 20, 30 and 40 is 100 divided by 4.
- iloc
- loc
- head
- at_position
Show the answer
loc works on labels; iloc works on integer positions.
- COUNT(*)
- COUNT(column)
- both
- neither
Show the answer
COUNT(*) counts every row. COUNT(column) counts only rows where that column has a value.
- %
- _
- *
- ?
Show the answer
In SQL LIKE patterns, _ matches one character and % matches any number.
- Removes the header
- Stops the row numbers being written
- Sorts the file
- Skips missing values
Show the answer
Without it, pandas writes the DataFrame index as an extra first column.
- active
- passive
- encrypted
- anonymous
Show the answer
The active footprint is what a person posts on purpose; the passive footprint is collected in the background.
Want the full set?
More questions, the practical file format and the topics examiners come back to — sent on WhatsApp.
Get it on WhatsApp Book a free demo classPlease read: these are practice questions written by Kwickprep to help you revise. They are not past examination papers and not a CBSE publication. Questions asked in your school’s viva or examination may differ, and the syllabus can change between sessions — the board’s own document at cbseacademic.nic.in is always the final word. Tell us if you spot a mistake and we will correct it.

