Q1 : Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the "OMR" answer sheet supplied with the question paper, following instructions therein.
(B) Dictionary
(C) Tuples
(D) Class
1.2 : What data type is the object below ? L=[1, 23, 'hello', 1]
(A) List
(B) Dictionary
(C) Tuple
(D) Array
1.3 : Which of the following functions converts a string to a float in python ?
(A) int(x [,base])
(B) long(x [,base])
(C) float(x)
(D) str(x)
1.4 : What is the output of the following program ?
def myfunc(a) :
a=a+2 a=a*2 return a
print myfunc(2)
(A) 8
(B) 16
(C) Indentation Error
(D) Runtime Error
1.5 : What is the output of the expression : 3*1**3 ?
(A) 27
(B) 9
(C) 3
(D) 1
1.6 : What is the output of the following program ?
i=0 while i<3:
print i i+=1
else :
print 0
(A) 0 1 2 3 0
(B) 0 1 2 0
(C) 0 1 2
(D) Error
1.7 : What is the output of the following program ?
print "Hello World"[::-1]
(A) dlroWolleH
(B) Hello Worl
(C) d
(D) Error
1.8 : Given a function that does not return any value, what value is shown when executed at the shell ?
(A) int
(B) bool
(C) void
(D) None
1.9 : What is the output of the following program ?
print 0.1+0.2==0.3
(A) True
(B) False
(C) Machine dependent
(D) Error
1.10 : Given a string s="Welcome", which of the following code is incorrect ?
(A) print s[0]
(B) print s.lower()
(C) s[1]='r'
(D) print s.strip()
Q 2 : Each statement below is either TRUE or FALSE. Choose the most appropriate one and enter your choice in the "OMR" answer sheet supplied with the question paper, following instructions therein.
X |
Y |
||
3.1 |
To take input from the keyboard |
A. |
Numpy |
3.2 |
Convert a string value
to int |
B. |
Get 1 |
3.3 |
Evaluate the value of a string |
C. |
tell() |
3.4 |
The operator used for concatenating two strings |
D. |
write() |
3.5 |
Statement used for error checking |
E. |
Eval 2 |
3.6 |
The function used to find power
of a number |
F. |
Tuple |
3.7 |
Array processing package |
G. |
pow() |
3.8 |
Immutable object |
H. |
+ |
3.9 |
Key value pair |
I. |
Decryption |
3.10 |
The operator used to calculate remainder after division |
J. |
Assert |
|
|
K. |
Queue |
|
|
L. |
Dictionary |
|
|
M. |
// |
4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list below. Choose the most appropriate option, enter your choice in the "OMR" answer sheet supplied with the question paper, following instructions therein. (1x10)
(A) |
* |
(B) |
Range |
(C) |
Dictionary |
(D) |
open |
(E) |
input |
(F) |
Random |
(G) |
Module |
(H) |
eval |
(I) |
list |
(J) |
Convert |
(K) |
int |
(L) |
tuples |
(M) |
Continue |
|
|
|
|
No comments:
Post a Comment