CBSE CS and IP

CBSE Class 11 & 12 Computer Science and Informatics Practices Python Materials, Video Lecture

Data Visualization (4 Marks Questions)

  1. Write a program that will draw the following figure:
    CBSE Board Question Informatics Practices
  2. Create a Horizontal Bar chart for:
    City
    Population
    Delhi
    10000000
    Mumbai
    30000000
    Kolkata
    15000000
    Bangalore
    20000000
    • Display the names of X and Y axis
    • Display Graph Name

  3. Write a python program to create a pie chart for the population of following states:
    State
    Population (in Cr)
    West Bengal
    10
    Maharashtra
    12
    Utter Pradesh
    20
    Madhya Pradesh
    8

    Pie chart should display:
    • Name of each state
    • Percentage in the form (xx.yy%)
    • Pop up the West Bengal state
    • Add legend in the Pie Chart

  4. Solve the below Questions ((a)-> 2 Marks, (b),(c) -> 1 Marks)
    • (a) Draw the plot for the following code:
      x=np.arange(0,50,1)
      plt.plot(x,x)
      plt.show()
      
    • (b) Write the command to add “X-axis”,”Y-axis” to respectively on X and Y axis.
    • (c) Write Command to add name for the Plot.

  5. Write a python program to draw a bar chart with the following information:
    City
    pollution
    Kolkata
    78
    Delhi
    91
    Kanpur
    88
    Patna
    90
    Banglore
    82
    • a) X-axis label should be City and Y-axis label should be Pollution
    • b) The title of the chart should be Pollution Index
    • c) The colour of the bars should be Red
    Use proper import statements in the program.

  6. Write a python program to draw a histogram with following information:
    10 15 10 10 10 15 20 20 20 20 20 25 25
    The histogram should have following information
    • a) X-axis label should be score and Y-axis should be Frequency
    • b) The title should be Frequency of Score
    • c) The colour of histogram should be blue with 10 bins
    Use proper import statements in the program
  7. Write commands to plot the chart as per given instructions:
    • Plot the same line in red color dashed line with line width = 3
    • Mention label on x axis as “x in range -50 to 50”, y axis as “y=x+5” and the title of the plot as “mytitle”.
  8. Consider data frame as shown below.
    Category199520002005
    A52148230
    B66136283
    C78176236
    D94122315
    E104154286
    • Create a histogram using this data frame.
    • A scatter chart from 1995 and 2005 columns of dataframe.

1 comment: