0% found this document useful (0 votes)
1K views11 pages

MS CS Agra PB1 2024-25

Uploaded by

riddhimanroy54
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)
1K views11 pages

MS CS Agra PB1 2024-25

Uploaded by

riddhimanroy54
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
You are on page 1/ 11

के ीय िव ालय संगठन

थम /ि तीय ी बोड परी ा-2024-25

KENDRIYA VIDYALAYA SANGATHAN, AGRA REGION

First /Second - Pre Board Examination-2024-25

क ा XII (COMPUTER SCIENCE)

MARKING SCHEME

Max. Time – 3 hours Max. Marks – 70

अिधकतम समय - 3 घं टे अिधकतम अं क – 70

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.

Q. No. Section-A (21 x 1 = 21 Marks) Marks

1. False (1)

(1 mark for correct answer)

2. (C) ['L', '-', 'Structured', 'Q'] (1)


(1 mark for correct answer)

3. (D)True (1)

PAGE NO. 1 OF 11
(1 mark for correct answer)

4. (B) trip@spli (1)


(1 mark for correct answer)

5. (A) () (1)
(1 mark for correct answer)

6. (C) [ [“2”,”3”] ] (1)


(1 mark for correct answer)

7. (B) print(dict['Rose', 'Lily']) (1)


(1 mark for correct answer)

8. (D) None of the above (1)


(1 mark for correct answer)

9. (A) Cannot have NULL as well as UNIQUE values. (1)


(1 mark for correct answer)

10. (B) F.write(“PASS”) (1)


(1 mark for correct answer)

11. False (1)


(1 mark for correct answer)

12. 150 # 50 (1)


150 # 0
(1/2 mark for each correct line/answer)

13. ALTER (1)


(1 mark for correct answer)

14. (C) Display name of students whose name has ‘ar’ anywhere in name. (1)
(1 mark for correct answer)

15. (C) VARCHAR (1)


(1 mark for correct answer)

16. (B) ORDER BY (1)


(1 mark for correct answer)

17. (C) FTP (1)


(1 mark for correct answer)

PAGE NO. 2 OF 11
18. (D) REPEATER (1)
(1 mark for correct answer)

19. Topology (1)


(1 mark for correct answer)

20. (A) Both A and R are true and R is the correct explanation for A. (1)
(1 mark for correct answer)

21. (C) A is True but R is False. (1)


(1 mark for correct answer)
Q. No. Section-B ( 7 x 2=14 Marks) Marks

22. “in” operator results in True/False after checking a value in a range of (2)
values. (1 mark for correct answer)
“ONE” & [1,2,3] (1/2 mark for each correct answer)

23. 1. 6789 (2)


2. 6
(1 mark for each correct answer)

24. 1. (a) L2.pop() or any correct python function. (2)


OR
(b) L1.count(20)
2. (a) L2.extend([1, 0, 2])
OR
(b) L1.sort()
(1 mark for each correct answer)

25. (a) & (b) (2)


Maximum value of BEG: 2
Maximum value of END: 4
(1/2 mark for each correct answer)
(1/2 mark for each correct max. value of BEG & END)

26. Y=int(input(“Enter 1 or 10”)) (2)


if Y==10:
for Y in range(1,11):
print(Y)

PAGE NO. 3 OF 11
elif Y<10:
for m in range(5,0,-1):
print(“thank you”)
(1/2 mark for each correct answer)

27. 1. (a) CHECK constraint OR (b) PRIMARY KEY (2)


2. (a) SHOW TABLES;
OR
(b) DESCRIBE PLAYER; / DESC PLAYER;
(1 mark for each correct answer)

28. (A) MODEM stands Modulation-Demodulation. MODEM is used to connect (2)


to Internet through the conversion of digital signals into analog signals and
vice-versa.
(1 mark for each correct full form)
(1 mark for each correct use of MODEM)
OR
(B) XML stands for Extensible Markup Language. XML allows the
development more new markups/elements while HTML works only on the
already defined markups.
(1 mark for each correct full form)
(1 mark for each correct benefit of XML over HTML)
Q. No. Section-C ( 3 x 3 = 9 Marks) Marks

29. (3)

(1/2 mark for correct function header)

PAGE NO. 4 OF 11
(1/2 mark for correct opening of file)
(1/2 mark for correctly reading from the file)
(1 mark for any correct logic & it’s code)
(1/2 mark for printing correct output)
OR

(1/2 mark for correct function header)


(1/2 mark for correct opening of file)
(1/2 mark for correctly reading from the file)
(1 mark for any correct logic & it’s code)
(1/2 mark for printing correct output)

30. (I) (3)


def Push_Emp(Emp_Stack, New_Emp):
Emp_Stack.append(New_Emp)

(II)
def Pop_Emp(Emp_Stack):
if not Emp_Stack:
print("Underflow")
else:
return(Emp_Stack.pop())

(III)
def Peep(Emp_Stack):
if not Emp_Stack:
print("None")
else:

PAGE NO. 5 OF 11
print(Emp_Stack[-1])

(3x1 mark for correct function body; No marks for any function header as it
was a part of the question)

OR
(B)
(I)
def Push_State(D_STATE):
for I in D_STATE:
if len(D_STATE[I])<10:
STATE.append(D_STATE[I])

(II)
def Pop_State():
if not STATE:
print("Empty")
else:
return(STATE.pop())

(III)
def Disp_State():
if not STATE:
print("None")
else:
print(STATE [-1:-len(STATE)-1:-1])

