CBSE Class 12 Computer Science 2027 Sample Question Paper

About this paper 37 questions · 70 marks · solved answers

About this paper

This is the CBSE Class 12 Computer Science (083) sample question paper (SQP) for the 2027 board exam. It carries 70 marks across 37 questions. Every question has a worked answer with an explanation: choose Solved Ans above to study them. You can read the paper here or download the PDF to practise offline.

Marks by unit

Programming: 40 marks · Networks: 10 marks · Database: 20 marks

Marks by chapter

ChapterMarks
Python Revision Tour I3
Python Revision Tour II11
Working with Python Function9
Exception Handling1
File Handling in Python (Text File)3
File Handling in Python (Binary & CSV file)10
Data Structures (Stack)3
Computer Networks-I2
Computer Networks-II8
Relational Databases3
Simple Queries in SQL6
Table Creation and Data Manipulation Commands3
Grouping Records, Joins in SQL4
Interface Python with MySQL4

Questions in this paper

  1. Q1 (1 mark, Python Revision Tour II) Write the output on execution of the following Python code: L1=[10,20,25,30] L1.insert(1,15) print(L1)
  2. Q2 (1 mark, Python Revision Tour II) What will be the output of the following expression? Msg = "programming is amazing" print(Msg.split("m"))
  3. Q3 (1 mark, Python Revision Tour I) Which of the following data types in Python is mutable?
  4. Q4 (1 mark, Relational Databases) A column in one table matching a primary key of another table is called a:
  5. Q5 (1 mark, Python Revision Tour II) Consider the following Python code: t = (1, 2, 3) l = [4, 5] print(t + l) What will happen when this code is executed?
  6. Q6 (1 mark, Working with Python Function) What possible output is expected to be displayed on the screen at the time of execution of the Python program from the following code? import random games = {0…
  7. Q7 (1 mark, Python Revision Tour II) Predict the output for the following: Dl={"Pen":12, "Pencil":6, "Scale":5, "InkPen":20} print(12 in Dl)
  8. Q8 (1 mark, Computer Networks-I) Long-distance communication without line-of-sight is mainly achieved using:
  9. Q9 (1 mark, Simple Queries in SQL) Which MySQL query will display all employees whose salaries are between 90,000 and 100,000 (including limits)?
  10. Q10 (1 mark, Python Revision Tour I) What will be the output of the following Python statement: print(25+100 1 3/5)
  11. Q11 (1 mark, Python Revision Tour I) What is the data type of the result when the expression 5 // 2 is evaluated in Python?
  12. Q12 (1 mark, Computer Networks-II) Every network interface card (NIC) comes with its own ________ address.
  13. Q13 (1 mark, Relational Databases) In a student table, “Class” can only take values from {IX, X, XI, XII}. This set is called the ________.
  14. Q14 (1 mark, Exception Handling) What would be written in the file errorlog.txt after the following code is run? def data(num): try: return 190/(29-num) except ZeroDivisionError: logfile = ope…
  15. Q15 (1 mark, Relational Databases) Which of the following will NOT change if you insert a new record into a table?
  16. Q16 (1 mark, Working with Python Function) What will be the output of the following Python code? y = 8 def update(): y = y + 2 print(y) update()
  17. Q17 (1 mark, Computer Networks-I) In ________ switching, before a communication starts, a dedicated path is identified between the sender and the receiver.
  18. Q18 (1 mark, Python Revision Tour II) What will be the output of the following Python code? text = "Drone Expo" print(text[-2: :-4])
  19. Q19 (1 mark, Table Creation and Data Manipulation Commands) Which MySQL command correctly removes an attribute Age from table Student?
  20. Q20 (1 mark, File Handling in Python (Binary & CSV file)) Assertion (A): Opening a file in mode rb allows you to read a binary file without modifying it. Reason (R): In rb mode, if the file does not exist, Python crea…
  21. Q21 (1 mark, Simple Queries in SQL) Assertion (A): The MySQL query SELECT Student_Name FROM Student WHERE Guardian_Phone IS NULL; displays the names of students whose guardian phone number is not…
  22. Q22 (2 marks, Working with Python Function) A. Define global variable and local variable with a suitable example. OR B. Write the difference between the seek() and tell() methods in Python text file hand…
  23. Q23 (2 marks, Python Revision Tour II) The Python program below tries to print the list in reverse. However, there are syntax and logical errors in the code. Rewrite it after removing all the errors…
  24. Q24 (2 marks, Working with Python Function) A. Write a Python function capitalize_words(words) that takes a list of strings words and returns a new list with each word capitalize. Example: If the input i…
  25. Q25 (2 marks, Python Revision Tour II) A. (Answer using Python built-in methods/functions only): I. Write a statement to check whether the string username starts with "admin". II. Given data = [2, 7…
  26. Q26 (2 marks, Python Revision Tour II) Predict the output of the following Python code: code = "gLaD5" result = [] i = 0 while i < len(code): if code[i].isupper(): result.append(code[i].lower()) eli…
  27. Q27 (2 marks, Table Creation and Data Manipulation Commands) A. Write suitable commands to do the following in MySQL. I. Display a list of all the relations stored in a database. II. Delete a database named CS_SP. OR B.…
  28. Q28 (2 marks, Computer Networks-II) A. Which protocol helps us to browse through web pages using internet browsers? Name any one internet browser. OR B. Define tree topology. Also, write down any…
  29. Q29 (3 marks, File Handling in Python (Text File)) A. Write and call a Python function to read "History.txt" and display all lines that contain a four-digit year (e.g., 1999, 2024 etc.) OR B. Write a Python fun…
  30. Q30 (3 marks, Data Structures (Stack)) A list containing records of books is given as: B = [("Machine Learning Basics", 550), ("World Geography", 450), ("Wonder World", 140), ("AI Revolution", 750)]…
  31. Q31 (3 marks, Working with Python Function) A. Write a Python function avg_len( ) segment that adds up the lengths of all the words in a list and then prints the average (mean) length. OR B. Consider the…
  32. Q32 (4 marks, Simple Queries in SQL) Consider the table TECH_EVENT_REG as given below: A. Write the following queries: I. To display the number of participants in each event where the number of pa…
  33. Q33 (4 marks, File Handling in Python (Binary & CSV file)) Kabir runs a vehicle rental agency and maintains a CSV file named Rentals.csv. The file stores daily rental details with columns: Vehicle_ID, Vehicle_Type, Hou…
  34. Q34 (4 marks, Grouping Records, Joins in SQL) Aditi is managing an events database and needs to access certain information from the chess_event and registrations tables for an upcoming survey. Help her ext…
  35. Q35 (4 marks, Interface Python with MySQL) MySQL database named LibraryDB has a table book_records which contains the following attributes: • Book_ID: ID of the book (Integer) • Book_Title: Title of the…
  36. Q36 (5 marks, File Handling in Python (Binary & CSV file)) A college administrator, Atul, maintains student course enrollment records. Each record includes Roll_No, Student_Name, Course, Fees. Write Python functions to…
  37. Q37 (5 marks, Computer Networks-II) AKA University is setting up its Academic blocks at Raipur and planning to set up a network. The university has 3 academic blocks and one Human Resource Center…

Download and study this document offline

Download PDF

Loading Preview...