CENTRAL CLUSTER COMMON EXAMINATION – (2024-2025)
STD XII SUB : COMPUTER SCIENCE (083)
SET - A MARKING SCHEME
DATE: MAX. MARKS: 70
marks
MAX. TIME: 3 hrs
General Instructions:
∙ Please check 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.
Sn Question Mark
o
Section – A
1 False 1
2 (b) (2,4,3,2,4,3) 1
3 (d) Error 1
4 1
(c) 3,2,01
5 imroPnhy 1
6 (d) [50,60,70] 1
7 (b) fall 1
8 (d) sorted 1
9 (b) 13,12 1
10 (b) rw 1
11 True 1
1
12 X=25 1
X=20
13 Desc 1
14 (a) Equi-join 1
15 (b) Count(*) 1
16 (c) FOREIGN KEY clause 1
17 (c) TCP/IP 1
18 (c) Repeater 1
19 CIRCUIT 1
20 (a) Both A and R are true and R is the correct explanation for A 1
21 (c)A is True but R is False. 1
SECTION - B
22 16 2
64
23 Python allows following two string types: 2
(i) Single line String - String that are terminated in single line
(ii) Multiline Strings - Strings storing multiple lines of text.
24 (I) (1+1)
(a)print(L1.index(16))
(b)L1.sort()
OR
(II)
(a)L1.append(15)
(b).L1.reverse()
25 (i) (1+1)
Minimum Value of End=3; Maximum Value of End=4
2
26 def Check_No(N): 2
status = N % 2
return status
num = int(input("Input enter a number to check:"))
K = Check_No(num)
if K == 0:
print("This is EVEN Number")
else:
print("This is ODD Number")
27 (I)Alter table Students change Roll_No Rno varchar(10); (1+1)
OR
Alter table Students add primarykey(Roll_No);
(II)Alter table Students drop Roll_No;
OR
Drop table Students;
28 Advantage of Tree topology: Simulates hierarchical flow of data. 2
Disadvantage of Tree topology: Long cable length
OR
FTP refers to File Transfer Protocol that govern the transfer of
files from one location to another on network.
SECTION - C
29 (A)def countcase(): 3
myfile=open(“Computer.txt”, “r”)
ch= “ ”
lcount = 0
ucount=0
while ch:
ch=myfile.read(1)
if ch.isupper()==True:
ucount+=1
else:
lcount+=1
print(“Uppercase letters in the file”,ucount)
print(“Lowercase letters in the file” ,lcount)
myfile.count()
3
(½ mark for correct function header)
(½ mark for correctly opening the file)
(½ mark for correctly reading from the file)
(½ mark traversing characters )
(1 mark for correctly counted characters)
OR
(B) def DISPLAYWORDS():
c=0
file=open(“story.txt” , “r”)
line= file.read()
word=line.split()
for w in word:
if len(w)<4:
print(w)
file.close()
(½ mark for correct function header)
(½ mark for correctly opening the file)
(½ mark for correctly reading from the file)
( ½ mark for splitting the text into words)
(1 mark for correctly displaying the desired words)
30 status=[] 3
def Push_element(cust):
if cust[2]==”Chennai”:
status.append([[cust[0],cust[1]])
def Pop_element():
ln=len(status)
while ln!=0:
popped=status.pop()
print(popped)
ln=ln-1
(11/2 x 2 – correct function body)
OR
EvenNumbers = []
def push_even4(N):
for number in N:
if 1000 <= number <= 9999 and number % 2 == 0:
EvenNumbers.append(number)
def pop_even():
4
for i in range(len(EvenNumbers)+1):
if EvenNumbers!=[]:
print(EvenNumbers.pop())
else:
print(' Stack Empty')
def Disp_even():
for i in range(len(EvenNumbers)-1,-1,-1):
print(EvenNumbers[i])
VALUES = []
n=int(input('Enter the no.of elements'))
for i in range(n):
VALUES.append(int(input('enter the elements')))
push_even4(VALUES)
print('The elements in the stack:')
Disp_even()
print('\nPopping the topmost element:' )
pop_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 8 # 3
9 #9 #
12 #12 #12 #
16 #16 #16 #16 #
(1.5 marks will be awarded for every two lines of output.)
SECTION – D
32 4
(i) SELECT P.NAME ,F.FARE,F.F_DATE FROM FLIGHT F,
PASSENGER P WHERE F.FNO=P.FNO AND F.START= ‘MUMBAI’;
(ii) UPDATE FLIGHT SET FARE=6500 WHERE FNO= ‘F103’;
(iii) DELETE FROM FLIGHT WHERE END = “DELHI”;
(iv) ALTER TABLE FLIGHT ADD (REMARKS VARCHAR(30));
(4 x 1 mark for each correct query)
OR
5
i)
+------+---------+---------+------------+------+
| FNO | START | END | F_DATE | FARE |
+------+---------+---------+------------+------+
| F101 | MUMBAI | CHENNAI | 2021-12-25 | 4000 |
| F105 | KOLKATA | CHENNAI | 2021-01-12 | 3500 |
+------+---------+---------+------------+------+
ii)
+--------+----------------+
| GENDER | PassengerCount |
+--------+----------------+
| Female | 3|
+--------+----------------+
iii)
+------+---------+-----------+
| FNO | START | END |
+------+---------+-----------+
| F103 | MUMBAI | DELHI |
| F104 | DELHI | MUMBAI |
| F101 | MUMBAI | CHENNAI |
| F105 | KOLKATA | CHENNAI |
| F102 | CHENNAI | BENGALURU |
+------+---------+-----------+
iv)
+--------------------+
| UniqueDestinations |
+--------------------+
| 4|
+--------------------+
(4 x 1 mark for each correct output)
33 (i) import csv 4
f=open("sport.csv","r")
r=csv.reader(f)
v=0
c=0
t=0
for row in r:
if (row[2].upper()=="VOLLEY BALL"):
v+=1
if (row[2].upper()=="THROW BALL"):
t+=1
6
if (row[2].upper()=="CRICKET"):
c+=1
if v>=c and v>=t:
print(" Favourite Game is Volley Ball")
elif c>=v and c>=t:
print("Favourite Game is Cricket")
else:
print("Favourite Game is Throw ball")
f.close()
(1+1+1-reading,checking,counting)
(ii) import csv
f=open("sport.csv","r")
r=csv.reader(f)
c=0
for row in r:
c+=1
print( “Number of Records in the file” ,c)
(1 mark- counting records)
34 (i) SELECT NAME FROM DOCTOR WHERE DEPT=”MEDICINE” 4
AND EXPERIENCE>10;
(ii) SELECT AVG(BASIC+ALLOWANCE) FROM DOCTOR,SALARY
WHERE DOCTOR.ID=SALARY.ID AND DEPT= “ENT”;
(iii) SELECT MIN (ALLOWANCE) FROM DOCTOR , SALARY
WHERE DOCTOR.ID=SALARY.ID AND SEX=”F”;
(iv) SELECT MAX(CONSULTATION) FROM DOCTOR,SALARY
WHERE DOCOTR.ID=SALARY.ID AND SEX=”M”;
OR
SELECT * FROM DOCTOR , SALARY;
(each 1 mark for correct answer)
35 def Add_Item(): 4
import mysql.connector as mycon
mydb=mycon.connect(host="localhost", user="root",
passwd="root", database="emp")
mycur=mydb.cursor()
no=input("Enter Employee code")
nm=input("Enter Employee Name: ")
s=int(input("Enter Salary: "))
c=input("Enter city: ")
7
query="INSERT INTO employee VALUES ({},'{}',{},{})"
query=query.format(no,nm,s,c)
mycur.execute(query)
mydb.commit()
mycur.execute("select * from employee where Salary
>12000")
data=mycur.fetchall()
for rec in data:
print(rec)
SECTION – E
36 (1/2 mark of import pickle) 5
(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)
Note: The file can be implemented using either a dictionary or a
nested list
# As dictionary
import pickle
def write():
f = open("employee_records.dat", 'wb')
employees = []
while True:
employee_id = int(input("Enter Employee ID: "))
employee_name = input("Enter Employee Name: ")
department = input("Enter Department: ")
salary = float(input("Enter Salary: "))
employee = {'Employee_ID': employee_id,
'Employee_Name': employee_name,
'Department': department,
'Salary': salary}
8
employees.append(employee)
ch = input("Do you want to add another employee? <Y/N>:
")
if ch == 'N' or ch == 'n':
break
pickle.dump(employees, f)
f.close()
def update():
f = open("employee_records.dat", 'rb+')
updated = False
try:
while True:
employees = pickle.load(f)
for employee in employees:
if employee['Department'].lower() == "sales" and
employee['Salary'] < 30000:
employee['Salary'] *= 1.10
updated = True
if updated:
f.seek(0)
pickle.dump(employees, f)
print("Updated salaries for employees in the 'Sales'
department successfully.")
else:
print("No employees in the 'Sales' department had a
salary below ₹30,000.")
except EOFError:
f.close()
def read():
f = open("employee_records.dat", 'rb')
try:
while True:
employees = pickle.load(f)
for employee in employees:
if employee['Department'].lower() == "it":
9
print("Employee ID:", employee['Employee_ID'],
", Name:", employee['Employee_Name'],
", Department:", employee['Department'],
", Salary: ₹", employee['Salary'])
except EOFError:
f.close()
write()
update()
read()
# As nested list
import pickle
def write():
f = open("employee_records.dat", 'wb')
employees = []
while True:
employee = [
int(input("Enter Employee ID: ")),
input("Enter Employee Name: "),
input("Enter Department: "),
float(input("Enter Salary: "))
]
employees.append(employee)
ch = input("Do you want to add another employee? <Y/N>:
")
if ch == 'N' or ch == 'n':
break
pickle.dump(employees, f)
f.close()
def update():
f = open("employee_records.dat", 'rb+')
updated = False
try:
while True:
employees = pickle.load(f)
for employee in employees:
if employee[2].lower() == "sales" and employee[3] <
10
30000:
employee[3] *= 1.10
updated = True
if updated:
f.seek(0)
pickle.dump(employees, f)
print("Updated salaries for employees in the 'Sales'
department successfully.")
else:
print("No employees in the 'Sales' department had a
salary below -30,000.")
except EOFError:
f.close()
def read():
f = open("employee_records.dat", 'rb')
try:
while True:
employees = pickle.load(f)
for employee in employees:
if employee[2].lower() == "it":
print("Employee ID:", employee[0],
", Name:", employee[1],
", Department:", employee[2],
", Salary: ₹", employee[3])
except EOFError:
f.close()
write()
update()
read()
37 (i) In building RED as it houses maximum number of computer ; 5
hence most traffic will be local traffic if server is placed here.
(ii) Building
“GREEN
”
45m
Building Building
“BLUE ” “RED ”
11
65m
(iii) (a) Switches are needed in every building as they help share
bandwidth in every building.
(b) Repeaters may be skipped as per above layout, because
distance is less than 100 m) however if building Green and
building Red are directly connected, we can place a repeater
there as the distance between these two buildings is more
than 100 m.
(iv) (a) Optical Fibre
(v) (a) Video Conferencing OR WAN
(each correct answer 1 mark)
End of Paper
********************
12