CS-XII-MS-PB-2024-25-SET-I A
CS-XII-MS-PB-2024-25-SET-I A
1 False (1)
4 False (1)
6 (B) ( ) (1)
8 remove() (1)
9 (B) r+ (1)
11 True (1)
13 IS NULL (1)
Page 1 of 7
14 (B) GROUP BY (1)
20 (A)Both A and R are true and R is the correct explanation for A (1)
23 Any two correct differences between compile time and run time error (2)
Page 2 of 7
(ii) HTTPS: Hyper Text Transfer Protocol Secure
OR
(i) Telnet
(ii) FTP
Q.NO SECTION-C(3x3=9 Marks) MARKS
Page 3 of 7
print("Stack Empty")
(1.5 marks for correct push_element() and 1.5 marks for correct
pop_element())
OR
stackItem=[]
def Push(SItem):
count=0
for k in SItem:
if (SItem[k]>=75):
stackItem.append(k)
count=count+1
print("The count of elements in the stack is : ", count)
(1 mark for correct function header
1 mark for correct loop
½ mark for correct If statement
½ mark for correct display of count)
31 aLL#tHE#bEes (3)
OR
S*u**n*S*
(deduct ½ mark for not printing * #)
Q.NO SECTION-D(4x4=16 Marks) MARKS
32 A) (4)
(i) SELECT * FROM TECH_COURSE WHERE CNAME LIKE ‘D%’;
(ii) SELECT FEES FROM TECH_COURSE ORDER BY FEES DESC;
(iii) SELECT SUM(FEES) AS TOTAL_FEES FROM TECH_COURSE WHERE TID IS
NOT NULL;
(iv) SELECT CNAME FROM TECH_COURSE WHERE FEES <15000;
OR
B) Write the output of following queries:
(i)
(ii)
Page 4 of 7
(iii)
(iv) 15500.00
(4 x 1 mark for each correct output)
33 import csv (4)
def ADD():
fout=open("record.csv","a",newline="\n")
wr=csv.writer(fout)
empid=int(input("Enter Employee id :: "))
name=input("Enter name :: ")
mobile=int(input("Enter mobile number :: "))
lst=[empid,name,mobile] ---------1/2 mark
wr.writerow(lst) ---------1/2 mark
fout.close()
def COUNTR():
fin=open("record.csv","r",newline="\n")
data=csv.reader(fin)
d=list(data)
print(len(d))
fin.close()
ADD()
COUNTR()
(½ mark for importing csv module
1½ marks each for correct definition of ADD() and COUNTR()
½ mark for function call statements)
34 i)Primary Key – Rollno (4)
ii)Degree of table= 5
iii)Insert into fees values(101,’Aman’,’XII’,5000);
iv)(A) DELETE FROM Fees;
OR
iv)(B) Desc Fees;
(4x1 mark for each correct query)
35 import mysql.connector as mysql (4)
def DataDisplay():
con1=mysql.connect(host="localhost",user="root",password="tiger",
database="school")
mycur= con1.cursor()
no=int(input("Enter Roll Number: "))
Page 5 of 7
nm=input("Enter Student Name: ")
class=int(input("Enter class: "))
marks=float(input("Enter marks: "))
query="INSERT INTO student VALUES ({},'{}',{},{})"
query=query.format(no,nm,class,marks)
mycur.execute(query)
con1.commit()
print("Students with marks greater than 75 are : ")
mycursor.execute("select * from student where Marks>75")
data= mycursor.fetchall()
for i in data:
print(i)
print()
(½ 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)
Q.NO SECTION-E(2x5=10 Marks) MARKS
Page 6 of 7
if Author==rec[2]:
num = num + 1
except:
fobj.close()
return num
Any other correct code
(1 mark of import pickle and function def)
(1 mark for input)
(1/2 mark for opening file in append mode and 1/2 mark for using dump)
(1/2 mark for opening file in read mode and 1/2 mark for using load)
(1 mark for checking the condition and updating the value)
(1 mark for checking the condition and displaying data correctly)
37 i) Layout- (5)
ii)The most appropriate location of the server would be Research Lab, as this
building contains the maximum number of computers.
(iii)
a) For layout1, since the cabling distance between Accounts to Store is quite
large, so a repeater would ideally be needed along their path to avoid loss of
signals during the course of data flow in this route. For layout2, since the
cabling distance between Store to Research Lab is quite large, so a repeater
would ideally be placed.
b) In both the layouts, a Hub/Switch each would be needed in all the
buildings to interconnect the group of cables from the different computers in
each building.
(iv) Firewall
(v) A) Twisted Pair cable / Ethernet cable
OR
B) LAN
(1 mark for correct answer)
************
Page 7 of 7