Loading

Quipoin Menu

Learn • Practice • Grow

Direction: Choose the correct option

Q1.

What is Matplotlib?
A. A plotting library for Python
B. A machine learning library
C. A data analysis library
D. A web framework
Direction: Choose the correct option

Q2.

Which module provides a MATLAB-like interface?
A. matplot
B. pylab
C. pyplot
D. plot
Direction: Choose the correct option

Q3.

How do you import pyplot?
A. from matplotlib import pyplot
B. import matplotlib.pyplot as plt
C. import pyplot as plt
D. Both A and C
Direction: Choose the correct option

Q4.

What does `plt.plot(x, y)` do?
A. Draws a bar chart
B. Draws a line plot
C. Draws a histogram
D. Draws a scatter plot
Direction: Choose the correct option

Q5.

How do you display a plot?
A. plt.render()
B. plt.show()
C. plt.plot.show()
D. plt.display()
Direction: Choose the correct option

Q6.

What does `plt.scatter(x, y)` create?
A. A bar chart
B. A histogram
C. A scatter plot
D. A line plot
Direction: Choose the correct option

Q7.

How do you add a title to a plot?
A. plt.title('Title')
B. plt.text('Title')
C. plt.set_title('Title')
D. plt.label('Title')
Direction: Choose the correct option

Q8.

What is the purpose of `plt.subplots()`?
A. Creates a legend
B. Creates a single plot
C. Creates multiple figures
D. Creates a figure and a grid of subplots
Direction: Choose the correct option

Q9.

How do you save a plot to a file?
A. plt.export('plot.png')
B. plt.savefig('plot.png')
C. plt.write('plot.png')
D. plt.save('plot.png')
Direction: Choose the correct option

Q10.

What does `plt.legend()` do?
A. Adds labels
B. Adds a title
C. Adds a legend to the plot
D. Adds a grid