0% found this document useful (0 votes)
59 views6 pages

Comp 12 Ms-Revised

This document contains the answer key for a Computer Science preboard exam with 70 total marks. It provides the correct answers to 34 multiple choice or short answer questions across 5 sections: Section A has questions 1-18, Section B has questions 19-25, Section C has questions 26-30, Section D has questions 31-33, and Section E has question 34. The answer key lists the question number and correct answer for each question on the exam.
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)
59 views6 pages

Comp 12 Ms-Revised

This document contains the answer key for a Computer Science preboard exam with 70 total marks. It provides the correct answers to 34 multiple choice or short answer questions across 5 sections: Section A has questions 1-18, Section B has questions 19-25, Section C has questions 26-30, Section D has questions 31-33, and Section E has question 34. The answer key lists the question number and correct answer for each question on the exam.
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/ 6

KENDRIYA VIDYALAYA SANGATHAN HYDERABAD REGION

SECOND PREBOARD Class: XII 2022-23 


Computer Science (083)  Answer Key
Maximum Marks: 70 Time Allowed: 3 hours

SECTION - A
1. True 1
2. (d) & 1
3. (b) L.insert (4,45) 1
4. (a) True 1
5. (c) Pyton 1
6. (d) ‘wb’ 1
7. (b) UPDATE 1
8. (a) % 1
9. (b) T[3]=35 1
10. (d) All of the above 1
11. (a) <name of reader object> = csv.reader(<file handle>) 1
12. (b) SELECT * FROM PERSONS ORDER BY FirstName DESC 1
13. (d) TCP 1
14. (a) 2 1
15. (c) COUNT(<col name>) will return number of NULL values in the given 1
column
16. (b) connect() -> cursor() -> execute() 1
Q17 and 18 are ASSERTION AND REASONING 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

17. (a)Both A and R are true and R is the correct explanation for A 1
18. (b)Both A and R are true and R is not the correct explanation forA 1
SECTION - B
2

19. N=10
for i in range(0,N): #Error 1
if i%4==0: # Error 2
print(i*4)
elif i%5==0: # Error 3
print(i+3)
else: #Error 4
print(i+10)
20. 2
IP v4 Address IP v6 Address
IP v4 Addresses are 32 bit IP v4 Addresses are 128 bit
addresses addresses
IP v4 format is IP v6 format is
x.x.x.x where x ranges from 0 y:y: y:y: y:y: y:y where y ranges
to 255 from 0000 to FFFF
OR
Static Webpage Dynamic Webpage
Static Web pages are written Dynamic Web Pages are
in languages such as HTML, written in languages such as
JavaScript, CSS, etc.  CGI, AJAX, ASP, ASP.NET,
etc.
In Static web pages the In dynamic web pages, the
content of pages is same for Content of pages is different
different users. for different users.

21. (a) potpaL 1+1


(b) English -> 45
Hindi -> 36
Maths -> 67
22. Degree 6 2
Cardinality 18
23. (a) (i) Voice over Internet Protocol 2
(ii) File Transfer Protocol
(b) It is a protocol used to access the data on the World Wide Web (www).
The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
24. * 2 IC
**
***
****
*****
****
***
**
*
(OR)
56.0
24.0
45.0
38.0
25. The CHAR datatype specifies fixed length character string. i.e if a column is 2
declared as CHAR(n), then even when value is shorter than n bytes size will
be maintained as n bytes only.
VARCHAR on the other hand specifies a variable length string,

(OR)
SELECT column1, column2, ...
FROM table_name
WHERE condition;

UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
SECTION - C
26. 1+2
CustomerID OrderNo
1 77890
2 23653

Name Marks
Anvitha 93
Gurpreet Kaur 85
Shreya 81

Rollno Name Gender Marks DOB


