12th preboard2 d
12th preboard2 d
Session – 2024-2025
Time Allowed: 3 hours Maximum Marks: 70
General Instructions:
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
1. State true or false: [1]
The expression 2**2**3 is evaluated as: (2**2)**3.
a) Domain b) Cardinality
c) Attribute d) Degree
a) Error b)[3,6,9,[4,8,12,[5,10,15]]]
c)[[3,6,9],[4,8,12],[5,10,15]] d)[3,6,9,4,8,12,5,10,15]
4. Following set of commands are executed in shell, what will be the output? [1]
>>> str = "hello"
>>> str[:2]
a) he b) llo
c) ello d) hel
6. The virus that uses MS Office suite as its host to replicate is known as? [1]
a) Trojan b) Worm
7. Which of the following command is used to open a file "c:\pattxt" for writing in [1]
binary format only?
c) SUM d) COUNT
10. How are following codes different from one another? [1]
i. my_file = open('poem.txt', 'r')
my_file.read()
ii. my_file = open('poem.txt', 'r')
my_file.read(100)
c) LIFO d) Weighted
a) Circuit b) Packet
c) Plot d) Graph
15. What is the output of sys.platform [:2] if the code runs on windows operating [1]
system?
a) 'wi' b) Error
c) 'op' d) 'sy'
16. Which of the following command is used to remove the table definition and all [1]
data?
a) Choose b) Drop
c) Create d) Select
a) 1 b) 3
c) 2 d) 0
a) server b) sender
c) client d) peer
19. Assertion (A): In python break is used to bring the program control out of the loop. l
Reason (R): The break is commonly used in the cases where we need to break the o
op for a given condition. [1]
a) Both A and R are true and R is b) Both A and R are true but R is
the correct explanation of A. not the correct explanation of
A.
20. Assertion(A): In Python, the csv.reader() module is used to read the CSV file. [1]
Reason(R): We can also use DictReader() function to read the CSV file directly
into a dictionary rather than deal with a list of individual integer elements.
a) Both A and R are true and R is b) Both A and R are true but R is
the correct explanation of A. not the correct explanation of
A.
21. Assertion (A): Python provides us the flexibility to offer the comma-separated [1]
values which are internally treated as tuples at the function call.
Reason (R): By using the variable-length arguments, we can pass any number of
arguments.
a) Both A and R are true and R is b) Both A and R are true but R is
the correct explanation of A. not the correct explanation of
A.
Section B
22. What measures do wireless networks employ to avoid collisions? [2]
23. Consider the following table Traders with following fields [2]
TCode TName City
T01 Electronic Sales Mumbai
T03 Busy Store Corp Delhi
T02 Disp House Inc Chennai
Write Python code to display the names of those traders who are either from Delhi
or from Mumbai.
24. Find the errors in following code and write the correct code. D
e
f s(x): [2]
a = ‘k'
print(a * x)
print(a * str(x))
for in [1, 2', 10 :
s(n)
i. Underline the corrections
ii. Write the reason!error next to it in comment form.
OR
How can you add following data in empty dictionary?
Keys Values
A One
B Two
C Three
D Four
25. Consider the table Persons whose fields are P_ID, LastName, FirstName, Address, [2]
City. Write a Python code to add a new row but add data only in the P_Id,
LastName and columns as 5, Peterson, Kari respectively.
OR
Rewrite the following code into for loop:
i=3
while (i < 5):
if (i == 4):
print("Welcome")
else:
print("No entry")
i=i+1
print("value of i", i)
28. Write a function that accepts two parameters: a dictionary and a number; and prints [2]
only the keys that have values more than the passed number.
Section C
29. Write a function that takes a list that is sorted in ascending order and a number as [3]
argument. The function should do the following:
i. Insert the number passed as argument in a sorted list.
ii. Delete the number from the list.
OR
How are following two statements different?
import math
from math import *
30. Give output for following SQL queries as per given table(s): [3]
Table: INTERIORS
ITEM
NO. TYPE DATEOFSTOCK PRICE DISCOUNT
NAME
Double
1. Red rose 23/02/02 32000 15
Bed
2. Soft-touch Baby cot 20/01/02 9000 10
Jerry's
3. Baby cot 19/02/02 8500 10
home
Rough Office
4. 01/01/02 20000 20
wood Table
Comfort Double
5. 12/01/02 15000 20
zone Bed
6. Jerry look Baby cot 24/02/02 700 19
Office
7. Lion king 20/02/02 16000 20
Table
8. Royal tiger Sofa 22/02/02 30000 25
OR
i. Write two examples of DBMS software.
ii. What is meant by NULL value in MySQL?
iii. Table 'Club' has 4 rows and 3 columns. Table 'Member' has 2 rows and 5 columns.
What will be the cardinality of the Cartesian product of them?
31. Write a method in Python to find and display the prime number between 2 to n. [3]
Pass n as an argument to the method.
OR
Write a function that receives two tuples and creates a third that contains all elements of
the first followed by all elements of the second.
Section D
32. Write the Push operation of stack containing person names. Notice that the name [4]
should only accept characters, spaces and period (.) except digits. Assume that
Pname is a class instance attribute.
OR
A line of text is read from the input terminal into a stack. Write a program to output the
string in the reverse order, each character appearing twice.
(ie.g., the string a b c d e should be changed to ee dd cc bb aa)
34. Consider the following tables GAMES and PLAYER and answer (b) and (c) parts [4]
of this question:
Table: GAMES
GCode Game Name Type Number Prize Money Schedule Date
101 Carom Board Indoor 2 5000 23-Jan-2004
102 Badminton Outdoor 2 12000 12-Dec-2003
103 Table Tennis Indoor 4 8000 14-Feb-2004
105 Chess Indoor 2 9000 01-Jan-2004
108 Lawn Tennis Outdoor 4 25000 19-Mar-2004
Table: PLAYER
PCode Name GCode
1 Nabi Ahmad 101
2 Ravi Sahai 108
3 Jatin 101
4 Nazneen 103
a. What do you understand by primary key and candidate keys?
b. Write SQL commands for the following statements:
i. To display the name of all GAMES with their GCodes.
ii. To display details of those GAMES which are having PrizeMoney more than
7000.
iii. To display the content of the GAMES table in ascending order of Schedule
Date.
iv. To display sum of PrizeMoney for each type of GAMES.
c. Give the output of the following SQL queries:
i. SELECT COUNT (DISTINCT Number) FROM GAMES;
ii. SELECT MAX(ScheduleDate), MIN (ScheduleDate) FROM GAMES;
iii. SELECT Name, GameName FROM GAMES G, PLAYER P WHERE
(G.Gcode= P.Gcode AND G.PrizeMoney>10000);
iv. SELECT DISTINCT Gcode FROM PLAYER;
OR
Write SQL commands for (i) to (v) on the basis of table INTERIORS.
TABLE: INTERIORS
No. ITEM NAME TYPE DATE OF STOCK PRICE DISCOUNT
1 Red rose Double Bed 23/02/02 32000 15
2 Soft touch Baby cot 20/01/02 9000 10
3 Jerry’s home Baby cot 19/02/02 8500 10
4 Rough wood Office Table 01/01/02 20000 20
5 Comfort zone Double Bed 12/01/02 15000 20
6 Jerry look Baby cot 24/02/02 7000 19
7 Lion king Office Table 20/02/02 16000 20
8 Royal tiger Sofa 22/02/02 30000 25
9 Park sitting Sofa 13/12/01 9000 15
10 Dine Paradise Dining Table 19/02/02 11000 15
11 White Wood Double Bed 23/03/03 20000 20
12 James 007 Sofa 20/02/03 15000 15
13 Tom look Baby cot 21/02/03 7000 10
i. To show all information about the Sofa from the INTERIORS table.
ii. To list the ITEMNAME, which are priced at more than 10000 from the INTERIORS
table.
iii. To list ITEMNAME and TYPE of those items, in which DATEOFSTOCK is before
22/01/02 from the INTERIORS table in descending order of ITEMNAME.
iv. To insert a new row in the INTERIORS table with the following data
{14, 'Truelndian' , 'Office Table', '25/03/03', 15000, 20}
v. To display the name of item with their price which have discount more than 20.
Section E
36. The Freshminds University of India is starting its first campus in Ana Nagar of [5]
South India with its center admission office in Kolkata. The university has 3 major
blocks comprising of Office Block, Science Block and Commerce Block in the 5
km area Campus.
As a network expert, you need to suggest the network plan as per (i) to (iv) to the
authorities keeping in mind the distance and other given parameters.
Expected Wire distances between various locations:
Office Block to Science Block 90 m
Office Block to Commerce Block 80 m
Science Block to Commerce Block 15 m
Kolkata Admission office to Ana Nagar Campus 2450 km
Expected number of Computers to be installed at various locations in the University
are as follows:
Office Block 10
Science Block 140
Commerce Block 30
Kolkata Admission office 8
i. What type of server should be installed in university?
Dedicated
Non-dedicated