0% found this document useful (0 votes)
35 views63 pages

Chapter-3 (Data Visualization)

This document contains questions and learning objectives related to data visualization. It includes 47 multiple choice questions covering topics like the characteristics of data visualization, different visualization options for categorical and quantitative data, how to create histograms, bar charts, line charts and more using Matplotlib. The questions range from basic knowledge to application level questions to test understanding of creating various data visualizations in Python.

Uploaded by

sejalsejal324
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views63 pages

Chapter-3 (Data Visualization)

This document contains questions and learning objectives related to data visualization. It includes 47 multiple choice questions covering topics like the characteristics of data visualization, different visualization options for categorical and quantitative data, how to create histograms, bar charts, line charts and more using Matplotlib. The questions range from basic knowledge to application level questions to test understanding of creating various data visualizations in Python.

Uploaded by

sejalsejal324
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Name of the Chapter- Data Visualization

Questio Question Content Learning


n No Objective(if
Provided)
1. Which of the following is a characteristic of data visualization- Understandin
1. Converts information g
2. Involves visuals
3. Simplifies understanding
4. All of above

2. In case of of categorical data and quantitative data which Understandin


visualization option is most suitable- g
1. Bar chart
2. Histogram
3. Scatter Chart
4. All

3. Which of the following statement limits both x and y axes to the Application
interval [0, 7]?
1. plt.xlim(0, 7)
2. plt.ylim(0, 7)
3. plt.xylim(0, 7)
4. plt.axis( [0, 7, 0, 7])
4. A ----- graph is a type of chart which displays information as a Knowledge
series of data points connected by straight line segment.
1. line
2. bar
3. pie
4. boxplot
5. The ----- argument of hist() is set to create a horizontal Application
histogram.
1. landscape
2. portrait
3. documentation
4. orientation
6. What are bins in histogram – Knowledge
1. Non overlapping intervals
2. Overlapping intervals.
3. Set of intervals.
4. None.
7. Which of the following is not a line style for the line of plot chart? Knowledge
1. solid
2. dot-dash
3. dotted
4. dashed
8. Which of the following is the correct way to install matplotlib? Application
1. pip matplotlib install
2. install matplotlib
3. matplotlib install
4. pip install matplotlib
9. Which of the following statements helps to create histograms:- Creation
1.plt.hist
2.plt.hist()
3.hist()
4.matplotlib.pyplot.hist()
10. Which of the following is not histtype while creating histograms:- Creation
1)bar
2)barstacked
3)step
4)barfilled
11. How many type of orientation is there in histograms:- Knowledge
1)horizontal
2)vertical
3)both 1 and 2
4)only horizontal
12. What is the default width of a bar in units in barcharts:- Knowledge
1)0.3
2) 0.5
3)0.8
4)0.4
13. Which of the following is not a linestyle in a line chart:- Knowledge
1)solid
2)dashed
3)dashdot
4)arrow
14. Which of the following statement is used to create line chart:- Creation
1)plt.line
2)plt.line()
3)plt.plot()
4)plt.plot
15. Which one of following is not a valid markertype in line chart knowledge
1)’+’
2)’0’
3)’4’
4)’!’
16. Which of the following function will produce a horizontal bar chart? Application
1). plot()
2). bar()
3) plotbar()
4). barh()
17. To specify the style of line as dashed, which argument of plot() need Application
to be set?
1). line
2). width
3). style
4). linestyle
18. The ---- argument of legend() provides the location of legends. application
1). loc
2). Toc
3). Goc
4). None of these
19. Using pyplot matplotlib, ________ can be used to count how many Knowledge
values fall into each interval.
1). Histogram
2). Pyplot
3). Barchart
4). Pie chart
20. Which of the following one indicates discontinuity? Knowledge
1). histogram
2). pie
3). bar graph
4). None of these
21. Choose the name of function that will return top 5 rows of a dataframe
(i) top(5)
(ii)head()
(iii) head5()
(iv) tail(n-5)

22. Choose the name of function that will return last 5 rows of a
dataframe

(i) bottom(5)
(ii)tail()
(iii) last5()
(iv) tail5()
23. Which function should be called with an object DF of a DataFrame to
get first n rows of a dataframe .
(i) head(n)
(ii) get(n)
(iii) print(n)
(iv) top(n)
24. which function should be called to get last n rows of a dataframe ,DF

(i) DF.tail(n)
(ii) DF.bottom(n)
(iii) DF.last(n)
(iv) DF. print(n)
25. Consider below given dataframe ,Df:

What output will be generated for Df.head()


(i) a b d
0 1 2 10
1 2 3 24
3 NaN NaN NaN
4 NaN NaN NaN
5 NaN NaN NaN
(ii)
a b d
0 1 2 10
1 2 3 24
3 0 0 0
4 0 0 0
5 0 0 0
(iii)
Error
(iv)
a b d
0 1 2 10
1 2 3 24
26. Consider below given dataframe ,Df:

What output will be generated for Df.tail()


(i) a b d
0 1 2 10
1 2 3 24
3 NaN NaN NaN
4 NaN NaN NaN
5 NaN NaN NaN
(ii)
a b d
0 1 2 10
1 2 3 24
3 0 0 0
4 0 0 0
5 0 0 0
(iii)
Error
(iv)
a b d
0 1 2 10
1 2 3 24
27. What will be python statement to get output :
a d
0 1 10
1 2 24

if dataframe is :

(i) df (a,d)
(ii) df[[‘a’,’d’]]
(iii)df[‘a’ , ‘d’]
(iv)df[‘a’:’d’]

28. What will be python statement to display columns a and b of the


undergiven dataframe ,df:

(i) df .loc[: ,á’:’b’]


(ii) df[[‘a’,’b’]]
(iii) both (i) and (ii)
(iv) only (ii)
29. What is purpose of the following python code :
df.loc[:,'g']=[7,8]

(i) will add new column ‘g’ to the dataframe


(ii) will add a new index ‘g’ to the dataframe
(iii) will give an error
(iv) will add both row and column with label ‘g’
30. which property of dataframe is used to access a group of rows and
columns by label(s)
(i) iloc
(ii) loc
(iii) labels
(iv) rowsColumns
31. Consider the following dataframe :
find output of :
print(df.loc[0,'b']>3)
(i) True
(ii) False
(iii)true
(iv) false
32. Consider the below given dataframe :

