aglasem.com
Schools Admission Mock Test Playground
ClassChoose class
StateSelect state

Class 12 Pre-Board Sample Paper 2025 Computer Science

Download the Class 12 Pre-Board Sample Paper 2025 Computer Science PDF for free at AglaSem. Designed as per the latest AglaSem Class 12 exam pattern and marking scheme, this sample paper lets you practise likely questions, manage time and self-assess before the exam. More Detail
Class 12 Pre-Board Sample Paper 2025 Computer Science - Page 1 of 20

Finished viewing? Save it for later —

Download Class 12 Pre-Board Sample Paper 2025 Computer Science (PDF · 20 pages)
Downloaded 56 times

About Class 12 Pre-Board Sample Paper 2025 Computer Science

Class 12 Pre-Board Sample Paper 2025 Computer Science is available here for free download. Published by AglaSem for Class 12, this sample paper can be viewed online or downloaded as a PDF (20 pages). Candidates preparing for Class 12 can use Class 12 Pre-Board Sample Paper 2025 Computer Science to understand the exam pattern, the type of questions asked, and the overall difficulty level.

Frequently Asked Questions

How can I download Class 12 Pre-Board Sample Paper 2025 Computer Science?

Open this page and click the Download button to save Class 12 Pre-Board Sample Paper 2025 Computer Science as a PDF. It is completely free on AglaSem Docs.

Is Class 12 Pre-Board Sample Paper 2025 Computer Science free to download?

Yes. Class 12 Pre-Board Sample Paper 2025 Computer Science can be viewed online and downloaded as a PDF free of cost on AglaSem Docs.

How many pages does Class 12 Pre-Board Sample Paper 2025 Computer Science have?

Class 12 Pre-Board Sample Paper 2025 Computer Science contains 20 pages, which you can read online or download together as a single PDF.

Where can I find more Class 12 study material?

You can find more Class 12 question papers, sample papers, syllabus, and answer keys on AglaSem Docs.

Class 12 Pre-Board Sample Paper 2025 Computer Science – Text

Read the full text of this sample paper below — useful to quickly search, copy and reference the content online without downloading the PDF.

📄 View text version (20 pages)

Page 1

lasem.com
g

a
PRE-BOARD
Sample Paper
2025
pdf download
model question paper / practice
paper

sample papers

Page 2

Pre-Board Exam 2025 Sample Question Paper

Class: XII

Computer Science (083)
Question Paper (Theory)
Time allowed: 3 Hours Maximum Marks: 70

General Instructions:

∙ Please check this question paper contains 35 questions.
∙ The paper is divided into 4 Sections- A, B, C, D and E.
∙ Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
∙ Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
∙ Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
∙ Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
∙ Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
∙ All programming questions are to be answered using Python Language only.

Q. Question
No. Marks
SECTION A
1 State True or False: 1

“Identifiers are pre-defined or reserved words that convey a special meaning in
programming language.”

2 In a table in MYSQL database, an attribute A of datatype varchar (20) has the 1
value "Harish". The attribute B of datatype char (20) has value "Siddhartha ". How
many characters are occupied by attribute A and attribute B?

a. 20,6 b. 6,20 c. 9,6 d. 6,9
3 What will be the output of the following code: 1
t=(4,5,6)
t1=t*2
print(t1)
a) (4,5,6,4,5,6)
b) (4,4,5,5,6,6)
c) (8,10,12)
d) None of the above
4 Select the correct output of the code : 1
S= "Amrit Mahotsav @ 75"

a=S.partition (" ")
print (a)

Page No. 1

Page 3

(a) ( 'Amrit Mahotsav', '@', '75') (b) ['Amrit', 'Mahotsav', '@', '75']
(c) ('Amrit', 'Mahotsav @ 75') (d) ('Amrit', ' ', 'Mahotsav @ 75')
5 In a relational model, _______ is the number of columns. 1
(a) Attribute
(b) Degree
(c) Relation
(d) Tuple
6 Two doctors seating in a room and sharing some data between their mobile 1
phone. Identify the type of network formed by their devices.
a) LAN b) MAN c) PAN d) WAN
7 Given the following dictionary 1
Day={1:"Monday", 2: "Tuesday", 3: "Wednesday"}
Which statement will return "Tuesday".
(a) Day.pop()
(b) Day.pop(2)
(c) Day.pop(1)
(d) Day.pop("Tuesday")
8 What will the following expression be evaluated to in Python ? 1
2+3/3**1**2*5+10
(a) 6.5
(b) 17.0
(c) 16.0
(d) 17
9 Which of the following statement(s) would give an error after executing the 1
following code?

