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

Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly)

Download the Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) PDF for free at AglaSem. Solving this previous year question paper helps you understand the real AglaSem Class 12 exam pattern, question types, difficulty level and marking scheme, and reveals important repeated topics — practise it to build speed, accuracy and exam confidence. More Detail
Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) - Page 1 of 11

About Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly)

Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) is available here for free download. Published by AglaSem for Class 12, this question paper can be viewed online or downloaded as a PDF (11 pages). Candidates preparing for Class 12 can use Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) to understand the exam pattern, the type of questions asked, and the overall difficulty level.

Frequently Asked Questions

How can I download Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly)?

Open this page and click the Download button to save Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) as a PDF. It is completely free on AglaSem Docs.

Is Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) free to download?

Yes. Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) can be viewed online and downloaded as a PDF free of cost on AglaSem Docs.

How many pages does Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) have?

Class 12 Question Paper 2024-25 Comptuter Science (Half Yearly) contains 11 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 Question Paper 2024-25 Comptuter Science (Half Yearly) – Text

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

📄 View text version (11 pages)

Page 1

HALF YEARLY EXAM

QUESTION
PAPER
ORIGINAL EXAM PAPERS

Page 2

No. of Printed Pages/Questions: 09/35

O. P. JINDAL SCHOOL, SAVITRI NAGAR
Half Yearly Examination (2024-2025)
-

Class: XH MM:70
Subject: Computer Science(083) Time: 3 Hr
(Fifteen Minutes Extra will be given for reading the Question Paper.)
General Instructions:
The question paper is divided into 5 Sections - A, B, C, D and E.
Section A consists of 18MCQ (Multiple Choice Questions)of 1 mark each.
Section B consists of 7VSA (Very Short Answer) Questions (19-25) of 2 marks each.
Section C consists of 5 SAT (Short Answer Type) Questions (26-30) of 3 marks each.
Section D consists of 3 LAT (Long Answer Type) Questions (31-33) of 5 marks each.
Section E consists of 2 Questions (34-35) of 4 marks each. One internal choice is given in Q35
againstpart (C) only.
• All programming questions are to be answered using Python Language only.

Q.N Section-A: This section consists of 18 MCQ (Multiple Choice Questions)of 1 mark each.

Find the invalid identifier from the following
1
a. b. labc c.abc_1 d._abc1

2 Given an object L=[[1,2,3],4,5, [6,7,8]] What will be the output of print (L[3][1]])?
a. [6,7,8] b.6 c. 5 d. 7
Which of the following statement(s) would give an error after executing the following code?
3
S1="Hello All" # Statement 1
print(S1) # Statement 2
S2=S1+3 # Statement 3
print(S2) #Statement 4
S3=S1+"Welcome to my class" # Statement 5

a. Statement 3 b. Statement 4 c. Statement 5 d. Statement 4 and 5

4 Address of an Object or variable can be identified by using
a. type( b. id() c.addr d. all of the above

Given an object rec = [101, 'Raisha','Delhi', 5]. Identify the statement that will result in an error.
5 a. print(rec[2])
b. rec[2] = 'Silchar
c. print(min(rec))
d. print(len(rec))

Consider the following function call
6
sum(a=45,b=67)
In the above line a=45 and b=67 represents
a. default values b. keyword arguments c. Value assignment d. Error

7
The _method of a file object flushes any unwritten information and closes the file object.
a. flush() b. close() c. clear() d. flush allO

command is used to delete a column from the table in SQL.
8
a.update b. remove c.alter d. drop

Page 3

Syntax of seek function in Python is fileObj.seek(offset, position) where fileObj is the
9
fileobject. What is the default value of position?
a. 0 b. 1 c. 2 d. 3

Pickling in python means
10 a. Python object is converted into a byte stream,

b. Python byte stream is converted into python object
c. both statements are true
d. None of the above are true

Which of the following commands will delete the table from MYSQL database?
11
a. DELETE TABLE b. DROP TABLE c. REMOVE TABLE d. ALTER TABLE

_is an attribute, which serves the purpose of uniqueness of records in a relation in SQL.
12
a. Primary Key b. Foreign Key c. Candidate Key d. Alternate Key
The SELECT statement when combined with _clause, returns records in ascending
13 order of column name.
a. group by b. where c. order by d. like

Which function is used to display the total of values of column from table in a database?
14
a. sum(*) b. total(*) c. count(*) d. return(*)

What will the output if following expression be evaluated to in Python?
15 42+4-3**2//19-3
a.43.25 b. 43.0 c. 43 d. 43.5

16 Select the correct output of the following python code:
str="My program is program for you"
t = str.partition("program")
print(t)
a. ('My', 'program',' is', 'program',' for you')

b. ('My', 'program','is program for you')
c. ('My',' is program for you')
d. ('My','is','for you')
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 А
(c) A is True but R is False
(d) A is false but R is True
Assertion (A): A logical operation results in either True or False.
17
Reason (R): An expression consists of operands and operators.
Assertion (A): In Python, when we use while loop, first condition is checked. If the
18 condition allows, then loop body is executed.
Reason (R): In Python, while loop is considered as an entry-controlled loop.

Q.N. Section-B: This section 7 VSA (Very Short Answer) Questions (19-25) of 2 marks each.

What is the role of UNIQUE constraint? How is PRIMARY KEY constraint different from
19
UNIQUE constraint?
OR

Categorize the following commands as DDL, DML & TCL:
INSERT, CREATE, COMMIT, DELETE

Page 4

Identify the output of the following Python statements.
20 LST= [[22.0, 51.6, 22.8],[23.0, 44.0, 15.0]]
L LST[-2][2]
=

print(L)

OR

Given A python String
ST=IamHere4you
Give output of :
print( ST[-2::-2])

21 Identify the candidate keys of Customer table & Select the primary key from candidate keys.
Table- Customer

Acc No Cust Name Cust_City Cust Phone Open_Bal
2101001 Sunita Ambala 9710557614 10000
2201002 Sandhya Patna 8223545233 15000
2301003 Vivek New Delhi 9972136576 13000
2401004 Meena New Delhi 9321305453 10000

a) What will be the output of the following string operation.
22 str="PYTHON@LANGUAGE"
print(str[2:12:2])

