0% found this document useful (0 votes)
24 views8 pages

Xii CS MS PB1

The document contains a marking scheme for a pre-board exam for class 12 computer science. It has sections for short answer questions, long answer questions and programming questions with solutions and marks allotted.

Uploaded by

Khansaleem
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)
24 views8 pages

Xii CS MS PB1

The document contains a marking scheme for a pre-board exam for class 12 computer science. It has sections for short answer questions, long answer questions and programming questions with solutions and marks allotted.

Uploaded by

Khansaleem
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/ 8

केंद्रीय विद्यालय संगठन कोलकाता संभाग

KENDRIYA VIDYALYA SANAGATHAN , KOLKATA REGION

पूिव बोर्व परीक्षा / PRE-BOARD EXAM– 1

कक्षा /CLASS - XII


विषय / SUBJECT : COMPUTER SCIENCE

प्रश्न पत्र कोड / Q. P. CODE : CS/PB2/23-01

_________________________________________________________________________________________

MARKING SCHEME

SECTION A (18 Marks )


1. Ans. rate/kg 1

2. 1
Ans. extend( )
3. 1
Ans. Prabhu app
4. 1
Ans : c
5. Ans : d 1
6. d. None of Above 1
7. Ans : b 1
8. Ans : b 1
9. Ans : a 1
10. Expand the following terms : 1
a. POST OFFICE PROTOCOL b. ADVANCE RESEARCH PROJECT AGENCY NETWORK
11. Ans. b 1
12. Ans : c. 1
13 Ans. c 1
14. Ans : d. 1
15. Ans : b 1
16. Ans d . HTTP 1

17. Ans : 1
i. Both A and R are true and R is the correct explanation for A
18. Ans: iii. A is True but R is False 1
SECTION B ( 14 Marks)
Ans : 19. (a) 18 Gbps = 18*210 mbps
= 18* 210 210 Kbps
= 18* 210 210 21° bps
= 18* 230 bits per second.
19. B) Twisted pair cable Co-axial cable 2
I)Their bandwidth is not as high as co-axial cables. (i) It has high bandwidth.
(ii) A twisted pair consists of two copper (ji) A coaxial cable consists of a copper
wires twisted around wire core covered bv an insulating each
other (each hasits own insulation material and a laver of conducting
around it like a double helix. material over that

OR
(a) A MODEM (Modulator Demodulator)is an electronic device that enables a computer to
transmit data over telephone lines. It converts the digital signals, governed by the source
computer into analog form for transmission over the telephone lines.
(b) A router establishes connection between two networks and it can handle network with
different protocols. Using a routing table, routers make sure that the data packets are travelling
through the best possible paths to reach their destination.
(1+1)
20. 2
Ans : (1) t1*t2 can't multiply
(2) P is in uppercase in print command
(3) t5 is not defined
(4) t1[2] is not possible, as tuples are immutable.
21. Ans : def dispTop( SCORES ): 2
lstTop=[ ]
for k in SCORES :
if SCORES[k] > 50 :
lstTop.append(k.upper())
else:
Return lstTop

OR
def ARRNG(string):
s = ""
for ch in "".join(sorted("corporate")):
if ch not in s :
s+=ch
return s

22. Ans: 2
1 20 P$
4 30 P$R$
9 60 P$R$S$
23 Ans : (a) print(list(D.keys( ))[-2: ]) 2
(b) print(Lst[-10:-5][::-1])
OR

(((('cold',), 'cold'), 'hot'), 'cold')

24. 1 marks for proper differentiation and another 1 mark for proper example 2
25. Ans : 2
DESCRIBE shop or DESC shop
DELETE FROM shop where Shop_No = 255 and Category = “Electronics”;
1 mark for correct SQL commmand I,e DESCRIBE < table_Name>
+ 1 mark for correct Delete statement

OR
VARCHAR and CHAR
( 1 mark for each )
SECTION C ( 15 Marks )
26. (a) What will be the output of the following statement? 1+2
SELECT * FROM Bank_Account, Branch;

Ans :
+--------+--------+--------+----------+
| e_code | name | e_code | location |
+--------+--------+--------+-----------+
| E01 | ASHISH | E05 | MUMBAI |
| E02 | SURESH | E05 | MUMBAI |
+--------+--------+--------+------------+
(1 mark for correct output)

(b) Write the output of the queries (i) to (iv) based on the table, TECHER given below:
Ans:I)
SUBJECT
Computer Science
Chemistry
English
Economics

II)

SUBJECT TOTA_FACUL
Computer Science 2

III)

TNAME
Dinesh Verma
Narendra Kumar

IV)
MAX(SALARY)
70000
27. def COUNT( ): 3
ifile = open(“Gratitude.txt”,’r’)
data = ifile.readlines()
L=1
for line in data :
count = 0
for word in line.split():
if word[-1] == ‘e’:
count+=1
else:
print(“Line “, L,”:”,count)
else:
ifile.close()

1⁄2 mark for function header


1⁄2 mark for opening and closing the file
1⁄2 mark for reading lines
1⁄2 mark for loop
1⁄2 mark for count function/or any other alternate correct statement(s) 1⁄2 mark for counter

OR

def VOWEL_WORDS():
ifile = open(“TESTFILE.TXT”)
data = ifile.read( )
A_count,U_count = 0,0
for word in data.split():
if word[0] in “aA”:
A_count += 1
If word[0] in “uU”:
U_count +=1
else:
print(“The Number of words starting with letter ‘a’ is : “,A_count)
print(“The Number of words starting with letter ‘u’ is : “,U_count)
ifile.close()

1⁄2 mark for function header


