CBSE

CBSE Class 12 Computer Science Important Questions 2027, Chapter-Wise Questions, PDF

👤

Computer Science is a scoring subject in the CBSE Class 12 board examination, but it requires regular practice. Students need to understand Python programming, file handling, data structures, SQL queries, database concepts and computer networks. Learning definitions alone is not enough. You must also practise writing programs, predicting outputs and solving database questions.

Table of Contents
  1. CBSE Class 12 Computer Science Important Questions 2027: Overview
  2. CBSE Class 12 Computer Science Exam Pattern 2027
  3. CBSE Class 12 Computer Science Important Questions 2027 PDF Download
  4. CBSE Class 12 Computer Science Chapter-Wise Important Questions 2027
  5. CBSE Class 12 Computer Science Important Python Programs 2027
  6. CBSE Class 12 Computer Science Important SQL Commands 2027
  7. CBSE Class 12 Computer Science Practical Exam 2027: Marks Distribution
  8. How to Prepare for CBSE Class 12 Computer Science Exam 2027?
  9. Benefits of Solving CBSE Class 12 Computer Science Important Questions 2027
  10. CBSE Class 12 Computer Science Important Questions 2027 FAQs

To help students prepare for the CBSE Class 12 Computer Science Exam 2027, we have provided important questions based on the latest CBSE syllabus for the 2026–27 academic session. These questions cover all three theory units, including Computational Thinking and Programming–2, Computer Networks and Database Management.

Students can use this question bank to revise important concepts, practise Python programs, prepare SQL queries and understand the types of questions asked in the board examination.

CBSE Class 12 Computer Science Important Questions 2027: Overview

Before starting your preparation, check the basic details of the CBSE Class 12 Computer Science examination. This overview includes the subject code, exam duration, total marks and syllabus structure.

Particulars Details
Exam Name CBSE Class 12 Board Examination 2027
Subject Computer Science
Subject Code 083
Academic Session 2026–27
Theory Exam Marks 70
Practical Exam Marks 30
Total Marks 100
Exam Duration 3 Hours
Question Paper Sections 5 Sections (A, B, C, D and E)
Programming Language Python
Official Syllabus CBSE Class 12 Computer Science Syllabus 2026–27

CBSE Class 12 Computer Science Exam Pattern 2027

Students should understand the latest exam pattern before solving important questions. The CBSE Class 12 Computer Science theory paper carries 70 marks and contains 37 compulsory questions divided into five sections. Internal choices are available in some questions.

The 2026–27 CBSE sample paper follows this question distribution:

Section Question Numbers Number of Questions Marks
Section A 1–21 21 21
Section B 22–28 7 14
Section C 29–31 3 9
Section D 32–35 4 16
Section E 36–37 2 10
Total 1–37 37 70

Unit-Wise Marks Distribution

CBSE has divided the Class 12 Computer Science theory syllabus into three major units. Students should give more time to programming and database management because these units carry a higher weightage.

Unit Name Marks
Unit 1 Computational Thinking and Programming–2 40
Unit 2 Computer Networks 10
Unit 3 Database Management 20
Total 70

Practical Examination: The practical assessment carries 30 marks. It includes a Python programming test, SQL queries, a report file, a project and viva voce.

Note: The unit-wise marks distribution is official. It does not guarantee a fixed number of marks from every individual chapter or topic.

CBSE Class 12 Computer Science Important Questions 2027 PDF Download

Students often look for a Computer Science important questions PDF to revise important topics before the board examination. A question bank can help you practise Python programs, SQL queries, file handling and theoretical questions in one place.

Download CBSE Class 12 Computer Science Important Questions 2027 PDF (Available Soon)

The PDF should include unit-wise questions, Python programming exercises, output-based questions, SQL practice, computer network questions and important practical topics. Students should also solve the official CBSE sample paper and marking scheme to understand the expected answer format.

CBSE Class 12 Computer Science Chapter-Wise Important Questions 2027

The CBSE Class 12 Computer Science syllabus covers programming, file handling, stacks, networking and database management. Students should practise both theoretical and practical questions from every unit. The following questions are prepared according to the topics mentioned in the 2026–27 CBSE syllabus.

