CBQ PracticeClass 12 Informatics Practices
🐍

Class 12 Informatics Practices
CBQ Practice

Competency Based Questions · 5 chapters · 10 CBQ sets

Question types:Case StudySource BasedAssertion–Reason
💡Attempt each question before clicking Show Answers — then compare.
Filter:
Ch 1

Pandas — Series and DataFrame

2 sets
CBQ 1Case StudyStudent Performance Analysis with Pandas4 marks

Read the passage

A school stores student data in a CSV file with columns: Name, Class, Maths, Science, English, Total. A data analyst imports this into Python using Pandas: `import pandas as pd; df = pd.read_csv('students.csv')`. The analyst needs to: (a) find the average marks in each subject, (b) filter students who scored above 80 in Maths, (c) find the student with the highest Total, (d) group by Class and find the mean. Pandas DataFrames support vectorised operations, so no explicit loops are needed. Missing values (NaN) must be handled before analysis.
1

To find the average Maths marks in the DataFrame df, the correct Pandas code is:

1M
(A)df.mean('Maths')
(B)df['Maths'].mean()
(C)df.average('Maths')
(D)mean(df['Maths'])
2

To filter students who scored above 80 in Maths, the correct code is:

1M
(A)df.filter(df['Maths'] > 80)
(B)df[df['Maths'] > 80]
(C)df.where('Maths' > 80)
(D)df.select(Maths > 80)
3

To handle missing values by filling them with 0, the correct code is:

1M
(A)df.remove_na(0)
(B)df.fill(0)
(C)df.fillna(0)
(D)df.dropna(0)
4

Explain the difference between a Pandas Series and a DataFrame. How is a DataFrame created from a dictionary?

1M
CBQ 2Assertion–Reason1 mark
A
Assertion

In Pandas, `df.dropna()` and `df.fillna()` serve different purposes for missing data.

R
Reason

`df.dropna()` removes rows (or columns) containing missing values entirely, while `df.fillna(value)` replaces missing values with a specified value — preserving the data structure but substituting a meaningful value for NaN.

(A) Both A and R are true and R is the correct explanation of A
(B) Both A and R are true but R is not the correct explanation of A
(C) A is true but R is false
(D) A is false but R is true
Ch 2

Data Visualisation with Matplotlib

2 sets
CBQ 1Case StudyVisualising Sales Data with Matplotlib4 marks

Read the passage

A retail company wants to visualise monthly sales data using Python's Matplotlib library. The data: months = ['Jan','Feb','Mar','Apr','May','Jun'] and sales = [45000, 52000, 48000, 61000, 55000, 70000]. The analyst needs to: (a) draw a line chart to show the trend, (b) draw a bar chart to compare monthly sales, (c) add a title, axis labels, and grid. Code skeleton: `import matplotlib.pyplot as plt`. Line chart: `plt.plot(months, sales)`. Bar chart: `plt.bar(months, sales)`. The analyst also needs a histogram to understand the distribution of individual product prices.
1

To add a title 'Monthly Sales' to a Matplotlib chart, the correct code is:

1M
(A)plt.title = 'Monthly Sales'
(B)plt.add_title('Monthly Sales')
(C)plt.title('Monthly Sales')
(D)plt.set_title('Monthly Sales')
2

A histogram is most appropriate for visualising:

1M
(A)Comparison of sales across categories
(B)Trend of sales over time
(C)Distribution/frequency of a continuous variable (like product prices)
(D)Proportion of each product in total sales
3

To display the chart on screen after drawing it, the correct Matplotlib command is:

1M
(A)plt.render()
(B)plt.draw()
(C)plt.display()
(D)plt.show()
4

When should you use a pie chart vs a bar chart? Give the appropriate scenario for each.

1M
CBQ 2Assertion–Reason1 mark
A
Assertion

A scatter plot is used to identify the relationship between two numerical variables.

R
Reason

By plotting each data point as a pair (x, y) on a coordinate system, scatter plots reveal patterns like positive correlation (both increase together), negative correlation (one increases as the other decreases), or no correlation (random spread).