What will be python statement to check if value for row 1 and column
b is equal to 4 or not:
(i) df.loc[1,'b']==4
(ii) df.loc[1:'b']==4
(iii)df.loc[[1,'b']]==3
(iv) df[1][‘b’]==4
33. Consider the following dataframe :

what will be output of :


print(df.loc[1,['a','d']])
(i)
a2
d 24
(ii)
a d
1 2 24
(iii)
a d
2 24
(iv) error
34. Consider the following dataframe :

What will be output of :


df.loc[True,'name']
(i) True aparna
True sudhir
(ii) aparna
sudhir
(iii) aparna
(iv) sudhir
35. Consider the following dataframe :

What will be python statement to display name and degree whose


score is greater than 90.
(i) df[['name','degree']][df.score>90]
(ii)df[['name','degree'][df.score>90]]
(iii)df[['name','degree']][score>90]
(iv) df.loc[['name','degree']][df.score>90]
36. Which argument must be set with head function to display first 5 rows
of the dataframe ?
(i) no argument required
(ii) 0
(iii) None
(iv) Five
37. Consider the following dataframe :
what will be output of :
print(df.head(1)['name'])
(i) error
(ii) aparna
(iii) true aparna
(iv) True aparna
38. Consider the following dataframe :

What will be output of :


df.head(1).loc[False]
(i)KeyError
(ii)empty Set
(iii) name degree score
False aparna MBA 90
(iv) none of the above
39. how many rows are displayed if no argument is passed to tail function?
(i) o
(ii)1
(iii)5
(iv)10
40. Consider following dataframe df and give answer for the python code:
print(type(df.tail()))
(i) DataFrame
(ii)Series
(iii)String
(iv) boolean

41. __________________ means graphical or pictorial representation Knowledge


of the data using graph, chart, etc.
(A) Data visualization
(B) Visual Data
(C) Matplot
(D)None of the above
42. Which of the following library to be imported for creating chart in Knowledge
python?
(A) Matplotlib
(B) Pandas
(C) Math
(DRandom
43. Which of the following command is correct to install matplotlib? Knowledge
(A) pip install matplot
(B) pipe install matplotlib
(C) pip install matplotlib
(D)None of the above
44. ______________ function is used to display figure/chart. Knowledge
(A) showing( )
(B) show( )
(C) display( )
(D)screen( )
45. Values which are displayed on x-axis is called ___________ Knowledge
(A) y ticks
(B) x ticks
(C) xy ticks
(D)None of the above
46. plot(a, b) is provided with two parameters, which indicates values Evaluation
for _______________
(A) x-axis and y-axis, respectively
(B) y-axis and x-axis, respectively
(C) x-axis only
(D)None of the above
47. By default plot() function plots a ________________ Knowledge
(A) Histogram
(B) Bar graph
(C) Line chart
(D)Pie chart
48. Which of the following pyplot function is used to plot histogram. Knowledge
(A) histogram( )
(B) histo( )
(C) histochart( )
(D)hist( )
49. Which of the following pyplot function is used to plot pie chart. Knowledge
(A) pie( )
(B) piechart( )
(C) circle( )
(D)oval( )
50. Which of the following pyplot function is used to plot bar graph. Knowledge
(A) bargraph( )
(B) bar( )
(C) barchart( )
(D)oval( )
51. Write a statement to display “Amount” as x-axis label. (consider Evaluation
plt as an alias name of matplotlib.pyplot)
(A) plt.label(“Amount”)
(B) plt.xlabel(“Amount”)
(C) plt.xlabel(Amount)
(D)None of the above
52. Fill in the blank in the given code, if we want to plot a line chart Evaluation
for values of list ‘a’ vs values of list ‘b’.

import matplotlib.pyplot as plt


a = [1, 2, 3, 4, 5]
b = [10, 20, 30, 40, 50]
plt.plot __________
A) (a, b)
(B) (b, a)
(C) [a, b]
(D)None of the above
53. The following code will create __________ . Evaluation
import matplotlib.pyplot as pl
a = [1,2,3,4,5]
b = [10, 20, 30, 40, 50]
c = [5, 10, 15, 20, 25]
pl.plot(a,b)
pl.plot(a,c)
pl.show()
(A) line chart
(B) bargraph
(C) histogram
(D)None of the above
54. Which function is used to display the legend in plot? Knowledge
(A) legend
(B) Legend
(C) legends
(D)None of the above
55. The following code will show ___________ lines in the figure/chart. Evaluation
import matplotlib.pyplot as pl
a = [1,2,3,4,5]
b = [10, 20, 30, 40, 50]
c = [5, 10, 15, 20, 25]
pl.plot(a,b)
pl.plot(a,c)
pl.show()
(A) 1
(B) 2
(C) 3
(D) 4
56. Which of the following is not a valid plotting function? Knowledge
(A) plot()
(B)bar()
(C)line()
(D)pie()
57. Which of the following function is used to save the figure/chart? Knowledge
(A) save( )
(B) savefigure( )
(C) savefig( )
(D)None of the above
58. Which of the following pyplot function is used to set the label for Evaluation
the x-axis.
(A) xlabeled( )
(B) xlabel( )
(C) x_axis_label( )
(D)None of the above
59. Which of the following pyplot function is used to set a title for the Knowledge
chart.
(A) Title( )
(B) c_title( )
(C) title( )
(D)None of the above
60. To show the grid lines in plot, we can write _______________ #plt Evaluation
is an alias of matplotlib.pyplot
(A) plt.grid( )
(B) plt.grid(True)
(C)Both of the above
(D)None of the above
61. Which module has to be imported for plotting ? Knowledge
A. matplot.pyplot
B. matplotlib.pyplot
C. import matplotlib.pyplot
D. None of these

62. How to install the package required for plotting ? Understandin


A. pip install matplotlib g
B. install matlplotlib
C. python install matplotlib
D. None of these

63. What is the default colour of line plot ? Knowledge


A. Black
B. Cyan
C. Blue
D. Yellow

64. What is the least no. of arguments required to call plot( ) ? Evaluation
A. 1
B. 2
C. 3
D. None of these

65. Pick the one which cannot be used as marker: Understandin


A. A g
B. D
C. ^
D. +
66. ‘Markeredgecolor’ parameter affects: Knowledge
A. Line colour
B. Marker colour
C. Border of the marker
D. None of these

