MCQ Questions for Class 12 Informatics Practices – Plotting Data Using Matplotlib Part 1

Plotting Data Using Matplotlib Class 12 MCQ Questions Part 1

Question 1.

Pyplot is an interface of Python’s …….. library.

(a) seaborn
(b) plotly
(c) ggplot
(d) matplotlib
Answer:
(d) matplotlib

Question 2.

For 2D plotting using a Python library, which library interface is often used?

(a) Seaborn
(b) Plotly
(c) Matplotlib
(d) Matplotli(b)pyplot
Answer:
(d) Matplotli(b)pyplot

MCQ Questions for Class 12 Informatics Practices – Plotting Data Using Matplotlib Part 1

Question 3.

Which of the following is not a valid chart type?

(a) Histogram
(b) Statistical
(c) Pie
(d) Box
Answer:
(b) Statistical, (d) Box

Question 4.

Which of the following is not a valid plotting function of pyplot?

(a) plot( )
(b)bar( )
(c) line( )
(d) pie( )
Answer:
(c) line( )

Question 5.

Which of the following plotting functions does not plot multiple data series?

(a) plot( )
(b) bar( )
(c) pie( )
(d) barh( )
Answer:
(c) pie( )

Question 6.

The plot which tells the trend between two graphed variables is the graph/chart.

(a) line
(b) scatter
(c) bar
(d) pie
Answer:
(a) line

Question 7.

The plot which tells the correlation between two variables which may not be directly related is graph/chart.

(a) line
(b) scatter
(c) bar
(d) pie
Answer:
(b) scatter

Question 8.

(a) ……. is a summarisation tool for discrete or ….. continuous dat(a)

(a) quartile
(b) histogram
(c) mean
(d) median
Answer:
(b) histogram

MCQ Questions for Class 12 Informatics Practices – Plotting Data Using Matplotlib Part 1

Question 9.

A visual representation of the statistical five number summary of a given dataset is known as

(a) histogram
(b) frequency distribution
(c) boxplot
(d) frequency polygon
Answer:
(c) boxplot

Question 10.

Which of the following function is used to create a line chart?

(a) line( )
(b) plot( )
(c) chart( )
(d) plotline( )
Answer:
(b) plot( )

Question 11.

Which of the following function will produce a bar chart?

(a) plot( )
(b) bar( )
(c) plotbar( )
(d) barh( )
Answer:
(b) bar( ), (d) barh( )

Question 12.

Which of the following will create a vertical bar chart?

(a) plot( )
(b) bar( )
(c) plotbar( )
(d) barh( )
Answer:
(b) bar( )

Question 13.

Which of the following function will create a horizontal bar chart?

(a) plot( )
(b) bar( )
(c) plotbar( )
(d) barh( )
Answer:
(d) barh( )

Question 14.

To specify the style of line as dashed, which argument of plot( ) needs to be set?

(a) line
(b) width
(c) style
(d) linestyle
Answer:
(d) linestyle

Question 15.

The datapoints plotted on a graph are called

(a) points
(b) pointers
(c) marks
(d) markers
Answer:
(d) markers

Question 16.

A ………. graph is a type of chart which displays …….information as a series of data points connected by straight line segments.

(a) line
(b) bar
(c) pie
(d) boxplot
Answer:
(a) line

Question 17.

To create scatter charts using plot( ), which argument is skipped?

(a) marker
(b) linestyle
(c) markeredgecolor
(d) linewidth
Answer:
(b) linestyle

MCQ Questions for Class 12 Informatics Practices – Plotting Data Using Matplotlib Part 1

Question 18.

In scatter( ), which argument is used to specify the size of datapoints?

(a) size
(b) s
(c) marker
(d) markersize
Answer:
(b) s

Question 19.

Which argument of bar( ) lets you set the thickness of bar?

(a) thick
(b)thickness
(c) width
(d) barwidth
Answer:
(c) width

Question 20.

Which function Lets you set the title of the plot?

(a) title( )
(b) plottitle( )
(c) graphtitle( )
(d) All of these
Answer:
(a) title( )

Question 21.

The command used to give a heading to a graph is……….

(a) plt.show( )
(b) plt.plot( )
(c) plt.xlabel( )
(d) plt.title( )
Answer:
(d) plt.title( )

Question 22.

Which function would you use to set the limits for x-axis of the plot?

(a) limits( )
(b) xlimits( )
(c) xlim( )
(d) lim( )
Answer:
(c) xlim( )

Question 23.

Which function is used to show legends?

(a) display( )
(b) show( )
(c) legend( )
(d) legends( )
Answer:
(c) legend( )

Question 24.

Which argument must be set with plotting functions for legend() to display the legends?

(a) data
(b) label
(c) name
(d) sequence
Answer:
(b) label

MCQ Questions for Class 12 Informatics Practices – Plotting Data Using Matplotlib Part 1

Question 25.

Which function is used to create a histogram?

(a) histo( )
(b) histogram( )
(c) hist( )
(d) histtype
Answer:
(c) hist( )

Question 26.

Which argument in hist( ) is used to create a stacked bar type histogram?

