Nps School, Techcbse Term-I (Mock Test) Subject: Informatics Practices (Code-065) Class - Xi
Nps School, Techcbse Term-I (Mock Test) Subject: Informatics Practices (Code-065) Class - Xi
Section : A
1. ROM is which type of memory ?
A) Volatile C) Both
B) Non-Volatile D) None
1/8
A) Random Action Memory C) Read Access Memory
B) Read Action Memory D) Random Access Memory
10. In which memory you can only read the data , but you can’t edit/write it ?
A) RAM C) Both
B) ROM D) None
A) 1 MB C) 1 GB
B) 1 KB D) 1 TB
13. 1 GB =
A) 1024 KB C) 1024 MB
B) 1024 Bytes D) S1024 TB
Section - B
2/8
18. Identify the valid declaration of L:
L = ['Mon', '23', 'hello', '60.5']
a) list b) string
c) tuple d) dictionary
b) mutable b) immutable
c) dictionary b) array
c) tuple d) list
A)_on b) _it
c) in d) _init_
23. Which one of these is floor division operator?
a) // b) /
c) % d) none of these
24. Which of the following is valid arithmetic operator in Python?
a) < b) //
c) and d) ?
25. The operator tells if an element is present in a sequence or not.
A)inside b) exists
3/8
c) in d) into
4/8
26. What is the output of following code?
x = (2856 / 156) % 89
x* = 34
print(x++)
a) 19 b) 18
c) 646 d) Error
28. In Python we do not specify types, it is directly interpreted by the compiler, so consider the
following operation to be performed.
>>> x = 33 <operator > 4
What would you fill in place of <operator> in the above expression so that x has an integer value?
Select all that apply (Python 3.xx)
A. //
B. /
C. %
D. All of these
a) A, D b) B, C
c) B, D d) A, C
29. What is the output of the following expression? float(5 + int(4.39 + 2.1)%2)
a) 8 b) 8.0
c) 5 d) 5.0
30. You have the following code segment: String1 = "my"
String2 = "work" print(String1, String2)
What is the output of this code?
A)mywork b) work
c) my d) my work
31. What is the output of the following expression? print(4.00/(2.0 + 2.0))
a) 1 b) 1.0
c) 1.00 d) Error
32. Which line of code has the correct syntax for the print statement?
5/8
A)print(Its' a rainy day) b) Print('it's rainy day')
c) % d) **
A)list b) dictionary
c) tuple d) array
y
34. How would you write x in Python as an expression?
A)x^y b) x**y
A)Tuples b) Lists
c) Class d) Dictionary
a) 14 b) 15
c) 17 d) 23
a) "7" b) 24
c) "34" d) 34
a) int('12') b) float('12.5')
c) int('12.5') d) float('12')
39. Suppose s is assigned as follows : s =
'foobar'
All of the following expressions produce the same result except one. Which one?
6/8
c) s[: : -1][-1] + s[len(s)-1] d) s[: : -1][: : -5]
a) B, D, E b) A, C, D
c) C, D, E d) A, B, E
40. Which of the following statements will print the following?
A. hello-how-are-you
D. print('hello-'+ 'how-are-you')
c) A, C d) C, D
Section-C
41. Mr. Sam is working in an organisation as data analyst. He got a dataset of the passengers (trains)
for the year 2010 to 2012 for January, March and December. His manager wants certain information
from him, but he is facing some problems.
i) List
ii) Dictionary
iii) Tuple
a) = b) -
c) | d) ==
a. Int b) String
c) Boolean d) Float
d) The following set of commands is executed in shell, what will be the output?
>>>str = "hello"
>>>str[:2]
a. hello b) lo
7/8
c) olleh d) he
a. assert b) nonlocal
c) pass d) eval
f) You )
have )
the
follo
wing What
code: is the
P outpu
1 t of
= this
code?
"
m a. My Work
b) mywork
y
" c) myWORK
d) MY Work
P2= "work"
p
r
i
n
t
(
P
1
+
P
2
.
u
p
p
e
r
(
8/8
g) Which of the following is an invalid variable?
a. my_day_2 b) 2nd_day
c) _2 d) Day_two
9/8