86% found this document useful (7 votes)
4K views6 pages

Class 12 - Computer Science (083) - CE - MS

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
86% found this document useful (7 votes)
4K views6 pages

Class 12 - Computer Science (083) - CE - MS

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/ 6

Chennai Sahodaya Schools Complex

Common Examination : 2024 - 2025


COMPUTER SCIENCE (083)
Class : XII MARKING SCHEME Marks : 70
Section – A 21 x 1 =21
1. True

2. b) one object 2 references

3. c) <class ‘NoneType’>

4. b) t.insert(2, 3)

5. c) 1

6. IN

7. DNS (Domain Name System)

8. b) Star topology

9. c) Bridge

10. c) Cartesian Product

11. b) Pickle

12. b) math.ceil(19.22) + math.floor(15.99) > 34

13. c) CALC(y=25)

14. Sunil

15. a) S[::-5]

16. d) [6, 4, 2, ‘1’, ‘0’, ‘0’]

17. age must be a positive integer and greater than or equal to 18.

18. a) It increases the salary of all the employees by 10%

19. a) Primary key = candidate key – alternate key

20. a) Both A and R are correct and R is the correct explanation of A.

21. c) A is True, R is false

1/6
Section – B 7 x 2 = 14
22. a) x = Data[“students”]
for i in x:
print(i[“first name”]) carries 1 mark

b) x = Data[“students”]
y = Data[“teacher”]
print(len(x) + len(y)) carries 1 mark

or any relevant answer

23. i) a) Mutable object can be updated where as immutable can not be updated. 1 mark
(or)
b) False carries 1 mark

ii) a) floor( ) carries 1 mark


(or)
b) swapcase( ) carries 1 mark

24. L = [1,2,1,1,2,1,2,3,5,4,1,2,5,4,4,5] any 4 errors – each carries ½ mark


D={}
for x in L:
if x in D:
D[x] += 1
else:
D[x] = 1
print(D)

25. b) P*g* d) P*g*m* each carries ½ mark


Maximum value of b – 8, minimum value of b – 3 each carries ½ mark

26. [1,None,2, None] each output carries ½ mark

27. i) a) WAN – Wide Area Network carries 1 mark


(or)
b) MAN – Metropolitan Area Network carries 1 mark

ii) a) HTTP – Hyper Text Transfer Protocol carries 1 mark


(or)
b) i) SLIP – Serial Line Internet Protocol each carries ½ mark
ii) PPP – Point-to-Point Protocol

28. i) a) Count(Section) will count only the Non-Null values, whereas


Count(*) function will count the number of records in the given table
each carries ½ mark
(or)
b) Command b) produces higher value carries 1 mark

ii) a) The wild cards are incorrect. carries ½ mark


The corrected query is “SELECT NAME FROM TEACHER
WHERE NAME LIKE “_ _ a%” carries ½ mark

2/6
(or)

ALTER TABLE MOVIE DROP PRIMARY KEY;


carries 1 mark
or any relevant answer

Section – C 3x3=9
29. a) Garment = {'1':['shirt',6500], '2':['trouser',2000], '3':['coat', 15000]}
s=[]
def Pushitems(Garment): push function carries 1 mark
for i in Garment.values():
if i[1]>=5000:
s.append(i)
def Popitems(): pop function carries 1 mark
print(s)
if s==[]:
print("empty")
else:
s.pop()
x=len(s)-1 display carries 1 mark
while x>=0:
print(s[x])
x=x-1
(or)

b) perfectstack = []
def pushperfect(n): push function carries 1 mark
sum=0
for i in range(1,n):
if n%i==0:
sum += i
if sum == n:
perfectstack.append(n)
def popperfect( ): pop function carries 1 mark
if perfectstack == []:
print("Stack empty")
else:
a=perfectstack.pop()
print("element deleted=",a)
x=len(perfectstack)-1
while x>=0:
print(perfectstack[x])
x-=1
ans='y'
while ans=='y':
n=int(input("Enter a number"))
pushperfect(n) each function calling carries ½ mark
ans=input("Do you want to continue")
popperfect()
or any relevant answer

30 a) 1 $
1$2$ each line carries 1 mark
3/6
1$2$3$

(or)
b) [1, 2, 3, 4, 5, 6, 7, 8, 9] each line carries 1 mark
[0, 1, 2, 3, 4]
[1, 3, 5, 7, 9, 4]

31. a) def countwords():


