Answer Key Sample Paper 3
Answer Key Sample Paper 3
com
Section –A
1. OMR stands for
a) Optical Mark Reader c) Optical Mark Reviewer
b) Optical Mark Recognition d) Optical Mark Representation
2. Which of the following is base of octal number system?
a) 7 c) 8
b) 2 d) 10
3. Which of the following is gate returns output as only 1 if all inputs are 1?
a) AND c) OR
b) EXOR d) NOR
4. ________ is an integrated tool with Anaconda allows to create a program
along with explanation and runs on browser.
a) Python Notebook c) PyCharm Editor
b) Jupyter Notebook d) Spyder Editor
5. Which of the following python distribution is designed by and for scientist,
engineers and data analysts?
a) Jupyter Notebook c) Spyder IDE
b) Python IDLE d) PyCharm IDE
6. Dhruv wants to compute power of n. Select appropriate statement for him:
a) n^2 b) n*2 c) n^^2 d) n**2
7. Which of the following is not a valid relational operator?
a) != b) += c) <= d) =
8. Identify the symbol is used to write a single line comment in python.
a) / b) % c) // d) #
9. What will be the value of variable a when loop is terminated?
a=20
for i in range(10,-1,-2):
a-=a-2
print(a)
a) -2 b) 0 c) -1 d) 2
Page 1 of 12
Downloaded from www.tutorialaicsip.com
10. Dhyana wants to check the more than two conditions in python program.
Suggest her a control structure that helps her to accomplish her tasks.
a) Simple if c) if-elif-else
b) If-else d) nested if
11. Observe the given code and select an appropriate output:
a='Computer Science is Science of Computers'
w=a.split(‘Sci’)
print(a[1])
a) Science is c) Computer
b) ence of Computers d) ence is
12. Hriday has created a tuple in python:
T=(5,10,15)
Now he wants add an element 20 at the end of tuple next to 15. Which of
the following statement is correct for him?
a) T = T + 40 c) T=T+(40,)
b) T.append(40) d) Not possible
13. Identify incorrect python tuple declaration?
a) (1,2,3) b) 1,2,3,4 c) (1,) d) (1)
14. The Indian IT ACT is amended in :
a) 2000 c) 2010
b) 2008 d) 2002
15. While using different apps and websites, it is asking our personal
information. What will they do with our data afterwards taking them?
a) They just save data for their records
b) It is compulsory to give information for using apps and websites
c) They are asking for reward user in future
d) Looking to run targeted advertisements on user’s computers
16. Which of the following digital footprint is created without user’s consent?
a) Active Digital Footprint c) Massive Digital Footprint
b) Passive Digital Footprint d) Inactive Digital Footprint
17 and 18 are ASSERTION AND REASONING based questions. Mark the correct
choice as
Page 2 of 12
Downloaded from www.tutorialaicsip.com
(A) Both (A) and (R) are true and (R) is the correct explanation (A)
(B) Both (A) and (R) are true and R is not the correct explanation (A)
(C) (A) is True but (R) is False
(D) (A) is false but (R) is True
17. Consider following dictionaries:
xi22={‘CS’:’Mr. Sanjay’,’IP’:’Mrs. Hemanigini’}
xi23={‘IP’:’Mrs. Hemanigini’,’CS’:’Mr. Sanjay’}
print(xi22==xi23)
Assertion(A): Print statement returns True.
Reasoning(R): Dictionaries are unorder set of key:value pairs.
Ans.: (A)
18. L=[23,24,25]
L[3]=27
Assertion(A): It adds 27 to the end of list.
Reasoning(R): List value can be added using functions only not by index.
Ans.: (D)
Section B
19. Convert the following binary numbers to as directed:
a) (1011011)16 c) (1010101)16
d) (10010011)8
b) (11110011)8
Ans.:
a) 5B c) 55
b) 363 d) 463
20. Prepare a truth table for the following equation:
a) (A+B)’C b) A’+B’C’
Ans.: a)
A B C A+B (A+B)’ (A+B)’C
0 0 0 0 1 0
0 0 1 0 1 1
0 1 0 1 0 0
0 1 1 1 0 0
1 0 0 1 0 0
1 0 1 1 0 0
1 1 0 1 0 0
1 1 1 1 0 0
Page 3 of 12
Downloaded from www.tutorialaicsip.com
b) A’+B’C’
A B C A’ B’ C’ B’C’ A’+B’C’
0 0 0 1 1 1 1 1
0 0 1 1 1 0 0 1
0 1 0 1 0 1 0 1
0 1 1 1 0 0 0 1
1 0 0 0 1 1 1 1
1 0 1 0 1 0 0 0
1 1 0 0 0 1 0 0
1 1 1 0 0 0 0 0
21. Pranjal has given following symbols and word to identify which types of
tokens are they, help her to identify them:
i. if iii. and
ii. r_no iv. ‘True’
Ans.:
i. if – Keyword iii. and – logical operator
ii. r_no – identifier iv. ‘True’ – String Literal
22. Predict the output of following code:
NUMBER= [15,12,19,26,18]
for i in range (3,0,-1):
A=NUMBER[i]
print(A,end='#')
B=NUMBER[i-1]
print(B,end='@')
Ans.: 26#19@19#12@12#15@
OR
Rewrite the following code after removing all syntax errors. Underline each
correction you have done in the code:
a=10
for v in range(a):
if v%10==0:
print(v//10)
el if v%8==0:
print(v//8)
_else:
print(v//2)
Page 4 of 12
Downloaded from www.tutorialaicsip.com
Section C
26. Tejas is preparing for an interview for software developer. Help him by
explaining categories of different application software by supporting
examples.
Page 5 of 12
Downloaded from www.tutorialaicsip.com
Page 6 of 12
Downloaded from www.tutorialaicsip.com
Example:
L=[‘Dhruvee’,’Hetvee’,’Kane’,’Rakesh’]
The output will be: ‘Dhruvee’, ‘Hetvee’, ‘Kane’
Ans.:
names=eval(input("Enter 5 names:"))
for i in names:
if i[-1] in 'eE':
print(i)
OR
What do you mean by packing and unpacking of tuples? Illustrate answer
with example.
Ans.:
Tuple packing refers to assigning multiple values into a tuple.
Tuple unpacking refers to assigning a tuple into multiple variables.
Example:
Packing
t=(1,’Computer Science’,’Class 11’)
Here just assigned multiple variables, which are 1, ‘Computer Science’ and
‘Class 11’ into tuple t.
Unpacking:
Sno, sub, cla =t[0], t[1], [t2]
Sno, sub, cla= t
Tuple unpacking totally opposite of tuple packing with same meaning.
29. Write any three restrictions that needs be to keep in mind while creating a
dictionary.
Ans.:
1. Every element in dictionary is key value pair.
2. Keys are unique and can appear only once.
3. Dictionary keys must be type of immutable such int, float, str or tuple.
30. Write any three points should be taken care while sitting for work in front
of computers.
Ans.:
Page 7 of 12
Downloaded from www.tutorialaicsip.com
Section D
31. Write algorithm and draw flow chart to check whether number is positive,
negative or zero.
Ans.:
Step 1 Start
Step 2 read n
Step 3 If n>0
Step 4 display “n is positive” , move to step 9
Step 5 else if n<0
Step 6 display “n is negative” , move to step 9
Step 7 otherwise
Step 8 display “n is zero”
Step 9 Stop
Page 8 of 12
Downloaded from www.tutorialaicsip.com
OR
Write a program to program to enter a number until user press ‘n’ from
keyboard. Display the average of entered numbers after loop termination.
Ans.:
a=s=c=0
while True:
n=int(input("Enter number"))
ans=input("Press n stop:")
s+=n
c+=1
if ans in 'nN':
break
avg=s/c
print("Average of entered number is:",avg)
32. Write a program to create a list [‘a’,’bb’,’ccc’,…] and continues up to z.
Ans.:
l=[]
for i in range(1,27):
ch=chr(i+96)*i
l.append(ch)
print(l)
OR
Write a python program to create a dictionary of having keys as product
name and price as values. Compute the bill and display the bill with required
details.
Ans.:
d={'Apple':90000,'Samsung':55000,'Red Mi Note':42000}
bill_amt=0
for i in d:
bill_amt+=d[i]
for i in d:
print(i,":",d[i])
print("Bill Amount:",bill_amt)
Page 9 of 12
Downloaded from www.tutorialaicsip.com
Section E
34. Observe the code given below to display binary equivalent number for
entered value. Complete the code by filling the gaps:
n=int(input("enter a three digit number:"))
b=0
i=0
____________ #Statement 1
___________ #Statement 2
Page 10 of 12
Downloaded from www.tutorialaicsip.com
___________ #Statement 3
___________ #Statement 4
i=i+1
______________________ #Statement 5
i. Write Statement to start the iteration 1 – Statement 1 1
ii. Write a statement to get remainder for base value required for converting
number into binary – Statement 2 1
iii. Write a statement to add remainder multiplied by power of position of the
number - Statement 3 1
OR
Write the statement to get the value dividing by 2 – Statement 4
iv. Write print statement to print the message and equivalent binary number
as “Binary Equivalent of 3 is 0011” 1
Ans.:
i. while n!=0
ii. r=n%2
iii. b+=10**i or n//=2
iv. print(“Binary Equivalent of ”,n,” is”,b)
35. Consider the code given below to compute energy through mass m
multiplied by the speed of light (c=3*108). Fill in the gaps as given in
statements.
import ___________ #Statement 1
m=_________________ #Statement 2
c= _____________ #Statement 3
e=_______________ #Statement 4
print(“Energy:”, e ,” Joule”)
Page 11 of 12
Downloaded from www.tutorialaicsip.com
Ans.:
i. import math
ii. m=float(input(“Enter mass value:”))
iii. c= 3 * (math.pow(10,8))
iv. e=m*c*c
Page 12 of 12