(A) Both A and R are true and R is the correct explanation of A
(B) Both A and R are true but R is not the correct explanation of A
(C) A is true but R is false
(D) A is false but R is true
Ch 3

SQL — Database Queries

2 sets
CBQ 1Case StudySchool Database Management with SQL4 marks

Read the passage

A school maintains a MySQL database with two tables: STUDENT(AdmNo, Name, Class, DOB, Fees) and MARKS(AdmNo, Subject, MarksObtained, Grade). The database administrator needs to: (a) find all students in Class 12, (b) find the average marks per subject, (c) list students who scored above 85 in any subject, (d) count students who have paid fees above ₹50,000, (e) join the two tables to show student name with their marks. SQL queries are case-insensitive but must follow correct syntax.
1

The SQL query to find all students in Class 12 is:

1M
(A)SELECT * WHERE Class = '12' FROM STUDENT;
(B)SELECT * FROM STUDENT WHERE Class = '12';
(C)GET * FROM STUDENT IF Class = '12';
(D)SELECT Name FROM STUDENT AND Class = 12;
2

The SQL command to find the average MarksObtained for each Subject is:

1M
(A)SELECT Subject, MEAN(MarksObtained) FROM MARKS;
(B)SELECT Subject, AVG(MarksObtained) FROM MARKS GROUP BY Subject;
(C)SELECT AVG(MarksObtained) FROM MARKS WHERE Subject;
(D)SELECT Subject, SUM(MarksObtained)/COUNT(*) GROUP BY MARKS;
3

To join STUDENT and MARKS tables and show Name with MarksObtained, the correct query uses:

1M
(A)COMBINE STUDENT, MARKS ON STUDENT.AdmNo = MARKS.AdmNo
(B)SELECT STUDENT.Name, MARKS.MarksObtained FROM STUDENT, MARKS WHERE STUDENT.AdmNo = MARKS.AdmNo
(C)SELECT Name, MarksObtained FROM STUDENT JOIN MARKS
(D)INNER TABLE STUDENT WITH MARKS USING AdmNo
4

Explain the difference between WHERE and HAVING clauses in SQL. When is HAVING used?

1M
CBQ 2Assertion–Reason1 mark
A
Assertion

PRIMARY KEY in a database table cannot contain NULL values.

R
Reason

A Primary Key uniquely identifies each row in a table — if NULL were allowed, two rows could both have NULL as their key, making unique identification impossible and violating the entity integrity rule.

(A) Both A and R are true and R is the correct explanation of A
(B) Both A and R are true but R is not the correct explanation of A
(C) A is true but R is false
(D) A is false but R is true
Ch 4

Computer Networks

2 sets
CBQ 1Case StudySetting Up a School Network4 marks

Read the passage

A school is setting up a computer network across 3 buildings. Building A has the server room, Building B has the computer lab (30 computers), and Building C has the administrative office (10 computers). The network designer considers: (a) using a star topology within each building (switches connect all computers), (b) connecting buildings via a fibre optic backbone, (c) assigning IP addresses from the 192.168.1.0/24 subnet, which gives 254 usable IPs. The school also wants wireless access points in the library and canteen. Data travels through routers between different networks and through switches within the same network.
1

In a star topology, if the central switch fails:

1M
(A)Only the computers directly connected to that switch lose connectivity
(B)The entire network fails since all computers depend on the central switch
(C)The network continues normally through alternate paths
(D)Only two computers connected by a direct cable are affected
2

A router is used to connect the school network to the internet. A router operates at which layer of the OSI model?

1M
(A)Physical Layer (Layer 1)
(B)Data Link Layer (Layer 2)
(C)Network Layer (Layer 3)
(D)Transport Layer (Layer 4)
3

The subnet 192.168.1.0/24 provides how many usable host IP addresses?

1M
(A)256
(B)255
(C)254
(D)252
4

Distinguish between HTTP and HTTPS. Why is HTTPS important for online banking websites?

1M
CBQ 2Assertion–Reason1 mark
A
Assertion

