Ms Pb-1 Mumbai Xii Cs 2024-25
Ms Pb-1 Mumbai Xii Cs 2024-25
MARKING SCHEME
1. True 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)
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)
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 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
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])
27. i. 2
A. NOT NULL
OR
ii.
A. Alter table Employee change Date_of_Birth DOB date;
OR
Page 3 of 10
28. Difference between HTML and XML: 2
S.
No.
HTML XML
1 HyperText Markup Language. eXtensible Markup Language.
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()
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))
Page 5 of 10
31. 18-s 3
7-2
8-i
OR
64 @ 71
36 @ 107
4 @ 3 @ 107
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
Page 6 of 10
iv.
min(fare)
1100
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()
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()
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;
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()
ii.
def Display_Data():
f=open("STUDENT.DAT", "rb")
L=pickle.load(f)
print(L)
f.close()
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()
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
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
Page 10 of 10