Informatics Practices > data-handling-and-visualization > Data Visualization
During a practical exam, a student Ankita has to fill in the blanks in a Python program that generates a bar chart. This bar chart represents the number of books read by four students in one month.

Help Ankita to complete the code:

import _____ as plt #Statement-1 students = ['Karan', 'Lina', 'Raj', 'Simran'] books_read = [12, 9, 5, 3] plt.bar( students, _____, label='Books Read') #Statement-2 plt.xlabel('Student Name') plt._____( 'Books Read') #Statement-3 plt.legend() plt.title('_____') #Statement-4 plt.show()
I. Write the suitable code for the import statement in the blank space in the line marked as Statement-1.
II. Refer to the graph shown above and fill in the blank in Statement-2 with suitable Python code.
III. Fill in the blank in Statement-3 with the name of the function to set the label on the y-axis.
IV. Refer the graph shown above and fill the blank in Statement-4 with suitable Chart Title.
Current Session
Community Stats
Track Your Progress
Sign up to save your practice progress and get personalized insights across all topics.