67. Which character represents black colour? Analysis


A. ‘b’
B. ‘k’
C. ‘bk’
D. ‘y

68. Identify the correct parameters for plotting the following line plot: Evaluation

A p.plot([1,2,6],[4,7,8],marker='o',markersize=20,color='y',
markeredgecolor='r', linestyle='--', linewidth=10)
B p.plot([1,2,6],[4,7,8],marker='D',markersize=20,color='y',
markeredgecolor='r', linestyle='-.', linewidth=10)

C p.plot([1,2,6],[4,7,8],marker='Circle',markersize=20,color='y
markeredgecolor='r', linestyle='--', linewidth=10)

D p.plot([1,2,6],[4,7,8],marker='o',markersize=20,color='y',
markeredgecolor='r' , linewidth=10)
69. Identify the correct linestyle used in the following line plot:

A. Linestyle= ‘None”
B. linstyle= “ “
C. linestyle= ‘None’
D. linestyle=None

70. In the following line of code, identify the parameters and their related Knowledge
value:
plot(x, y, 'go--', linewidth=2, markersize=12)

A. color= ‘green’ , linestyle= ‘o - -'


B. color= ‘green’ , linestyle= ‘o - -'
C. color= ‘green’ , linestyle= ‘ - - ‘, marker= ‘o’
D. linestyle= ‘go - -'

71. For a bar graph, what is default width of each bar ? Analysis
A. 0.5
B. 0.25
C. 0.3
D. 0.8

72. For a bar chart containing 5 bars, and color=[‘r’, ‘g’ , ‘y’], what will Creation
be the colours of the bars:
A. red, green, yellow, yellow, green
B. red, green, yellow, green, red
C. red, green, yellow, red, green
D. Error

73. For a bar chart containing 5 bars, and width=[0.25,0.5] is mentioned. Analysis
What will the width of the bars ?
A. 0.25, 0.5, 0.25, 0.5, 0.25
B. 0.25, 0.25, 0.25, 0.5, 0.5
C. Cannot be determined
D. Error

74. Where does legend appears in a plot when ‘loc’ is not mentioned ? Knowledge
A. Determined by Interpreter
B. Upper left
C. Upper right
D. Lower right

75. Which of the following is best suited for compare things between Understandin
different groups or to track changes over time ? g
A. Line chart
B. Pie chart
C. Bar graph
D. Histogram

76. What is the function of ‘bins’ in hist() ? Application


A. To draw the bars
B. To divide the range in the histogram
C. To set the height of the bars
D. None of these

77. Identify the correct histtype for the following bar graph Knowledge
A. bar
B. barstacked
C. stepfilled
D. step

78. How can we makes the histogram horizontal ? Understandin


A. by using orientation= ‘vertical’ g
B. by using histh( )
C. by using align=’horizontal’
D. by using orientation= ‘horizontal’

79. Which option can be used for accumulating the previous height of the Application
bar ?
A. Cumulative=false
B. cumulative= ‘true’
C. cumulative=True
D. None of these

80. For the following line of code, how many ‘bins’ will be created? Analysis
matplotlib.pyplot.hist(a, bins=[1,5,10,15])
A. 4
B. 3
C. Depends upon the data
D. Cannot be determined

81. Choose the name of Python module that is to be imported to be able to


use Python’s Data Visualisation library:

(i) plot module


(ii) pyplot module
(iii) matplotlib module
(iv) plt module

82. Matplotlib allows you to create:

(i) table
(ii) charts
(iii) maps
(iv) infographics
83. Which of the following commands is used to install matplotlib for
coding?

(i) import plt.matplotlib as plot


(ii) import plot.matplotlib as pt
(iii) import matplotlib.plt as plot
(iv) import matplotlib.pyplot as plt
84. Which of the following methods should be employed in the code to
display a plot?

(i) show()
(ii) display()
(iii) execute()
(iv) plot()
85. Which function is used to create a histogram ?

(i) histo()
(ii) histogram()
(iii) hist()
(iv) histtype
86. Which function is used to show legends ?

(i) display()
(ii) show()
(iii) legend()
(iv) legends()
87. The datapoints plotted on a graph are called _____.

(i) points
(ii) pointers
(iii) marks
(iv) markers
88. The plot which tells the trend between two graphed variables is the
_____ graph/chart.

(i) line
(ii) scatter
(iii) bar
(iv) pie
89. Which of the following functions is used to create a line chart?

(i) line()
(ii) plot()
(iii) chart()
(iv) plotline()
90. Which of the following function will create a horizontal bar chart ?

(i) plot()
(ii) bar()
(iii) plotbar()
(iv) barh()
91. Which of the following is not a valid chart type ?

(i) histogram
(ii) statistical
(iii) pie
(iv) bar
92. A _____ is a summarisation tool for discrete or continuous data.

(i) quartile
(ii) histogram
(iii) mean
(iv) median
93. To specify the style of line as dashed, which argument of plot() needs
to be set ?

(i) line
(ii) width
(iii) style
(iv) linestyle
94. Which function would you use to set the limits for x-axis of the plot ?

(i) limits()
(ii) xlimits()
(iii) xlim()
(iv) lim()
95. Which of the following statements is used to create a histogram of
'step' type with 20 bins?

(i) plt.hist(x, bins = 20, histype = "barstacked")


(ii) plt.hist(x, bins = 20)
(iii) plt.hist(x, bins = 20, histype = "step")
(iv) plt.hist(x, bins = 20, histype = hist()
96. Which argument must be set with plotting functions for legend() to
display the legends ?

(i) data
(ii) label
(iii) name
(iv) sequence
97. Observe the output figure. Identify the coding for obtaining this
output.
(i)
import matplotlib.pyplot as plt
plt.plot([1,2,3],[4,5,1])
plt.show()

(ii)
import matplotlib.pyplot as plt
plt.plot([1,2],[4,5])
plt.show()

(iii)
import matplotlib.pyplot as plt
plt.plot([2,3],[5,1])
plt.show()

(iv)
import matplotlib.pyplot as plt
plt.plot([1,3],[4,1])
plt.show()

98. What will be the output of the given code :

from matplotlib import pyplot as plt

x = [5,2,7]
y = [2,16,4]
plt.plot(x,y)
plt.title('Info')
plt.ylabel('Y axis')
plt.xlabel('X axis')
plt.show()

(i)
(ii)

(iii)

(iv)
99. Which of the following is not a valid plotting function of pyplot?

(i) bar()
(ii) barh()
(iii) hist()
(iv) histh()
100. Which of the following is not a visualization under matplotlib?

(i) Scatter plot


(ii) Histogram
(iii) Box plot
(iv) Table plot

ANSWER

Question Answer
No
1. 4)All of above