1⁄2 mark for opening and closing the file 1⁄2 mark for reading lines
1⁄2 mark for loop
1⁄2 mark for if condition
1⁄2 mark for print statment

28. Ans : (a) I) 3


Organizer Min(date)
1004 26/10/2019
1002 05/11/2019
1003 01/12/2019
1001 25/11/2019
( ½ mark for the correct output)
(ii)
Max(date) Min(date)
01/12/2019 26/10/2019
( ½ mark for the correct output)
iii)
EventName Name Phone
Birthday Bash Henry 9468731216
Farewell Peter 9745684122
( ½ mark for the correct output)
iv)
Name Date
Smith 01/12/2019
( ½ x 4 = 2)

(b) SHOW DATABASES ( 1 mark )

29. Ans: 3
i) SELECT NAME , CLASS FROM STUDENTS WHERE ADDRESS IS NOT NULL
ii) ALTER TABLE STUDENTS DROP PHONE
iii) (CLASS , SEC , RNO) can togeather act as Composite Primary Key
30 ANS :
emp_dict = { 101: (True, True, True), 102: (False, True, True), 103: (True, True, False),
104: (True, True, True), 105: (False, False, False) }
Proj_Stk=[ ]
def Push_elements(Proj_Stk, emp_dict):
for emp_ID, status in emp_dict.items():
if status == (True , True , True):
Proj_Stk.append(emp_ID)
def Pop_elements(Proj_Stk):
while len(Proj_Stk)>0:
print(Proj_Stk.pop())
if not Proj_Stk:
print('Stack Empty')
Push_elements(Proj_Stk, emp_dict)
Pop_elements(Proj_Stk)

1.5 marks for correct implementation of Push_elements() 1.5 marks for correct implementation
of Pop_elements()

SECTION D ( 8 Marks)
31. Ans : 4
import csv
def highest_performer():
f=open('performance_records.csv', 'r')
reader=csv.reader(f)
skip_header = True
max= -1
for row in reader:
if skip_header:
skip_header = False
else:
if(float(row[4])>max):
max=float(row[4])
rec=row
print('Row with the highest ratings : ', rec)
f.close()
highest_performer()

1⁄2 mark for importing module


1⁄2 mark for function definition
1⁄2 mark for opening and closing file
1⁄2 for reader object
1⁄2 for skipping first row (i.e. header)
1 mark for calculating highest rating
1⁄2 mark for displaying record having highest rating
32 Ans :
import pickle
def high_gpa_students():
with open('STUDENTS.DAT', 'rb') as file:
high_gpa_count = 0
while True:
try:
stu_data = pickle.load(file)
stu_id, stu_name, course, gpa = stu_data
if gpa > 3.5:
print("Student ID:", stu_id)
high_gpa_count += 1
except EOFError:
break
print("Total high gpa students: ", high_gpa_count)

high_gpa_students()

1⁄2 mark for function definition


1⁄2 mark for opening and closing file
1⁄2 mark for correct try and except block
1.5 mark identifying and displaying details of expensive products 1 mark for displaying count of
high gpa students
SECTION E (15 Marks )

33 Ans :
i. The most appropriate location of the server inside the MUMBAI campus is ADMIN building
due to the maximum number of computers in it.
1⁄2 mark for mentioning the branch and 1⁄2 mark for proper justification
ii. Cable Layout

1 mark for drawing any valid cable layout


iii. Switch or Hub
1mark for suggesting the correct device
iv. c. Video Conferencing
1 mark for correct answer
v.
(a) WAN
(b) LAN
1⁄2 mark for mentioning WAN and 1⁄2 mark for mentioning LAN

34 ANS :
i. Purpose
Syntax Parameters
seek()
a)Repositions the file pointer to a specific location within a file
b)seek(offset [,reference point]) Requires specifying the offset and an optional reference point
tell()
A) Returns the current position of the file pointer
B) tell() Requires no parameters

2 marks for mentioning two correct differences.


OR
1 marks for mentioning only one correct differences.
ii. 2+3
import pickle
def copy_books():
In_file = open('BOOKS.DAT','rb')
out_file = open('MYSTERY_BOOKS.DAT','wb')
try:
while True:
data = pickle.load(In_file)
if data[4] == 'MYSTERY' :
pickle.dump(data,out_file)
In_file.close()
except:
out_file.close()
COPY_REC()
1⁄2 mark for function definion
1⁄2 mark for correctly opening and closing file
1⁄2 mark for correct try and except block
1.5 marks for writing required data in MYSTERY_BOOKS.DAT
OR

Binary
1. pickle module to be used
2. Data is stored in binary format(0s and 1s) and is not in human readable
form using any plain text editor.
3. File extension .dat/.pdf/.exe etc.
CSV
1. csv module is used
2. Data is stored in tabular fashion and comma separated by default. The file can be read by any
spreadsheet software or text editor.
3. File extension .csv

2 marks for mentioning two correct differences. OR


1 marks for mentioning only one correct differences.
ii)
import pickle
def find_high_rated_movies(rating):
with open('MOVIES.DAT', 'rb') as file:
while True:
try:
movie_record = pickle.load(file)
for item in movie_record:
ratings = movie_record[item][2]
if ratings >= rating:
print(item, movie_record[item])
except EOFError:
break
find_high_rated_movies(3 )

1⁄2 mark for function definion


1⁄2 mark for correctly opening and closing file
1⁄2 mark for correct try and except block
1.5 marks for displying required records
35 ANS: a) Connect
b) con1.cursor( )
c)f"UPDATE SALARIES SET Salary = {new_salary} WHERE EmpName = '{emp_name}'
d) commit
OR
i) mysql.connector as mysql
ii) con1.cursor()
iii) 50000
iv)mycursor.fetchall( )

You might also like