12 CS PB1 CHN MS

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION

CLASS: XII SESSION: 2024-25


PREBOARD I MARKING SCHEME
COMPUTER SCIENCE (083)
Time allowed: 3 Hours Maximum Marks: 70

Q No. Section-A (21 x 1 = 21 Marks) Marks


1 False 1
(1 mark for correct answer)
2 iv) [2,14,3,7] 1
(1 mark for correct answer)
3 ii) 4.6 1
(1 mark for correct answer)
4 ii) ['', 'hinese ', 'ontinental'] 1
(1 mark for correct answer)
5 so ie 1
(1 mark for correct answer)
6 ii) 100 1
(1 mark for correct answer)
7 ii) print(farm[‘sheep’,’hen’]) 1
(1 mark for correct answer)
8 iii) Replace all occurrences of ‘e’ to ‘h’ 1
(1 mark for correct answer)
9 iii)2 1
(1 mark for correct answer)
10 file.seek(0) 1
(1 mark for correct answer)
11 iii) raise 1
(1 mark for correct answer)
12 ii) 5500.0%6000$ 1
(1 mark for correct answer)
13 ALTER (or ALTER TABLE) 1
(1 mark for correct answer)
14 iii) Customers details whose code’s second letter is A 1
(1 mark for correct answer)
15 i) (20,34) 1
(1 mark for correct answer)
16 c)count(col) 1
(1 mark for correct answer)
17 a)IP 1
(1 mark for correct answer)
18 c)Modem 1
(1 mark for correct answer)
19 Packet Switching 1
(1 mark for correct answer)
Q20 and Q21 are Assertion(A) and Reason(R) based questions. Mark the correct
choice as:
(A) Both A and R are true and R is the correct explanation for A
(B) Both A and R are true and R is not the correct explanation for A
(C) A is True but R is False
(D) A is False but R is True
20 A) Both A and B are true and R is the correct explanation for A 1
(1 mark for correct answer)
21 D) A is False B is True 1
Q No. Section-B ( 7 x 2=14 Marks) Marks
22 Difference 1 mark 2
Example ½ mark each
23 a) Assignment Operators = += -= *= **= /= //= %= 2
b) Logical Operators not and or (any two from each)
(1/2 mark for each correct operator)
24 2
(i) A) L1.pop(4)
Or
B) a=max(L2) or print(max(L2)

(ii) (A) L1.append(L2)


OR
(B) L2.insert(1,15)
25 Identify the correct output(s) of the following code. Also write the minimum and the 2
maximum possible values of the variable Lot
Minimum value possible for Lot: 4
Maximum value possible for Lot: 8
Possible outputs are : i) and ii)
26 Identify Primary Key and Candidate Key present if any in the below table name 2
Colleges. Justify
Primary Key: Cid its unique
Candidate Key: Cid, Name, PhoneNumber as they are have unique values

27 (I) 2
(A) UNIQUE ,NOT NULL
OR
(B) NOT NULL (PRIMARY KEY CAN BE GIVEN MARK)
(II)
(A) ALTER TABLE flight ADD PRIMARY KEY(F_id);
OR
(B) ALTER TABLE CUSTOMER DROP REMARKS;
28 STAR Adv DisAdv ½ mark each 2
BUS Adv DisAdv ½ mark each
OR
DNS definition 1 mark, IP purpose 1 mark

Q No. Section-C ( 3 x 3 = 9 Marks) Marks


29 a) Opening and closing file ½ mark 3
Read() ½ mark split() ½ mark
Loop ½ mark upper case checking ½ mark
Output display ½ mark
OR
b)
Opening and closing file ½ mark
Readlines() ½ mark
Loop ½ mark counting no of words ½ mark
Output display ½ mark
30 (1/2 for identifying even numbers) 3
(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)
OR
(1 ½ mark for correct function body; No marks for any function header as it
was a part of the question)
31 ILENCE-^OPE-^UCCEs^^^14 correct o/p 3 mark 3

Q Section-D ( 4 x 4 = 16 Marks) Mar


