0% found this document useful (0 votes)
11 views10 pages

Ms Pb-1 Mumbai Xii Cs 2024-25

This document is a marking scheme for the first pre-board examination in Computer Science for Class XII under Kendriya Vidyalaya Sangathan, Mumbai Region. It includes various sections with multiple-choice questions, definitions, code corrections, and SQL queries, totaling a maximum of 70 marks. The document outlines the correct answers and grading criteria for each question.

Uploaded by

ayushtripathy35
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)
11 views10 pages

Ms Pb-1 Mumbai Xii Cs 2024-25

This document is a marking scheme for the first pre-board examination in Computer Science for Class XII under Kendriya Vidyalaya Sangathan, Mumbai Region. It includes various sections with multiple-choice questions, definitions, code corrections, and SQL queries, totaling a maximum of 70 marks. The document outlines the correct answers and grading criteria for each question.

Uploaded by

ayushtripathy35
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/ 10

KENDRIYA VIDYALAYA SANGATHAN, MUMBAI REGION

FIRST PRE-BOARD (SESSION 2024-25)


(SET- I)
Subject: Computer Science (Theory) Class: XII
Time Allowed: 3:00 Hours Max. Marks – 70

MARKING SCHEME

SECTION-A (21x1=21 Marks)

1. True 1
(1 mark for correct answer)

2. B. ('w', 'or', 'k is worship') 1


(1 mark for correct answer)

3. D. 12 != 5 or not True 1
(1 mark for correct answer)

4. A. ['@2024', ''] 1
(1 mark for correct answer)

5. B. (8.2, 7) 1
(1 mark for correct answer)

6. D. -1 1
(1 mark for correct answer)

7. D. Statement-2 and 4 1
(1 mark for correct answer)

8. B. Inserts the element x at the end of the list 1


(1 mark for correct answer)

9. C. 3 1
(1 mark for correct answer)

10. f.tell( ) 1
(1 mark for correct answer)

11 True 1
(1 mark for correct answer)

12. C. 36+36@ 1
(1 mark for correct answer)

13. DISTINCT 1
(1 mark for correct answer)

14. C. count(*) 1
(1 mark for correct answer)

15. B. 5 and 20 1
(1 mark for correct answer)

Page 1 of 10
16. D. list 1
(1 mark for correct answer)

17. D. Telnet 1
(1 mark for correct answer)

18. C. Microwaves 1
(1 mark for correct answer)

19. Modem 1
(1 mark for correct answer)

20. A. Both A and R are true and R is the correct explanation for A 1
(1 mark for correct answer)

21. C. A is True but R is False 1


(1 mark for correct answer)

SECTION-B (7x2=14 Marks)

22. Dynamic data typing: It allows variables to hold values of different data types 2
during the program execution.

Example:
x = 10 # x is an integer
x = "Hello" # Now x is a string

(1 mark for correct definition and 1 mark for example.)

23. i. Operator Associativity: It determines the order in which operators of 2


the same precedence level are evaluated in an expression. It specifies
whether operators are evaluated from left to right or from right to left.

ii. Operator precedence in descending order:


** → * → + → == → and → or

(1 mark for correct definition and 1 mark for correct order of operator precedence)

24. i. 2
A. M1. remove(25) / M1.pop(1)
OR
B. M2.insert(3,85)
(1 mark for correct answer)

ii.
A. M1.sort(reverse=True)
OR
B. M2.pop()
(1 mark for correct answer)

Page 2 of 10
25. Possible Outputs: i and ii 2
(½ x 2 = 1 Mark for correct possible outputs)

Highest Value: 13
Lowest Value: 4

(½ x 2 = 1 Mark for correct answer)

26. Incorrect Code: 2


