NCERT Solutions
Class 12 Computer Science
8 chapters · 16 important questions
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?