Class 12 Computer Science Notes
These Class 12 Computer Science notes are prepared strictly according to the CBSE 2026-27 syllabus. The notes cover all important chapters including Python Revision Tour, Working with Functions, File Handling, Exception Handling, Data Structure, Computer Network, MySQL Database and Interface Python with MySQL . Each chapter is explained in a simple, exam-oriented manner with examples, definitions, and key points to help students score better in board exams. These notes are useful for revision, self-study, and last-minute preparation.
Unit 1: Computational Thinking and Programming - 2 7 chapters · 40 marks
-
Chapter 1: 🐍 Python Revision Tour I
Revision of Class 11 Python for Class 12: tokens, variables, data types, mutable and immutable types, operators and expressions, input/output, conditional statements, loops, and break, continue and loop-else, with board-style examples.
-
Chapter 2: 🐍 Python Revision Tour II
Revision of Python strings, lists, tuples and dictionaries — indexing, slicing, operators, built-in functions and methods — with diagrams, common errors and board-style questions.
-
Chapter 3: ⚙️ Working with Python Function
Defining and calling functions in Python, flow of execution, parameters and arguments (positional, default, keyword), return values, scope of variables and the LEGB rule, and passing mutable and immutable objects, with board-style questions.
-
Chapter 4: ⚡ Exception Handling
Exceptions in Python: syntax errors vs exceptions, common built-in exceptions, and handling them with try, except, else and finally, with programs and board-style questions.
-
Chapter 5A: 🗂️ File Handling in Python (Text File)
Text files in Python: opening and closing files, file modes, the with statement, read(), readline(), readlines(), write() and writelines(), flush(), file pointers with seek() and tell(), and the standard input, output and error streams.
-
Chapter 5B: 🔐 File Handling in Python (Binary & CSV file)
Binary and CSV files in Python: pickling with dump() and load(), searching, updating and deleting records in a binary file, and reading and writing CSV files with the csv module, including DictReader and DictWriter.
-
Chapter 6: 📦 Data Structures (Stack)
The stack data structure: LIFO, stack terminology (TOP, PUSH, POP, PEEK, overflow, underflow), implementing a stack with a Python list, algorithms for each operation, a menu-driven stack program and applications of stacks.
Unit 2: Computer Networks 2 chapters · 10 marks
-
Chapter 7: 🌐 Computer Networks-I
Computer networks: types of networks (PAN, LAN, MAN, WAN), evolution of networking, circuit and packet switching, data communication terms, guided and unguided transmission media, network topologies, and identifying nodes with MAC and IP addresses (IPv4 and IPv6).
-
Chapter 8: 🖧 Computer Networks-II
Network devices (modem, NIC, hub, switch, repeater, bridge, router, gateway), network protocols (HTTP, FTP, TCP/IP, PPP, email protocols, VoIP, Telnet), and internetworking concepts: WWW, URLs, DNS, web hosting, HTML, XML and network protection.
Unit 3: Database Management 5 chapters · 20 marks
-
Chapter 9: 🛢️ Relational Databases
Relational databases: purpose of a DBMS, the relational data model and its terminology (relation, tuple, attribute, domain, degree, cardinality), keys (primary, candidate, alternate, foreign), and an introduction to MySQL and SQL.
-
Chapter 10: 🔍 Simple Queries in SQL
Writing SQL queries in MySQL: literals, data types, NULL values and comments, SELECT with DISTINCT, calculations and column aliases, the WHERE clause with relational, logical, BETWEEN, IN, LIKE and IS NULL conditions, ORDER BY, MySQL functions and aggregate functions.
-
Chapter 11: 📅 Table Creation and Data Manipulation Commands
Creating databases and tables in MySQL, SQL constraints, DML commands (INSERT, UPDATE, DELETE), and further DDL commands such as ALTER TABLE and DROP TABLE, with example queries.
-
Chapter 12: 🔗 Grouping Records, Joins in SQL
Types of SQL functions, grouping rows with GROUP BY, filtering groups with HAVING, and combining tables with joins — Cartesian product, Equi-Join and Natural Join — with example queries.
-
Chapter 13: 🔗 Interface Python with MySQL
Connecting Python to MySQL with mysql.connector: creating a connection and cursor, running SELECT queries with fetchall(), fetchone() and fetchmany(), parameterised queries, and INSERT and UPDATE with commit().
Class 12 CS notes: quick answers
What is in the CBSE Class 12 Computer Science (083) syllabus for 2026-27?
The theory paper is 70 marks and the practical exam is 30 marks. The theory has three units:
- Unit 1: Computational Thinking and Programming - 2 (40 marks)
- Unit 2: Computer Networks (10 marks)
- Unit 3: Database Management (20 marks)
See the full Class 12 Computer Science syllabus for every topic and the practical marks.
Are these Class 12 CS notes free?
Yes. All 14 chapters are free to read, no login needed. Log in only if you want to track which chapters you have finished.
How should I use these notes to prepare for the board exam?
- Read one chapter at a time, then take its chapter quiz from the Class 12 CS quizzes.
- Practise coding with the Class 12 CS programs and run them in the free online Python compiler.
- Practise MySQL queries in the SQL Lab, right in your browser.
- Finish with sample papers and previous year papers to practise under exam conditions.
When is the CBSE Class 12 Computer Science exam in 2027?
Wednesday, 31 March 2027, from 10:30 AM to 1:30 PM. See the full CBSE date sheet 2027.
Are there notes for Class 12 Informatics Practices too?
Yes, see the Class 12 IP notes. For Class 11, see the Class 11 Computer Science notes.
Recommended books optional
Go beyond the notes. Optional printed books for Class 12 Computer Science to read and practise alongside these notes.
-
Sumita Arora — Progress in Computer Science with PythonSee price on Amazon
Class 12 · 2026–27 edition · Dhanpat Rai & Co.
-
Oswaal CBSE Question Bank — Computer ScienceSee price on Amazon
Class 12 · Chapterwise & topicwise · for the 2027 exam
-
Preeti Arora — Computer Science with PythonSee price on Amazon
Class 12 · Sultan Chand & Sons
-
Together With CBSE Question Bank — Computer ScienceSee price on Amazon
Class 12 · Question bank
-
Arihant All in One — Computer ScienceSee price on Amazon
Class 12 · Theory + practice questions
You don't need to buy anything: the notes, programs, quizzes and papers on CSIP12 are free. As an Amazon Associate, CSIP12 earns from qualifying purchases.