NCERT Solutions
Class 12 Computer Science
8 chapters · 16 important questions · Updated 2025-26
Chapter 1
Python Revision Tour
1 exercises · 3 solved →
Chapter 2
Functions and Recursion
1 exercises · 3 solved →
Chapter 3
File Handling in Python
1 exercises · 3 solved →
Chapter 4
Data Structures — Stack
1 exercises · 3 solved →
Chapter 5
Data Structures — Queue
1 exercises · 3 solved →
Chapter 6
Sorting Algorithms
1 exercises · 3 solved →
Chapter 7
Computer Networks
1 exercises · 3 solved →
Chapter 8
Database Concepts
1 exercises · 3 solved →
Chapter 9
Structured Query Language (SQL)
1 exercises · 3 solved →
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
Important Questions
What is the difference between a syntax error and a runtime error? Give one example of each.
Write a Python program that takes two numbers as input and raises an exception if the divisor is zero. Use try-except-else-finally.
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
Important Questions
Write a Python function to count the number of lines in a text file.
What is the difference between 'w' and 'a' mode in file handling?
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
Important Questions
Write Python code to create a DataFrame from a dictionary and display only rows where marks > 80.
What are the parameters of read_csv()? Explain: filepath, sep, header, index_col.
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
Important Questions
Write Python code to draw a bar chart showing the marks of 5 students using Matplotlib.
When would you choose a histogram over a bar chart? Give one example.
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
Important Questions
Explain the OSI model. State the function of each layer.
Distinguish between a hub and a switch. Which is more efficient and why?
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
Important Questions
What is a primary key? How does it differ from a candidate key and a foreign key?
State four advantages of using a DBMS over a flat file system.
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
Important Questions
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.
What is the difference between WHERE and HAVING clause in SQL?
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
Important Questions
What is phishing? How is it different from hacking? What are the precautions against each?
What is net neutrality? Why is it important for internet users?
Frequently Asked Questions
Is NCERT enough for CBSE Class 12 Computer Science board exam?
Yes. CBSE board exams are designed entirely around NCERT. 80–90% of questions in the Class 12 Computer Science paper are directly based on NCERT concepts — sometimes reworded, never from outside NCERT. Completing all 16 important questions listed here is the minimum you need.
How to study NCERT Class 12 Computer Science for board exams?
Go chapter-by-chapter. Read the chapter first, then attempt the important questions without looking at answers. Check your answer structure — CBSE gives marks per point, so structure matters as much as content. For 5-mark answers: brief intro + 4–5 numbered points with keywords + conclusion.
Which chapters are most important in Class 12 Computer Science for CBSE boards?
Chapters with the most long-answer (5-mark) important questions carry the most marks in the board paper. Look at which chapters here have the highest question count — those are the ones CBSE has historically focused on. Don't skip any chapter, but spend extra time on these.
How many questions come from NCERT in CBSE Class 12 Computer Science exam?
Nearly all 16 questions in the Class 12 Computer Science board paper are rooted in NCERT. The exact question may be reworded, but the concept, definition, or formula always comes from the NCERT textbook. Practicing these 16 important questions covers the vast majority of what can be asked.