Set 1 Xii CS PB2 MS
Set 1 Xii CS PB2 MS
SECTION A
1 False 1
2 D) Alternate Key 1
3 B) None 1
4 A)'welcome#to#kvs#bhopal' 1
5 (A) 5,15 1
6 (B) VOIP 1
7 (D) Statement 4 1
8 (A) 73nh 1
9 (B) tp1[2] = 20 1
10 (C) 0,6 1
11 (C) switch 1
12 (C) 40 1
13 True 1
14 (D) Drop 1
15 (D) tell() 1
16 (B) mysql-connector 1
17 (B) Both A and R are true and R is not the correct explanation for A 1
18 (A) Both A and R are true and R is the correct explanation for A 1
SECTION B
19 Simple mail transfer protocol ½ 1
Dynamic Hyper text markup language ½ +1
1 mark for correct difference
Or
Domain Name System ½
Uniform Resource Locator ½
1 mark for correct difference
20 def checkNumber(N): 2
if N>0:
print(“This is positive number”)
else:
print(“This is negative “)
return
#main-code
num = int ( input (“ Enter a number to check : “) )
k = checkNumber (num)
½ mark for each correction and underline
21 def listchange(Arr): ½ mark 2
x=len(Arr)
for i in range(0,x): ½ mark
if (Arr[i][ %2 == 0: ½ mark
Arr[i] = 0
else:
Arr[i] = Arr[i] * 3 ½ mark
½ mark or proper defining, ½ for proper loop, ½ for checking condition and ½ for
even and odd assignment.
22 [25, 196] 1 mark for proper value and 1 for in list manner 2
22 wd = input(“Enter a word”) 2
p = len(wd)
print(“The Pattern:)
for i in range(0,6):
for j in range(0, i+1):
print (wd[i],end = ‘ ‘)
print()
W,H = 0,0
r = f.read()for x
in r:
if x[0]== ‘W’ or x[0] = ‘w’:
W=W+1
if x[0]== ‘H’ or x[0] = ‘h’:
H=H+1
f.close()
OR
def countwords():
s = open("Quotes.txt","r")
f = s.read()
z = f.split ()count
= 0 for I in z:
count = count + 1
print ("Total number of words:", count)
Note: Using of any correct code giving the same result is alsoaccepted.
29 a) Alter table Book add publisher varchar(20); 3
b) Update Book set price = price +( price * 5) /100 where price > 200;
c) Delete from book where bname line ‘%FIRST%;
30 def PushBook(Book): 3
bno = input("Enter book no :”)btitle=
input("Enter title : ")
rec = bno + “ “ + btitle
Book.append(rec)
print(Book)
OR
def PopBook(Book) :
if len(Book)==0: # If stack is empty
print("Underflow")
else: