0% found this document useful (0 votes)
3 views

library _mcq

The document is a quiz on Python libraries, covering topics such as data manipulation with Pandas, visualization with Matplotlib, and numerical operations with NumPy. It includes questions about specific functions and methods used in these libraries, as well as their applications. The quiz tests knowledge on various aspects of Python programming related to data science and analysis.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

library _mcq

The document is a quiz on Python libraries, covering topics such as data manipulation with Pandas, visualization with Matplotlib, and numerical operations with NumPy. It includes questions about specific functions and methods used in these libraries, as well as their applications. The quiz tests knowledge on various aspects of Python programming related to data science and analysis.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Unit 3 Quiz on Python libraries

1. Which of the following libraries is used for data manipulation and analysis in
Python?
a) Matplotlib
b) NumPy
c) Pandas
d) TensorFlow

2. Which Python library is primarily used for creating visualizations and plots?
a) SciPy
b) Matplotlib
c) Pandas
d) Seaborn

3. Which library provides support for large, multi-dimensional arrays and


matrices?
a) NumPy
b) Flask
c) Requests
d) Sklearn

4. In TensorFlow, which function is used to create a constant value?


a) tf.Variable()
b) tf.constant()
c) tf.placeholder()
d) tf.zeros()

5. Which function reads a CSV file into a Pandas DataFrame?


a) pd.load_csv()
b) pd.read_csv()
c) pd.open_csv()
d) pd.file_csv()

6. What does df.isnull().sum() do?


a) Drops all null values
b) Replaces nulls with 0
c) Counts null values in each column
d) Filters out non-null values

7. How do you select a column named "Age" from a DataFrame df?


a) df.age()
b) df[Age]
c) df["Age"]
d) df->Age

8. Which method is used to remove duplicate rows in a DataFrame?


a) drop_repeats()
b) drop_duplicates()
c) remove_duplicated()
d) filter_unique()

9. Which function creates a NumPy array of all zeros?


a) np.zero()
b) np.empty()
c) np.zeros()
d) np.blank()

10. What is the output shape of np.ones((3, 2))?


a) (2, 3)
b) (3, 2)
c) (1, 3, 2)
d) (6,)

11. Which NumPy function is used for element-wise square root?


a) np.sqrt()
b) np.square()
c) np.pow()
d) np.log()

12. How do you perform matrix multiplication in NumPy?


a) *
b) np.multiply()
c) np.dot()
d) np.sum()

13. SciPy is built on top of which core library?


a) TensorFlow
b) NumPy
c) Pandas
d) PyTorch

14. Which module in SciPy is used for statistical operations?


a) scipy.linalg
b) scipy.optimize
c) scipy.stats
d) scipy.ndimage

15. Which function is used in SciPy to find the mode of a dataset?


a) stats.mean()
b) stats.mode()
c) stats.average()
d) stats.variance()

16. What does scipy.integrate.quad() do?


a) Solves algebraic equations
b) Finds numerical integrals
c) Calculates square roots
d) Performs matrix operations

17. Which function is used to plot a basic line graph in Matplotlib?


a) plt.plot()
b) plt.line()
c) plt.graph()
d) plt.draw()

18. How do you show a plot in Matplotlib?


a) plot.show()
b) plt.graph()
c) plt.show()
d) draw.plot()

19. Which parameter changes the line color in a plot?


a) linewidth
b) linestyle
c) marker
d) color

20. Which function creates a histogram in Matplotlib?


a) plt.bar()
b) plt.hist()
c) plt.plot()
d) plt.grid()

You might also like