0% found this document useful (0 votes)
110 views7 pages

MS Xii CS Set 2

Uploaded by

ram priya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views7 pages

MS Xii CS Set 2

Uploaded by

ram priya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

KENDRIYA VIDYALAYA SANGATHAN: BHUBANESWAR

REGION
PRE-BOARD I EXAMINATION 2023-24
CLASS XII SET 2
COMPUTER SCIENCES (083)
TIME: 3 HOURS M.M.70
MARKING SCHEME
Q.N Question and Answers Distribution of To
O Marks tal
Marks
Section A
1 True 1 mark 1
forcorrectanswer
2. a) update 1 mark 1
forcorrectanswer
3 c) False 1 mark 1
forcorrectanswer
4 a) sqrt 1 mark 1
forcorrectanswer
5 b. 8,15 1 mark 1
forcorrectanswer
6 d) SMTP 1 mark 1
forcorrectanswer
7 c) 4 1 mark 1
forcorrectanswer
8 a) COMPUTER-students-ARE-very-SMART 1 mark 1
forcorrectanswer
9 b. Statement 2 1 mark 1
forcorrectanswer
10 b) SHIVAJI** 1 mark 1
SHIVAJI**TAGORE** forcorrectanswer
11 b. Modulator 1 mark 1
forcorrectanswer
12 c.75 1 mark 1
forcorrectanswer
13 True 1 mark 1
forcorrectanswer
14 (c) CREATE, DROP, ALTER, TRUNCATE 1 mark 1
forcorrectanswer
15 (B) Protocol 1 mark
forcorrectanswer
16 b. fp.tell() 1 mark 1
forcorrectanswer
17 (d)A is false but R is True 1 mark 1
forcorrectanswer
18 (b) Both A and R are true and R is not the correct explanation for A 1 mark 1
forcorrectanswer
SECTION-B
19 i)IMAP: Internet Mail Access Protocol ½ mark for 2
DNS :Domain Name System each

1
ii) Routers – connects a modem to different computer networks, ensuring that
Internet traffic goes to the right networks 1 mark for
Switches – connect devices within a single network, transfer incoming and any one
outgoing internet traffic between the connected devices correct
difference
Or 1 mark for
i) Bandwidth is the maximum rate of data transfer over a given transmission correct
medium. / The amount of information that can be transmitted over a network. definition
ii)Web Browser:
A web browser transmits an HTTP request to the server and gets an
HTTP response back. 1 mark for
webserver any one
A web server basically receives the HTTP request from the browser and correct
responds to it using an HTTP response. difference
20 def perfectNum(num): ½ mark for 2
sum = 0 each
for i in range(1, num): correction
if n % i == 0: made
sum = sum + i
if sum == n:
print("The number is a Perfect number")
else:
print("The number is not a Perfect number")
num =input("Enter the number")
perfectNum(num)
21 ½ mark for 2
correct
function
header
½ mark for
correct loop
½ mark for
correct if
statement
½ mark for
displaying
the output
Or ½ mark for
correct
function
header
½ mark for
using split()
½ mark for
adding to
list
½ mark for
return
statement

Note: Any other correct logic may be marked


22 Output ½ mark for 2
12.0 each correct
35.0 line of output

2
24.0
16.0
23 i) d2.update(d1) 1 mark for 2
ii) message. capitalize () each correct
Or statement
import statistics 1 mark for
print(statistics.mean(studentMarks)) correct
import
statement
1 mark for
correct
command
with mean()
and print()
24 SQL Command to add primary key: 1 mark for 2
ALTER TABLE Employee ADD EmpId INTEGERPRIMARY KEY; correct ALTER
TABLE command

1 mark for
INSERT INTO Employee VALUES("Shweta","Production",26900,999); Alternative correct INSERT
answer: INSERT INTO Employee(EmpId,Ename,Department,Salary) command
VALUES(999,"Shweta","Production",26900);
2 Mark for
correct output

Or

Update sports set noofplayers=60 where scode=’s006’;


25 vELCcME#Kk 2 Mark for 2
correct output
Section -C
26 G*L*TME 3 Mark for 3
correct output
27 (i) 3
DISTINCT TID
101
103
102
104
105
(1 mark for correct Answer)
(ii)
TID ,COUNT(*) ,MIN(FEES)
101 2 12000
(1 mark for correct Answer)
(iii)
COUNT(*) ,SUM(FEES)
4 65000
(1 mark for correct Answer)
28 def COUNT_AND( ): (½ Mark for 3
count=0 opening the file)
file=open(‘STORY.TXT','r') (½ Mark for

3
line = file.read() reading word)
word = line.split() (½ Mark for
for w in word: checking
if w in [‘AND’,’and’,’And’]: condition)
count=count+1 (½ Mark for
file.close() printing word)
print(count)

