You are on page 1of 5

Sri Chaitanya Educational Institutions., India.

A.P T.S KARNATAKA TAMILNADU MAHARASTRA DELHI RANCHI


Aright Choice for the ReAl AspirA nt
Central Office – Chennai
Class: ALL SR’S PRACTICE PAPER 1 Date: 29.03.2024
Time Allowed: 3 hrs CLASS XII - COMPUTER SCIENCE (083) Maximum Marks: 70

ANSWERS
SECTION A
1. True
2. (c) 8,15
3. (a) Annu.l Meet .t the Cmpus
4. (b) 8100
5. (c) 8,7
6. (d) Infrared
7. (a) 980
8. (a) dict_items([('emp', 'Yuvan'), ('Salary', 105000), ('city', 'Pune')])
9. *40 ide CEENCSNSB*
10. (a) 90 @
77 @
65 @
33 @
11. (b) FTP
12. 250 is minimum
13. (d) raise
14. Alter table Client add Contact_No integer (10);
15. Any 2 advantages of Bus Topology in a network are—
(a) Nodes can be connected or removed easily from the network.
(b) It is easy to implement and can be extended up to a certain limit.
16. f.seek(20) moves the file pointer to 20th byte in the file, no matter where we are in the file.
17. (c) A is True but R is False.
18. (b) Both A and R are true and R is not the correct explanation for A.
SECTION B
19. (i) SMTP—Simple Mail Transfer Protocol
URL—Uniform Resource Locator
(ii) Website—It is a collection of web pages, images, videos, audios, etc., that are hosted on a web server.
Web Page— It isanelectronicdocumentwhichdisplaysinformationintextualorgraphicalform. It isoftwo
types such as static web page and dynamic web page.
OR
(i) (a) Router
(b) Hub

Practice Paper–1 (Solution) 1


(ii) The difference between LAN and MAN is as follows—
LAN MAN
It covers an area such as a building or campus up It covers an area such as a city up to 50 km radius.
to 10 km radius.
It is inexpensive. It is expensive.
Its transmission speed is high. Its transmission speed is moderate.
Its error rate is the lowest. Its error rate is moderate.
Technology or media used are Ethernet, Wi-Fi Technology or media used are Optical fibre,
Radio wave, Microwave
20. (i) def Prod(x=5,y=2):
return x*y
print("The Product is =", Prod(7, 1))
(ii) def top(a,b=15):
print(a + b)
top(5)
or
def top(a,b):
print(a+b)
top(5,8)
21. str = input("Enter a string:")
def STR_PALIN(str):
return str==str[::–1]
result=STR_PALIN(str)
if result:
print("The given String", str, "is a palindrome")
else:
print("The given String", str, "is not a palindrome")

OR
def REPLACE_VOWEL(st):
newstr = ''
for character in st:
if character in 'aeiouAEIOU':
newstr += '*'
else:
newstr += character
return newstr
st = input("Enter a String: ")
st1 = REPLACE_VOWEL(st)
print("The original String is:",st)
print("The modified String is:",st1)

2 Practice Paper–1 (Solution)


22. G*L*TME
23. (i) min_value = min(Numbers)
(ii) word_lengths = [len(word) for word in wordLengths]
print("Length of words in the list:", word_lengths)
24. CREATE TABLE Products
(
Product_ID INT PRIMARY KEY,
Product_Name VARCHAR(50) NOT NULL,
Category VARCHAR(30) NOT NULL,
Price DECIMAL(6, 2) CHECK (Price > 0),
Stock_Quantity INT DEFAULT 1
);
OR
SQL statement to modify the data type of ISBN column-
ALTER TABLE Books
MODIFY ISBN CHAR(13);
25. 450450
SECTION C
26. The sum is 22
27. (i)
CATEGORY AVG(CHARGES)
AC 50666.6
NON-AC 41000
(ii)
STU_NAME H_NO CHARGES
Amit Jindal BH-3 52000
Manisha Gupta GH-2 42000
Vikas Jain BH-2 40000
(iii)
H_NO FACILITY WARDEN_NAME
BH-2 Food Mr. Satinder
GH-2 Laundry Ms. Sakshi

28. def read_text():


f=open("data.txt")
for i in f:
print(i, end=' ')
f.close()
OR
def three_char_words():
f1=open("document.txt")
c=0

Practice Paper–1 (Solution) 3


for i in f1:
words=i.split()
for j in words:
if len(j)==3:
print("three characters words are", j, end='')
f1.close()
29. (i) Update candidate set stipend = stipend+stipend *0.1;
(ii) Delete from candidate where Gender='F';
(iii) Select * from candidate where stipend > 44000;
30. st = [ ]
c="y"
while (c=="y"):
print("Enter your choice as per given -")
print("1 = For push ")
print("2 = For pop ")
print("3 = For display ")
ch = int (input("Enter your choice :- "))
if (ch== 1) :
PNR_NO = int(input("Enter the pnr number of the passenger :- "))
NAME = input("Enter name of a passenger :- ")
info= (PNR_NO, NAME)
st.append(info)
elif (ch == 2) :
if (st == [ ]):
print("UnderFlow")
else :
PNR_NO,NAME=st.pop()
print("deleted element is ",PNR_NO,NAME)
elif (ch==3):
i=len(st)
while i>0:
print(st[i-1])
i=i-1
else:
print("wrong input")
c=input("do you want to continue")
SECTION D
31. (i) Select S_Name, Club_coach from Sports S, Club C where S.SNO and C.SNO;
(ii) Select training_type count(*) from Sports group by training_type;
(iii) Select avg(fees) from Sports where S_Name like '%t%';
(iv) Select S_Name, Fees, Club_Coach, Location from Sports S, Club C where
gender ="Male" and S.SNO = C.SNO;
32. import csv
file = open('Records.csv', 'w', newline="");

4 Practice Paper–1 (Solution)


writer = csv.writer(file)
with open('Scores.csv') as csvfile:
data = csv. reader(csvfile)
for row in data:
writer.writerow([row[0],row[1]])
file.close()
SECTION E
33. (a) Star topology
(b) Broadband
(c) Hub/Switch
(d) Radio wave
(e) Block A because it has maximum number of computers.
34. (i) (a) Text File
(b) F.write("Examination")
(ii) Line1- position=f1.tell()
Line2- f1.seek(position)
Line3- pickle.dump(emp,f1)
35. (i) Where clause works in respect to the whole table but HAVING clause works on Group only.
For example, Select * from Teacher where gender=" female";
Select count(*) from emp group by city;
(ii) (a) mysql.connector
(b) connect()
(c) "Select * from drug where price between 50 and 100"
(d) fetchall( )
OR
(i) Distinct clause is used to eliminate the redundant records from the table.
(ii) import mysql.connector
conn=mysql.connector.connect(host="localhost",user="root",
passwd=' ',database="hospital")
mycursor=conn.cursor()
mycursor.execute("select * from patient")
records=mycursor.fectchall()
count=0
for x in records:
count+=1
print(x)
print("total number of records are:",count)
conn.close()

Practice Paper–1 (Solution) 5

You might also like