MODERN SCHOOL
SUBJECT: INFORMATICS PRACTICES
CLASS: XII
ASSIGNMENT-III
TOPIC: DATA VISUALISATION
MCQ
1. Which of the following library in Python is used for plotting graphs and visualization?
a. Pandas b. NumPy c. Matplotlib d. None of the above
2. Covid-19 Patient analysis in the Mumbai region is to be plotted. The command used to give title to
x-axis as “ No. of Patients” in the graph is ..............
a. plt. show () b. plt.plot("No. of Patients")
c. plt. xlabel("No. of Patients") d. plt. title ("No. of Patients")
3. The _____ is bounding box with ticks and labels.
a) Axes b) plot c) title d) xlabels
4. The _____ can be plotted vertically or horizontally.
a) bar chart b) module c) bar chart d) pyplot
5. Histograms are used to show a/an ____________.
a) Distribution b) standard convention c) data representation d) None of these
6. A bar graph uses bars to compare data among ________.
a) Different categories. b) Categories c) data distribution d) All of these
7. By default plot () function plots a __________
a) Histogram b) Bar graph c)Line chart d)Pie chart
8. Which of the following function is used to save the figure?
a) save () b) savefigure () c) savefig () d)None of the above
9. A __________ plot is a graph that shows the frequency of data along a number line.
a) line b) box c) histogram d) bar graph
10. Which attribute of plot () function is used to set the edge color of bar in bar chart?
a) Bordercolor b)color of edge c) edgecolor d) none of the above
QUESTION
Q1. How data visualization can help in decision making?
Q2. Write a Python programming to display a bar chart on the popularity of Programming Languages.
Sample data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
Q3.Plot following data on bar graph:
English: 56,78,90,34
Science: 65,77,54,32
Maths: 45,67,43,41
Q4. Consider the following graph. Write the code to plot it.
Q5. Draw the following bar graph representing the number of students in each class.
Q6. What will be the output of the following code?
import matplotlib. pyplot as p
x= [6, 7, 8, 9, 10]
y= [60, 40, 55, 30, 70]
p. title ('Secondary Class Strength')
p. xlabel('Class')
p. ylabel ('No. of students')
p.bar (x, y)
p. show ()
Q7.Write a program to draw line charts for the following with suitable label in the X-axis, Y-axis and a title.
Show the Unemployment_Rate from1930 to 2020
Year = [1930, 1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010, 2020]
Unemployment_Rate = [9.8, 12, 8, 7.2, 6.9, 7, 6.5, 6.2, 5.5, 9.3]
Q8. Consider the following graph; write the python code to plot it.
Q9. Write python code to draw the following bar chart to represent temperature in different cities
Q10. What will be the output of the following code?
a) import matplotlib. pyplot as p b) import matplotlib. pyplot as p
x= [6,7,8,9,10] city=["Delhi", "Mumbai", "Bengaluru", "Kolkata"]
y= [60,40,55,30,70] accident=[60,40,55,30]
p. plot (x, y, linestyle=” dashed”) p.bar (city, accident, color="orange", edgecolor="black")
p. title ('Secondary Class Strength') p. title ('Accident Tally of 4 Metropolitan cities')
p. xlabel('Class') p. xlabel('City')
p. ylabel ('No. of students') p. ylabel('Accidents')
p. show () p. show ()