Set-I Cs Ms Pb-II
Set-I Cs Ms Pb-II
Page: 1/11
14. (B) Details of all student whose names end with 'Raj'
(1)
(1 mark for correct answer)
15. (D) CHAR
(1)
(1 mark for correct answer)
16. (C) Distinct
(1)
(1 mark for correct answer)
17. (D) PAN
(1)
(1 mark for correct answer)
18. (D) Repeater
(1)
(1 mark for correct answer)
19. Microsoft Edge, Firefox, Google Chrome etc. (1)
20. (B) Both A and R are true and R is not the correct explanation for A
(1)
(1 mark for correct answer)
21. (D) A is False but R is True.
(1)
(1 mark for correct answer)
(ii) 8
24. (I)
A) print (L1[-4: ])
OR
B) L1.sort() (2)
(1 mark for correct answer)
Page: 2/11
(II)
A) L3= L2+ L1
OR
B) L2.clear ()
(1 mark for correct answer)
25. Maximum value of FROM = 3, Maximum value of TO = 4
(B) 30#40#50# and (C) 30#
(2)
26. def swap_first_last(tup):if
len(tup) < 2:
return tup
new_tup = (tup[-1],) + tup[1:-1] + (tup[0],)
return new_tup
(2)
(II) (2)
A) ALTER TABLE Student DROP PRIMARY KEY;
OR
B) ALTER TABLE Student ADD PRIMARY KEY (Sno);
(1 mark for correct answer)
28.
A) Topology refers to the way in which the workstations attached to the
network are interconnected.
Advantages of Tree Topology:
Scalability: The network can be easily expanded by adding more devices or branches. (2)
Centralized Management: The root node allows for centralized control and easy
network management.
Fault Isolation: Issues in one branch do not affect the rest of the network, simplifying
troubleshooting.
Point-to-Point Connections: Devices have dedicated connections, reduced data
collisions and improving performance.
Disadvantages of Tree Topology:
Dependency on Root Node: The network's functionality relies on the root node, and its
failure can disrupt the entire network.
Page: 3/11
Cost: Implementing tree topology can be expensive, especially for larger networks.
Complex Cabling: As the network grows, the cabling can become more
complex and difficult to manage.
OR
HTTP : Hypertext Transfer Protocol,
FTP : File Transfer Protocol
TCP/IP : Transmission Control Protocol / Internet Protocol
SMTP : Simple Mail Transfer Protocol
Page: 4/11
B) SMTP: Simple Mail Transfer Protocol.
Page: 5/11
30. (A)
(I)
def push_book(BooksStack, new_book):
BooksStack.append(new_book)
(II)
def pop_book(BooksStack):if
not BooksStack:
print("Underflow")
else:
return(BookStack.pop())
(III)
def peep(BooksStack):if
not BooksStack:
print("None")
else:
print(BookStack[-1])
(3x1 mark for correct function body; No marks for any function header as it
was a part of the question)
OR
(B)
def push_even(N):
(3)
EvenNumbers = []
for num in N:
if num % 2 == 0:
EvenNumbers.append(num)
return EvenNumbers
VALUES = []
for i in range(5):
VALUES.append(int(input("Enter an integer: ")))
EvenNumbers = push_even(VALUES)
def pop_even():
if not EvenNumbers:
print("Underflow")
else:
print(EvenNumbers.pop())
pop_even()
Page: 6/11
def Disp_even():
if not EvenNumbers:
print("None")
else:
print(EvenNumbers[-1])
Disp_even()
(1/2 for identifying even numbers)
(1/2 mark for correctly adding data to stack)
(1/2 mark for correctly poping data on the stack and 1/2 mark for checking
condition)
(1/2 mark for correctly displaying the data with none)
(1/2 mark for function call statements)
31. cCMmpuEe@sCIEeCE
OR
[13, 13, 10, 10, 5, 8, 7] (3)
Page: 7/11
(II)
SNo Name Age Department Charge Sex
1 Siju 23 Cardiology 800 M
3 Divya 20 Cardiology 500 F
(III)
SNo Name Charge
3 Divya 500
4 Nidhin 700
5 Hari 500
(IV)
avg(Charges)
12000
(4)
Page: 8/11
34. (i) SELECT PNAME, QTY*PRICE FROM ITEMS WHERE ITEMS.ID = COMPANY.ID
AND COMPANY.City=’Mumbai’;
(ii) SELECT PNAME, COMP, PRICE FROM ITEMS, COMPANY WHERE
ITEMS.ID = COMPANY.ID
(iii) DELETE FROM ITEMS WHERE MDATE < {01/01/2007};
(iv) UPDATE ITEMS SET QTY = QTY + 20 WHERE PNAME = ‘Soap’ OR
PNAME = ‘Paste’;
OR
Page: 9/11
(½ mark for correctly importing the connector object)
(½ mark for correctly creating the connection object)
(½ mark for correctly creating the cursor object)
(½ mark for correctly inputting the data)
(½ mark for correct creation of first query)
(½ mark for correctly executing the first query with commit)
(½ mark for correctly executing the second query)
(½ mark for correctly displaying the data)
doesn’t exist.
Page: 10/11
(ii)
import pickle
def CreateFile():
fobj=open("product.dat","ab")
ch='y'
while ch.upper()=='Y':
rec=[pno,pname,brand_name,Price]
pickle.dump(rec,fobj)
ch=input()
fobj.close()
def CountData(brand_name):
fobj=open("product.dat","rb")
num = 0
try:
while True:
rec=pickle.load(fobj)
if brand_name==rec[2]:
num = num + 1
except:
fobj.close()
return num
CreateFile()
Page: 11/11
print(CountData("LG"))
(II) Switch
(1 mark for correct answer)
(III)
Block
B
Page: 12/11
(or Any other correct layout)
(1 mark for correct layout
(IV) There is no requirement of the Repeat as the optical fibre cable used for the
network can carry the data to much longer distances than within the campus.
(1 mark for correct answer)
Page: 13/11