b) Write the output of the following code.
data = [1,2,4,5]
for x in data:
x=x+ 10

print(data)

23 What will be the output of the following code?
X=104
def func():
name="Asha"
global X
X=25
print("Inside the function")
print("X :",X)
print("Name ",name)

func()
print("Outside the function")
print("X :",X)

Page 5

24
Study the following program and select the possible output(s) and write maximum and minimum value
assigned to the variable y.
import random
x=random.random()
y-random.randint(0,4)
print(int(x),":",y+int(x))

(i) 0:0 (ii) 1:6 (iii) 2:4 (iv) 0:3

OR

What possible outputs(s) are expected to be displayed on screen at the time of execution of the
program from the following code? Also specify the maximum values that can be assigned to each of
the variables Lower and Upper.
import random
AR=[10,20,30,40,50,60,70];
Lower =random.randint(1,3)
Upper =random.randint(2,5)
for K in range(Lower, Upper +1):
print (AR[K],end="#")

(i) 40#50 (ii) 20#30#40# (iv) 40#50#70#
(iii) 50#60#70#
Write SQL command to create a table name as Department with the following structure
25

Field Name Field Typе Constraint
DEPTNO Integer PRIMARY KEY
DNAME Varchar(14) NOT NULL
LOC Varchar(13)
Salary Decimal

OR

a. How will you activate a database in SQL?

b. How will you show structure of a table in SQL?

O.N. Section-C: This section 5 SAT (Short Answer Type) Questions (26-30) of 3 marks each.

Suppose the content of "Myfile.txt"is
26
Python is an interactive langauge

What will be the output of the following code?
myfile open("Myfile.txt")
=

ylist=list("aeiouAEIOU")
vc=0
x = yfile.read()
for y in x:
if(y in list):
vc+=1

print(vc)
myfile.close)

Page 6

Write the output of the following
27 Python code:
def Encrypt(str):
m=""

