Xii CS Model Ak
Xii CS Model Ak
(083)
Class : XII Date :
Time allowed: 3 hr Max.Marks: 70
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)
Page 1 of 10
15. B. 5 and 20 1
(1 mark for correct answer)
16. D. list 1
25. Possible
(1 mark Outputs:
for correct answer) i and ii 2
17. D. Telnet
(½ x 2 = 1 Mark for correct possible outputs) 1
(1 mark for correct answer)
Highest Value: 13
18. C. Microwaves
Lowest Value: 4 1
(1 mark for correct answer)
(½ x 2 = 1 Mark for correct answer)
19. Modem 1
(1 mark for correct answer)
26. Incorrect Code: 2
20. A.
defBoth A and R are true and R is the correct explanation for A
Linear_Search(L) 1
(1 mark for correct answer)
item=int(input("Enter the value that you want to search:” )
for i in
21. C. A is True but R is False 1
range(len(L)):
(1 mark for correct answer)
if L[i]==item:
print("Element
SECTION-Bfound
(7x2=14 atMarks)
index: " i)
break
22. Dynamic data else:
typing: It allows variables to hold values of different data types 2
during the program print("Element
execution. not found")
Linear_Search([25,78,45,36,21,10])
Example:
x = 10 # x is an integer
Correct Code:# Now x is a string
x = "Hello"
def Linear_Search(L):
(1 mark for correct definition and 1 mark
item=int(input("Enter thefor value
example.)that you want to search:”
))
23. i. forOperator
i in Associativity: It determines the order in which operators of 2
the same precedence
range(len(L)): level are evaluated in an expression. It specifies
whether operators are evaluated from left to right or from right to left.
if L[i]==item:
print("Element found at index: ",
ii. i) breakin descending order:
Operator precedence
else: ** → * → + → == → and → or
print("Element not found")
Linear_Search([25,78,45,36,21,10])
(1 mark for correct definition and 1 mark for correct order of operator precedence)
ii.
A. M1.sort(reverse=True)
OR
B. M2.pop()
(1 mark for correct answer)
Page 2 of 10
27. i. 2
A. NOT NULL
OR
ii.
A. Alter table Employee change Date_of_Birth DOB date;
OR
Page 3 of 10
SECTION-C (3x3=9 Marks)
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()
Page 4 of 10
30. i. 3
def add_movie(MovieStack, new_movie):
MovieStack.append(new_mo
vie) print(MovieStack)
ii.
def
remove_movie(MovieSta
ck): if
len(MovieStack)==0:
print("Underflow"
) else:
return MovieStack.pop()
iii.
def
view_top(MovieStac
k): if
len(MovieStack)==
0:
print(" one")
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
flriceStack=[ ]
def
flUSH_DATA(Stationery_Item)
: for Sname in
Stationery_Item:
if Stationery_Item[Sname]>75:
flriceStack.append(Sname)
print("Stack is:", flriceStack)
print("umber of elements in stack: ", len(flriceStack))
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 T o, T ame, Fare from Train where T ame like “S
%”;
iii. Select T o, Tame, Source from Train where
Destination is ULL;
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
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 COUTR():
import csv
f=open("record.csv",
"r")
L=list(csv.reader(f))
n=len(L)
print("umber of records: ", n)
f.close()
COUTR()
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;
Page 8 of 10
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)
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()
Page 9 of 10
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
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