def Linear_Search(L)
item=int(input("Enter the value that you want to search:” )
for i in range(len(L)):
if L[i]==item:
print("Element found at index: " i)
break
else:
print("Element not found")
Linear_Search([25,78,45,36,21,10])

Correct Code:
def Linear_Search(L):
item=int(input("Enter the value that you want to search:” ))
for i in range(len(L)):
if L[i]==item:
print("Element found at index: ", i)
break
else:
print("Element not found")
Linear_Search([25,78,45,36,21,10])

(½ mark for each correction)

27. i. 2
A. NOT NULL

OR

B. DDL : ALTER, DROP


DML : INSERT, UPDATE

(1 mark for correct answer)

ii.
A. Alter table Employee change Date_of_Birth DOB date;

OR

B. Alter table Employee rename as Emp;

(1 mark for correct answer)

Page 3 of 10
28. Difference between HTML and XML: 2
S.
No.
HTML XML
1 HyperText Markup Language. eXtensible Markup Language.

2 Designed to display data with XML was designed to be a software


focus on how data looks. and hardware independent tool used
to transport and store data, with
focus on what data is.
3 HTML is case insensitive. XML is case sensitive.
4 HTML has its own predefined Uses custom tags defined by the
tags. user.

(Any two correct differences)


(1x2=2 Marks for correct differences)
OR

Circuit Switching Packet Switching

Requires point to point connections Sends data in small blocks, called


during calls. packets. Packets reassembled in
proper sequence at the receiver
end.
Required dedicated connection Not required dedicated connection

Circuit-switched networks are used packet-switched networks handled


for landline phone calls data

(any two correct points)


(1x2=2 Marks for correct differences)

SECTION-C (3x3=9 Marks)

29. def Show_Words(): 3


f=open("NOTES.txt","r")
s=f.read().lower()
L=s.split()
for word in L:
if word[0] in "aeiou":
print(word.upper())
f.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 a list)
(1 mark for correct logic and displaying the desired output)

Page 4 of 10
OR
def count_my():
f=open("DATA.txt", "r")
s=f.read().lower()
L=s.split()
n=L.count("my")
print("The word my occurs: ", n, " times")
f.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. i. 3
def add_movie(MovieStack, new_movie):
MovieStack.append(new_movie)
print(MovieStack)
ii.
def remove_movie(MovieStack):
if len(MovieStack)==0:
print("Underflow")
else:
return MovieStack.pop()
iii.
def view_top(MovieStack):
if len(MovieStack)==0:
print("None")
else:
print(MovieStack[-1])

(1x3=3 marks for correct function body; No marks for any function header as it was a part of
the question)
OR
PriceStack=[ ]
def PUSH_DATA(Stationery_Item):
for Sname in Stationery_Item:
if Stationery_Item[Sname]>75:
PriceStack.append(Sname)
print("Stack is:", PriceStack)
print("Number of elements in stack: ", len(PriceStack))

(½ mark for correct function header)


(½ mark to traverse the dictionary)
(½ mark for correct logic in if statement)
(½ mark for appending the element in stack)
(½ mark to display the stack)
(½ mark to display number of elements in stack)

Page 5 of 10
31. 18-s 3
7-2
8-i

(1 x 3 = 3 marks for correct output)

OR

64 @ 71
36 @ 107
4 @ 3 @ 107

(1 x3 = 3 marks for correct output)

SECTION-D (4 X 4 = 16 Marks)

32. A. 4
i. Select train_type, sum(fare) from Train group by train_type;
ii. Select TNo, TName, Fare from Train where TName like “S%”;
iii. Select TNo, TName, Source from Train where Destination is
NULL;
iv. select count(*) from Train where train_type="superfast" and
source="Delhi";
(1x4 = 4 marks for correct queries)
OR
B.
i.

TNAME Fare
North East Express 1500
Sabarmati Express 1100
Shatabdi Express 1200

ii.

avg(fare)
1975.00
2100.00

iii.
TName Destination Fare
Shatabdi Express NULL 1200

Sabarmati Express NULL 1100

Page 6 of 10
iv.

min(fare)
1100

(1 x 4= 4 marks for correct output)

33. i. 4

def ADD():
import csv
f=open("record.csv","w",newline="")
L=[]
for i in range(6):
employee_id=int(input("Enter Employee ID: "))
emp_name=input("Enter Employee name: ")
salary=int(input("Enter Salary: "))
M=[employee_id, emp_name, salary]
L.append(M)
w=csv.writer(f)
w.writerows(L)
f.close()

ADD()

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


(½ mark to take values from user and to create the list )
(½ mark to create writer object )
(½ mark to write data to csv file and close the file, if required)

ii.
def COUNTR():
import csv
f=open("record.csv","r")
L=list(csv.reader(f))
n=len(L)
print("Number of records: ", n)
f.close()

COUNTR()

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


(½ mark for correctly creating the reader object and converting it in a list)
(½ mark for correct use of counter or use built-in function)
(½ mark for correctly displaying the counter and close the file, if required)

34. i. select customer_name, branch_name from borrower, loan where 4


loan.loan_number=borrower.loan_number and branch_name="Delhi";

Page 7 of 10
ii. select loan.loan_number, customer_name, amount from borrower,
loan where loan.loan_number=borrower.loan_number and
amount>40000;

iii. select branch_name, avg(amount) from loan group by branch_name


having avg(amount)>50000 ;
iv.
A. select customer_name, amount from borrower, loan where
loan.loan_number=borrower.loan_number order by amount desc;
OR
B. 4

(1 x 4 =4 marks for correct queries)

35. def Create_and_ADD(): 4


import mysql.connector
demodb = mysql.connector.connect(host="localhost", user="root",
password="Program", database="library")
democursor = demodb.cursor( )
qry="create table BOOK (Book_ID int Primary Key, BName
varchar(25) NOT NULL, Quantity int, Price float(6,2), Author
varchar(20))"
democursor.execute (qry)
values=(12,"Godaan",15,210,"Premchand")
democursor.execute("insert into book values(%s,%s,%s,%s,%s)" , values)
demodb.commit()
print("Record inserted successfully")

(½ mark for correctly importing the connector object)


(½ mark for correctly creating the connection object)
(½ mark for correctly creating the cursor object)
(1 mark for correct creation of first query)
(½ mark for correctly executing the first query)
(1 mark for correctly creating and executing the second query with commit)

SECTION-E (2 X 5 = 10 Marks)

36. i. 5
import pickle
def ADD_Data():
f=open("STUDENT.DAT", "wb")
L=[]
for i in range(7):
admn=int(input("Enter Admission Number: "))
name=input("Enter student name: ")
marks=int(input("Enter marks: "))
D={"Admn_No":admn, "SName":name, "Marks":marks}
L.append(D)

Page 8 of 10
pickle.dump(L,f)
f.close()

(½ mark to import pickle module and open file in write mode)


(½ mark to take values from user)
(½ mark to append the data in list)
(½ mark to dump data in binary file)

ii.
def Display_Data():
f=open("STUDENT.DAT", "rb")
L=pickle.load(f)
print(L)
f.close()

(½ mark to open file in read mode)


(½ mark to read contents of file and display them)

iii.
def Modify_Marks():
admn=int(input("Enter admission number: "))
f=open("STUDENT.DAT", "rb+")
found=0
L=pickle.load(f)
M=[]
for D in L:
if D["Admn_No"]==admn:
m=int(input("Enter new marks: "))
D["Marks"]=m
found=1
M.append(D)
if found==1:
f.seek(0)
pickle.dump(M,f)
print("Record updated successfully")
else:
print("Record not found")
f.close()

(½ mark to take admission number from user)


(½ mark to open a file in read and write mode)
(½ mark for checking the condition and updating the value)
(½ mark for checking the condition and displaying data correctly)

37. i. In Technical Block, It has maximum number of computers and satisfies 5


80:20 rule of networking.
(½ mark for correct answer and ½ mark for justification of the answer)

ii. Switch/Hub
(1 mark for correct answer)

iii.
a. HR and Marketing Block: LAN
Page 9 of 10
b. Head office and Jaipur office : WAN

(½ x 2 = 1 mark for correct output)

iv. Optical Fiber


( 1 mark for correct answer)

v.
A. Technical block and Marketing block.
Justification: Because the distance between these two blocks is
more than 100m, so to send the signals for long distance, repeater
should be used.
(½ mark for correct answer and ½ mark for justification of the answer)
OR
B. Star Topology (or any other correct layout)

Jaipur Campus

HR Tech
nical

Head Office

Mumbai
Mark
eting

(½ mark for correct topology and ½ mark for layout)

Page 10 of 10

You might also like