Python Programming (2180711) MCQs

MCQs of Advanced Topics I

Showing 1 to 10 out of 17 Questions
1.
True or False? Once you start a threading.Timer, you cannot stop it until it expires.
(a) TRUE
(b) FALSE
Answer:

Option (b)

2.
Which module in Python supports regular expressions?
(a) re
(b) regex
(c) pyregex
(d) none of the mentioned
Answer:

Option (a)

3.
Which of the following creates a pattern object?
(a) re.create(str)
(b) re.regex(str)
(c) re.compile(str)
(d) re.assemble(str)
Answer:

Option (c)

4.
What does the function re.match do?
(a) matches a pattern at the start of the string
(b) matches a pattern at any position in the string
(c) such a function does not exist
(d) none of the mentioned
Answer:

Option (a)

5.
The character Dot (that is, ‘.’) in the default mode, matches any character other than _____________
(a) caret
(b) ampersand
(c) percentage symbol
(d) newline
Answer:

Option (d)

6.
The expression a{5} will match _____________ characters with the previous regular expression.
(a) 5 or less
(b) exactly 5
(c) 5 or more
(d) exactly 4
Answer:

Option (b)

7.
Which of the following functions results in case insensitive matching?
(a) re.A
(b) re.U
(c) re.I
(d) re.X
Answer:

Option (c)

8.
The plot method on Series and DataFrame is just a simple wrapper around ____________
(a) gplt.plot()
(b) plt.plot()
(c) plt.plotgraph()
(d) none of the mentioned
Answer:

Option (b)

9.
Point out the correct combination with regards to kind keyword for graph plotting.
(a) ‘hist’ for histogram
(b) ‘box’ for boxplot
(c) ‘area’ for area plots
(d) all of the mentioned
Answer:

Option (d)

10.
Which of the following value is provided by kind keyword for barplot?
(a) bar
(b) kde
(c) hexbin
(d) none of the mentioned
Answer:

Option (a)

Showing 1 to 10 out of 17 Questions