Practice SAMPLE PAPER 1 Comp Sci_124619
Practice SAMPLE PAPER 1 Comp Sci_124619
IIII IIIJ
-
Sample Question Paper 03
Computer Science 12th (Code 083)
6eneral Instructions
1. This question paper contains 37 questions.
2. All questi~ns are compulsory. However, internal choices have been provided in
some questions. Attempt only one of the choices in such questions.
3. The paper is divided into 5 Sections - A, B, C, D and E. Time: 3 Hrs.
4. Section A, consists of 21 questions (1 to 21). Each question carries 1 Mark.
S. Section B, consists of 7 questions (22 to 28). Each question carries 2 Marks. Max. Marks : 70
6. Section C, consists of 3 questions (29 to 31). Each question carries 3 Marks.
7. Section D, consists of 4 questions (32 to 35). Each question carries 4 Marks.
8. Section E, consists of 2 questions (36 to 37). Each question carries 5 Marks.
9. All programming questions are to_ be answered using Python Language only.
10. In case of MCQ text of the correct answer should also be written.
Section A [21xlx21]
2. Given an object objl= (10, 20, 30, 40, SO, 60, 70, 80, 90). What will be the output of print(obj1[3:7:2])?
(a) (40,50,60,70,80) (b) (40,50,60,70) (c) (40,50,60) (d) (40,60)
.
►
print(s)
(a) AmitAmitAmit (b) AmitAmit (c) AnujAnujAnuj (d) AnujAnuj
10. Write the missing statement to open the file such that the data record is appended to the
file. ·'
import pickle
f•open("abc.dat" . __ )
pickle.dump([roll.name.marks].f)
f .close()
11. State True or False : It is must to handle exception in ~y code.
12. Identify the output of the following Python statement.
SP-03 lstl = [10. 15. 20. 25. 30] J
lstl.insert( 3. 4)
lstl.insert( 2. 3)
print (lstl[-5])
W2 M3 W4 (d) 20
13. . ........... is an attribute that makes a link between two tables to fetch corresponding
data.
(a) Primary key (b) Secondary key
(c) Foreign key (d) Composite key
l
(b) Removes records of books whose names starts with "r and has 3rd letter as "t"
11
What type of network topology has all devices connected to a central hub or switch?
Directions (Q. 20 and 21) are Assertion (A) and Reason (R) based questions. Mark the
correct , ·,
,
choice as
(a) Both A and Rare true and R is a correct explanation of A.
(b) Both A and Rare true but R is not a correct explanation of A.
(c) A is true and R is false.
(d) A is false and R is true.
20. Assertion (A) Built-in functions are predefined in the system and can be directly used in
any program.
Reason (R) id() and type() are built-in functions in Python.
21. Assertion (A) The cardinality of a table can be increased by adding fields to the table.
Reason (R) Cardinality is number of records, adding fields will increase the degree.
Section B [7X2=14]
22. , (i) Suppose there is a list such that: L=[2,3,4]. If we want to print this list in reverse order SP-03
with an output of L=[4,3,2], which function/method should be used?
(ii) Which clause can sort a list in descending order. •
Section C [3x3=9]
29. Write a function countEU() in Python, which should read each character of a text file
IMP.TXT should count and display occurrence of alphabets E and U (including small cases
e and u too). I •
e.g. If the file content is as follows :
Pinaky has gone to his friend's house.
His friend's name is Ravya. Her house is 12 km from Pinaky's house.
The countEU() function should display the output as
E: 8, U: 3
◄
-
Write a Pyth on prog ram to find th Or ·
statu s.txt are e longest word in file "status.bet". If conte nts of
Welcome to your one-s tep sol ti
various c?mp etitiv e and re~ ~: for all _yo~
study, practice and asses smen t need for
work ing tirele ssly for over ad d nt examinatio
ns and school segm ent. We have been
because you deser ve SUC CES ;~~ ~~~ re that
you have best in class study r~sou rces
outp ut shou ld be : G LESS ...
Longest word : exam inatio ns
30, (A) Julie has creat ed a dictio na . .
6 stude nts. Write a pro ramry c~nta inmg name s and •
mark s as key value pairs of
follo wing opera tions g ' wi th separ ate user defin ed funct ions to perfo rm the
Push the keys (nam e of the tud
d. s •
ent) of the dictio nary into a stack
corre spon mg va1ue (mark s) is great er than 75. , wher e the
Pop and displ ay the conte nt of the stack.
•
For exam ple If the samp le conte nt of th d. ti
"
e 1c onary 1s . f
11 "
Or .
(B) Write a Pyth on prog ram to inpu t as many numb
ers and push them to a stack
perfe ctsta ck[] using a funct ion push perfe ct(), only
if the numb er inpu t is a perfe ct.
(A perfe ct num ber is one whos e sum of factors other
than itself , is equa l to the
numb er) , •
31. Cons ider the table MOVIEDETAILS given
below · [1 x3= 3]
Table : MOVIEDETAILS
MOVIEID TITLE LANGUAGE RATING PLATFORM
MOOl Mina ri Korean 5 Netflix
M004 MGR Magan Tamil 4 Hotstar
MOlO Kaagaz Hindi 3 ZeeS
SP-03
MOll Harry Potte r and the English 4 Prime Video
Chamber of Secrets
MOlS Uri Hindi 5 Zee5
M020 Avengers: Endgame English 4 Hotst ar
TABLE: FABR IC
FCODE lYPE
F04 POL vsijt~ ,·
F02 COTTON ' ', ,
SILK
'\
F03
F0l TERELENE
•
' .
II
,·
I
\
.I
◄
53
sample Question Paper 03
36. Mr. Reena is a developer in file handling and has to write certain functions on csv files.
She is confused with certain queries regarding the file type and the code writing. Help he SP-03
in writing the code and in her queries.
(i) When do we use CSV file?
(ii) Write a program using two functions :
addCustom er() To write Customer code, Customer name and Amt in file "cust.csv"
The details of the customers are as follows :
[ 'CustCod e', 'CustName', 'Amount' J
['001', 'Nihir', '8000'] <
Building Distance
HR-Adrnin . 10m
HR-System 50m
. 750m
HR-Pers
Adrnin- System 300m
l '