Unit 1: Computational Thinking and Programming–2

This unit carries 40 marks in the theory examination, making it the most important unit in Computer Science. It includes Python functions, exception handling, text files, binary files, CSV files and stack data structures. Students should practise writing complete programs and predicting their outputs.

A. Python Functions Important Questions

  1. What is a function in Python? Explain its advantages with an example.
  2. Differentiate between built-in functions and user-defined functions.
  3. What are parameters and arguments in Python?
  4. Explain positional parameters and default parameters with examples.
  5. What is the difference between a function that returns a value and a function that does not return a value?
  6. Explain the use of the return statement in Python.
  7. What is the scope of a variable? Differentiate between local and global variables.
  8. Explain the flow of execution in a Python function.
  9. Write a Python function to find the sum of all positive numbers in a list.
  10. Write a function that accepts a list of words and returns a new list containing the first letter of each word.
  11. Write a Python function to calculate the factorial of a number.
  12. Write a function to count the number of even and odd numbers in a given list.

B. Exception Handling Important Questions

Exception handling helps programmers manage errors that occur while a program is running. Students should understand the use of try, except and finally blocks and practise writing programs that handle common errors.

  1. What is exception handling in Python?
  2. Differentiate between syntax errors, logical errors and runtime errors.
  3. Explain the purpose of try and except blocks with an example.
  4. What is the use of the finally block in Python?
  5. What happens when a program tries to divide a number by zero?
  6. Write a Python program to handle a ZeroDivisionError.
  7. Write a program that accepts a number from the user and handles invalid input.
  8. Explain the difference between an error and an exception.

C. File Handling Important Questions

File handling is an important topic in the Computer Science syllabus. It allows users to store information permanently and access it whenever required. Students should understand text files, binary files and CSV files, along with their reading and writing operations.

  1. What is file handling in Python? Why is it required?
  2. Differentiate between text files and binary files.
  3. What is a CSV file? Explain its use with an example.
  4. Explain the different file opening modes: r, r+, w, w+, a and a+.
  5. Differentiate between read(), readline() and readlines().
  6. Explain the use of write() and writelines() methods.
  7. What is the purpose of the with statement in file handling?
  8. Differentiate between relative and absolute file paths.
  9. Explain the use of seek() and tell() methods.
  10. What is the difference between binary file modes and text file modes?
  11. Explain the use of the pickle module in Python.
  12. Differentiate between dump() and load() methods.
  13. Explain the use of reader(), writer(), writerow() and writerows() functions in CSV file handling.

D. Text File Programming Questions

