IP
IP
Q1. Write the code to create a DataFrame ‘df’ and answer the questions followed.
Maths Science SST
Amit 100 100 60
Mohan 95 50 57
Sudha 85 90 53
Q2 Write a python program to display a bar chart of the number of students in a school.
a) Sample data: Group I, II, III, IV and strength is 30, 40, 45, 49
b) Title for x axis should be ‘Groups’ and title for y axis should be ‘Number of students’
c) Title of the chart should be ‘Group wise students’.
Q3. Write the commands in SQL for (i) to (vi) and output for (vi) and (vii).
Table: Infant
(i) To list the names of items and their unit price that have unit price less than 1000.
(ii) To display the number of items that have more than 10% as a discount.
(iii) To display item code and unit price in decreasing order of unit price.
(iv) To increase the unit price of each item by 5% of their unit price.
(v) To display the highest unit price of items.
Write the Output of the following SQL queries:
(vi) SELECT MID (Item,1,2) FROM Infant;
(vii) SELECT AVG (UnitPrice) FROM Infant WHERE DATEPURCHASE is ‘2015–09–20’ ;
Informatics Practices (065) Set B
Q1 Write a program in Python Pandas to create the following DataFrame batsman from a
Dictionary:
Name Score1 Score2
1 Sunil 90 80
2 Gaurav 65 45
3 Piyush 70 90
4 Kartik 80 76
Q3 Consider the following table CARDEN. Write SQL commands for the following statements.
Ccode Carname Company Color Capacity Charges