Grade 12 IP - Practical File Questions 2024-2025
Grade 12 IP - Practical File Questions 2024-2025
1 Write a program to create a pandas series from a dictionary of values and a ndarray
3 Three series objects stores the marks of 10 students in three terms. Roll numbers of
students form the index of these Series objects. The three series objects have the same
indexes.
Write a Python Program to calculate the final marks obtained by students as per following
formula :
4 Write a program to create a Series named S1 and display its type. Change the Series into a
list and display its type. Also display the elements of the Series which are above 20.
8 Create a dataframe for examination result and display row labels, column labels, data types
of each column and the dimensions
9 Write a program to create a Dataframe quarterly sales where each row contains the item
category, item name, and expenditure. Do the following tasks in the dataframe:
a) Display the itemname and expenditure columns
b) Display the rows where expenditure is more than 2500
10 Write a program to create a dataframe ‘data’ with the following details:
12 Write a program to import and export data between Pandas and CSV file.
13 Write a Program to create a dataframe emp to hold empno, empname and salary details
of 5 employees and perform the following tasks:
(a) Add a column ‘Bonus’ which is calculated as 5% of salary.
(b) Add a column ‘Dept’ between empname and salary columns and populate it with
appropriate values.
(c) Remove the column ‘Bonus’.
14 Write a program to create dataframe ‘stock’ with the following data:
Sample DataFrame:
exam_data = {'name': ['Anastasia', 'Dima', 'Katherine', 'James', 'Emily', 'Michael',
'Matthew', 'Laura', 'Kevin', 'Jonas'],
'score': [12.5, 9, 16.5, np.nan, 9, 20, 14.5, np.nan, 8, 19],
'attempts': [1, 3, 2, 3, 2, 3, 1, 1, 2, 1],
'qualify': ['yes', 'no', 'yes', 'no', 'no', 'yes', 'yes', 'no', 'no', 'yes']}
labels = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
17 Write a program to create a dataframe to store the school result data, analyses the
performance of the students on different parameters, e.g., subject wise or class wise.
18 Given a dataframe df1 as shown below:
(d) Display all the Nonmedical stream students from the table
(e) List the names of those students who are in class 12 sorted by stipend
(j) List the name and stream of students whose name contains letter ‘a’
(l) Display No, Name and Class of students whose score is in the range 60 to 80
(o) List the details of students who are not in the Humanities stream
22 (a) Create table Teacher in database school with the appropriate specification in order to
store the given data
Table: Teacher
ID Name Department Hiredate Category Gender Salary
1 Tanya Nanda Social Studies 1994-03-17 TGT F 25000
2 Saurabh Sharma Art 1990-02-12 PRT M 20000
3 Nandita Arora English 1980-05-16 PGT F 30000
4 James Jacob English 1989-10-16 TGT M 25000
5 Jaspreet Kaur Hindi 1990-08-01 PRT F 22000
6 Disha Sehgal Math 1980-03-17 PRT F 21000
7 Siddharth Kapoor Science 1994-09-02 TGT M 27000
8 Sonali Mukherjee Math 1980-11-17 TGT F 24500
(e) To list names, departments and date of hiring of all teachers in ascending order of date
of hiring
(f) To count the number of teachers in English department
(g) To list the teachers details whose name starts with letter ‘s’
(k) Display the name, department and category of teachers whose salary is less than
23000
(l) Add a new column Bonus to the table and Compute the Bonus as 10% of Salary
(m) Display the name and department of teachers whose name does not contain letter ‘r’
(n) Display the details of teachers in ascending order of Category, then descending order
of Salary
(o) Display the details of teachers whose department is either Art or Science
23 Excellent Consultancy Pvt. Ltd. maintains two tables for all its employees.
Table : Employee
Employee_id First_name Last_name Salary Joining_date Department