Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

IP Practical G12

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

INFORMATICS PRACTICES

Grade 12
Practical List
1. Write a program to create a Series object using (a) Scalar Value (b) List (c) ndarray
2. Write a program to create a Series object using a dictionary that stores the number of students
in each section of class 12 in your school[Sections: A,B,C,D,E,F,G,H Strength:
24,23,20,22,22,24,10,15]
3. Write a program to create a Series object that stores the contribution of each section, as shown
below:

Section Contribution
A 4300
B 6500
C 3900
D 6100

Modify the amount of Section A as 3400 and for section C and D as 5000. Print the modified
Series.
4. Write a program to compare the elements of two Series
Series 1 Series 2
0 2 0 1
1 4 1 3
2 6 2 5
3 8 3 7
4 10 4 9

5. Write a program to create a Series that contains the marks of five students in one subject.
Print all marks that are greater than 75.

6. Create a Series temp that stores temperature of seven days in it. Its index should be Sunday,
Monday,..
Write a program to
a. Display temperature of first 3 days.
b. Display temperature of last 3 days.
c. Display all temperature in reverse order like Saturday, Friday,..
d. Display square of all temperature
7. Write a program to create a dataframe quarterly sales where each row contains the quarterly
sales of TV, Fridge and AC. Show the dataframe after deleting the details of AC.

TV Fridge AC
Qtr1 20000 15000 25000
Qtr2 10000 22000 12000
Qtr3 15000 10000 9000
Qtr4 14500 11000 19000

8. Write a program to create a dataframe to store rollnumber, name and marks of five students.
Print the dataframe, along with the number of rows, columns and total elements in the
dataframe and also its transpose.

Rollnumber Name Marks


101 Karan 82
102 Taran 86
103 Piyush 79
104 Bhupinder 86
105 Simran 94

9. Write a program to create a dataframe which contains Rollnumber, Name, Height, Weight of
5 students. Add a column BMI(Body Mass Index) using appropriate formula.
10. Write a program to create a dataframe AID using the data given below and do the following.
a. Display the books and shoes only
b. Display toys only
c. Display quantity in MP and CG for toys and books.
d. Display quantity of books in AP

Toys Books Shoes


MP 7000 4300 6000
UP 3400 3200 1200
AP 7800 5600 3280
CG 4100 2000 3000

11.Consider two series object Staff and salaries that stores the number of people in various
branches and salaries distributed in these branches respectively. Write a program to create
another Series object that stores average salary per branch and then create a dataframe object
from these Series object. After creating dataframe rename all row labels with Branch name.
12. Write a program to create the dataframe sales containing year wise sale figure for five sales
persons in INR. Use the year as column labels and the sales person names as row labels.

2014 2015 2016 2017


Madhu 1000 2000 4000 2800
Kusum 1500 1800 5000 6000
Kinshuk 2000 2200 7000 7000
Ankit 3000 3000 1000 8000
Shruti 4000 4500 1250 9000

Write script to do the following:


a. Display the row labels of sales
b. Display the column labels of sales
c. Display the last two rows of sales
d. Display the first two rows of sales
13. Wrie a program to create a dataframe Accessories using data as given below and write
program to do the following
a. Increase price of all accesseroies by 10%
b. Rename all indexes to [C001,C002,C003,C004,C005]
c. Delete the data of C003 from the dataframe
d. Delete quantity from the dataframe

Cname Quantity Price


C1 Motherboard 15 1200
C2 Hard Disk 24 5000
C3 Keyboard 10 500
C4 LCD 30 450

14.Write a program to create a dataframe using the following data and store it into a csv file
student.csv without row labels and column labels.

Rollnumber Name Marks


101 Karan 82
102 Taran 85
103 Piyush 79
104 Bhupinder 86
105 Simran 94
15. Write a program to read the contents of the csv file student.csv and display it. Update the
row labels and column labels to be same as that of previous question.
16. Collect and store total medals won by 10 countries in Olympic games and represent it in
form of bar chart with title to compare and analyze data.
17. Techtipow Automobiles is authorized dealer of different bike companies. They record the
entire sale of bike month wise as given below.

Jan Feb Mar Apr May Jun


Honda 23 45 109 87 95 100
Suzuki 45 57 75 60 50 30
TVS 97 80 84 68 80 108
To get a proper analysis of sale performance create multiple line chart on a common plot where
all bike sale are plotted. Display appropriate x and y axis labels, legend and chart title.
18. Given the school result data , analyse the student performance on different parameters,
e.g., subject wise or class wise. Create a dataframe for the above , plot appropriate chart with
title and legend.

Eng Math Phy Chem IT


9 78 89 69 92 90
10 89 91 70 85 98
11 67 95 96 94 90
12 88 78 65 87 80

19. The following seat bookings are the daily records of a month from a cinema hall.

124,124,135,156,128,189,200,176,156,145,138,200,178,189,156,124,142,156,176,180,199,154,
167,198,143,150,144,152,150,143
Construct a histogram for the above data with 10 bins.
20. Write a program to create a dataframe for subject wise average, save it to a CSV file and
then draw a bar chart with a width of each bar as 0.25, specifying different colors for each bars.
Additionally, provide a proper title and axes labels for the bar chart.

Subject Avg Marks


Sub1 Eng 72
Sub2 Phy 85
Sub3 Chem 90
Sub4 Maths 89
Sub5 IP 100
21. To write Queries for the following questions based on the given table

Empid Name Age Gender Dept DOJ Salary City


1 Praveen 25 M Sales 1989-06-08 20000 Chennai
2 Arun 29 M Marketing 1989-09-26 22000 Chennai
3 Usha 27 F Finance 1994-08-09 25000 Bangalore
4 Bala 31 M Sales 1990-03-23 27000 NULL
5 Rani 29 F Marketing 1990-04-23 27000 Mumbai
6 Nisha 26 F NULL 1991-02-24 18000 Bangalore
7 Manoj 32 M Finance 1982-05-06 30000 Goa

a. Create a database EMPS and open it


b. Create the above table Employee with Empid as primary key.
c. Write queries to insert all the rows of the above table.
d. Display all the details of the above table
e. Display the details of employees whose salary is above 15000 and gender is not male.
f. Increase the salary of an employee who is in Chennai and is a male by 10%.
g. Delete details of the employee whose id is 6
h. Display the sum, maximum and minimum of salary of all employees.
i. Display the number of employees who earns more than 20000.
j. Display the names in ascending order of names
k. Display the sum of salary department wise.
l. Display the department names where number of employees are greater than or equal to 2.
m. Display the names in upper case from the above table.
n. Display the names and the length of each name from the above table.
o. Display the names of employees whose year of joining is 1990.

You might also like