Practise the following Python programs to improve your file handling skills.

  1. Write a Python program to read a text file named Story.txt and display its contents.
  2. Write a program to count the number of lines in a text file.
  3. Write a Python program to count the number of vowels and consonants in a text file.
  4. Write a program to display all lines that contain the word “Python”.
  5. Write a Python function to count the number of times a particular word appears in a text file.
  6. Write a program to read a text file and display each word separated by a hash (#).
  7. Write a program to count uppercase letters, lowercase letters and digits in a text file.
  8. Write a program to remove all lines containing the letter ‘a’ and save the remaining lines in another file.
  9. Write a Python program to count the total number of words in a text file.
  10. Write a program to display lines that contain a four-digit year.

E. Binary File Programming Questions

Binary file questions usually test the use of the pickle module and record-based operations. Practise creating, reading, searching, appending and updating records in binary files.

  1. What is a binary file? Explain its advantages.
  2. Explain the use of the pickle module in Python.
  3. Write a Python program to create a binary file containing student names and roll numbers.
  4. Write a program to search for a student record using a roll number.
  5. Write a Python program to display all records stored in a binary file.
  6. Write a program to update the marks of a student using their roll number.
  7. Write a program to append a new record to an existing binary file.
  8. Write a program to count the number of records in a binary file.
  9. Explain the difference between dump() and load() methods.
  10. Write a program to search for an employee record using an employee ID.

F. CSV File Programming Questions

CSV files store information in rows and columns. Students should practise reading and writing CSV files using Python’s csv module.

  1. What is a CSV file? Explain its importance.
  2. Which module is used to handle CSV files in Python?
  3. Explain the use of reader() and writer() functions.
  4. Differentiate between writerow() and writerows().
  5. Write a Python program to create a CSV file containing student names and marks.
  6. Write a program to read and display all records from a CSV file.
  7. Write a program to search for a student record using their roll number.
  8. Write a program to count the number of records in a CSV file.
  9. Write a program to append employee details to an existing CSV file.
  10. Write a program to search for a user ID in a CSV file and display the related password.

G. Stack Important Questions

A stack is a linear data structure that follows the Last In, First Out (LIFO) principle. This means the last element added to the stack is the first one removed. Students should practise implementing stack operations using Python lists.

  1. What is a stack in Python?
  2. Explain the LIFO principle with an example.
  3. What are push and pop operations?
  4. Differentiate between stack overflow and stack underflow.
  5. How can a stack be implemented using a Python list?
  6. Write a Python function to push an element into a stack.
  7. Write a Python function to pop an element from a stack.
  8. Write a program to display all elements of a stack.
  9. Write a program to count the total number of elements in a stack.
  10. Write a program to push only those numbers from a list that are greater than 50 into a stack.

Unit 2: Computer Networks

Computer Networks carries 10 marks in the CBSE Class 12 Computer Science theory examination. This unit covers networking basics, communication media, network devices, topologies, protocols and web services. Students should learn definitions, differences, uses and practical examples of networking concepts.

A. Computer Networks Important Questions

  1. What is a computer network? Explain its advantages.
  2. Explain the evolution of computer networks.
  3. What are ARPANET and NSFNET?
  4. What is the Internet? How is it different from the World Wide Web?
  5. Explain the components of data communication.
  6. What is bandwidth in computer networking?
  7. Differentiate between bandwidth and data transfer rate.
  8. What is an IP address? Explain its importance.
  9. What is the difference between circuit switching and packet switching?
  10. Explain the role of communication protocols in a network.

B. Transmission Media Important Questions

Transmission media provide a path for data to travel from one device to another. Students should understand the differences between wired and wireless communication media.

  1. What is transmission media?
  2. Differentiate between guided and unguided transmission media.
  3. Explain twisted pair cable with its advantages and disadvantages.
  4. What is a coaxial cable?
  5. Explain the working and advantages of optical fibre cable.
  6. Differentiate between optical fibre and twisted pair cable.
  7. What are radio waves? Mention their uses.
  8. Explain microwave communication.
  9. What are infrared waves?
  10. Differentiate between radio waves, microwaves and infrared waves.

C. Network Devices Important Questions

Network devices help connect computers and manage the flow of data. Students should learn the functions of common networking devices and understand where they are used.

  1. What is a modem? Explain its function.
  2. What is a network interface card (NIC)?
  3. Explain the use of an RJ45 connector.
  4. Differentiate between a hub and a switch.
  5. What is a router? Explain its function.
  6. Differentiate between a router and a gateway.
  7. What is a repeater? Why is it used?
  8. Explain the function of an Ethernet card.
  9. What is a Wi-Fi card?
  10. Differentiate between a modem and a router.

D. Network Topologies and Types Important Questions

Network topology refers to the arrangement of computers and other devices in a network. Students should understand different topologies and network types with their advantages and limitations.

  1. What is network topology?
  2. Explain bus topology with a diagram.
  3. Explain star topology with a diagram.
  4. What is tree topology? Explain its advantages.
  5. Differentiate between bus, star and tree topology.
  6. Which topology is suitable for a network that requires centralised management? Give a reason.
  7. What is PAN? Give an example.
  8. Differentiate between LAN and MAN.
  9. What is WAN? Explain with an example.
  10. Differentiate between LAN, MAN and WAN.

E. Network Protocols and Web Services Important Questions

Protocols are rules that help devices communicate over a network. Web services allow users to access websites, transfer files and communicate through the Internet.

  1. What is a network protocol?
  2. Explain the use of HTTP and HTTPS.
  3. Differentiate between HTTP and HTTPS.
  4. What is FTP? Explain its use.
  5. Explain the functions of SMTP and POP3.
  6. What is TCP/IP?
  7. What is the use of TELNET?
  8. Explain the role of VoIP in communication.
  9. What is a URL? Explain its different parts.
  10. Differentiate between a web browser and a web server.
  11. What is web hosting?
  12. Explain the difference between a domain name and a website.
  13. What is HTML? Explain its role in web pages.
  14. What is XML? How is it different from HTML?

Unit 3: Database Management

Database Management carries 20 marks in the theory examination. It includes database concepts, relational data models, SQL commands, aggregate functions, joins and Python-MySQL connectivity. Students should practise writing SQL queries because questions may require both query writing and output prediction.

A. Database Concepts Important Questions

  1. What is a database? Explain its advantages.
  2. What is a database management system (DBMS)?
  3. Differentiate between data and information.
  4. What is a relational database?
  5. Explain the terms relation, attribute and tuple.
  6. What is a domain in a database?
  7. Differentiate between degree and cardinality.
  8. What is a candidate key?
  9. Differentiate between primary key and foreign key.
  10. What is an alternate key?
  11. Explain the importance of keys in a relational database.
  12. What is the difference between a primary key and a unique constraint?

B. SQL Important Questions

SQL is used to create, manage and retrieve data from relational databases. Students should understand DDL and DML commands and practise writing queries using SELECT, INSERT, UPDATE, DELETE, ALTER and other SQL statements.

  1. What is SQL? Explain its importance in database management.
  2. Differentiate between DDL and DML commands.
  3. What is the difference between CHAR and VARCHAR data types?
  4. Explain the use of the NOT NULL and UNIQUE constraints.
  5. What is the purpose of the PRIMARY KEY constraint?
  6. Differentiate between DELETE, DROP and ALTER commands.
  7. Explain the use of the WHERE clause.
  8. What is the purpose of the DISTINCT clause?
  9. Explain the use of the ORDER BY clause.
  10. What is the difference between ASC and DESC?
  11. Explain the use of the BETWEEN operator.
  12. What is the use of the IN operator?
  13. Differentiate between IS NULL and IS NOT NULL.
  14. Explain the use of the LIKE operator with examples.
  15. What is aliasing in SQL?
  16. Explain the use of GROUP BY and HAVING clauses.
  17. Differentiate between WHERE and HAVING clauses.
  18. Explain the use of aggregate functions in SQL.
  19. What is a Cartesian product?
  20. Differentiate between equi-join and natural join.

C. Important SQL Query Practice

Students should practise the following queries using suitable tables. These questions cover common SQL operations and query-writing skills.

Consider a table named STUDENT with the following fields:

Roll_No Name Class Marks City
101 Aman XII 85 Delhi
102 Riya XII 92 Noida
103 Karan XII 76 Delhi
104 Neha XII 88 Jaipur
105 Mohit XII 65 Noida
  1. Write an SQL query to display all records from the STUDENT table.
  2. Write a query to display the names and marks of all students.
  3. Write a query to display students who scored more than 80 marks.
  4. Write a query to display students who belong to Delhi.
  5. Write a query to display all student records in descending order of marks.
  6. Write a query to display the unique cities in the STUDENT table.
  7. Write a query to find the highest marks.
  8. Write a query to calculate the average marks of all students.
  9. Write a query to count the total number of students.
  10. Write a query to display students whose marks are between 70 and 90.
  11. Write a query to display students whose names start with the letter ‘A’.
  12. Write a query to update the marks of Roll_No 105 to 75.
  13. Write a query to delete the record of Roll_No 103.
  14. Write a query to display the minimum marks in the table.
  15. Write a query to count the number of students in each city.

D. Aggregate Functions and SQL Clauses

Aggregate functions perform calculations on a group of records and return a single result. Students should understand their syntax and practise combining them with GROUP BY and HAVING clauses.

Function / Clause Purpose
MAX() Returns the highest value
MIN() Returns the lowest value
SUM() Calculates the total
AVG() Calculates the average
COUNT() Counts records
GROUP BY Groups records with matching values
HAVING Applies conditions to grouped records
ORDER BY Sorts records
DISTINCT Removes duplicate values from the result

E. Python-MySQL Connectivity Important Questions

Python-MySQL connectivity allows a Python program to interact with a MySQL database. Students should understand the connection process and practise inserting, updating, deleting and retrieving records.

  1. What is Python-MySQL connectivity?
  2. Why is database connectivity required in Python?
  3. Explain the use of the connect() function.
  4. What is a cursor in Python-MySQL connectivity?
  5. Explain the use of execute() and commit() methods.
  6. Differentiate between fetchone() and fetchall().
  7. What is the use of rowcount in Python-MySQL connectivity?
  8. Explain the use of the %s format specifier in SQL queries.
  9. Write a Python program to connect Python with a MySQL database.
  10. Write a program to insert a new record into a MySQL table using Python.
  11. Write a program to update student marks using Python and MySQL.
  12. Write a program to delete a record from a MySQL table.
  13. Write a program to display all records from a database table.
  14. Write a program to search for a student using their roll number.

CBSE Class 12 Computer Science Important Python Programs 2027

Python programming is an important part of the Computer Science examination. Students should practise writing programs without depending on ready-made solutions. Focus on functions, file handling, lists, stacks and CSV operations.

The following programs are useful for revision:

Topic Important Programming Practice
Functions Sum of positive numbers, factorial, average of list elements
Strings Count vowels, reverse a string, check palindrome
Lists Find maximum and minimum, search an element, count frequency
Dictionaries Count character frequency, store student records
Exception Handling Handle division by zero and invalid input
Text Files Count words, lines, vowels and consonants
Binary Files Create, search, update and append records
CSV Files Read, write and search CSV records
Stack Push and pop elements using a list
Python-MySQL Insert, update, delete and display database records

CBSE Class 12 Computer Science Important SQL Commands 2027

SQL commands are useful for creating tables, inserting records, updating data and retrieving information. Students should remember the basic syntax of important SQL commands.

SQL Command Purpose Example
CREATE Creates a database or table CREATE DATABASE School;
USE Selects a database USE School;
SHOW DATABASES Displays databases SHOW DATABASES;
SHOW TABLES Displays tables SHOW TABLES;
DESCRIBE Shows table structure DESCRIBE Student;
INSERT Adds records INSERT INTO Student VALUES (101,’Aman’,85);
SELECT Retrieves records SELECT * FROM Student;
UPDATE Changes existing records UPDATE Student SET Marks=90 WHERE Roll_No=101;
DELETE Removes records DELETE FROM Student WHERE Roll_No=101;
ALTER Changes table structure ALTER TABLE Student ADD City VARCHAR(20);
DROP Removes a database or table DROP TABLE Student;

CBSE Class 12 Computer Science Practical Exam 2027: Marks Distribution

The practical examination is worth 30 marks. Students should prepare Python programs, SQL queries, the practical report file, project work and viva questions. Regular practical practice can help students improve their programming and database skills.

Practical Component Marks
Python Programming Lab Test 8
SQL Queries Lab Test 4
Report File 7
Project 8
Viva Voce 3
Total 30

Important Practical File Requirements

Students should prepare their practical files according to the CBSE syllabus. The prescribed requirements include:

  • Minimum 15 Python programs.
  • Minimum 5 sets of SQL queries using one or two tables.
  • Minimum 4 programs based on Python-MySQL connectivity.
  • A project using concepts learned in Classes 11 and 12.

Students should also practise explaining their programs because questions related to the practical file and project may be asked during the viva.

How to Prepare for CBSE Class 12 Computer Science Exam 2027?

A good preparation plan should include programming practice, SQL revision and theory preparation. Students should not leave practical topics until the last few days. Follow these tips to prepare effectively.

  1. Understand the Python Basics: Revise Python concepts from Class 11, including data types, loops, strings, lists, tuples and dictionaries.
  2. Practise Functions Daily: Write small programs using user-defined functions, parameters and return statements.
  3. Learn File Handling: Practise reading, writing, searching and updating text, binary and CSV files.
  4. Revise Stack Operations: Understand the LIFO principle and practise push and pop functions using lists.
  5. Practise SQL Queries: Write SQL queries regularly using SELECT, WHERE, GROUP BY, HAVING, ORDER BY and aggregate functions.
  6. Learn Computer Network Definitions: Prepare short notes on network devices, topologies, protocols and transmission media.
  7. Practise Python-MySQL Connectivity: Understand the connection process and practise insert, update, delete and display operations.
  8. Solve the Official Sample Paper: Attempt the CBSE 2026–27 sample paper within three hours to understand the question pattern.
  9. Check the Marking Scheme: Compare your answers with the official marking scheme and improve your answer-writing method.
  10. Revise Practical Work: Prepare your Python programs, SQL query sets, project and viva questions before the practical examination.

Benefits of Solving CBSE Class 12 Computer Science Important Questions 2027

Practising important questions can help students understand the syllabus and improve their confidence before the board examination. Here are some major benefits:

  • Better Understanding: Important questions help students revise Python, SQL and networking concepts.
  • Programming Practice: Regular coding practice improves logical thinking and problem-solving skills.
  • Improved SQL Skills: Solving query-based questions helps students understand database operations.
  • Better Time Management: Practising sample questions helps students manage the three-hour examination.
  • Topic-Wise Revision: Students can identify difficult topics and give them more attention.
  • Exam Preparation: Solving different question types helps students become familiar with the board examination format.

CBSE Class 12 Computer Science Important Questions 2027 FAQs

Q1. What are the most important topics in CBSE Class 12 Computer Science 2027?

The most important topics include Python functions, exception handling, text file handling, binary files, CSV files, stacks, SQL queries, database management, Python-MySQL connectivity and computer networks. Students should prepare all topics according to the latest CBSE syllabus.

Q2. How many marks are allotted to Computer Science in Class 12 CBSE?

CBSE Class 12 Computer Science carries 100 marks in total. The theory examination is worth 70 marks, while the practical examination carries 30 marks.

Q3. What is the subject code for CBSE Class 12 Computer Science?

The subject code for CBSE Class 12 Computer Science is 083.

Q4. Which programming language is used in the CBSE Class 12 Computer Science exam?

Python is the programming language prescribed for the Class 12 Computer Science programming questions. Students should practise writing Python programs according to the CBSE syllabus.

Q5. How many questions are there in the CBSE Class 12 Computer Science paper 2027?

According to the CBSE 2026–27 sample question paper, the Computer Science theory paper contains 37 questions divided into five sections: A, B, C, D and E.

Q6. How many marks does Python programming carry in the Computer Science theory paper?

The unit Computational Thinking and Programming–2 carries 40 marks out of the total 70 marks in the theory examination. It includes functions, exception handling, file handling and stacks.

Q7. Is SQL important for CBSE Class 12 Computer Science 2027?

Yes, SQL is an important part of the Database Management unit, which carries 20 marks. Students should practise SQL commands, aggregate functions, GROUP BY, HAVING, joins and Python-MySQL connectivity.

Q8. Is file handling included in the CBSE Class 12 Computer Science syllabus 2026–27?

Yes, file handling is included in the syllabus. Students need to prepare text files, binary files and CSV files, including their reading, writing, searching and updating operations.

Q9. How can I score good marks in CBSE Class 12 Computer Science?

Students should practise Python programs regularly, revise SQL commands, understand computer network concepts and solve sample papers. They should also prepare their practical file, project and viva questions properly.

Q10. Where can I download the CBSE Class 12 Computer Science sample paper 2026–27?

Students can download the official Computer Science sample paper and marking scheme from the CBSE Academic website. The sample paper helps students understand the latest question pattern and marks distribution.

Last updated on

Geetanjali Gupta

SEO Content Writer at GenZExams, creating easy-to-understand and informative content on government jobs, competitive exams, recruitment notifications, exam dates and results. Focused on providing accurate and useful information to help candidates prepare for their exams.