Python Programming MCQS With Answers 1 to 5

 

1. What is the output of the following code : print 9//2

A. 4.5

B. 4.0

C. 4

D. Error

2. Which function overloads the >> operator?

A. more()

B. gt()

C. ge()

D. rshift()

3. What is the output of the following program :
i = 0
while i < 3:
print i
print i+1

A. 0 2 1 3 2 4

B. 0 1 2 3 4 5

C. 0 1 1 2 2 3

D. 1 0 2 4 3 5

4. What is the output of the following program:

A. dlroW olleH

B. Hello Worl

C. d

D. Error

5. Which module in Python supports regular expressions?

A. re

B. regex

C. pyregex

D. None of the above

Related Posts

Post a Comment

Subscribe Our Newsletter