0% found this document useful (0 votes)
44 views13 pages

Set-I Cs Ms Pb-II

Uploaded by

sahilmeena3435
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)
44 views13 pages

Set-I Cs Ms Pb-II

Uploaded by

sahilmeena3435
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/ 13

MARKING SCHEME SET-I

Pre Board 2024-25


Class: XII Session: 2024-25
Computer Science (083)

Time allowed: 3 Hours Maximum Marks: 70


Q No. SECTION A (21X1=21) Marks
1. True (1)
(1 mark for correct answer)
2. (D) g = dict {}
(1)
(1 mark for correct answer)
3. (C) ==
(1)
(1 mark for correct answer)
4. (A) ['Computer', 'Science@', 'class', '12']
(1)
(1 mark for correct answer)
5. athMtrA (1)
(1 mark for correct answer)
6. (D) List
(1)
(1 mark for correct answer)
7. (A) reverse()
(1)
(1 mark for correct answer)
8. (C) Both A and B
(1)
(1 mark for correct answer)
9. (D) YYYY-MM-DD
(1)
(1 mark for correct answer)
10. file.seek(0,10) )
(1)
(1 mark for correct answer)
11. (A) FileNotFoundError
(1)
(1 mark for correct answer)
12. (C) YesNO#Hello%
(1)
(1 mark for correct answer)
13. 3 (1)
(1 mark for correct answer)

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)

Q No. SECTION B (7 X 2 =14) Marks


22. This type of conversion is performed by Python Interpreter automatically without
the user's intervention.
Explicit Conversion:
(2)
This type of conversion is performed by the user manually. It is also known as
type-casting. Explicit type-casting is performed using functions such as int( ), float(
), str( ) etc.
(1 mark for correct difference)
(½ x 2 = 1 Mark for example)
23. (i) 9 + (3 ** 3) * 4 // 3
= 9 + 27 * 4 // 3 (* and // has left to right associativity)
= 9 + 108 // 3 (2)
= 9 + 36 = 45

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

result = swap_first_last((1, 2, 3, 4))


print("Swapped tuple:", result)

(½ mark each for correcting 4 mistakes)


27. (I) (A) Default
OR
(B) NOT NULL
(1 mark for correct answer)

(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.

SMTP is used for sending e-mails from client to server.


(1 mark for correct expansion)
(1 mark for correct usage)

Q No. SECTION C (3 X 3 = 9) Marks


29. def WordCount():
fob=open("d:\\story.txt", "r")
data = fob.read()
ct=0
words=data.split()
for w in words:
if w[0].lower() not in 'aeiou' and w[-1].lower() in 'aeiou':
print(w)
ct+=1
return ct
OR
def LineCount():
fob=open("d:\\letter.txt", "r")
data = fob.readlines()
ct=0 (3)
for line in data:
for k in line:
if k.isdigit():
print(line)
ct+=1
break
return ct
print(LineCount())

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)

(3 mark for each correct output)

Q No. SECTION D (4 X 4 = 16) Marks


32. (A)
(i) Select * from Test where Sex =’F’ ;
(ii) select * from Test order by Price asc;
(iii) select distinct Department from Test ;
(iv) select min (charge) from Test;

(4 x 1 mark for each correct query)


OR
(B) (4)
(I)
Name Age
Siju 23
Nidhin 25
Hari 28

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 x 1 mark for each correct output)

33. Statement 1 – CSV


Statement 2- "Student.csv","w"
Statement 3- writer(csvfh)
Statement 4- writerows()
(4x1 mark for each correct answer)

(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

(A) Select * ITEMS, COMPANY; (4)

(4x1 mark for each correct query)

35. def AddAndDisplay():


import mysql.connector as mycon
mydb=mycon.connect(host="localhost",user="root",
passwd="tiger",database="ITEMDB")
mycur=mydb.cursor()
no=int(input("Enter Item Number: "))
nm=input("Enter Item Name: ")
pr=float(input("Enter price: "))
qty=int(input("Enter qty: "))
query="INSERT INTO STOCK VALUES ({},'{}',{},{})" (4)
query=query.format(no,nm,pr,qty) mycur.execute(query)
mydb.commit()
mycur.execute("select * from STOCK where price>100")for rec
in mycur:
print(rec)

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)

Q No. SECTION E (2 X 5 = 10) Marks


36. (I) (5)
r+: Both reading and writing operations can take place. File cannot created if

doesn’t exist.

W+ - Both reading and writing operations can take place. File is


created if doesn’t exist.

Page: 10/11
(ii)

import pickle

def CreateFile():

fobj=open("product.dat","ab")

ch='y'

while ch.upper()=='Y':

pno=int(input("Enter Product Number : "))

pname=input("Enter Product Name :")

brand_name = input('Enter Product Brand Name: ')

Price = int(input("Enter Price of the Product : "))

rec=[pno,pname,brand_name,Price]

pickle.dump(rec,fobj)

print("\n Have you any more record to enter: ", end='')

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"))

37. (I) ADMIN Block as it has maximum number of computers. (5)


(1 mark for correct answer)

(II) Switch
(1 mark for correct answer)

(III)

Block Block Block


A C D

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)

(V) (A) a) Video Conferencing


OR
(B) LAN
(1 mark for correct answer)

Page: 13/11

You might also like