0% found this document useful (0 votes)
10 views5 pages

Preboard Class12 ComputerScience Key

This document contains the key for the Preboard Common Examination in Computer Science for Class XII, detailing the structure of the exam, including sections with multiple-choice questions, programming tasks, and SQL queries. It provides answers and sample code for various questions related to Python programming, SQL commands, and data handling. The examination is designed to assess students' understanding of computer science concepts and practical skills.

Uploaded by

vedeshadaikkalam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Preboard Class12 ComputerScience Key

This document contains the key for the Preboard Common Examination in Computer Science for Class XII, detailing the structure of the exam, including sections with multiple-choice questions, programming tasks, and SQL queries. It provides answers and sample code for various questions related to Python programming, SQL commands, and data handling. The examination is designed to assess students' understanding of computer science concepts and practical skills.

Uploaded by

vedeshadaikkalam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1

D.A.V GROUP OF SCHOOLS


PREBOARD COMMON EXAMINATION (2024-25)
COMPUTER SCIENCE (083) - KEY

CLASS: XII MARKS: 70


DATE: DURATION: 3 Hrs

Section-A (21 x 1 = 21 Marks)

1. False
2. c. 512
3. a. In Python, explicit data type conversion is impossible
4. b. List
5. b. COMPUTER-Students-are-very-SMART
6. b.
(4, 5, 6, 4, 5, 6)
(4, 5, 6, 4, 5, 6, 4, 5, 6)
7. b. (['salary', 'dept', 'age', 'name'])
8. a. ('', ' ', 'Azadi Ka Amrit Mahotsav @ 2022')
9. a. update
10. b. seek()
11. False
12. c. 5#5
13. c. A view of existing column with different name
14. a. Aggregate functions ignore NULL
15. c. Join
16. c. Cardinality
17. c. PAN
18. a. Micro waves
19. b. Modulator
20. b. Both A and R are true and R is not the correct explanation for A
21. a. Both A and R are true and R is the correct explanation for A

Section-B (7 x 2 = 14 Marks)
22.
a.@50 otnmx ROEP@ (1 mark for the correct answer)
b. dict_items([('name', 'Aman'), ('age', 27), ('address', 'Delhi')])
(1 mark for the correct answer)

23. (22, 44, 66)

24. i. L1.pop(1)
ii. L1.insert(1, 'orange')
OR
import statistics
print( statistics.mode(studentAge) )
25. Maximum value of SEL is 3 and minimum is 1
1|Page
2

(iv) is the correct option


26.
def checkNumber(N): # Def should be def
status = N%2
return status # return what? Should be return status
#main-code
num=int( input(“ Enter a number to check :”)) # Message not enclosed within quotation
mark
k=checkNumber(num)
if k == 0: # must be k = = 0
print(“This is EVEN number”) # indendation
else:
print(“This is ODD number”)
27. SQL querry to create the table HRDATA:
CREATE TABLE HRDATA
(Ecode int, Ename char(50),Desig char(5),remn int);
SQL querry to insert given data in to the table HRDATA:
INSERT INTO HRDATA VALUES(80008,"Arjun","Admin",55000);
OR
SQL querry to remove the column Quantity from table CHStore:
ALTER TABLE CHStore drop column Quantity;
SQL querry to display the structure of the table CHStore:
DESC CHStore; or DESCRIBE CHStore;

28.

OR
WEBSERVER:
A web server is a computer that runs websites. It's a computer program that distributes
web pages as they are requisitioned. The basic objective of the web server is to store,
process and deliver web pages to the users. This intercommunication is done using
Hypertext Transfer Protocol (HTTP).
WEB BROWSER:
The web browser is the software application used to access resources on the internet. E.g.
Chrome, Firefox, Internet Explorer etc.
(1 mark each for correct difference)
2|Page
3

Section-C ( 3 x 3 = 9 Marks)

29.
def count_Dwords():
f=open("details.txt","r")
s=f.read()
w=s.split()
count=0
for c in w:
if c[-1].isdigit():
count=count+1
print("Number of words ending with a digit are",count)
OR
def count_word():
file = open('india.txt','r')
count = 0
for line in file:
words = line.split()
for word in words:
if word == 'India':
count += 1
print(count)
file.close()
# call the function count_word(). count_word()

30.

OR

3|Page
4

31. New String is: iNdiA%****


OR
0 @ 6 @ 7 @ 8 @ 9 @ 25 @ 11 @
0@6@7@8@9@
0@6@7@
Section-D ( 4 x 4 = 16 Marks)

32.
(i) select PROD_NAME, QTY_SOLD from computer c, sales s
where c.PROD_ID = s. PROD_ID ;
(ii) desc computer;
(iii) drop table sales;
(iv) select QUARTER , sum( QTY_SOLD) from sales group by quarter;
(1 mark for each correct SQL)

OR
(i) select bname, auname, price from books where bid like “comp%”;
(ii) update books set price = price + 50 where bid like “hist%”;
(iii) select * from books order by price;
(iv) select bid, bname, qty_issued from books, issued where books.bid =
issued.bid;
(1 mark for each correct SQL)
33.
import csv
file = open('class.csv', 'w' ,newline="")
w1 = csv.writer(file)
with open('marks.csv') as csvfile:
data = csv. reader(csvfile)
for row in data:
if row[1]== '2' :
writer.writerow(row)
file.close()

34.
i. Select * from TRANSACT where TYPE=’Withdraw’;
4|Page
5

ii. Select ANO, AMOUNT from TRANSACT where DOT like ‘%-05-%’;
iii. Select MIN(DOT) from TRANSACT where ANO=102;
iv. A) Select ANO,T.ANO,ANAME,AMOUNT from ACCOUNT A, TRANSACT T
where A.ANO = T.ANO and AMOUNT<=3000;
B) Select ANO, ANAME From ACCOUNT
Where ADDRESS NOT IN ('Chennai', 'Bangalore');

35.
import mysql.connector

db_con = mysql.connector.connect(host = "localhost",


user = "root",
passwd = "lion",
database = "menagerie")
cursor = db_con.cursor()

cursor.execute("SELECT * FROM event WHERE type = 'kennel'")

records = cursor.fetchall()
for record in records:
print(record)
db_con.close()
Section-E ( 2 x 5 = 10 Marks)

36.

(a) with open(“Stu.dat”,”wb”) as fh:

(b) pickle.dump(Stu1,fh)

(c) with open(“Stu.dat”,”rb”) as fin:

(d) Rstu=pickle.load(fin)
37.

5|Page

You might also like