Python Programming (2180711) MCQs

MCQs of Advanced Topics I

Showing 11 to 17 out of 17 Questions
11.
You can create a scatter plot matrix using the __________ method in pandas.tools.plotting.
(a) sca_matrix
(b) scatter_matrix
(c) DataFrame.plot
(d) all of the mentioned
Answer:

Option (b)

12.
Which of the following plots are used to check if a data set or time series is random?
(a) Lag
(b) Random
(c) Lead
(d) none of the mentioned
Answer:

Option (a)

13.
Which of the following plots are often used for checking randomness in time series?
(a) Autocausation
(b) Autorank
(c) Autocorrelation
(d) none of the mentioned
Answer:

Option (c)

14.
How many CPUs (or cores) will the Python threading library take advantage of simultaneously?
(a) Two
(b) One
(c) None
(d) All of the available CPUs
Answer:

Option (b)

15.
What does the Thread.join() method do?
(a) Adds the thread to a pool
(b) Merges two threads into one
(c) Waits for the thread to finish
(d) Restricts access to a resource
Answer:

Option (c)

16.
Race conditions are …
(a) Two threads incorrectly accessing a shared resource
(b) Testing which thread completes first
(c) Something you should add to your code
(d) The weather on race day
Answer:

Option (a)

17.
Why is it a good idea to use a ThreadPoolExecutor as a context manager when you can?
(a) It looks better
(b) It passes exceptions back to the main program
(c) It manages the start up of all threads and waits for them all to complete
(d) It prevents the threads from having race conditions
Answer:

Option (c)

Showing 11 to 17 out of 17 Questions