(a) histt
(b) histtype
(c) type
(d) barstacked
Answer:
(b) histtype

Question 27.

Which of the following functions can plot only one data series?

(a) plot( )
(b) bar( )
(c) boxplot( )
(d) pie( )
Answer:
(d) pie( )

Question 28.

Which argument must be provided to create wedges out of a pie chart?

(a) label
(b) autopct
(c) explode
(d) wedge
Answer:
(c) explode

Question 29.

Which argument should be set to display percentage share of each pie on a pie chart?

(a) label
(b) autopct
(c) explode
(d) wedge
Answer:
(b) autopct

Question 30.

Which function creates a boxplot?

(a) box( )
(b) plot( )
(c) boxplot( )
(d) showbox( )
Answer:
(c) boxplot( )

Question 31.

Which argument of boxplot( ) is used to create a filled boxplot?

(a) fill
(b) box
(c) patch_artish
(d) patch
Answer:
(c) patch_artish

Question 32.

(a) ……… is a plot that shows the underlying …… frequency distribution of a set of continuous data

(a) Histogram
(b) Pyplot
(c) Bar chart
(d) Pie chart
Answer:
(a) Histogram

Question 33.

Pyplot interface is a collection of methods within library of Python.

(a) Matplotlib
(b) Numpy
(c) Pandas
(d) None of these
Answer:
(a) Matplotlib

Question 34.

Pyplot’s ……… function is used to create line charts.

(a) plot( )
(b) barh( )
(c) scatter( )
(d) hist( )
Answer:
(a) plot( )

Question 35.

Pyplot’s function is used to create horizontal bar charts.

(a) plot( )
(b) barh( )
(c) scatter( )
(d) hist( )
Answer:
(b) barh( )

Question 36.

Pyplot’s function is used to create scatter ……..charts.

(a) plot( )
(b) barh( )
(c) scatter( )
(d) hist( )
Answer:
(c) scatter( )

Question 37.

Pyplot’s function is used to create histogram.

(a) plot( )
(b) barh( )
(c) scatter( )
(d) hist( )
Answer:
(d) hist( )

MCQ Questions for Class 12 Informatics Practices – Plotting Data Using Matplotlib Part 1

Question 38.

The datapoints plotted on a graph are called

(a) markers
(b) linewidth
(c) linestyle
(d) width
Answer:
(a) markers

Question 39.

The argument of plot( ) specifies the width ……..for the line.

(a) notch
(b) linewidth
(c) linestyle
(d) length
Answer:
(b) linewidth

Question 40.

The argument of plot( ) specifies the style of …… the line.

(a) notch
(b) linewidth
(c) linestyle
(d) length
Answer:
(c) linestyle

Question 41.

The argument of bar( ) specifies the bar …….. width.

(a) markers
(b) linewidth
(c) linestyle fc- V
(d) width
Answer:
(d) width

Question 42.

The function is used to specify ticks for x-axis.

(a) xticks( )
(b) yticks( )
(c) xyticks( )
(d) xxticks( )
Answer:
(a) xticks( )

Question 43.

To save a plot……… function is used

(a) savefig( )
(b) savefun( )
(c) savefigure( )
(d) None of these
Answer:
(a) savefig( )

Question 44.

The argument of hist( ) is set to create a …….. horizontal histogram.

(a) landscape
(b) portrait
(c) documentation
(d) orientation
Answer:
(d) orientation

MCQ Questions for Class 12 Informatics Practices – Plotting Data Using Matplotlib Part 1

Question 45.

The argument shows the arithmetic mean …… on a boxplot.

(a) showmeans
(b) Showsmeans
(c) Showmean
(d) None of these
Answer:
(a) showmeans

Question 46.

The ……..argument in a boxplot( ) creates a …… notched boxplot.

(a) notch
(b) limits
(c) grid
(d) labels
Answer:
(a) notch

Question 47.

The …… argument of legend( ) provides the …… location of legend

(a) loc
(b) Toe
(c) Goc
(d) None of these
Answer:
(a) loc

Question 48.

Using Python Matplotlib can be used to ……. count how many values fall into each interval.

(a) Histogram
(b) Pyplot
(c) Bar chart
(d) Pie chart
Answer:
(a) Histogram

Question 49.

Pyplot is a sub-library of matplotlib library.

(a) False
(b) True
(c) Error
(d) None of these
Answer:
(b) True

Question 50.

Statement import pyplotmatplotlib is a valid statement for working on pyplot functions.

(a) False
(b)True
(c) Error
(d) None of these
Answer:
(a) False

Question 51.

By default, pie chart is printed in elliptical or oval shape.

(a) False
(b) True
(c) Error
(d) None of these
Answer:
(b) True

Question 52.

The default shape of pie chart cannot be changed from oval

(a) False
(b) True
(c) Error
(d) None of these
Answer:
(a) False

MCQ Questions for Class 12 Informatics Practices – Plotting Data Using Matplotlib Part 1

Question 53.

A line chart can be plotted using pyplot library’s line( ) function.

(a) False
(b) True
(c) Error
(d) None of these
Answer:
(a) False

MCQ Questions for Class 12 Informatics Practices with Answers

error: Content is protected !!