Stud = {"Murugan":100,"Mithu":95 } # Statement 1
print (Stud[95]) # Statement 2
Stud ["Murugan"]=99 # Statement 3
print (Stud.pop()) # Statement 4
print (Stud) # Statement 5
a) Statement 2
(b) Statement 3
c) Statement 4
(d) Statements 2 and 4

10 What possible output(s) are expected to be displayed on screen at the time of 1
execution of the following code ?
import random

Options :
a) Pencil:Book
Page No. 2

Page 4

b) Pencil:Book
Eraser:Bag
c) Pen:Book
Bag:Book
d) Bag:Eraser

11 Fill in the blank: 1
______is a communication methodology designed to deliver both voice
and multimedia communications over Internet protocol.
(a) VoIP (b) SMTP (c) PPP (d)HTTP

12 Consider the code given below: 1
c=1
def add():
_________ # missing statement
c=c+4
print(c)
add()

Which of the following statements should be given in the blank for #Missing
Statement, if the output produced is 5 ?
Options:
a. global c
b. global c= 5
c. global 5
d. c= 5

13 __________ function returns a list containing each line in the file as a list item. 1
a. tell()
b. read()
c. readline()
d. readlines()

14 1
Which of the following statements is FALSE about keys in a relational database?
a. Any candidate key is eligible to become a primary key.
b. A primary key uniquely identifies the tuples in a relation.
c. A candidate key that is not a primary key is a foreign key.
d. A foreign key is an attribute whose value is derived from the primary key of
another relation.

15 Fill in the blank : 1
_______ is used for point-to-point communication or unicast communication such
as radar and satellite.
a. Micro waves
b. Infrared waves
c. Radio waves
d. Bluetooth

16 State whether the following statement is True or False: 1
An exception may be raised even if the program is syntactically correct.
Page No. 3

Page 5

Q17 and 18 are ASSERTION AND REASONING based questions. Mark the
correct choice as

