BreakInterview

1. Predict the output of the following code :
print type(type(int))

type ‘type’
type ‘int’
Error
None of the above

2. Predict the output of the following code.
L = ['a','b','c','d']
print "".join(L)

abcd
['a','b','c','d']
Error
None of the above

3. Which of the following is the use of id() function in python?

Id returns the identity of the object
Every object doesn’t have a unique id
Both of the above
None

4. Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.pop(1)?

[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]

5. Predict the output of the following code :
print 9//2

9/2
4.5
4
5

6. Predict the output of the following code :
print 9//2

4.0
4.5
4
5

7. Which function overloads the >> operator?

more()
rshift()
lshift()
None of the above

8. Which operator is overloaded by the or() function?

||
|
//
/

9. Which of the following is correct about Python?

It supports automatic garbage collection.
It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java
Both of the above
None of the above

10. To start Python from the command prompt, use the command............

execute python
go python
python
run python