CBSE 2026 results are out, Mukul scored a perfect 100/100 in Computer ScienceSee all toppers →
CBSE Class 12 Informatics Practices · MCQ practice

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.

1. What does this print?
import pandas as pd
s = pd.Series([10, 20, 30])
print(s[1] + s[2])
  1. 30
  2. 40
  3. 50
  4. Error
Show the answer
Answer: 50
The default index starts at 0, so s[1] is 20 and s[2] is 30.
2. What is the output?
import pandas as pd
df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
print(df.shape)
  1. (2, 2)
  2. (2,)
  3. (4,)
  4. (2, 1)
Show the answer
Answer: (2, 2)
shape returns (rows, columns): two rows and two columns.
3. What does this print?
import pandas as pd
df = pd.DataFrame({'M': [10, 20, 30, 40]})
print(df['M'].mean())
  1. 20.0
  2. 25.0
  3. 30.0
  4. 100
Show the answer
Answer: 25.0
The mean of 10, 20, 30 and 40 is 100 divided by 4.
4. Which selects rows by LABEL rather than position?
  1. iloc
  2. loc
  3. head
  4. at_position
Show the answer
Answer: loc
loc works on labels; iloc works on integer positions.
5. Which aggregate function ignores NULL values?
  1. COUNT(*)
  2. COUNT(column)
  3. both
  4. neither
Show the answer
Answer: COUNT(column)
COUNT(*) counts every row. COUNT(column) counts only rows where that column has a value.
6. In SQL, which wildcard matches exactly one character?
  1. %
  2. _
  3. *
  4. ?
Show the answer
Answer: _
In SQL LIKE patterns, _ matches one character and % matches any number.
7. What does index=False do in to_csv()?
  1. Removes the header
  2. Stops the row numbers being written
  3. Sorts the file
  4. Skips missing values
Show the answer
Answer: Stops the row numbers being written
Without it, pandas writes the DataFrame index as an extra first column.
8. A digital footprint left without the user doing anything deliberately is called
  1. active
  2. passive
  3. encrypted
  4. anonymous
Show the answer
Answer: passive
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 class

Written by Kajal Ma'am (MCA), teaching computer subjects since 2004. Every code answer on this page was checked by running it.

Please 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.

{ }

Frequently asked questions

How many programs are needed in the CBSE Class 12 CS practical file?+
As per CBSE, the report file should contain a minimum of 15 Python programs and 5 sets of SQL queries. The practical is 30 marks (lab test 12, report file 7, project 8, viva 3).
Are these programs part of the CBSE syllabus?+
Yes, these are standard CBSE Class 12 Computer Science (083) practical concepts: stacks, file handling, recursion, searching, dictionaries and Python-MySQL connectivity. Every program here has been run and its output verified.
Can I get the full practical file and viva questions?+
Yes, request the full pack (15+ programs, the CBSE practical-file format and likely viva questions) on WhatsApp, free. Kajal Ma'am's team can also guide you through your own file.

Want to ace your boards?

See a real class before you decide. No pressure, no payment.

Book Free Demo on WhatsApp

Studying outside India?

We coach CBSE, IGCSE & international students across the globe, one-to-one, in your local time zone.

Visit International →