(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True

17 Assertion (A): CSV (Comma Separated Values) is a file format for data storage 1
which looks like a text file.
Reason (R): The information is organized with one record on each line and each
field is separated by comma.

18 Assertion (A) : readlines() reads all the lines from a text file and returns the lines 1
along with newline as a list of strings.
Reason (R) : readline() can read the entire text file line by line without using any
looping statements.
SECTION B
19 Differentiate between Bus Topology and Star Topology. Also, write one advantage 2
of each of them.
OR

(i) Expand the following terms:
POP3 , URL
(ii) Give one difference between XML and HTML.

20 2
Hari has written a code to input a number and check whether it is prime or not. His
code is having errors. Rewrite the correct code and underline the corrections made.

21 Write a function countNow(PLACES) which takes a list of names and displays 2
the names (in uppercase) of the places whose names are longer than 5 characters.

For example, Consider the following List
PLACES= ["Delhi","London","Paris","New York","Doha"]
The output should be:
LONDON

NEW YORK

OR

Page No. 4

Page 6

Write a function, lenWords(STRING), that takes a string as an argument and
returns a tuple containing length of each word of a string.
For example, if the string is "Come let us have some fun", the tuple will have (4, 3,
2, 4, 4, 3)

22 Predict the output of the Python code given below: 2

23 Write the Python statement for each of the following tasks using BUILT-IN 2
functions/methods only:

(i) To delete second element of the list L1.
(ii) Insert the value "orange" as the second element of the list L1.
OR
A list named studentAge stores age of students of a class. Write the Python
command to import the required module and (using built-in function) to display the
most common age value from the given list.

24 Name any two DDL and any two DML commands. 2
OR
Differentiate between count(attribute) and count(*) functions in SQL.
25 Write the output of the Python code given below : 2

SECTION C
26 Write the output of the code given below: 3
Page No. 5

Page 7

a=30
def call(x):
global a
if a%2==0:
x+=a
else:
x - =a
return x
x=20
print(call(35),end=”#”)
print(call(40),end=”@”)

27 Write the output of the SQL queries (a) to (d) based on the table TRAVEL 3
given below :

(i) SELECT COUNT(DISTINCT START) FROM TRAVEL;
(ii) SELECT T_ID, FARE FROM TRAVEL
WHERE T_DATE LIKE '2021%' ;
(iii) SELECT T_ID, T_DATE FROM TRAVEL WHERE END = 'CHENNAI'
ORDER BY FARE ;

28 Write a function count_Dwords () in Python to count the words ending with a digit 3
in a text file "details.txt".

Example:
If the file content is as follows:
On seat2 VIP1 will sit and
On seat1 VVIP2 will be sitting
Output will be:
Number of words ending with a digit are 4

OR
Write the definition of a Python function named LongLines ( ) which reads the
contents of a text file named 'lines.txt’ and displays those lines from the file which
have at least 10 words in it. For example, if the content of 'lines.txt' is as follows:
Once upon a time, there was a woodcutter

He lived in a little house in a beautiful, green wood.
One day, he was merrily chopping some wood.
He saw a little girl skipping through the woods, whistling happily.

Page No. 6

Page 8

The girl was followed by a big gray wolf.

Then the function should display output as:
He lived in a little house in a beautiful, green wood.
He saw a little girl skipping through the woods, whistling happily.
29 Consider the following table : 3

Based on the given table, write SQL queries for the following:
(i) Increase the amount by 10% of all loan_no.
(ii) Display loan_no and interest (12 % of amount) of all records. The column
heading ‘Monthly interest’ should also be displayed.
(iii) Delete the records of loan_no who have amount less than 4000.

30 A list contains following record of course details for a University: 3
[Course_name, Fees, Duration]
Write the following user defined functions to perform given operations on the stack
named ‘Univ’ :
(i) Push_element() - To push an object containing the
Course_name, Fees and Duration of a course, which has fees
greater than 100000 to the stack.
(ii) Pop_element() - To pop the object from the stack and display it.
Also, display “Underflow” when there is no element in the stack.
For example :
If the lists of courses details are :
[‘MCA’, 200000,3]
[‘MBA’, 500000,2]
[‘BA’, 100000, 3]
The stack should contain :
[‘MBA’, 500000,2]
[‘MCA’, 200000,3]
SECTION D

31 1X4=4
Consider the tables COMPUTER and SALES given below:

Page No. 7

Page 9

Write SQL queries for the following:
(i) Display PROD_NAME and QTY_SOLD from the tables COMPUTER and
SALES.
(ii) Display the structure of the table COMPUTER .
(iii) Delete table SALES.
(iv) Display the total QTY_SOLD in each QUARTER.

32 4
i. What is the advantage of using a csv file for permanent storage?
ii. Write a Program in Python that defines and calls the following user defined
functions:
(i) ADD() – To accept and add data of an employee to a CSV file ‘record.csv’.
Each record consists of a list with field elements as empid, name and mobile to
store employee id, employee name and employee salary respectively.
(ii) COUNTR() – To count the number of records present in the CSV file named
‘record.csv’.

OR
i. Give any one point of difference between a binary file and a csv file.
ii. Write a Program in Python that defines and calls the following user defined
functions:
(i) add() – To accept and add data of an employee to a CSV file ‘furdata.csv’.
Each record consists of a list with field elements as fid, fname and fprice to
store furniture id, furniture name and furniture price respectively.

(ii) search()- To display the records of the furniture whose price is more than
10000.

SECTION E

33 ABC Consultants are setting up a secure network for their office campus at Noida 1x5=5
for their day-to-day office and web-based activities. They are planning to have
connectivity between three buildings and the head office situated in Bengaluru. As a
Page No. 8

Page 10

network consultant, give solutions to the questions (i) to (v), after going through the
building locations and other details which are given below :

(i) Suggest the most suitable place to install the server for this
organization. Also, give reason to justify your suggested location.
(ii) Suggest the cable layout of connections between the buildings
inside the campus.
(iii) Suggest the placement of the following devices with justification :
i. Switch
ii. Repeater
(iv) The organization is planning to provide a high-speed link with the head office
situated in Bengaluru, using a wired connection. Suggest a suitable wired medium
for the same.
(v) The System Administrator does remote login to any PC, if any requirement
arises. Name the protocol, which is used for the same.
34 1+4=5
(i) Differentiate between r+ and w+ file modes in Python.
(ii) Consider a file, SPORT.DAT, containing records of the following structure:

[SportName, TeamName, No_Players]
Write a function, copyData(), that reads contents from the file SPORT.DAT and copies the
records with Sport name as “Basket Ball” to the file named BASKET.DAT. The function
should return the total number of records copied to the file BASKET.DAT.
OR
(i) How are text files different from binary files?
(ii) A Binary file, CINEMA.DAT has the following structure:

[MNO,MNAME, MTYPE]

Where
MNO – Movie Number
MNAME – Movie Name
Page No. 9

Page 11

MTYPE is Movie Type
Write a user defined function, findType(mtype), that accepts mtype as parameter and
displays all the records from the binary file CINEMA.DAT, that have the value of Movie
Type as mtype.

35 (i) Give one difference between alternate key and candidate key. 1+4=5
(ii) Kabir wants to write a program in Python to insert the following record in the table
named Student in MYSQL database, SAMPLE2023:
● rno(Roll number )- integer
● name(Name) - string
● DOB (Date of birth) – Date
● Fee – float
Note the following to establish connectivity between Python and MySQL:
● Username - root
● Password - tiger
● Host - localhost
The values of fields rno, name, DOB and fee has to be accepted from the user. Help Kabir to
write the program in Python.
OR
i. Give one difference between primary key and foreign key.
ii. The code given below inserts the following record in the table Student:
RollNo – integer
Name – string
Clas – integer
Marks – integer
Note the following to establish connectivity between Python and MYSQL:
● Username is root
● Password is tiger
● The table exists in a MYSQL database named school.
● The details (RollNo, Name, Clas and Marks) are to be accepted from the user.
Write the following missing statements to complete the code:
Statement 1 – to access MySQL database
Statement 2 – to form the cursor object
Statement 3 – to execute the command that inserts the record in the table Student.
Statement 4- to add the record permanently in the database

import _______________ as mysql #statement 1
import mysql.connector as mysql
def sql_data():
con1=mysql.connect(host="localhost", user="root", password="tiger",
database="school")
mycursor=_________________ #Statement 2
rno=int(input("Enter Roll Number :: "))
name=input("Enter name :: ")
clas=int(input("Enter class :: "))
marks=int(input("Enter Marks :: "))
querry="insert into student values ({ }, '{ }',{ },{ } )" .format
(rno,name,clas,marks)

______________________ #Statement 3
______________________ #Statement 4
print("Data Added successfully")
Page No. 10

Page 12

Class: XII
Computer Science (083)
Marking scheme
Time allowed: 3 Hours Maximum Marks: 70

General Instructions:

∙ Please check this question paper contains 35 questions.
∙ The paper is divided into 4 Sections- A, B, C, D and E.
∙ Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
∙ Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
∙ Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
∙ Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
∙ Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
∙ All programming questions are to be answered using Python Language only.

Que s. Question Marks
No.
SECTION A
1 False 1
2 Option b
6,20 1
3 Option a 1
4 Option d 1
5 Option b 1
6 Option c 1
7 Option b 1
8 Option b 1
9 Option d 1
10 Option a and d 1
11 Option a 1
12 Option a 1
13 Option d 1
14 Option c 1
15 Option a 1
16 True 1
17 Option (a) 1
18 Option C 1
19 2 Marks for correct answer

2
20 2
Page No. 1

Page 13

def prime():
n=int(input("Enter number to check :: ")) #bracket missing
for i in range (2, n//2):
if n%i==0: # = missing
print("Number is not prime \n")
break #wrong indent
else:
print("Number is prime \n”) # quote mismatch
(½ mark for each correct correction made and underlined.)
21 PLACES= ["Delhi","London","Paris","New York","Doha"]
def countNow(PLACES):
for p in PLACES :
if len(p) >5 :
print(p.upper())
countNow(PLACES)

OR
STRING="Come let us have some fun"

def lenWords( STRING) :
t = ()
s = STRING.split()
for w in s:
length = len ( w)
t = t + (length,)
print (t)
lenWords(STRING)
Note: Any other correct logic may be marked
2
22 Ans: (22,44,66) 2
23 i. L1.pop(1)
ii. L1.insert(1, 'orange')
OR
import statistics
print( statistics.mode(studentAge) )
2
24 2 Marks for correct answer 2
25 20$4 2
26 65#70@ 3
27
COUNT(DISTINCT START)
2
i.

T_ID FARE
101 4500
102 4000 3
Page No. 2

Page 14

ii.

iii.
T_ID T_DATE
101 2021-12-25
103 2020-12-10

28

OR

Note: Any other correct logic may be marked
3
29 i. Update loan set amount = amount + amount*10/100;
ii. select loan_no, amount * 12/100 'monthly interest' from loan;
iii. delete from loan where amount < 4000 ; 3
30

Note: Any other correct logic may be marked
3
31 i. select PROD_NAME, QTY_SOLD from computer c, sales s
where c.PROD_ID = s. PROD_ID ;
ii. desc computer;

iii. drop table sales;
iv. select QUARTER , sum( QTY_SOLD) from sales group by quarter; 4
32 4
Page No. 3

Page 15

i. Advantage of a csv file:
● It is human readable – can be opened in Excel and Notepad applications
● It is just like text file

ii. Program:
import csv
def ADD():
fout=open("record.csv","a",newline="\n")
wr=csv.writer(fout)
empid=int(input("Enter Employee id :: "))
name=input("Enter name :: ")
mobile=int(input("Enter mobile number :: "))
lst=[empid,name,mobile] ---------1/2 mark
wr.writerow(lst) ---------1/2 mark
fout.close()
def COUNTR():
fin=open("record.csv","r",newline="\n")
data=csv.reader(fin)
d=list(data)
print(len(d))
fin.close()
ADD()
COUNTR()
(1 mark for advantage
½ mark for importing csv module
1 ½ marks each for correct definition of ADD() and COUNTR()
½ mark for function call statements)

OR
Difference between binary file and csv file: (Any one difference may be given)
Binary file:

● Extension is .dat
● Not human readable
● Stores data in the form of 0s and 1s

CSV file
● Extension is .csv
● Human readable
● Stores data like a text file

Program:
import csv
def add():
fout=open("furdata.csv","a",newline='\n')
wr=csv.writer(fout)
fid=int(input("Enter Furniture Id :: "))
fname=input("Enter Furniture name :: ")

fprice=int(input("Enter price :: "))
FD=[fid,fname,fprice]
wr.writerow(FD)
Page No. 4

Page 16

fout.close()
def search():
fin=open("furdata.csv","r",newline='\n')
data=csv.reader(fin)
found=False
print("The Details are")
for i in data:
if int(i[2])>10000:
found=True
print(i[0],i[1],i[2])
if found==False:
print("Record not found")
fin.close()
add()
print("Now displaying")
search()
(1 mark for difference
½ mark for importing csv module
1 ½ marks each for correct definition of add() and search()
½ mark for function call statements
)
33 i. Building 3 , Maximum no of Computers ½ Mark for Naming and ½ for reason.
ii. Any suitable layout 1 Mark for correct layout.
iii. i. switch in all buildings, as more than one computers used.
ii. Repeater from Building 1 to Building 3, as distance is more than 100 m.
iv. Optical Fiber, can be used for high speed wired connection.
v. Telnet
1x5 =5
34 (i)

r+ mode:
1) Primary function is reading
2) File pointer is at beginning of file
3) if the file does not exist, it results in an error

w+ mode:
1) primary function is writing
2) if the file does not exist, it creates a new file.
3) If the file exists, previous data is overwritten
4) File pointer is at the beginning of file