for i in range(0,len(str)):
if(str[i].isupper()):
m=m+str[ij.lower()
elif str[i].islower():
m=m+str[i].uppero
else:
m=m+str[i-1]
print(m)
Encrypt('I Love Python')

OR

Write a function COUNTOWEL() IN PYTHON which should read each character of a text file
CHARACTER.TXT and display the count of vowels.

Example:

If the file content is as follows:
Exam is going on well
A Binary file, CINEMA.DAT has the following structure: {MNO: [MNAME, MTYPE]}
28 Where
MNO-Movie Number
MNAME- Movie Name
MTYPE is Movie Type

Write a user defined function, findType(mtype), that accepts mtype as parameter anddisplays all
the records from the binary file CINEMA.DAT, that have the value of Movie Type as mtyре.
Table- Library
29
Bid Name Author Price Mem name Issue Date Status
B01 Wings of Fire A.P.J Abdul Kalam 550 Sarita 2018-05-20 Returned

Look at the table library and identify the correct data type for all the columns, then Write the
commands to perform following operations:

• Create the above table, set Bid as Primary key.
• Modify the range of Author, increase it by 5 characters.
a. What is the advantage of using pickle module?
30 b. Write a program to write into a CSV file "one.csv" Rollno, Name and Marks separated
by comma. It should have header row and then take input from the user for all following
rows. The format of the file should be as shown if user enters 2 records.

Roll.No, Name, Marks
20,Ronit,67
56,Nihir,69

OR
a. What is difference between tell() and seek() methods?
b. Write a program to read all content of "student.csy" and display records of only those
students who scored more than 80 marks. Records stored in students is in format:
[Rollno, Name, Marks]

Page 7

Q.N. Section-D: This section 3 LAT (Long Answer Type) Questions (31-33) of 5 marks each.
a.What is the difference between text, binary & CSV files? (3 Marks)
31
b.Write the output of the following code: (2 Marks)

def change(m, n=10):
global x
x+=m

n+=x

m=n+x

print(m,n,x)
x=20
change(10)
change(20)

Consider the following code and Answer the Questions given below:
32

import #Statement 1
data=[['Arundhati',34],['Shyam',24],['Soham',22]]
with open ("Nwnames.csv","_",newline=") as f: #Statement 2
fw=csv.writer() #Statement 3
fw.writerow(['Name','Age'])
t_rec=len(data)
for i in range(0,t_rec):
fw.(data[i]) #Statement 4
#To print records with age less than 25
c=0
with open("Nwnames.csv","r") as f:
recs=csv.reader(f)
for rec in recs:
c= #Statement 5
if c!=1: #To skip Header row
if int(rec[1])<25:
print(rec)

(i) Identify the suitable code for blank space in the line marked as Statement-1.
(ii)Identify the missing code for blank space in the line marked as Statement-2.
(iii)Choose the object name to be passed i n the line marked asStatement-3.
(iv) Identify the suitable code for the blank space in Statement-4.
(v) Write the suitable code for blank space in Statement-5.

Page 8

MOHIT is writing a program to search a name in a CSV file "MYFILE.csv". He has
33 written the following code. As a programmer, help him to successfully execute the given
task.
import # Statement 1

f open("MYFILE.csv",
= ) # Statement 2
data = # Statement 3
nm = input("Enter name to be searched: ")
for rec in data:
if rec[0] nm:
print (rec)
f. () # Statement 4

(a) Name the module he should import in Statement 1.
(b) In which mode, MOHIT should open the file to search the data in the file in statement 2?
(c) Fill in the blank in Statement 3 to read the data from the file.
(d) Fill in the blank in Statement 4 to close the file.
(e) Full form of TSV.

OR

Rahul created the following table TRAVEL to store the travel details

TNO TNAME TDATE KM VTYPE NOP

101 NANDA 25-11-2019 100 VOLVO BUS 32

103 SANAL 09-12-2019 210 ORDINARY BUS 45

105 RAMU 06-12-2019 300 VOLVO BUS 40

102 SOMU 25-12-2019 120 AC DELEX BUS 35

107 NEHA 05-11-2019 250 ORDINARY BUS 25

104 SNEHA 06-11-2019 300 VOLVO BUS 32

106 KIRAN 12-12-2019 125 VOLVO BUS 43

Page 9

Based on the data given above answer the following questions:

(i) Identify the most appropriate column, which can be considered as Primarykey.
(ii) If 3 columns are added and 1rows are deleted from thetable TRAVEL, what will be
thenew degree and cardinality of the abovetable?
(iii) Write the statements to:
a. Insert the following record into the table

110 BIMAL 28-11-2022 200 VOLVO BUS 40

b. Increase KM traveled by 10 if the VTYPE is VOLVO.
c. Change the VOLVO BUS to SUPER LUXARY.

Q.N. Section-E: This section contains 2 Questions (34-35) of 4 marks each.

TABLE: GRADUATE

34 SNO NAME STIPEND SUBJECТ AVERAGE DIV
1 KARAN 400 PHYSICS 68
2 DIWAKAR 450 COMP. Sc. 68
3 DIVYA 175 CHEMISTRY 40 NULL
4 REKHA 350 PHYSICS 63

5 ARJUN 500 MATHS 70
6 SABINA 400 CEHMISTRY 55

Write SQL Statements for the following:
(i) Display details of those students whose NAME starts with 'R' or 'P'
(ii) To display NAME and STIPEND of students who are either PHYSICS or
COMPUTER SCgraduates.
(iii)Increase the value of stipend of students of computer science by 500.
(iv) Display NAME and SUBJECT of those students who have AVERAGE in the range of 65 and
75.
(a) Pankaj has written a program which is showing an error. As a friend of Pankaj, help him to
35 identify the wrong statement. Also mention the reason. (2 Marks)

f=open["test.txt","w"] #Statement 1
L= ["My name\n", "is\n", "Amit"] #Statement 2
f.writeline(L) #Statement 3
f.close() #Statement 4

(b) What will be the output of following code, if file1.txt contains : INDIA IS GREAT (2 Marks)
f=open("file1.txt","r")

Page 10

f.read ()
L=f.tell()
for i in range(L-1,-1,-1):
f.seek(i,0)
print(f.read(1),end="")
f.close()

OR (Choice for (b) part only)

Write a function in Python to print those words which contains letter 'S' or 's' anywhere in the
word in text file "STORY.txt".

If the "STORY.txt" contents are as follows:

An Old Man is happy today, he doesn't complain about anything, smiles, and even his face is
freshened up.

The output of the function should be:
is doesn't smiles his is freshened

Page 11

Study Materials
Notes

Model Papers Class 6 Notes

Sample Papers Class 7 Notes
Half Yearly Sample Papers Class 8 Notes

Class 9 Notes
Important Resources
Class 10 Notes
Periodic Table
Class 11 Notes
Writing Skills / Formats

Maps of India / World Class 12 Notes

Books and Solutions

NCERT Books
NCERT Book Solutions
HC Verma Chapter Wise Solutions
RD Sharma Solutions
CGBSE Solutions

Document Details

Board / OrgAglasem
ExamClass 12
TypeQuestion Paper
Pages11
Updated22 Jul 2026