Wa0015.
Wa0015.
Section A
[Each question carries 1 mark]
1. Which of the following Boolean operator operates on a single operand?
(A) NOT
(B) AND
(C) OR
(D) NAND
2. One octet represents ___ bits.
(A) 8
(B) 16
(C) 32
(D) 1024
3. _____ software is made to perform a specific task.
(A) System
(B) Application
(C) Utility
(D) None of these
4. In binary, (7)8 is represented by
(A) (101)2
(B) (011)2
(C) (110)2
(D) (111)2
5. Which of the following is not a Python token?
(A) Keyword
(B) Literals
(C) List
(D) Operators
6. Which of the following symbol is not an operator?
(A) /
(B) %
(C) //
(D) #
7. Which of the following is not a sequence datatype in Python? [1]
(A) List
(B) Tuple
(C) Set
(D) String
8. What is the difference between the is and == operators in Python?
(A) Both is and == operators check for value equality.
(B) The is operator checks for object identity, while == checks for value equality.
(C) The is operator checks for value equality, while == checks for object identity.
(D) Both is and == operators check for object identity.
9. Samarth wants to divide a number and store the result without decimal places into an integer
variable. Suggest him an appropriate operator from the following:[1]
(A) /
(B) %
(C) //
(D) Both (A) & (B)
10. How many times the below loop will run?
i=2
while(i>0):
i=i-1
(A) 2
(B) 3
(C) 1
(D) 0
11. What will be the output of below Python code?
str1 = "Artificial"
print (str1[2:7])
(A) tifici
(B) rtifici
(C) rtific
(D) tific
12. Which of the following will give output as [6,1, 0, 3, 8]?
If list=[8, 4, 3, 9, 0, 2, 1, 5, 6]
(A) print(list[7::-2])
(B) print(list[::-2])
(C) print(list[0:9:2])
(D) print(list[0: :2] )
13. Which of the following two Python codes will give same output?
If tup= (3,5,1,6,7,0)
(i) print (tup [:-1 ] )
(ii) print (tup [0 : 6] )
(iii) print(tup[0:5])
(iv) print (tup[-5:])
(A) i, ii
(B) ii, iv
(C) i, iv
(D) i, iii
14. Recycling of e-waste is needed for:
(A) protecting human and environmental health
(B) save money
(C) save space
(D) help needy
15. Which of the following is not a mutable data type?
(A) Lists
(B) Dictionaries
(C) Sets
(D) Tuples
16. What will be the output?
x="1a4"
sum = 0
for i in x:
if i.isdigit():
sum+= int(i)
print(sum)
(A) 6
(B) 5
(C) 0
(D) None of these
17. Which of the following will result in an error?
st="python_language"
(A) print(st [2])
(B) st[1]=”Wow”
(C) print(st[0:5])
(D) Both (B) and (C)
18. Assertion (A): a* *b is used for power, i.e., ab
Reason (R) : <, > operators are similar to != operator
(A) Both A and R are true and R is the correct explanation of A
(B) Both A and R are true but R is not the correct explanation of A
(C) A is true but R is false
(D) A is false but R is true
Section B
[Each question carries 2 marks]
19. Draw a logic circuit for the following Boolean expression: AB + CD’
OR
OR
x=4
while(x<=8):
print (x*10)
x+=2
OR
A = [2, 4, 6, 8,10]
L = len(A)
S=0
for I in range (1, L, 2) :
S+= A[I]
print("Sum=", S)
(i)
(iv)
list1 = [1, 2, 3, 4, 5]
print(list1[len(list1)-1])
24. If d={‘math’: 45, ‘english’, 60, ‘science’: 65, ‘computer science’: 70} [2]
What will be the output of the following?
(i) print (len (d) )
(ii) print(list(d.keys( )))
(iii) print (d[“english”] )
(iv) print(max(d.values() ) )
OR
Start with the list [8, 9,10]. Do the following using list functions:
(i) Set the second entry (index 1) to 17
(ii) Add 4,5 and 6 to the end of the list
(iii) Remove the first entry from the list
(iv) Insert 25 at index 3
25. Name the crimes for which cyber laws are enforced strictly in India.
OR
Where are the digital footprints mainly stored?
Section C
[Each question carries 3 marks]
26. Differentiate between DRAM and SRAM.
27. Write a program to add all the values in the tuple of marks t= (23, 11, 41, 56, 1) which ends with 1 and
display their sum.
OR
Write the output of the following code:
A= {10:100,20:200,30:3000,40:4000,50:5000}
(i) print (A.items( ))
(ii) print(A.keys( ))
(iii) print(A.values( ))
28. What do you mean by packing and unpacking of tuples? Illustrate the answer with an example.
OR
List the guidelines to avoid plagiarism.
29. Differentiate between Break and Continue statements using examples in Python.
OR
What is the purpose of range() function? Give an example.
30. Write the output of the following code.
t=tuple()
t = t + ( 'Python',)
print(t)
print (len (t))
t1= (10,20,30)
print(len(t1))
Section D
[Each question carries 4 marks]
31. Write the output of the following: ‘
import math
a. print (math, cell (35.7) )
b. print(math.cell(-98.9))
c. print(math.sqrt(math.cell(63.01)))
d. print(math.pow(9,math.sqrt(4)))
e. print(math.pow(10,-2))
f. print(math.sqrt(81))
g. print(math.pow (4, -2))
h. print(math.pow(math.sqrt(100),math.cell(-3, 96)))
32. 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 the statements. [4]
Section E
[Each question carries 5 marks]
33. Write a program to check if a number is palindrome without converting to string or any other data-
structure, i.e., the reverse of the number is the number itself.
OR
#####
#***#
#*@*#
#***#
#####
35. Write an algorithm, flowchart and program to find whether the two stings contain equal number of
characters or not.
***************************************************************************************
*********