w=[]
f=open("story.txt","r") carries ½ mark
x=f.read()
y=x.split() carries ½ mark
for i in y:
if y.count(i)==1: carries ½ mark
w.append(i) carries ½ mark
for i in w:
print(i, end=' ') carries ½ mark
f.close() carries ½ mark
(or)
b) def dispwords():
lv=[]
uv=[]
f=open("diary.txt","r")
x=f.read() carries ½ mark
y=x.split() carries ½ mark
for i in y:
if i[0] in "aeiou": carries ½ mark
lv.append(i) carries ½ mark
if i[0] in "AEIOU": carries ½ mark
uv.append(i) carries ½ mark
print(lv)
print(uv)
f.close()
or any relevant answer

Section – D 4 x 4 =16
32. import mysql.connector as m - ½ marks
c = m.connect(host="localhost", user="admin",
password="student", database="college") - 1 mark
cursor=c.cursor() - ½ mark
cursor.execute("UPDATE Collegestuds SET Grade= “A”
WHERE Points > 8”) – ½ mark
c.commit() - ½ mark
cursor.execute("UPDATE Collegestuds SET Grade= “B”
WHERE Points <=8”) – ½ mark
c.commit() - ½ mark
c.close()
or any relevant answer

33. i) SELECT S_ID, C_Name, City FROM Salesman, Customer WHERE


Customer. S_ID = Salesman.S_ID;

ii) SELECT C_Name, City FROM Customer WHERE Grade


4/6
BETWEEN 200 and 300;

iii) UPDATE Salesman SET Commission = Commission + 0.5 WHERE City= “Delhi”;

iv) DESCRIBE Customer;


(or)
SELECT DISTINCT City FROM Salesman; each query carries 1 mark

34 a) i) DELETE FROM Patients WHERE Department = “Cardiology”;

ii) SELECT Name, Charges, Charges*0.15 AS “Discount” FROM Patients;

iii) SELECT Name FROM Patients WHERE Gender=”F” and Age is NULL;

iv) SELECT monthname(Dateofadm) FROM Patients WHERE Gender = “M”;

each query carries 1 mark


(or)
b) Write the output for the following.
i) ENT 700
Cardiology 1600
Gynaecology 300

ii) 2

iii) 2 Sriram 29 Cardiology 20-02-1998 800 M


3 Lakshmi NULL Gynaecology 22-02-1998 300 F
4 Lekha 19 Cardiology 13-01-1998 800 F

iv) 20-02-1998 400


each output carries 1 mark
35. def Copycsv():
l=[]
fr=open("marks.csv","r",newline="\n") opening of both files – ½ mark
fw=open("class.csv","w",newline="\n")
cw=csv.writer(fw) writer & reader object – ½ mark
cr=csv.reader(fr, delimiter=":")
for i in cr:
l=[i[0],i[2]] carries ½ mark
cw.writerow(l) carries ½ mark
fw.close()
fr.close()
def Copyselected():
l=[]
fr=open("marks.csv","r",newline="\n") opening of both files – ½ mark
fw=open("class2.csv","w",newline="\n")
cw=csv.writer(fw) writer & reader object – ½ mark
cr=csv.reader(fr, delimiter=":")
for i in cr:
if i[1]==str(2): carries ½ mark
cw.writerow(i) carries – ½ mark
fw.close()
fr.close()
5/6
or any relevant answer
Section – E 2 x 5 = 10
36. a) csv file carries 1 mark
b) import pickle
def Addgarment():
f=open("Garment.dat","wb") carries ½ mark
ans='y'
while ans=='y':
GID=int(input("Enter garment Id"))
Type=input("Enter cloth type")
Gender=input("Enter the gender")
Cost=int(input("Enter cost"))
l=[GID,Type,Gender,Cost] carries ½ mark
if Type.lower()=="cotton" or Type.lower()=="silk": carries ½ mark
pickle.dump(l,f) carries ½ mark
else:
print("Invalid garment type")
ans = input("do you want to continue")
f.close()
def Showgarment():
c=0
f=open("Garment.dat","rb") carries ½ mark
try:
while True:
x=pickle.load(f) carries ½ mark
if x[1].lower()=="silk": carries ½ mark
print(x)
c=c+1 carries ½ mark
except:
f.close()
print("Number of records=",c)
f.close()
Addgarment()
Showgarment() or any relevant answer
37 a) HR center. It has maximum number of computers. 1 mark
c) Hub / Switch ------------------ 1 mark
d) In this layout, repeater is not needed as all the distances are less than 70 mts --- 1 mark
e) WAN ---------------- 1 mark
b) Bus topology ---------------- 1 mark

6/6

You might also like