IP ASSIGNMENT (Class XII)
IP ASSIGNMENT (Class XII)
Write a program to print only the Name, Age and Position for all rows.
Q12. Draw the histogram based on the Production of Wheat in different Years
Year:2000,2002,2004,2006,2008,2010,2012,2014,2016,2018
Production':4,6,7,15,24,2,19,5,16,4
Q13. The table shows passenger car fuel rates in miles per gallon for several
years. Make a LINE GRAPH of the data. During which 2-year period did the
fuel rate decrease?
YEAR: 2000 2002 2004 2006
RATE: 21.0 20.7 21.2 21.6
Q17 Write a program to plot a bar chart in python to display the result of a
school for five consecutive years.
(a) Change the colour bars in sequence as red,yellow,green,blue,cyan
(b) Change width of bars in sequence as 0.5,0.6,0.7,0.8,0.9
Years=[2014,2015,2016,2017,2018]
PerResult=[91.0,89.7,84.2,98.9,94.3]
Q18 Write a program to create multiple line charts on common plot where three
data ranges are plotted on the same chart.
The data ranges to be plotted are-
DATA = [[5.,42.,28.,18.],[9.,13.,22.,29.],[8.,32.,26.,40.]]
(i) Display legends as Range1,Range2 and Range3.
(ii) Display label on x and y axes as X and Y respectively.
(iii) Add title as “Multirange line chart”
Q 19.Write a program to create the histogram for (a) to (g). The data is
given below-
Weight measurements for 16 small orders of French Fries (in grams).
78 72 69 81 63 67 65 73
79 74 71 83 71 79 80 69
(a) Create a simple histogram from above data
(b) Create a horizontal histogram from above data\
(c) Create a step type of histogram from above data.
(d) Create a cumulative histogram from above data.
Q20. Write a program to read details such as item, sales made in a dataframe
and then store this data in a csv file.the dataframe is given below:
D={ ‘Fridge’:[12],’Cooker’:[5],’Juicer’:[15],’Iron:[11]