2. 1)Bar chart

3. 3)plt.xylim(0, 7)

4. 1)line

5. 4)orientation

6. 1)Non overlapping intervals


7. 2)dot-dash

8. 4)pip install matplotlib

9. 1)plt.hist

10. 4)barfilled

11. 3)both 1 and 2

12. 3)0.8

13. 4)arrow

14. 3)plt.plot()

15. 4)’!’

16. 4). barh()

17. 4). linestyle

18. 1). loc

19. 1). Histogram

20. 3). bar graph

21. (ii)head()

22. (ii) tail()

23. (i) head(n)

24. (i) DF.tail(n)

25. (iv)
a b d
0 1 2 10
1 2 3 24
26. (iv)
a b d
0 1 2 10
1 2 3 24
27. (ii)df[[‘a’,’d’]]
28. (iii) both i and ii

29. (i) will add new column ‘g’ to the dataframe

30. (ii) loc

31. (ii) False

32. (i) df.loc[1,'b']==4

33. (i)
a2
d 24
34. (i)True aparna
True sudhir

35. (i)df[['name','degree']][df.score>90]

36. (i) no argument required

37. (iv)True aparna

38. (i) KeyError

39. (iii) 5

40. (i) DataFrame

41. Answer:- A

42. Answer:- A

43. Answer:- C

44. Answer:- B

45. Answer:- B

46. Answer:- A

47. Answer:- C
48. Answer:- D

49. Answer:- A

50. Answer:- B

51. Answer:- B

52. Answer:- A

53. Answer:- A

54. Answer:- A

55. Answer:- B

56. Answer:- C

57. Answer:- C

58. Answer:- B

59. Answer:- C

60. Answer:- C

61. B

62. A

63. C

64. A

65. A

66. C

67. B

68. A

69. C

70. C

71. D
72. C

73. D

74. A

75. C

76. B

77. D

78. D

79. C

80. B

81. (ii) pyplot module

82. (ii) charts

83. (iv) import matplotlib.pyplot as plt

84. (i) show()

85. (iii) hist()

86. (iii) legend()

87. (iv) markers

88. (i) line

89. (ii) plot()

90. (iv) barh()

91. (ii) statistical

92. (ii) histogram

93. (iv) linestyle

94. (iii) xlim()


95. (iii) plt.hist(x, bins = 20, histype = "step")

96. (ii) label

97. (i)
import matplotlib.pyplot as plt
plt.plot([1,2,3],[4,5,1])
plt.show()

98. (iii)

99. (iv) histh()

100. (iv) Table plot

Name of the vetter- Soumalik Roy

Name of the KV- KV No2 Ishapore

Region- Kolkata

Mobile No- 9831697957

E-mail ID – soumalikroy@gmail.com
Name of the Chapter- Data Visualization

Question Question Content Learning Objective(if


No Provided)
1. Assertion(A): a histogram is a plot that shows the underlying Knowledge
frequency distribution of a set of continuous data.
Reason(R): Pyplot interface is a collection of methods within
matplotlib library of python.
a. both (A) and (R) are true, and (R) is the correct explanation of (A)
b. both (A) and (R) are true, but (R) is not correct explanation of (A)
c. (A) is true but (R) is false.
d. (A) is false but (R) is true.

2. Assertion(A): Pyplot plot() function is used to create line charts. Creation


Reason(R): Pyplot’s barh() function is used to create horizontal bar
graph.

a. both (A) and (R) are true, and (R) is the correct explanation of (A)
b. both (A) and (R) are true, but (R) is not correct explanation of (A)
c. (A) is true but (R) is false.
d. (A) is false but (R) is true.

3. Assertion(A): The datapoint plotted on a graph are called markers. Application


Reason(R): The width argument of plot() specifies the width of the
line.

a. both (A) and (R) are true, and (R) is the correct explanation of (A)
b. both (A) and (R) are true, but (R) is not correct explanation of (A)
c. (A) is true but (R) is false.
d. (A) is false but (R) is true.
4. Assertion(A): The xticks() function is used to specify ticks for x-axis. Application
Reason(R): To save a plot, savefig() function is used.

a. both (A) and (R) are true, and (R) is the correct explanation of (A)
b. both (A) and (R) are true, but (R) is not correct explanation of (A)
c. (A) is true but (R) is false.
d. (A) is false but (R) is true.
5. Assertion(A): Data visualization demand much more from a Understanding
graph/plot. The graph/plot should have a proper title, X and Y limits
defined, Labels, Legends etc.
Reason(R): Any graph or chart that you create using matplotlib’s
pyplot interface is created as per a specific structure of a plot or shall
we say a specific anatomy.

a. both (A) and (R) are true, and (R) is the correct explanation of (A)
b. both (A) and (R) are true, but (R) is not correct explanation of (A)
c. (A) is true but (R) is false.
d. (A) is false but (R) is true.
6. A: df.head(3) will return top 3 rows of the dataframe
R: head() functions returns rows from the top of dataframe.
(i) A and R both are true and R is correct explanation of A
(ii) A is true but R is False
(iii) A if False but R is true
(iv) both are false
7. A: dataframe , df

df.tail() will return all rows of the dataframe


B: tail() function returns only last row of the dataframe
(i) A and R are true and R is correct explanation of A
(ii) A and R are true but R is not correct explanation of A
(iii) A is true and R is False
(iv) both A and R are false
8. A: dataframe , df

df.loc[1,’a’:’d’]
will return the output :
a b d
1 2 3 24

R: loc property includes both the limits of labels(upper and


lower limits) for displaying rows and columns .
(i) A and R both are true and R is correct explanation of A
(ii) A is true R is false
(iii) A is false and R is true
(iv) both are false
9. Assertion:- Data visualization refers to the graphical Analysis
representation of information and data using visual elements
like charts, graphs and maps etc.
Reason:- To install matplotlib library we can use the command

pip install matplotlib.

(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
10. Question Analysis,
Assertion: PyPlot is a collection of methods within matplotlib
library.
Reason: PyPlot can be used to construct 2D plots easily and
interactively.
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
11. Question Analysis,
Assertion: Python supports data visualization.
Reason: Python provide matplotlib library.
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
12. Question Analysis,
Assertion: A histogram is a summarization tool for discrete data
Reason: A histogram is a summarization tool for continuous
data
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
13. Question Analysis,
Assertion: A frequency polygon is not a type of frequency
distribution graph.
Reason: In a frequency polygon, the number of observations is
marked with a single point at the midpoint of an interval.
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
14. Assertion : Default width of bar graph is 0.8 Understanding
Reason : Line width can be changed.
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
15. Assertion : Title appears on the bottom of the graph. Knowledge
Reason : title() function is used to set the title.
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
16. Assertion: p.plot(x,y,linestyle='.-') will give error. Knowledge
Reason: linestyle parameter is used to set the line style.
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
17. Assertion: We can change the colour of the line plot. Application
Reason: color attribute sets the line colour.
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
18. Assertion: markeredgecolor changes the colour of the line plot. Understanding
Reason: marker are the data points.
(A) Both Assertion and reason are true and reason is correct
explanation of assertion.
(B) Assertion and reason both are true but reason is not the
correct explanation of assertion.
(C) Assertion is true, reason is false.
(D) Assertion is false, reason is true.
19. Assertion (A) :Data visualization refers to the graphical
representation of information and data using visual elements
like charts, graphs and maps etc.

Reason (R) :To install matplotlib library we can use the


command
pip install matplotlib.

A. Both A and R are true and R is the correct explanation of A


B. Both A and R are true but R is not the correct explanation of
A
C. A is true but R is false
D. A is false but R is true
20. ASSERTION(A) : legend (labels = [‘Text’]) is used to give
title to the graph
REASON(R) : plt.savefig(“path”) will save the current graph in
png or jpeg format.
A. Both A and R are true and R is the correct explanation of A
B. Both A and R are true but R is not the correct explanation of
A
C. A is true but R is false
D. A is false but R is true
21. ASSERTION(A) : plt.plot(x,y,'g',label="Students participating
in CCA competition") will plot a Line chart.

REASON(R) : ‘g’ in plot() function is colour of the marker.


A. Both A and R are true and R is the correct explanation of A
B. Both A and R are true but R is not the correct explanation of
A
C. A is true but R is false
D. A is false but R is true

22. ASSERTION(A) : linestyle, linewidth are used to customize


line graph.
REASON(R) : In the following example markers, line style
and colour are mentioned exclusively.
emp_count = [3, 20, 50, 200, 350, 400]
year = [2014, 2015, 2016, 2017, 2018, 2019]
plt.plot ( year, emp_count, 'o’, ‘’-’, ‘g’ )
A. Both A and R are true and R is the correct explanation of A
B. Both A and R are true but R is not the correct explanation of
A
C. A is true but R is false
D. A is false but R is true
23. ASSERTION(A) : Marker has different elements i.e., style,
color, size etc.
REASON(R) : we can customize line of a line chart by using
marker property of plot() function.
A. Both A and R are true and R is the correct explanation of A
B. Both A and R are true but R is not the correct explanation of
A
C. A is true but R is false
D. A is false but R is true

ANSWER

Question No Answer
1. b

2. b

3. c

4. b

5. b

6. (i)

7. (iii)

8. (i)

9. Answer:- B

10. Answer:- B
11. Answer:- A

12. Answer:- B

13. Answer:- D

14. A

15. D

16. B

17. A

18. D

19. A

20. C

21. A

22. B

23. A
Name of the vetter- Soumalik Roy

Name of the KV- KV No2 Ishapore

Region- Kolkata

Mobile No- 9831697957

E-mail ID – soumalikroy@gmail.com
Name of the Chapter- Data Visualization

CBQ Question Content Learning


NO Objective(
if
Provided)
1. Deepak is working in a game development industry and he was comparing the given chart Applicatio
on the basis of the rating of the various games available on the play store. He is trying to n
write a code to plot the graph. Help Deepak to fill in the blanks of the code and get the
desired output.

import__________________________ #Statement 1
Games=["PubG","Crush candy","solitaire","minesweeper","sniper"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.______________(Games,Rating) #Statement 2
plt.xlabel("Games")
plt.______________("Rating") #Statement 3
plt._______________ #Statement 4

1. Choose the right code from the following for statement 1.


i. matplotlib as plt
ii. pyplot as plt
iii. matplotlib.pyplot as plt
iv. matplotlib.plt as pyplot

2. Identify the name of the function that should be used in statement 2 to plot the above
graph.
i.line()
ii. bar()
iii. hist()
iv. barh()

3. Choose the correct option for the statement 3.


i. title("Rating")
ii. ytitle("Rating")
iii. ylabel("Rating")
iv. yaxis("Rating")

4. If the width of all bars need to be changed with specified width 0.5 then, what change
will be there in statement 2
1)plt.width=0.5
2)width=0.5
3)width=[0.5]
4)wid=0.5

5. In case Deepak wants to change the above plot to a horizontal bar chart, which
statement, should he change.
i. Statement 1
ii. Statement 2
iii. Statement 3
iv. Statement 4

6. What will the answer of statement 4 if plot needs to be displayed


1)plt.show()
2)show()
3)disp()
4)display()

2. Sangeeta is trying to see the frequency distribution for 250 people whose height in cms Applicatio
lie between different ranges .Help her to create a histogram that plots an ndarray x, in n
stepfilled horizontal style. She has written the following code:-
import matplotlib.pyplot as plt #1
import numpy as np
x = np.random.normal(170, 10, 250) #2
plt.hist([x],histtype='stepfilled') #3
plt._____________ ("height") #4
plt.ylabel("no of people") #5
plt.___________ #6
1.What will be the first statement in a program to use the feature of pyplot
1)matplotlib
2)matplotlib.pyplot
3)pyplot
4)py.matplotlib

2)What will be the change in statement 3 to create the above histogram as given below:-

1) histtype=’stepfilled’
2) histtype=’barfilled’
3) histtype=’edgefilled’
4) histtype=’step’

3)What will be the command to change the color as red for the histogram:-
1)color=’red’
2)edgecolor=’red’
3)facecolor=’red’
4)color=’r’