No. ks
32 i) SELECT COUNT(DISTINCT VTYPE) FROM VEHICLE; 4
ii) SELECT VTYPE,COUNT(*) FROM VEHICLE GROUP BY VTYPE HAVING
MIN(COST)>80;
iii) UPDATE VEHICLE SET COST=45 WHERE COST IS NULL
iv) SELECT OWNER ,VTYPE,CONTACT FROM VEHICLE WHERE OWNER LIKE
“P%”;
OR
i)
+---------------------+-----------------+
| VTYPE | AVG(COST) |
+----------------------+-----------------+
| CAR | 65.0000 |
| truck | 125.0000 |
| Moter Cycle | NULL |
| SUV | 65.0000 |
| MOTOR CYCLE | NULL |
+----------------------+-----------------+
ii)
+--------------------+----------------------+------------------+
| OWNER | VTYPE | CONTACT |
+---------------------+----------------------+-----------------+
| Prem Sharma | Moter Cycle | 9987654321 |
| PRIYA REDDY | MOTOR CYCLE | 9123456789 |
+---------------------+----------------------+-----------------+
iii)
+---------------+
| COUNT(*) |
+--------------+
| 2|
+--------------+
iv)
+-----------------+
| MAX(COST) |
+-----------------+
| 125 |
+-----------------+

33 (½ mark for opening in the file in right mode) 4


(½ mark for correctly creating the reader object)
(½ mark for correctly checking the condition)
(½ mark for correctly displaying the records)
OR
(½ mark for opening in the file in right mode)
(½ mark for correctly creating the reader object)
(½ mark for correct use of counter)
(½ mark for correctly displaying the counter)
34 i) select airports.a_id,city,f_id,F_no from flights,airports where flights.f_id=airports.a_id 4
and departure="DEL";
ii) select * from flights where arrival="bom" or arrival="Maa" or arrival="ccu";
iii) delete from flights where F_no like "6E%";
iv) (A) select * from flights,airports;
OR
(b) select airports.a_id,city,flights.f_id from flights,airports where airports.a_id=flights.a_id;
35 4
#interface code
import mysql.connector as mn
def Input_Disp():
con=mc.connect(host="localhost",user="root",password="tiger",database="VRMALL")
cur=con.cursor()
print("Enter Event Details:")
eid=input("ID:")
ename=input("NAME:")
edate=input("DATE:")
des=input("Description:")
query="insert into Event values("+eid+",'"+ename+"','"+edate+"','"+des+"')"
cur.execute(query)
con.commit()
print("Record Inserted")

print("Details of Event organised in year 2024")


query="select * from Event where eventdate like '2024'"
cur.execute(query)
data=cur.fetchall()
print("ID NAME DATE DESCRIPTION")
for rec in data:
print(rec[0],rec[1],rec[2],rec[3],sep= " ")
con.close()
or any other relavant code
import ½ mark
Connectivity stmt ½ mark
Cursor creation query creation ,execute(), commit ½ mark each
Query creation, cursor execution ½ mark each
Fetching data and display loop ½ mark each
Q No Section-E ( 2 x 5 = 10 Marks) Mark
s
36 #binary file
def Prj_input():
file=open("Projects.dat","ab")
print("Enter Project Details:")
pid=int(input("ID:"))
pname=input("NAME:")
mem=int(input("MEMBERS:"))
dur=int(input("DURATION IN MONTHS:"))
rec=[pid,pname,mem,dur]
pickle.dump(rec,file)
file.close()
print("data inserted")
def Prj_update():
file=open("Projects.dat","rb+")
try:
while True:
pos=file.tell()
rec=pickle.load(file)
5
if rec[2]>3:
rec[3]=3
file.seek(pos)
pickle.dump(rec,file)
except EOFError:
pass
finally:
file.close()
print("Record modified")
def Prj_solo():
file=open("Projects.dat","rb")
try:
print("PROJECT DETAILS")
print("ID NAME MEMBERS DURATION")
while True:
import pickle ½ mark
rec=pickle.load(file)
input and ifclose ½ mark ,insert 1 mark
rec[2]==1:
try except block ½ mark loop ½ mark
print(rec[0],recc[1],rec[2],rec[3],sep=" ")
reading records , updation
file.seek(pos) ½ mark each
try catch block ½ mark
pickle.dump(rec,file)
loop except
½ markEOFError:
fetching and display ½ mark each
37 passi) Server to be placed in ADMIN block as it has maximum number of 5
file.close() computers(70 30 traffic rule)
ii) Coaxial cable/fiber optics
iii) Star topology or any other layout

LOGISTICS
ACCTS

ADMIN

HR

iv) VoIP Voice over internet Protocol


v)
a) Repeater –distance more then 90 m –all
..if fiber optical cable then no repeater
b) Switch- in each block as to connect computers

You might also like