4 Mohan Das M 70 20-02-1999
2 Ankith M 76 23-11-1999
5 Shreya F 81 17-08-2000
3 Gurpreet Kaur F 85 15-10-2000
6 Nanak ram M 88 08-06-2000
7 Praful Patel M 92 02-04-1999
1 Anvitha F 93 17-09-2000

MIN(Marks) MAX(Marks)
70 93

Name
Nanak ram
Praful Patel

27. def countD(): 3


f=open("poem.txt","r")
lines=0
l=f.readlines()
for i in l:
if i[0]=='D':
lines+=1
print("The number of lines starting with letter D: ",lines)
f.close()
Any other valid code
(OR)

def countWords():
f=open("story.txt",'r')
s=f.read()
words=s.split()
count=0
for word in words:
if len(word)<5:
count=count+1
print("The number of words with length less than 5: ",count)

Any other valid code

28. (a) 3
TID NAME DEPT
103 DEVRAJ MATHS
105 ABHIGNA MATHS
107 KIRAN COMPUTER

TID STUID NAME


105 10 VEDA

CLASS COUNT(*)
12 5
11 5

DEPT
COMPUTER
HISTORY
MATHS

(b) CREATE DATABASE LIBRARY;

29. n=int(input("Enter a number:")) 3


s=str(n)
for i in range(len(s)):
print(s[i],i)
Any other valid code
30. BOOKS=[] 3
def Push_Book(L):
for book in L:
if book[2]>2000:
item=[book[0],book[1]]
BOOKS.append(item)
def Pop_Book():
while len(BOOKS)!=0:
ele=BOOKS.pop()
print(ele)
else:
print("Stack Empty")
(OR)

Failed_list=[]
def Push(Stu):
for key in Stu.keys():
if Stu[key]<33:
Failed_list.append(key)
SECTION - D
31. (a) Any correct layout 5
(b) main
(c ) Switch / Hub in every building
Repeater between Main and Finance buildings ( only if cable layout is
there between those two buildings)
(d)Modem to be connected at the server
(e ) Firewall to be connected at the server.
32. (a) 31 2+3
17
(b # statement 1
mysql.connector
# statement 2
mydb.cursor()
# statement 3
mydb.commit()

(OR)
(a){'E': 1, 'x': 1, 'c': 1, 'e': 2, 'l': 2, 'n': 1, 't': 1}
(b) i) mysql.connector.connect #blank1
ii) execute #blank2
iii) mydb.commit() #blank3

33. newline with open() will ensure that no translation of end of line (EOL) takes 5
place .
import csv
def Addrecord():
f=open("Student.csv","a",newline="")
wr=csv.writer(f)
admno=int(input("Ente admission no: "))
name=input("Enter name :: ")
Class=int(input("Enter Class: "))
L=[admno,name,Class]
wr.writerow(L)
f.close()
def count():
f=open("Student.csv","r",newline="")
data=csv.reader(f)
d=list(data)
print(len(d))
f.close()

Addrecord()
count()

(OR)
CSV file are easier to create. Capable of storing large amounts of data.
import csv
f=open("Employee.csv","a",newline="")
wr=csv.writer(f)
empdata=[["Rahul","Assistant",34000],
["Abhinav","Manager",67000],
["John","Clerk",23000],
["Vinod","Accountant",32000],
["Mahitha","Clerk",28000]]
wr.writerows(empdata)
f.close()
SECTION - E
34. (i) SNO as it is having unique values 1+1
(ii) 2 (SNO,AADHAR) +2
(iii)
(a) INSERT INTO PERSONS VALUES(8, ‘MANOHAR’,
‘HYDERABAD’, 712365430907);
(b)UPDATE PERSONS SET CITY=’MUMBAI’ WHERE SNO=5;

(OR)
(a)SELECT * FROM PERSONS ORDER BY NAME;
(b)ALTER TABLE PERSONS ADD EMAIL CHAR(25);
35. (i)pickle 1+1
(ii)rb+ +2
(iii) (a) load (b)dump

You might also like