NCERT SolutionsClass 12 Computer Science
💻

NCERT Solutions
Class 12 Computer Science

8 chapters · 16 important questions

Ch 1

Exception Handling in Python

Covers types of errors (syntax, runtime, logical), exception handling using try-except-else-finally, and raising exceptions. Handling multiple exceptions and user-defined exceptions are included.

Key Topics

Types of errors: syntax, runtime (exceptions), logicaltry-except blockMultiple except clauseselse and finally in exception handlingraise statement for user-defined exceptions

Important Questions

Q1

What is the difference between a syntax error and a runtime error? Give one example of each.

Short Answer2M
Q2

Write a Python program that takes two numbers as input and raises an exception if the divisor is zero. Use try-except-else-finally.

Long Answer4M
Ch 2

File Handling in Python

Covers opening, reading, writing, and appending files in text and binary modes. CSV file handling is included. Functions: open(), read(), readline(), readlines(), write(), writelines(), seek(), tell().

Key Topics

Text files vs binary filesFile opening modes: r, w, a, r+, rb, wbReading: read(), readline(), readlines()Writing: write(), writelines()CSV file handling using csv module

Important Questions

Q1

Write a Python function to count the number of lines in a text file.

Long Answer3M
Q2

What is the difference between 'w' and 'a' mode in file handling?

Short Answer2M
Ch 3

Data Handling with Pandas — Series and DataFrame

Covers creation and operations on Series and DataFrame objects. Importing from CSV, selection using loc/iloc, filtering, groupby, and handling missing values are key topics.

Key Topics

Creating Series from lists and dictionariesCreating DataFrame from dictionary of listsImporting CSV using read_csv()Data selection: loc[], iloc[], Boolean indexingHandling missing data: isnull(), fillna(), dropna()GroupBy and aggregate operations

Important Questions

Q1

Write Python code to create a DataFrame from a dictionary and display only rows where marks > 80.

Long Answer3M
Q2

What are the parameters of read_csv()? Explain: filepath, sep, header, index_col.

Short Answer2M
Ch 4

Data Visualisation with Matplotlib

Covers creating line charts, bar charts, histograms, pie charts, and scatter plots using Matplotlib's pyplot interface. Customising plots with labels, title, legend, and colour.

Key Topics

Line chart: plt.plot()Bar chart: plt.bar() and plt.barh()Histogram: plt.hist()Pie chart: plt.pie()Customisation: xlabel, ylabel, title, legend, color, figsize

Important Questions

Q1

Write Python code to draw a bar chart showing the marks of 5 students using Matplotlib.

Long Answer3M
Q2

When would you choose a histogram over a bar chart? Give one example.

Short Answer2M
Ch 5

Computer Networks

Covers types of networks (LAN, MAN, WAN), topologies, the OSI model (7 layers), TCP/IP model (4 layers), network devices, and common protocols. Switching (circuit and packet) is included.

Key Topics

Network types: LAN, MAN, WANOSI model: 7 layers and their functionsTCP/IP model: 4 layersNetwork devices: hub, switch, router, modem, gateway, firewallProtocols: HTTP, FTP, SMTP, POP3, DNS, TCP/IP

Important Questions

Q1

Explain the OSI model. State the function of each layer.

Long Answer5M
Q2

Distinguish between a hub and a switch. Which is more efficient and why?

Short Answer2M
Ch 6

Database Concepts

Covers database terminology (table, record, field, primary key, foreign key, candidate key), types of databases, DBMS vs RDBMS, and ER model basics. Advantages of DBMS over file system are important.

Key Topics

Database terminology: table, record, fieldPrimary key, foreign key, candidate keyDBMS advantages over file systemRDBMS vs DBMSEntity-Relationship (ER) diagram basics

Important Questions

Q1

What is a primary key? How does it differ from a candidate key and a foreign key?

Long Answer3M
Q2

State four advantages of using a DBMS over a flat file system.

Short Answer2M
Ch 7

Structured Query Language (SQL)

Covers SQL commands: DDL (CREATE, ALTER, DROP), DML (INSERT, UPDATE, DELETE, SELECT). Complex SELECT queries with WHERE, ORDER BY, GROUP BY, HAVING, JOINs, and aggregate functions are key exam topics.

Key Topics

DDL: CREATE TABLE, ALTER TABLE, DROP TABLEDML: INSERT, UPDATE, DELETE, SELECTSELECT with WHERE, ORDER BY, GROUP BY, HAVINGAggregate functions: COUNT, SUM, AVG, MAX, MININNER JOIN and basic joins

Important Questions

Q1

Write SQL queries to: (a) Create a table Student(RollNo, Name, Marks, Grade) (b) Insert a row (c) Display students with Marks > 80 ordered by Name.

Long Answer4M
Q2

What is the difference between WHERE and HAVING clause in SQL?

Short Answer2M
Ch 8

Society, Law and Ethics in IT

Covers cybercrime types, the IT Act 2000, intellectual property rights, digital footprint, net neutrality, and ethical issues in computing like plagiarism and data privacy.

Key Topics

Types of cybercrimes: hacking, phishing, cyberbullying, ransomware, identity theftIT Act 2000: key provisions and offencesIntellectual property: copyright, patents, trademarks, open source licencesDigital footprint and online privacyNet neutrality, data privacy, e-waste, digital divide

Important Questions

Q1

What is phishing? How is it different from hacking? What are the precautions against each?

Long Answer3M
Q2

What is net neutrality? Why is it important for internet users?

Short Answer2M
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