(3x1 mark for correct function body; No marks for any function header as it
was a part of the question)

31. OUTPUT : cO*P*t*R (3)


(3 marks for correct line of output)
(deduct ½ mark for not printing **/*)
OR

PAGE NO. 6 OF 11
OUTPUT : (22,44,66)
(3 marks for correct line of output)
(deduct ½ mark for not printing parentheses/comma)
Q. No. Section-D ( 4 x 4 = 16 Marks) Marks

32. (A) Write SQL queries for the following: (4)


I. SELECT * FROM SURGERY ORDER BY STARTDATE DESC;
II. SELECT SUM(FEES) FROM SURGERY WHERE OTNO IS NULL;
III. SELECT SID, FEES FROM SURGERY WHERE SNAME LIKE
“D%”;
IV. SELECT COUNT(*) FROM SURGERY WHERE FEES<12000 AND
OTNO != 301;
(4 x 1 mark for each correct query)
OR
(B) Write the output of the given below SQL queries:-
I. DISTINCT(OTNO)
302
NULL
301
II. OTNO COUNT(*) MIN(FEES)
302 2 15000
III. SNAME
HEART
STOMOCH
IV. AVG(FEES)
16500
(4X1 mark each for correct output)

33. (I) (4)


import csv
def SHOW():
f=open("Population.csv",'r')
records=csv.reader(f)
next(records, None) #To skip the Header row

PAGE NO. 7 OF 11
for i in records:
if int(i[2])>200000:
print(i)
f.close()
(½ mark for opening in the file in right mode)
(½ mark for correctly creating the reader object)
(½ mark for correctly checking the condition)
(½ mark for correctly displaying the records)

(II)
import csv
def Count_City():
f=open("Population.csv",'r')
records=csv.reader(f)
next(records, None) #To skip the Header row
count=0
for i in records:
count+=1
print(count)
f.close()

(½ mark for opening in the file in right mode)


(½ mark for correctly creating the reader object)
(½ mark for correct use of counter)
(½ mark for correctly displaying the counter)

Note (for both parts (I) and (II)):


(i) Ignore import csv as it may be considered the part of the complete
program, and there is no need to import it in individual functions.
(ii) Ignore next(records, None) as the file may or may not have the Header
Row.

34. Write SQL commands for the following queries (i) to (iv) based on the (4)
relations TRAINER & COURSE given below:

PAGE NO. 8 OF 11
I. SELECT * FROM TRAINER WHERE CITY IS ”CHENNAI”;
II. SELECT CITY, COUNT(*) FROM TRAINER GROUP BY CITY;
III. SELECT * FROM COURSE WHERE FEES > 12000 AND
CNAME LIKE “%A”;
IV. (A) SELECT T.TNAME, C.CNAME FROM TRAINER T,
COURSE T WHERE T.TID=C.TID AND C.FEES<10000;
OR
(B) SELECT * FROM TRAINER, COURSE;
(4X1 mark each for correct QUERY)

35. def AddNewProduct(): (4)


import mysql.connector as mycon
mydb=mycon.connect(host="localhost",user="root",
passwd="Time",database="PRO_DB")
mycur=mydb.cursor()
pid=int(input("Enter Product ID: "))
pname=input("Enter Product Name: ")
company=input("Enter Company Name: ")
price=float(input("Enter price: "))
query="INSERT INTO PRODUCT VALUES ({}, '{}', '{}', {})"
query=query.format(pid, pname, company, price)
mycur.execute(query)
mydb.commit()
mycur.execute("select * from product where price<250")
for rec in mycur:
print(rec)

(½ 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)

PAGE NO. 9 OF 11
(½ mark for correctly displaying the data)
Q. No. SECTION E (2 X 5 = 10 Marks) Marks

36. (I) (5)


import pickle
def NewTest():
Tid = int(input("Enter Test ID: "))
Sub= input("Enter Subject Name of Test: ")
MM = int(input("Enter Max. Marks of Test: ") )
SM = float(input("Enter Marks Scored in the Test: "))
REC = [Tid, Sub, MM, SM]

F=open(“TEST.DAT”,”ab”)
pickle.dump(REC, F)
F.close()

(II)
import pickle
def UpdateMM(Sub):
file=open(“TEST.DAT”,”rb”)
while True:
try:
rec = pickle.load(file)
if rec[1] == Sub:
rec[2]+=10
file.seek(-len(rec))
pickle.dump(rec, file)
print(“Max. Marks updated”)
except EOFError:
break # End of file reached

(III)
import pickle
def DisplayAvgMarks(Sub):

PAGE NO. 10 OF 11
sum=count=0
try:
with open('TEST.DAT', 'rb') as file:
while True:
try:
rec = pickle.load(file)
if rec[1] == Sub: # Check the subject
sum+=rec[3]
count+=1
except EOFError:
print(“Average marks of “, Sub, “ are : “, sum/count)
break # End of file reached
except FileNotFoundError:
print("No Test data found. Please add Test data first.")

(1/2 mark of import pickle)


(1/2 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. Bus/Star topology (5)


(½ mark for correct layout + ½ mark for correct topology name)
II. ADMIN
(1 mark for correct answer)
III. Hub/Switch
(1 mark for correct answer)
IV. ADMIN & RESOURCE
ADMIN & FINANCE
(½ mark each for correct name)
V. (A) (c) Optical Fiber
OR
(B) LAN
(1 mark for correct answer)

***************

PAGE NO. 11 OF 11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy