Professional Documents
Culture Documents
Model Test Paper - Fully Solved
Model Test Paper - Fully Solved
TEST SOLVED
GENERAL INSTRUCTIONS
1. This question paper contains two parts A and B. Each part is compulsory
2. Both Part A and Part B have choices.
3. Part-A has 2 sections:
a. Section- is short answer questions, to be answered in one word or one line.
b. SectionH has two case study based questions. Each case study has 4 case-based subyparts.
An examinee is to attempt any 4 out of the 5 subparts.
Part-B is Descriptive Paper.
5. Part-B has three sections.
Section- is short answer questions of 2 marks each in which two questions have internal options
b. Section-l is long answer questions of 3 marks each in which two questions have internal options.
C. Section-ll is very long answer questions of 5 marks each in which one question has internal option
6. All programming questions are to be answered using Python Language only.
PART-A
SECTION-I
Select the most appropriate option out of the options given for each question. Attempt any 15 questions
from question no 1 to 21.
1. Write the type of Python Operators (Arithmetic, Logical, Augmented Assignment and Relational Operators) from
the following 1
(a) and (b)
(c) (d)
2. Given thelist Tp = (-38, -20, 0,5, 10, 15) write the output of print(Tp[1:5:21)
3. Which function of csv module is used to write a record into csv file?
4. Write the names of any two sequence data types available in 1
Python.
5. You are provided two list S1 and S2. Write the statement in the blank to update list S1 as given in Line 4 1
$1 [1.3,5,7 #Line 1
$2 12,4,6 #Line 2
#Line 3
18
Complimentary Bookilet
17
6. Find the output of the following code
snippet: 1
car ={
"br": "Hondaa",
"mod": "Vols",
"year": 2010}
car.popitem()
print(car)
7. What will be the output of the print() statement? 1
P (8, 19, 3, 14, 8, 16, 8, 15)
print(len(P)
8. Name the Python Library module which need to be imported to invoke the following functions.
(a) sqrt()
(b) dump()
9. Write the internet service for
name sending written messages electronically from one computer to another. 1
10. Trehan opened his email and found that his inbox was full of hundreds of unwanted
mails. It took him around two
hours to delete these unwanted mails and find the relevant ones in his inbox. What may be the cause of his
receiving so many unsolicited mails? What can Trehan do to prevent this happening in future?
11. Out of the following, which clause is used immediately after select statement in SQL?
GROUP BY, ORDER BY, SELECT, WHERE
12. Write any two wild card characters that are available in SQL 1
13. Which aggregate function finds the sum of all values of a column in SQL?
14. Which of the following is a DDL command? 1
P "Parrot@Green"
print(P[4:8:2])
18. Write the names of any two joins in SQL?
19. Which protocol helps us to transfer files to and from a remote computer?
cSv.reader (fob)
for row in dataf:
print (row)
fob.
# Line 4
PART-B
SECTION-I
y 20
x y ) or not(x < y)
25. What kind of data get stored in ocookies and how is it useful? 2
OR
27. Write the definition of a function Pattern(MyList) in Python, to display the eiements of list twice, if it is a number
RAMAN
2121
YOGRAJ
33
TARA
OR
What is the difference between break and continue
keywords. Give a suitable example to explain the use of both
words.
28. Rewrite the following code after removing syntax errors. Underline each correction in the following code 2
letter input('Enter any letter(A-Z))
if letter = 'a' or letter == 'e' or letter == i"
print'cons')
29. What possible output(s) are expected to be displayed on screen at the
time of execution of the
program from the
following code? Also specify the maximum and minimum values that can be
assigned to variable PICKER. 2
import random
PICKER = random.randint(0,3)
(i) fetchmany(3)
(ii) fetchall()
(b) How fetchone( ) function works?
32. Write the full form of DDL and
DML in SQL. Give one example of DDL command and one of DML command. 2
33. Find the output of
the following Python code
Data ["U", 20, "V",
10,'"W", 30]
Times = 0
Alpha =
Add e
for C in range(1,6,2) :
Times = Times + C
34. Write a function FEnding(SCORES) to find the sum of numbers ending with 4. The numbers are stored in the list
SCORES. 3
For example
Input List contains the following elements:
SCORES = [25,36,54,86,94]
Output
Sum of numbers ending with 4 are: 148
35. Write a method/function CountLin() in python to read lines from a text file 'Wonder.TXT, and display lines starting
3
with letter 'C' or 'c'.
are as follows:
If the "Wonder.TXT" contents
Petra, Jordan
Taj Mahal, India
Colosseum, Italy
22 DEEPAK CBSE Sample Paper 12
Machu Picchu
The Great Pyramid of Giza, Egypt
Colossus of Rhodes, Greece
Lighthouse of Alexandria, Egypt
Output:
OR
Write a function
Lettc() in python to count the occurrence of letter' or 'R' in the text file 'Birbal.TXT.
If the file contents are as follows:
SECTION-II
38. SunRise Pt. Ltd. is
setting up the network in the Ahmadabad.
There are four
departments named as MrktDept,
FunDept, LegalDept, SalesDept.
MrktDept SalesDept
FunDept to SelesDept50m
Number of Computers in the buildings:
MrktDept 20
LegalDept 10
FunDept 08
SalesDept 42
TABLE MOBILESTOCK
(d) To
display the name of mobile company having price between 3000 and 5000.
(e)To display mobile company and the corresponding supplier name.
40. A binary file "Insurance.dat" has structure [pid,pname].
(a) Write a user defined function Personlns() to input data for a record and add to
Insurance.dat file.
(b) Write a function Displaylnfo(SN) to display information regarding the person "Riya" stored in the fie
Insurance.dat.
OR
"Softw.DAT" has structure (SNAME, SPRICE). Write a
A binary file
function Softwares( ) in Python that wouia
read contents of the file "Softw.DAT and dlsplay details of
"
O00
Complimentary Booklet
- ANSWER KEY 25
PART-A
1. (a) and Logical SECTION-I
(b)>= Relational
(c) Augmented Assignement
**
(d) Arithmetic
2. (-20, 5)
3. Function: writerow()
4. Sequence Data Type: List, Tuple
5. $1.append($2)
6. fbr': 'Honda', 'mod: "Vols)
7. Length:8
8. (a) math module
(b) Degree 5
Cardinality: 5
(c) INSERT INTO TRAN(Id, Product, Qty, Price, Transaction Date) VALUES(108, 'Cover, 50, 500, 2015-04-03)
(d) DESCRIBE TRAN
(e) (i) DROP TABLE TRAN
26
DEEPAK CBSE Sample Paper
23. (a) csv 12th
(6) writer
(c) r
(d) close(0
(e) [2005,Lak Sales]
[2006,Pt Hardware']
PART-B
SECTION-I
24. (a) 58
(b) False
25. Cookies is small text
file that web servers send
to a web browser so that the web server
user's activity on a particular website.
can keep track of the
Specific cookies known as HTTP cookies are used to
users and improve
your web browsing
identify specific
experience.
OR
Firewall is hardware or software based network security
network.
system. It prevents unauthorized access to or from a
A Hardware Firewall is a
physical device similar to a server that filters traffic to
routers.
a computer, for eg. Linksys
A software firewall is installed on individual computers/servers. It intercepts every request
connecting to the computer and after this, it determines if the by the network for
for val in
"string" :
if val == "i":
break
elif val == t ' :
Continue
else:
if letter ==
'a' or
letter 'e' or letter 'i" #Error 2
print ('a or e or i') #Error 3
else: #Error 4
print('cons')
29. (i) and () options are possible outputs
Maximum value of PICKER =3
Minimum value of PICKER = 0
30. A primary key is used to ensure data in the specific column is unique. A foreign key is a column or group of
columns in a relational database table that provides a link between data in two tables. If two table contains the
same column in such a way that in one table it is acting as primary key then in another table it is treated as
for i in SCORES:
if i%10 = 4
s S+ 1
ending with 4 are: '.s)
print('Sum of numbers
FEnding(SCORES)
28
DEEPAK CBSE Sample Paper 12th
35. def Displine():
Ad "Wonder. txt'
fob
open (Ad, 'r')
lines =
for 1 in lines:
fob.readlines ()
if 1[e] 'c'
==
or 1[0] ==
'c':
print (1, end = '')
else
pass
fob.close()
DispLine()
OR
def LettFreq():
Count= count + 1
else:
pass
(b) SName
ABC Computronics
|All Infotech Media
(c) ld SName
SO03 Tech Shoppe
37. def SPush(L)
s=[]
for x in range(®,
len (L)) :
if L[x]<5 = 0:
s.append(L[x])
if len(s) ==0:
print("Empty Stack")
else:
print(s)
OR
Complimentary Booklet
def SPOP (L):
# If stack is empty
if len(L) ==
0:
print("Underflow" )
else:
n len(L)
val=L[n-1]
print'Element deleted ' val)
L.pop(n-1)
print( Current stack status: ',L)
SECTION-III
38. (a) Star Topology
FunDept
MrktDept
SalesDept
LegalDept
As per 80 20 rule, MrktDept is the best place to house the server as it contains the maximum number of
(b)
computers.
case Internet connection is required.
(c) Each building should have modem in
(d) Each building should have hub/switch to establish LAN within the building.
print(row," Found')
except:
fobj.close()
OR
def Softwares ()
fobj =open("Softw.dat", 'rb')
try:
while True:
row pickle. load(fobj)
if row[e] = 'Antivirus' :
print(row)
except:
fobj.close()
O00