Or (½ Mark for
def DISPLAYWORDS( ): opening the file)
count=0 (½ Mark for
file=open(‘STORY.TXT','r') reading word)
line = file.read() (½ Mark for
word = line.split() checking
for w in word: condition)
(½ Mark for
if w[0]=="T" or w[0]=="t":
printing word)
count=count+1
file.close()
print(count)

29 i) SELECT M_Company, M_Name, M_Price FROM MobileMasterORDERBY 3


M_Mf_Date DESC;
(½ mark for correct SELECT)
(½ mark for correct ORDER BY)

ii) SELECT * FROM MobileMaster WHERE M_Name LIKE “S%” or


M_Name LIKE “%a”;
(½ mark for correct SELECT)
mark for correct WHERE clause)

iii) SELECT M_Id, SUM(M_Qty) FROM MobileStock GROUP BY


M_Id;
(½ mark for correct SELECT)
(½ mark for correct Group By)
30 (½ Mark for 3
correct push
function
definition)
(½ Mark for
correct condition)
(½ Mark for
append method)

(½ Mark for
correct pop
function
definition)

(½ Mark for
correct pop
function
definition)
(1/2 mark for pop
and printing
correct output)

4
SECTION D
31 I) SELECT S1.ITEMNO,S1.ITEM,S2.SNAME FROM STORE 1 Mark for 4
S1 ,SUPPLIERS S2 WHERE S1.SCODE=S2.SCODE correct SQL
query
1 Mark for
II) Desc store correct describe
command
III) Select avg(s1.rate) from store s1 ,suppliers s2 where 1 Mark for
s1.scode=s2.scode and s1.name in (‘Premium Stationary correct SQL
“,”Tetra Supply”); query
1 Mark for
IV) Select item,qty,rate from store order by rate desc; correct SQL
query

½ mark for 4
32 importing csv
module
½ mark for
accepting data
correctly ½ mark
for opening and
closing file

½ mark for
writing row

½ mark for
opening and
closing file
½ mark for
reader object
½ mark for
Condition to
compare roll
number
½ mark for
printing data

SECTION E
33 a) BUS TOPOLOGY Half mark 1

5
Half mark 5

a)
b) switch 1 mark
forcorrectanswer
c) admin block by 80-20 % rle or more number of computers available 1 mark
forcorrectanswer
d) yes between admin to resource and admin to finance ditdnace more than 100 1 mark
mtrs forcorrectanswer
e) (c) Optical Fiber 1 mark
forcorrectanswer
34 i) If the file does not exist, r+ throws FileNotFoundError ; the a+ creates 2 mark for 2+3
the file. corerect
For r+ mode, the initial file pointer position at the beginning of the file ; differences
For a+ mode, the initial file pointer position at the end of the file .

ii) import pickle


def copyData():
count=0
f1=open("SPORTS.DAT","rb")
f2=open("CRICKET.DAT","wb") For correct code
while True: give full 3 marks
try:
rec = pickle.load(f1)
if rec[0].lower()=="crikcet":
pickle.dump(rec,f2)
count=count+1
except:
f1.close()
f2.close()

return count

print("Total number of records copied",copyData())

or
i) The seek() function is used to set the position of the file cursor,
1 Mark for
whereas the tell() function returns the position where the cursor is set
difference
to begin reading
1 Mark for
pos = file.tell()
file.seek(offset,position) correct syntax
ii)
import pickle
def read_file():
f1=open("emp.dat","rb")
try:

while True: For correct code


rec=pickle.load(f1) give full 3 marks
if rec["sal"]>=25000 and rec["sal"]<30000:

6
print(rec)
except:
f1.close()

read_file()
35 i) In relational database terminology, a domain defines the permitted range of 2 Marks for 2+3
values for an attribute of an entity correct
definition and
ii) import mysql.connector as ms for correct
mydb=ms.connect(host="localhost", example
username="root",
½ mark for
password="root",
importing mysql
database="School")
package
if mydb.is_connected():
½ mark for
MyCur=mydb.cursor()
correct syntax of
query="create table student(rno int,name varchar(20),dob date,fees float);" connect method
MyCur.exceute(query) with all
print(“Table Created successfully”) paramaeters
mydb.close() 2 Marks for
rrmaining
correct code
or

i) The difference between a UNIQUE constraint and a Primary Key is that per 2 Marks for
table you may only have one Primary Key but you may define more than one correct
UNIQUE constraint. definition and
ii) for correct
import mysql.connector as ms example
mydb=ms.connect(host="localhost",
username="root",
password="root",
database="School") ½ mark for
if mydb.is_connected(): importing mysql
MyCur=mydb.cursor() package
query="select * from student where fee>3500;" ½ mark for
MyCur.exceute(query) correct syntax of
result=MyCur.fetchall() connect method
for rows in result: with all
print(rows) paramaeters
mydb.close() 2 Marks for
rrmaining
correct code

You might also like