0% found this document useful (0 votes)
56 views8 pages

CS Final

The document outlines the structure and content of the Pre-Board Examination for Class XII Computer Science at Sagar International School for the academic year 2025-26. It includes details about the examination format, sections, types of questions, and marks distribution, along with specific questions covering Python programming, SQL queries, and computer science concepts. The exam consists of 37 questions across five sections, with varying marks assigned to each section.

Uploaded by

atsagar62
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views8 pages

CS Final

The document outlines the structure and content of the Pre-Board Examination for Class XII Computer Science at Sagar International School for the academic year 2025-26. It includes details about the examination format, sections, types of questions, and marks distribution, along with specific questions covering Python programming, SQL queries, and computer science concepts. The exam consists of 37 questions across five sections, with varying marks assigned to each section.

Uploaded by

atsagar62
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SAGAR INTERNATIONAL SCHOOL, PERUNDURAI.

PRE- BOARD EXAMINATION-2025-26


Computer Science (083)
Class – XII Max. Marks:70
SET 1 Time Allowed: 3 hours
• This question paper contains 37 questions.
• All questions are compulsory. However, internal choices have been provided in
some questions. Attempt only one of the choices in such questions
• The paper is divided into 5 Sections- A, B, C, D and E.
• Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
• Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
• Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
• Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
• Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
• All programming questions are to be answered using Python Language only.
• In case of MCQ, text of the correct answer should also be written.

SECTION-A (21 x 1 = 21 Marks)


1. State if the following statement is True or False:
Using the math module, the output of the below statements will be 4:
import math
[Link](4.8)
2. What will be the output of the following code?
S='I Love my India'
print(S[-5:]+S[2:6])
a) aidnILove b) IndiaLove c) India Love d) IndiLov
3. Consider the given expression:
print(23<23 or 34>45 and not 50<=50)
Which of the following will be the correct output of the given expression?
a) True b) 0 c) False d) Error
4. The cardinality of the resultant table of an operation in SQL is the product of the
cardinalities of the two underlying tables. Identify the operation.
5. What will be the output of the following Python code?
L=[23,12,45,34]
print(L[-[Link]-2])
a) [34] b) [34,12] c) 34 d) [ ]
6. Write the output of the following Python code :
for n in range(30,10,-5):
print ( n,end=',' )
7. What will be the output of the following Python statement:
print(17%2**3**2//5)
8. Consider the given SQL Query:
SELECT * FROM PRODUCT WHERE PRICE = NULL;
1
Manav is executing the query but not getting the correct output. Write the
correction.
9. What will be the output of the following Python code?
try:
y='4'+'2'
except ValueError:
print("Value error occured!")
except TypeError:
print("Type error occured!")
else:
print("Done!")
a) Value error occured!
b) Type error occured!
c) Done!
d) Nothing is printed
10. Which code removes a key only if it exists, without raising an error?
a) del d['key']
b) [Link]('key')
c) [Link]('key', None)
d) [Link]('key')
11. 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
X =[100,75,10,125]
Go = [Link](1,3)
for i in range(Go):
print(X[i],end="$$")
a) 100$$75$$10$$125$$ b) 75$$10$$

c) 100$$75$$10 d) 100$$75$$

12. What will be the output of the following Python code?


def change(a,b):
global x
x=a
y=b
x,y=4,5
change(10,20)
print(x,y,sep='#')
a) 10#5 b) 10#20 c) 4#20 d) 4#5
13. Which command increases the number of tuples in a table?
a) ALTER b) UPDATE c) INSERT d) DELETE
14. What will be the output of the following code?
text = "apple,banana,grape,orange"
print([Link](',', 2))
2
a) ['apple', 'banana', 'grape,orange']
b) ['apple', 'banana', 'grape', 'orange']
c) ['apple,banana', 'grape', 'orange']
d) ['apple', 'banana,grape,orange']
15. Nancy intends to position the file pointer to the beginning of a text file. Write Python
statement for the same assuming F is the File object.
16. Which SQL command is used to remove a table in MySQL?
a) UPDATE b) DELETE c) DROP d) ALTER
17. The device used to amplify a weak signal in a network is called__________.
a) Router
b) Switch
c) Repeater
d) Modem
18. Which of the following statement is true about topology in computer networks?
a) It refers to the shape of network cables.
b) It describes how devices are physically arranged and connected
c) It defines the type of software used for transmission
d) It specifies the speed of a network
19. Which of the following is correct about HTTP and HTTPS?
a) Bothe are used for sending emails
b) HTTPS is the secure version of HTTP
c) HTTP is used for file transfer; HTTPS is for chat.
d) HTTPS works only in LAN networks, but HTTP works in all the networks
20 and Q21 are Assertion(A) and Reason(R) 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.
20. Assertion (A): Tuples can be used as dictionary keys
Reason (R): Tuples are immutable
21. Assertion (A): The SQL statement ALTER TABLE ORDERS ADD EMAIL
VARCHAR(50); will add a column named ‘EMAIL’ to the ‘ORDERS’ table.
Reason (R): The ALTER command in SQL is used to modify the structure of
existing tables.
SECTION- B (7 x 2 = 14 Marks)
22. Explain the difference between list and tuple with example.
OR
Explain the difference between the operators % in // in python with example.
23. The code given below is intended to remove all vowels from a given string and
return the resulting string. However, there are syntax and logical errors in the code.
Rewrite it after removing all the errors. Also, underline all the corrections made.
def remove vowels(str):
vowels = ['a', 'e', 'i', 'o', 'u',’A’,’E’,’I’,’O’,U’]
new_str = ""
for ch in str:
3
if ch in vowels:
new_str = new_str + ch
return new_str
result = remove_vowels(Education)
print("String after removing vowels:", result)
24. A. (Answer using Python built-in methods/functions only):
I) Write a statement to rearrange a python list NUM in descending order.
II) Write a statement to remove an element at index 5 from a list NUM.
OR
B. Predict the output of the following Python code:
text="Life@India@is Beautiful"
X=[Link]("@")
print(X)
print([Link]("@"))
25. Write a function search_element() in Python that accepts a number list NUM and a
number n. If the number n exists in the list, display the index of the number in the
list. If it does not exist, print a message saying "Element not found".
Example:
If NUM=[12,34,56,23] and n=34, then the function should display
34 at index 1
OR
Write a python function update_marks() that accepts a dictionary marks_list, a
student_name and anew_mark. If the student already exists , update their marks
with the new one. If the student does not exist, print ‘student not found’
26. Predict the output of the Python code given below :
products = {"Table": ['wood',5000],"Chair": ['plastic',500],
"Sofa":['wood',8000],"Chair":['wood',1500]}
wooden={}
for p in products:
if products[p][0].lower()=='wood':
wooden[p]=products[p]
for k,v in [Link]():
print(k,v[1])
27. A. Write suitable commands to do the following in MySQL.
I. Create a database named MYDB
II. Display all the databases.
OR
B. Differentiate between Alter and Update query in SQL with a suitable example.
28. A. Write one advantage and disadvantage of the following
I. Twisted pair cable
II. Optical fiber
OR
I. Differentiate between hub and switch in computer networks
II. Expand HTTP and SMTP

4
SECTION-C ( 3 x 3 = 9 Marks)
29. Write a user defined function linecount() in python that displays the number of lines
starting with word 'The' in the file [Link] .
OR
Write a method/function CNTWORDS() in python to read contents from a text file
[Link], to count and return the occurrences of those words, which are
having 4 or more characters.
30. A list contains following record of an employee: [Name, Phone_number, Place] .
Write the following user defined functions to perform given operations on the stack
named ‘PHONE’:
(i) Push () - To Push the names of employees whose phone number starts with
‘9’ in to the stack.
(ii) Pop () - To Pop and display the content of the stack. Also, display “Stack
Empty” when there are no elements in the stack.
For example:
If the list of employee details is:
[[‘Mohan’,’945645645’,’Chennai’],[‘Rahul’,’75676868’,’TVM’],
[‘Sunil’,’97557575’,’Mumbai’]]

The stack should contain [‘Mohan’, ‘Sunil’]


The output should be:
Sunil,Mohan,Stack Empty

31. A. Predict the output of the following Python code:


s="CBSE@2026"
n = len(s)
m=""
i=0
while i<n:
if s[i] >= 'a' and s[i] <= 'z':
m = m +s[i].upper()
elif s[i] >= 'A' and s[i] <= 'N':
m = m +s[i-1]
elif not s[i].isalnum():
m = m + '#'
elif s[i].isdigit():
m = m +'9'
i+=1
print(m)

OR

B. Predict the output of the following Python code:

countries = ["India","Australia","Kenya","United states","Oman","Nepal","Argentina"]

5
newcountries = []
for country in countries:
if len(country) >= 5 and country[-1].lower() not in 'aeiou':
[Link]([Link]())
print(newcountries)

SECTION-D ( 4 x 4 = 16 Marks)
32. Consider the table PASSENGERS as given below:

A. Write the following queries:


I. To display the minimum age of male and female passengers.
II. To display the records of PASSENGERS table sorted by TRAVELDATE in
descending order.
III. To display the distinct Train numbers(TNO) from the PASSENGERS table.
IV. To display the records of passengers whose names end with the letter 'A'.
OR
B. Predict the output of the following:
I. SELECT PNAME,PNR FROM PASSENGERS WHERE GENDER=’MALE’
AND AGE>45;
II. SELECT PNAME,AGE FROM PASSENGERS WHERE PNAME LIKE ‘R%’;
III. SELECT COUNT(*) FROM PASSENGERS WHERE TNO=12030;
[Link] * FROM PASSENGERS WHERE AGE>60;

33. Sandra is a teacher working in a CBSE school. To keep track of student


performance in exams , she has created a CSV file named [Link], which
stores the details of each student. The columns of the CSV file are:
Rollno,Name,Term1,Term2,Term3. The columns Term1,2&3 indicates marks
obtained in different term examinations.

6
Help her to efficiently maintain the data by creating the following user-defined
functions:
I. Accept() – to accept a student’s details from the user and add it to the file
[Link].
II. CalculateAverage() – to calculate and display the roll number, name and average
mark of term1,term2 and term3 of every student.

34. Write the SQL query for the following questions based the tables given below.
Table: STUDENT
RollNo Name Class Section Marks City
1 Ananya 12 A 85 Kochi
2 Rahul 12 A 92 Trivandrum
3 Neha 11 B 78 Kozhikode
4 Arjun 12 B 88 Kochi
5 Sneha 11 A 90 Kollam

Table: FEES
RollNo Amount Status
1 15000 Paid
2 15000 Unpaid
3 13000 Paid
4 15000 Paid
5 13000 Unpaid
I. To display the names of students from Kochi and Kollam
II. To change the status of RollNo 5 to Paid
III. To delete the fees details of students who paid the fees.
IV. A. To display the Cartesian Product of the two tables.
OR
B. To display the names of students who have not paid the fees.

35. A MySQL database named LibraryDB has a table book_records with the
following attributes:
• Book_ID: Book identification number (Integer)
• Title: Title of the book (String)
• Author: Author of the book (String)
• Copies: Number of copies available (Integer)
Consider the following details to establish Python–MySQL connectivity:
• Username: library_admin
• Password: lib@2024
• Host: localhost
Write a Python program to update the number of copies to 15 for the book
whose Book_ID is 103

7
SECTION-E (2 X 5 = 10 Marks)
36. Mrs. Meera, the head librarian of a college library, needs to maintain records of
books.
Each record should include: Book_ID, Title, Author, and Price.
Write the Python functions to:
I. Input book data and append it to a binary file.
II. Update the price of all books written by "R.K. Narayan" to 550.

37. NetDesign Solutions Pvt. Ltd. is establishing a new Hyderabad campus while
keeping its headquarters in Chennai. The Hyderabad campus will contain four
buildings: Admin, R&D, Sales, and Support. As the campus network designer, you
must propose network solutions based on the information below.
Distance (in meters) between buildings
From To Distance (m)
Admin R&D 120
Admin Sales 70
Admin Support 150
R&D Sales 90
R&D Support 60
Sales Support 110

Number of Computers in Each Block


Block Number of Computers
Admin 50
R&D 120
Sales 45
Support 35
I. Suggest the best location (which building) to place the server for the Hyderabad
campus. Explain your reasoning
II. Suggest and draw a cable layout of connections between the buildings inside the
Hyderabad campus.
III. Recommend where (which building or between which buildings) to place the
following devices and justify each placement:
a) Repeater
b) Switch
IV. The organisation plans a high-speed wired link from Hyderabad campus to the
Chennai headquarters. Which cable type would be most suitable for this long-
distance high-bandwidth connection? Give two reasons for your choice.
V. A. Expand LAN and PAN
OR
B. If the Hyderabad campus is connected to the Chennai headquarters, what
type of network is formed (PAN, LAN, MAN or WAN)?

You might also like