4) What will be the change in statement 3 if following change in the shape of histogram is
required:-

1)landscape
2)horizontal
3)vertical
4)orientation=’horizontal’

5.Write the command to display labels for x axis in statement 4


1)plt.show()
2)labelx()
3)xlabel()
4)xdisp()

6.Write the command to display the graph in statement 6


1)plt.show()
2)show()
3)disp()
4)display()

3. Ram want to get a visual display after doing some analysis on a given set of data ,help Applicatio
him to perform his task.If he has the following dataset n
india=[100,150,145,125,138,160,170]
Australia=[120,130,140,150,110,149,150]
Year=[2010,2012,2014,2016,2018,2020,2022]
He wants to represents above given dataset in such a way he want to see year wise the
value of runs scored by both Indian and Australian team.

For above chart he has written the following code:-


import matplotlib.pyplot as plt
india=[100,150,145,125,138,160,170]
australia=[120,130,140,150,110,149,150]
year=[2010,2012,2014,2016,2018,2020,2022]
plt._________(year,india))#1
plt.________(year,australia)#2
plt._________()#3

1. To get visual display in the form of line which function he should choose in statement1
and 2
1)plt.line()
2)plt.bar()
3)plt.plot()
4)plt.hist()

2.To represent india score in blue which argument should he use in statement 1
1)disp=’blue’
2)dispcolor=’b’
3)color=’b’
4)show=’b’

3.To give a title to the visual display title as “runs scored in test match”
1)plt.heading()
2)plt.header()
3)plt.title()
4)plt.head()

4.To set the marker as shown in following chart what change should be done by him in
statement 1 and 2.
1)marker=’o’ and marker=’+’
2) marker=’o’ and marker=’+’
3)pointer =’o’ and marker=’+’

5.Write the command to display the graph in statement 3


1)plt.show()
2)show()
3)disp()
4)display()
4. Ram is storing record of students , with degree and score . He created a dataframe as Applicati
follows: on
import pandas as pd

# dictionary of lists
dict = {'name':["aparna", "pankaj", "sudhir", "Geeku"],
'degree': ["MBA", "BCA", "M.Tech", "MBA"],
'score':[90, 40, 80, 98]}

df = pd.DataFrame(dict, index = [1, 2, 3, 4])

1.Ram wants to add a new record to this dataframe with index 5 and values
[‘Rahul’,’MCA’,98].What command should he write for the same:
(i) df.loc[5]=[‘Rahul’,’MCA’,98]
(ii) df.loc[5,:]=[‘Rahul’,’MCA’,98]
(iii) df[5]= [‘Rahul’,’MCA’,98]
(iV) None of the above

2.Ram required to display name and degree of first 5 rows. What command should he use
:
(i) df.head().loc[:,'name':'degree']
(ii)df.head()
(iii)df.head()['name','degree']
(iv)df.head()

3.Ram wants to display last 3 rows of the dataframe , and he wrote following command:
df.tail()
He is getting wrong output .What mistake is he doing:
(i)he should write df.tail(3)
(ii) he should write df.tail()
(iii) he should write df.tail3()
(iv) he should write df.tail()==3

4.Ram wants to display rows 2 to 4 and columns name and score only , he confused how
to write code for same. Help him in writing the code by choosing the correct answer:
(i) df.loc[2:4,['name','score']]
(ii) df.loc[2:4,'name':'score']
(iii)df.loc[2:4,'name','score']
(iv)df[2:4,['name','score']]
5. Read the passage given below and answer the following questions. Applicati
TSS school celebrated volunteering week where each section of class XI dedicated a day on
for collecting amount for charity being supported by school. Section A volunteered on
Monday, B on Tuesday, C on Wednesday and so on. There are six sections in class XI.
Amount collected by section A to F are 8000,12000,9800,11200,15500,7300
1)Create a bar chart showing collection amount
2)Plot the collected amount vs days using a bar chart
3)Plot the collected amount vs sections using a bar chart
6. Knowled
ge
(i) Which statement should be written in statement 1to import the appropriate module :
(a) Matplotlib.pyplot
(b) matplotlib.pyplot
(c) pyplot
(d) matplotlib

(ii) Which statement should come in statement 2 for appropriate label which appears in
the legend ?
(a) Sin(x)

(b) Cos(x)

(c) ‘sin(x)’

(d) None of these

(iii) Which statement should come in statement 3 to display the legend ?


(a) Legend( )
(b) legend
(c) legnd( )
(d) legend( )
(iv) Select the appropriate statement for statement 4 for saving the plot.
(a) savefig( )
(b) save_fig()
(c) savefigure( )
(d) None of these.
(v) In legend( ), loc =2 refers to which position ?
(a) upper right most position
(b) upper left most position
(c) lower left most position
(d) lower right most position

7. Understa
nding

(i) Fill up statement 1 with appropriate alias name(used in code):


(a) Np
(b) NP
(c) np
(d) None of these

(ii) Use appropriate statement to create a numpy array to be used in x-axis:


(a) arange(1,6)
(b) range(1,6)
(c) Arange(1,6)
(d) None of these

(iii) Suggest appropriate label as displayed in the label:


(a) Category 2
(b) Category 3
(c) Cat3
(d) Cat2

(iv) Set appropriate statement to display message in the x-axis:


(a) xlabel
(b) xLabel
(c) ylabel
(d) Ylabel

(v) Set appropriate statement to display the graph:


(a) display()
(b) show( )
(c) Show()
(d) Show_graph()

8.
Ms. Ankita wants to plot the below given graph of y=x*2 vs y=x*3 for x in the range 1 to Knowled
ge
10. However, she is facing some problems. Help her by answering a few questions
related to the code written by her.

(i) What color code should be used to assign black color to the plot of y=x*2 in
the line marked as statement 1?
(a) bl (b) c (c) bk (d) k

(ii) What x axis should be chosen for y=x*3 plot in statement 2 so that the bars do
not overlap.
(a) x (b) 0.4 (c) x+0.4 (d) x*0.4
(iii) Fill in the blank in statement 3 to print all the points on the x axis.
(a) xticks (b) xtick (c) xlabel (d) xlabels

(iv) Fill in the blank in statement 4 to display the legends as shown in the plot.
(a) legends (b) displaylegends (c) displaylegend
(d) legend

(v) Fill in the blank in statement 5 to display the plot.


