Class 12 Cs Qp 3rd Preboard
Class 12 Cs Qp 3rd Preboard
14. In MySQL, if table A has degree 6 and cardinality 5, and table B has degree 3 (1)
and cardinality 5, what are the degree and cardinality of their Cartesian
product?
(A) 25, 9 (B) 18,10 (C) 30,15 (D) 9,25
15. A ___________ specifies the permissible set or range of values a field can (1)
take, often defined by the data type and additional specifications.
(A)Domain (B) Cardinality (C) Degree (D) Attribute
16. An SQL clause used to sort the values in ascending or descending order in a (1)
column?
(A) Order By (B) Group By (C) Distinct (D) Having
17. Which of the following statements is false? (1)
(A) Telnet is used for remotely logging in to system.
(B) HTTPS is safer than HTTP.
(C) URL of a page is not always the same as its domain name.
(D) Interlinking of collection of webpages is called Internet.
18. Name the topology in which all the devices are directly connected to each (1)
other.
19. Name of the device that connects dissimilar networks is ________ (1)
(A) Modem (B) Gateway (C) Bridge (D) HUB
Q20 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. (A) : To use a function from a particular module, we need to import the module (1)
(R) : An import statement can be placed anywhere before using the function.
21. (A): Foreign keys cannot be null. (1)
(R): Foreign key values must match primary key values of the referenced table.
Q No Section-B ( 7 x 2=14 Marks) Marks
22. (A) Lists cannot be used as keys in dictionary. Why? (2)
(B) If D={1:’A’,3:’H’,2:’L}. What will sum(D) and sort(D) return?
23. Give output of: (2)
(A) 7-2**3+5/3
(B) not(False)and True or False and True
24. Given a dictionary S=”CS Preboard 2024”, Write the built-in functions: (2)
(A) To replace the spaces in the string with “-“.
(B) To count the occurrences of “2” in the string.
25. What possible outputs(s) will be obtained when the following code is executed? (2)
from random import randint
x="ComputerScienceExamination2024"
k=0
for i in x:
if i.isalpha() and i.isupper():
k+=1
y=randint(1,k)
for j in range(y):
print(x[j:len(x)-j])
(A) ComputerScienceExamination202 (B) ComputerScienceExamination202
4 4
omputerScienceExamination2024
mputerScienceExamination2024
(C) ComputerScienceExamination202 (D) ComputerScienceExamination202
4 4
omputerScienceExamination202 omputerScienceExamination2024
mputerScienceExamination2024
puterScienceExamination2024
26. Find the error in the given code: (2)
even_no=odd_no=0
for i in Range(0,len (L))
if L[i]%2=0:
even_no+=1
Else:
odd_no+=1
print(even_no, odd_no)
27. I Write SQL command to change Rohan's phone number in the student table? (2)
OR
Which command will you use to delete a table along with its structure?
II Write an SQL command to add a field Blood_group to employee table which
cannot be left blank.
OR
Write an SQL command to rename the field DOB to Birthdate in Employee table.
28. Give 2 point of differences between packet switching and circuit switching. (2)
OR
Expand the term XML. How is it different from HTML?
Q No. Section-C ( 3 x 3 = 9 Marks) Marks
29.. Write a Python function dispdigit() reads a text file “test.txt” and that displays (3)
all the digits in the file.
OR
Write a Python function disp() that finds and displays longest line of the file
“test.txt”
29. Julie has created a dictionary containing names and marks as key value pairs of 6 (3)
students. Write a program, with separate user defined functions to perform the
following operations:
(A) Push the keys (name of the student) of the dictionary into a stack, where the
corresponding value (marks) is greater than 75.
(B) Pop and display the content of the stack.
For example: If the sample content of the dictionary is as follows:
R={"OM":76, "JAI":45, "BOB":89, "ALI":65, "ANU":90, "TOM":82}
The output from the program should be:
TOM ANU BOB OM
d={"Om":76,"A":90,"b":67,"c":45,"d":78}
(C) Peep the last value inserted in the stack.
OR
(A) Write the definition of a user-defined function `push (N)` which accepts a list of
numbers in a parameter `N` and pushes the numbers greater than 99 on the
stack.
(B) Write function pop() to pop the topmost string from the stack and returns its
length. If the stack is already empty, the function should display "Empty".
(C) Write function Disp() to display all element of the stack. If the stack is empty,
the function should display 'None'.
30. Predict the output of the Python code given below: (3)
value=50
print("value before",value)
def display(N=80):
global value
if N%7==0:
value=value+N
else:
value=value-N
print("value in function",value)
display(20)
display()
print("value after",value)
OR
Name="@@@#PreBoard2024#@@@"
R=""
for x in range(len(Name)):
if Name[x].isupper():
R=R+Name[x+1]
elif Name[x].islower():
R=R+Name[x-1].upper()
elif Name[x].isdigit():
R=R+Name[x-1]
else:
R=R+"$"
print(R)
Q No. Section-D ( 4 x 4 = 16 Marks) Marks
31. Consider the table Product given below: (4)
activities. They are planning to have connectivity between three buildings and the
head office situated in Bengaluru. As a network consultant, give solutions to the
questions (i) to (v), after going through the building locations and other details
which are given below :
(A) Suggest the most suitable place to install the server for this organization. Also,
give reason to justify your suggested location.
(B) Suggest the cable layout of connections between the buildings inside the campus.
(C) Suggest the placement of the following devices with justification:
i)Switch ii) Repeater
(D) 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.
(E) The System Administrator does remote login to any PC, if any requirement arises.
Name the protocol, which is used for the same.