A switch is more efficient than a hub for connecting computers in a LAN.

R
Reason

A hub broadcasts data to all connected devices regardless of the destination, wasting bandwidth and creating collisions, while a switch learns MAC addresses and sends data only to the specific destination port, reducing collisions and improving efficiency.

(A) Both A and R are true and R is the correct explanation of A
(B) Both A and R are true but R is not the correct explanation of A
(C) A is true but R is false
(D) A is false but R is true
Ch 5

Emerging Trends and Society

2 sets
CBQ 1Case StudyArtificial Intelligence in Healthcare4 marks

Read the passage

A hospital in Mumbai uses an AI-powered diagnostic system that analyses X-rays and MRI scans. The system was trained on 2 million labelled medical images using Machine Learning — specifically a type of ML called Deep Learning (using neural networks with many layers). The AI can detect pneumonia from chest X-rays with 94% accuracy, matching senior radiologists. The system also uses Natural Language Processing (NLP) to read and summarise patient medical records. Concerns raised: (a) what if the AI makes a wrong diagnosis? (b) is patient data safe? (c) will AI replace doctors?
1

The AI system that learns from 2 million labelled X-ray images to classify new X-rays is an example of:

1M
(A)Unsupervised Learning — no labels needed
(B)Supervised Learning — learning from labelled training data to make predictions on new data
(C)Reinforcement Learning — learning through trial and error with rewards
(D)Rule-based Expert System — using predefined rules
2

Natural Language Processing (NLP) in the context of reading patient records refers to:

1M
(A)Converting speech to text only
(B)AI's ability to understand, interpret, and generate human language from text data
(C)Translating medical terms to simple language only
(D)Programming the AI in natural (spoken) language instead of code
3

The concern about patient data safety in the AI system relates to which aspect of digital ethics?

1M
(A)Digital literacy
(B)Intellectual property
(C)Data privacy and cybersecurity
(D)Net neutrality
4

What is the Internet of Things (IoT)? Give two examples of IoT in healthcare.

1M
CBQ 2Assertion–Reason1 mark
A
Assertion

Cloud computing allows users to access computing resources without owning physical hardware.

R
Reason

Cloud providers like AWS, Google Cloud, and Microsoft Azure own vast data centres and provide computing power, storage, and software over the internet on a pay-per-use model — users access these resources through a browser or API without purchasing servers.

(A) Both A and R are true and R is the correct explanation of A
(B) Both A and R are true but R is not the correct explanation of A
(C) A is true but R is false
(D) A is false but R is true
CBSE Class 10 · Phase 2 Board Exam · May 2026

Appearing for the May Phase 2 Board Exam? Practice with AI-ranked questions.

Built for the May 2026 Phase 2 Board Exam — board paper analysis + unlimited practice for Maths, Science, English & SST.

Improvement · May 2026

Mathematics

299
599
Access to all CBSE Class 10 Maths chapters
Know which questions are most likely to come in your exam
Study by Chapter or by Section (A–E)
Step-by-step solutions for every question
AI-revealed high probability questions
Pattern recognition across past CBSE papers
Expected Paper for Phase 2 Board Exam (unlocks 3 weeks before)
Improvement · May 2026

Science

299
599
Access to all CBSE Class 10 Science chapters
Know which questions are most likely to come in your exam
Study by Chapter or by Section (A–E)
Step-by-step solutions for every question
AI-revealed high probability questions
Pattern recognition across past CBSE papers
Expected Paper for Phase 2 Board Exam (unlocks 3 weeks before)
★ Best Value · May 2026

Maths and Science

Maths · Science

+ SST & English Free
499
998
Both subjects — Maths & Science
Know which questions are most likely to come in your exam
Study by Chapter or by Section (A–E)
Step-by-step solutions for every question
AI-revealed high probability questions
Pattern recognition across past CBSE papers
Expected Paper for Phase 2 Board Exam (unlocks 3 weeks before)
Instant access
Valid till board exam
Secure payment — Razorpay
Phase 2 Board Exam · May 2026

CBSE Class 10 — Board Pattern