(a) plt.display() (b) plt.show() (c) plt.showplot() (d)
plt.displayplot()

9. Mr. Sharma is working in a game development industry and he was comparing the given
chart on the basis of the rating of the various games available on the play store.

He is trying to write a code to plot the graph. Help Mr. Sharma to fill in the blanks of the
code and get the desired output.
import______________ #Statement 1
Games = [ "Subway Surfer", "Temple Run", "Candy Crush", "Bottle Shot",
"Runner
Best" ]
Rating = [4.2, 4.8, 5.0, 3.8, 4.1]
plt._____(Games, Rating) #Statement 2
plt.xlabel("Games")
plt.________("Rating") #Statement 3
plt.________ #Statement 4
1.Choose the right code from the following for statement 1.
(i) matplotlib as plt
(ii) pyplot as plt
(iii)matplotlib.pyplot as plt
(iv) matplotlib.plt as pyplot

2.Identify the name of the function that should be used in statement 2 to plot the above
graph.
1. line()
2. bar()
3. hist()
4. barh()

3.Choose the correct option for statement 3.


i. title("Rating")
ii. ytitle("Rating")
iii. ylabel("Rating")
iv. yaxis("Rating")

4.Choose the right function/method from the following for the statement 4.

i. display()
ii. print()
iii. bar()
iv. show()

5.In case Mr. Sharma wants to change the above plot to the any other shape, which
statement, should he change.
i. Statement 1
ii. Statement 2
iii. Statement 3
iv. Statement 4
10.
Gaurav has written a Python Code to create a bar plot as given below using the following

data :
import ______ as ______ #Statement 1
City = [ 'Delhi', 'Beijing', 'Washington', 'Tokyo', 'Moscow' ]
Gender = [ 'Male', 'Female' ]
Happiness_Index_Male = [ 60, 40, 70, 65, 85 ] Happiness_Index_Female = [ 30, 60, 70,
55, 75 ]
plt.bar ( [ 0.25, 1.25, 2.25, 3.25, 4.25 ],
Happiness_Index_Male,
color = 'blue',
label = " Male",
width = 0.5 )
plt._____ ( [ 0.75, 1.75, 2.75, 3.75, 4.75 ],
Happiness_Index_Female,
color = 'Green',
width = 0.5,
label = "Female" ) #Statement 2
pos = range ( len ( City ) )
print ( pos )
plt.xticks ( pos, City, fontsize = 10 )
plt.xlabel ( 'City', fontsize = 16 )
plt.ylabel ( 'Happiness_Index', fontsize = 16 )
_______ # Statement 3
_______ # Statement 4
_______ # Statement 5

1.Identify the suitable code to be used in the blank space in line marked as Statement 1.

a. matplotlib as plt
b. numpy as np
c. pandas as pd
d. matplotlib.pyplot as plt
2.What is the name of the function to plot the required bar graph in the line marked as
Statement 2.

a. hist()
b. pie()
c. bar()
d. scatter()

3.Fill in the blank in statement 3 to set Chart Title as “Happiness Index across cities by
gender “and font size as 18.
a. plt.xtitle("Happiness Index across cities by gender",fontsize = 18)
b. plt.title("Happiness Index across cities by gender",fontsize = 18)
c. plt.ytitle("Happiness Index across cities by gender",fontsize = 18)
d. plt.show("Happiness Index across cities by gender",fontsize = 18)

4.Identify the suitable code for line marked as Statement 4 to display the legends as
shown in the plot.

a. plt.showlegend()
b. plt.legend()
c. plt.display()
d. plt.show()

5.Fill in the blank marked in Statement 5 to display the plot.


a. plt.plot()
b. plt.showplot()
c. plt.display()
d. plt.show()
11.
Mr. Sharma is trying to write a code to plot a line graph shown in the given figure. Help
Mr. Sharma to fill in the blanks of the code and get the desired output.
import matplotlib.pyplot as plt # statement 1
x = [ 1, 2, 3 ] # statement 2
y = [ 2, 4, 1 ] # statement 3
plt.plot ( x, y, color = ‘g’ ) # statement 4
______________ # statement 5
______________ # statement 6

# giving a title to my graph


plt.__________('My first graph!') # statement 7

# function to show the plot


_______________ # statement 8

1.Which of the above statement is responsible for plotting the values on canvas.

a) Statement 8
b) Statement 4
c) Statement 1
d) None of the above

2.Statements 5 & 6 are used to give names to x-axis and y-axis as shown in figure.
Which of the following can fill those two gaps?

a) plt.xlabel('x - axis') plt.ylabel('y - axis')


b) plt.xtitle('x - axis') plt.ytitle('y - axis')
c) plt.xlable('x - axis') plt.ylable('x - axis')
d) plt.xlabel('x axis') plt.ylabel('y axis')
3.Raman has executed code with first 7 statements, but no output displayed. Which of the
following statements will display the graph?

a) plt.display()
b) plt.show()
c) matplotlib.pyplot.show()
d) Both b & c

4.The number of markers in the above line chart are

a) zero
b) three
c) Infinite
d) One

5.Which of the following methods will result in displaying 'My first graph!' in the above
graph

a) legend()
b) label()
c) title()
d) Both a & c

ANSWER

CBQ NO Answer
1. 1) 3. matplotlib.pyplot as plt
2) 2. bar()
3) 3. ylabel("Rating”)
4) 2. Width=0.5
5) 2. Statement 2
6) 2. show()
2. 1) 2.matplotlib.pyplot
2) 4.histtype=’step’
3) 3.facecolor=’red’
4) 4.orientation=’horizontal’
5) 3.xlabel()
6) 1.plt.show()
3. 1)3.plt.plot()
2)3.color=’b’
3)3.plt.title()
4)3.pointer =’o’ and marker=’+’
5)1.plt.show()
4. 1) (ii)
2) (i)
3) (i)
4) (i)

5. 1)
import numpy as np
import matplotlib.pyplot as plt
Col=[8000,12000,9800,11200,15500,7300]
X=np.arange(6)
plt.title(“Volunteering Week Collection”)
plt.bar(X, Col, color=’r’,width=0.25)
plt.show()

2)
import numpy as np
import matplotlib.pyplot as plt
Col=[8000,12000,9800,11200,15500,7300]
X=np.arange(6)
plt.title(“Volunteering Week Collection”)
plt.bar(X, Col, color=’olive’,width=0.25)
plt.xticks(X, [‘Mon’,’Tue’,’Wed’,’Thu’,’Fri’,’Sat’])
plt.xlabel(“Days”)
plt.ylabel(“Collection”)
plt.show()