(ii) 5

Page No. 5

Page 17

OR
(i) Text files:
a. Extension is .txt
b. Data is stored in ASCII format that is human readable
c. Has EOL character that terminates each line of data stored in the text files

Binary Files
a. Extension is .dat
b. Data is stored in binary form (0s and 1s), that is not human readable.
ii.

Note: Any other correct logic may be marked

Page No. 6

Page 18

35 i. One marks for correct difference.
ii.

Note: Any other correct logic may be marked

OR
i. One marks for correct difference.
ii.
Statement 1:
mysql.connector
Statement 2:
con1.cursor()
Statement 3:
mycursor.execute("select * from student where Marks>75")
Statement 4:
con1.commit() 1+4=5

Page No. 7

AglaSem Earn while Learn Program. Send your papers and get paid.
Contact: support@

Page 19

Sample Papers

CBSE Sample Papers
ICSE / ISC Board Sample Papers
AP Board Sample Papers
Assam Board Sample Papers
Bihar Board Sample Papers
Chhattisgarh Board Sample Papers
Goa Board Sample Papers
Gujarat Board Sample Papers
Haryana Board Sample Papers
HP Board Sample Papers
J&K State Board Sample Papers
Jharkhand Board Sample Papers
Karnataka Board Sample Papers
Kerala Board Sample Papers

Page 20

Sample Papers

MP Board Sample Papers
Maharashtra Board Sample Papers
Manipur Board Sample Papers
Mizoram Board Sample Papers
Orissa Board Sample Papers
Punjab Board Sample Papers
Rajasthan Board Sample Papers
Tamil Nadu Board Sample Papers
Telangana State Board Sample Papers
Tripura Board Sample Papers
UP Board Sample Papers
Uttarakhand Board Sample Papers
West Bengal Board Sample Papers

Document Details

Board / OrgAglasem
ExamClass 12
TypeSample Paper
Pages20
Updated22 Jul 2026