PM SHRI KV NO1 PRATAP NAGAR UDAIPUR
Class XII Session (2025-26)
Informatics Practices (065)
Lab Program List
Sr. Program List (Python Programming) Date
No.
1. Write a Python program to create a Pandas Series as shown below using a
ndarray, where the subject names are the indices and the corresponding
marks are the values in the series.
Mathematics 85
Science 90
English 78
History 88
2. Write a Python Program to create a pandas series as given in Q.1, print all the
elements that are having marks above the 75.
3. Write a Python Program to create a pandas series using a dictionary.
Write a Python program to create the Pandas DataFrame displayed below
using a list of dictionaries.
Course Duration
0 Data Science 12
1 Artificial Intelligence 18
2 Web Development 6
4. Write a Python Program to perform the column addition operation on a
pandas DataFrame given in Q. 3.
5. Write a Python Program to create a Data Frame for quarterly sales where each
row contains the item category, item name, and expenditure. Group the rows
by the category and print the total expenditure per category.
6. Write a Python Program to retrieve the data frame rows using label().
one two
a 30 10
b 50 20
c 70 30
d 80 40
7. Write a Python Program to perform the row addition operation on the data
frame given below.
a b
0 10 20
1 30 40
8. Write a Python Program to create a data frame for employee data given below
and display the use of head and tail functions on it.
Name Department Salary
101 Aman IT 60000
102 Rahul HR 50000
103 Priya IT 70000
104 Neha Finance 55000
105 Rahul IT 60000
9. Analyze, and plot bar charts with title and legend using Matplotlib library for
the following data.
Month Revenue (in Lacs)
January 50
February 65
March 75
April 80
May 95
10. Write a python program to filter out rows based on different criteria such as
duplicate rows.
11. Write a Python Program for importing and exporting data between pandas
data frame and CSV file.
12. Write a python program using Matplotlib library to plot line chart for the
school result data. Analyses the performance of the students on different
parameters, e.g. subject wise or class wise.
13. Write a python program using Matplotlib library to plot histogram using the
values given in Q.12 with bins and customization.
14. Consider the DataFrame df shown below.
Name Department Salary
0 Rohan Sharma IT 75000
1 Meera Kapoor HR 68000
2 Aarav Singh Finance 85000
3 Nisha Singh Marketing 72000
4 Aditya Verma IT 80000
Write Python statements for the following tasks:
I. Print the last three rows of the DataFrame df.
II. Add a new column named "Experience" with values [5, 8, 10, 6, 7].
III. Delete the column "Salary" from the DataFrame.
IV. Rename the column "Department" to "Dept".
V. Display only the "Name" and "Salary" columns from the DataFrame.
15. Create a table EMP with the Empno, EName, DOJ, Job, Dept_no, Salary and Comm as
attributes where the Empno is the primary key.
Insert the following details of employees in the above table EMP.
Empno EName DOJ Job Dept_no Salary Comm
1010 Karan 01/06/80 Director 40 48,000 5000
1023 Divakar 01/03/84 Manager 10 20,000 2000
1038 Divya 01/05/94 Programmer 20 40,000 NULL
1055 Atul 01/09/95 Analyst 20 45,000 1000
1059 Hritik 01/06/97 Programmer 20 40,000 NULL
1062 Akshay 01/08/99 Manager 30 25,000 2000
1064 Ajay 01/10/99 Clerk 10 12,000 NULL
1066 Sanjay 01/02/00 Salesman 30 15,000 1000
Write SQL statements/queries for questions (a) to (e) using the table EMP (Q 15)?
a) To display details of all employees who earn between 10000 and 25000.
b) To display the details of all employees whose name ends with ‘y’.
c) To display details of all employees according to ascending order of their
department and Salary.
d) To display the min, max, sum, and average of the salary in the table EMP.
e) To display the number of employees in each department using group by clause.
16. Create a table furniture with the no, item_name, item_type, stock_date, price, and
discount as attributes where the no is the primary key.
Insert the following details of employees in the above created table furniture.
no item_name item_type stock_date price discount
101 WhiteLotus DoubleBed 2002-02-23 3000 25
102 Pinkfeathers BabyCot 2002-01-29 7000 20
103 Dolphin BabyCot 2002-02-19 9500 20
104 Decent OfficeTable 2002-02-01 25000 30
105 Comfortzone DoubleBed 2002-02-12 25000 30
106 Donald Babycot 2002-02-24 6500 15
Write SQL statements/queries for questions (a) to (e) using the table furniture?
a) To list the details of furniture whose price is more than 10000
b) To list the Item name and Price whose discount is between 10 and 20.
c) To list item name, type and price of all items whose names starts with ‘D’
17. Write SQL statements/queries for questions (a) to (e) related to text, mathematical
and date & time functions?
a) To display the result of 83 using power() function.
b) To display the value of pi (3.14159) using round() function upto 2 places after
decimal.
c) To convert the word India into INDIA using upper()/UCASE() function.
d) To display the current date and time of the computer system.
e) To display the month part from date.
18. Raghav, who works as a database designer, has created a table Student as shown
below:
Table : Student
StudentID Name City Marks AdmissionDate
101 Aarav Sharma Delhi 85 2022-04-01
102 Priya Iyer Mumbai 78 2021-05-15
103 Rohan Verma Bangalore 92 2020-06-10
104 Simran Patel Delhi 88 2022-03-20
105 Karan Yadav Mumbai 75 2021-08-05
Write suitable SQL query for the following.
a) Show the Name and City of the students, both in uppercase, sorted alphabetically
by Name.
b) Display the Student ID along with the name of the month in which the student
was admitted to the school.
c) Calculate and display the average marks obtained by students.
d) Show the names of the cities and the number of students residing in the city.
19. Consider the following tables:
Table 1: STUDENT
StudentID Name Class
1 Ankit 12
2 Priya 11
3 Rohan 12
4 Shreya 11
5 Rehan 12
Table 2: MARKS
StudentID Subject Score
1 Mathematics 85
2 Physics 78
3 Chemistry 88
4 Biology 81
6 Computer Science 93
Write appropriate SQL queries for the following:
a) List the names of students enrolled in Class 12, sorted in ascending order.
b) Display name of all subjects in uppercase where students scored more than 80
marks.
c) Display the names of students along with their subject and Score.
20.
21.
22.