3)
import numpy as np
import matplotlib.pyplot as plt
Col=[8000,12000,9800,11200,15500,7300]
X=np.arange(6)
plt.title(“Volunteering Week Collection”)
plt.bar(X, Col, color=’olive’,width=0.25)
plt.xticks(X, [‘A’,’B’,’C’,’D’,’E’,’F’])
plt.xlabel(“Sections”)
plt.ylabel(“Collection”)
plt.show()

6. (i) B
(ii) C
(iii) B
(iv) A
(v) B

7. (i) c
(ii) a
(iii) d
(iv) a
(v) b

8. (i) C
(ii) C
(iii) A
(iv) D
(v) B

9. 1.(iii)matplotlib.pyplot as plt
2.ii. bar()
3.iii. ylabel("Rating")
4.(iv) show()
5.ii. Statement 2
10. 1.d. matplotlib.pyplot as plt
2.c. bar()
3.b. plt.title("Happiness Index across cities by gender",fontsize = 18)
4.b. plt.legend()
5.d. plt.show()
11. 1.b) Statement 4
2.a) plt.xlabel('x - axis') plt.ylabel('y - axis')
3.d) Both b & c
4.b) three
5.c) title()

Name of the vetter- Soumalik Roy

Name of the KV- KV No2 Ishapore

Region- Kolkata

Mobile No- 9831697957

E-mail ID – soumalikroy@gmail.com
Name of the Chapter- Data Visualization

Question Question Content Learning Objective(if


No Provided)
1. Bars can be recorded in Histogram Knowledge

2. Histograms have gaps between bars while in Analysis


Bar graph bar are adjacent to each other
3. A histogram provides a visual interpretation of Understanding
numerical data by showing the number of data
points that fall within the specified range of
values called bins.
4. A bar graph is a summarization tool for discrete Knowledge
and continuous data.
5. In histograms stepfilled is default value for Application
histtype argument.
6. Matplotlib is a subpackage of pyplot. Knowledge

7. The plots created can only be saved as .pdf


extension.
8. To save a plot created by using pyplot Application
saveplot() command is used.
9. The width of bars in barchart cannot be Analysis
changed once plot is created
10. For creating vertical bar chart barh( ) command Creation and Application
can be used
11. loc is a function of dataframe class KNOWLEDGE

12. head function returns last rows of a dataframe

13. tail function returns top rows of the dataframe.

14. argument passed to head function is by default 5

15. if no argument is passed to tail function it will return last


5 rows of the dataframe
16. consider the python statement :
df.loc[1:5,1:5]
Will give rows 1 to 5(both inclusive ) and similarly columns 1
to 5 (both inclusive)
17. If there is only 4 rows in a dataframe then df.head() will return
error
18. if there is only 4 records in a dataframe then df.tail() will give
all 4 rows.
19. to display column 2 and 3 of a dataframe both the
following commands can be used:
df.loc[:,2:3]
df[[2,3]]

20. loc property takes only labels and not indices

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


(T/F)
22. PyPlot is a sub-library of matplotlib library(T/F) Understanding

23. A bar chart can be plotted using pyplot library’s barh() Understanding
function(T/F)
24. It is impossible to plot multiple series of values in the Understanding
same bar graph.(T/F)
25. A standard marker of representing a non-number data in Understanding
Python libraries is NaN(T/F)
26. Statement import pyplot.matplotlib is a valid statement Understanding
for working on pyplot functions(T/F)
27. The default shape of pie chart cannot be changed from Understanding
oval(T/F)
28. A line chart can be plotted using pyplot library’s line() Understanding
function(T/F)
29. A line chart can be plotted using pyplot library’s plot() Understanding
function(T/F)
30. A bar chart can be plotted using pyplot library’s bar() Understanding
function(T/F)
31. xlabel( ) is used to display message along the x-axis. Knowledge

32. xticks() changes the ticks along y-axis. Application

33. Title appears on the bottom of a graph. Understanding


34. To display legend in a graph, legend( ) is called. Evaluation

35. Legend appears anywhere is a graph as determined by the Understanding


interpreter.
36. Default colour of bar graph is blue. Application

37. ‘k’ represents black colour. Knowledge

38. ‘.- ‘ (dot-dash) is valid line style. Analysis

39. ‘Color’ is the correct name of the parameter. Understanding

40. Default bar width is 0.7 Knowledge

41. A plot is a graphical representation of a data set Knowledge


which is also interchangeably known as a graph or
chart.
42. plt.plot() is used to build a plot, where plt is an alias.

43. plt.display() is used to display the figure, where plt is an


alias.
44. plt.xlabel() and plt.ylabel() are used to set the x and y
label of the plot.
45. plt.show ( ) can be used to display the title of a plot.

46. A histogram is basically used to represent data provided in the


form of groups spread in non-continuous ranges
47. matplotlib.pyplot.hist() function is used to compute and
create histogram of a variable.

48. matplotlib.pyplot.show() is a method used to plot a line graph.

49. A bar graph represents categorical data using


rectangular bars.
50. Marker has different elements i.e., style, color, size etc .

ANSWER

Question No Answer
1. True

2. False

3. True

4. True

5. False

6. False

7. False

8. False

9. False

10. False

11. False

12. False

13. false

14. TRUE

15. True

16. Tue

17. False

18. True

19. True

20. True

21. Answer:- T

22. Answer:- T

23. Answer:- T

24. Answer:- F
25. Answer:- T

26. Answer:- F

27. Answer:- F

28. Answer:- F

29. Answer:- T

30. Answer:- T

31. True

32. False

33. False

34. True

35. True

36. True

37. True

38. False

39. True

40. False

41. TRUE

42. TRUE

43. FALSE

Correct answer:
plt.show()
44. TRUE

45. FALSE

Correct answer :
plt.title()
46. FALSE

Correct answer :
continuous ranges
47. TRUE

48. FALSE
Correct answer : plot()
49. TRUE

50. TRUE

Name of the vetter- Soumalik Roy

Name of the KV- KV No2 Ishapore

Region- Kolkata

Mobile No- 9831697957

E-mail ID – soumalikroy@gmail.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy