0% found this document useful (0 votes)
130 views

Grade 12 IP - Practical File Questions 2024-2025

Uploaded by

shilpighosh1000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views

Grade 12 IP - Practical File Questions 2024-2025

Uploaded by

shilpighosh1000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

INFORMATICS PRACTICES – PRACTICAL FILE QUESTIONS

1 Write a program to create a pandas series from a dictionary of values and a ndarray

2 Write a program to multiply and divide two Pandas Series.

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 :

Final marks = 25% term1 + 25% term2 + 50% term3

Store the final marks of students in another Series object.

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.

5 Write a program to change the order of index of a given series.


Original Data Series:
A 1
B 2
C 3
dtype: int64

Data Series after changing the order of index:


B 2
A 1
C 3
dtype: int64
6 Write a program to create and display a DataFrame from a specified dictionary with index
labels.
7 Write a program to get the first 3 rows and last 4 rows of a given DataFrame

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:

Write code to display the following:


a) Display city and favourite_color columns of first, fourth and seventh rows
b) Access value Chennai
c) Find rows where value of age is more than 16
d) Find rows where age is more than 13 and gender is Female
11 Write a Pandas program to count the number of rows and columns of a DataFrame.

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:

Write suitable python statements for the following


i. Add a column called Num_Copies with the following data: [300,290,450,760].
ii. Add a new genre of type ‘Folk Tale' having code as “FT” and 600 number of copies.
iii. Rename the column ‘Code’ to ‘Book_Code’.
15 Write a program to select the 'name' and 'score' columns from the following DataFrame.
Also change the score in row ‘d’ to 14.5

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']

16 A DataFrame 'item' has the following columns : pid,pname, price.

Write python statements for the following:


(a) Add a new column ‘qty’ with values 10,65,45,80
(b) Delete column price
(c) Delete the second row in the Dataframe
(d) Rename column qty to quantity
Data Visualization

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:

Write code to create,


(a) A line chart from the 1990 and 2000 columns of dataframe df1
(b) Create a bar chart plotting the three columns of dataframe df1
19 Create a Dataframe quarterly_sales with columns Salesman, Sales, Quarter and District.
Write a program to draw a histogram based on monthly sales report for all numeric columns
20 Consider the data given below:
App Name App Price in Rs Total Downloads
Angry Bird 75 197000
Teen Titan 120 209000
Marvel Comics 190 414000
ColorMe 245 196000
Fun Run 550 272000
Crazy Taxi 55 311000
Igram Pro 175 213000
WApp Pro 75 455000
Maths Formula 140 278000
Using the above data, plot the following:
(a) A line chart depicting the prices of the apps
(b) A bar chart depicting the downloads of the apps
(c) Compute Estdownload sequence that has each download value divided by 1000.
Now create a bar chart that plots multiple bar for prices as well as Estdownloads
(d) The charts should have proper titles for the charts, axes, legends etc.
Data Management
21 (a) Create a database school. Inside this database, create a table student with the
appropriate specifications for storing the following data.
(b) Populate the table with the following records
Table: Student
No Name Stipend Stream AvgMark Grade Class
1 Karan 400.00 Medical 78.5 B 12B
2 Divakar 450.00 Commerce 89.2 A 11C
3 Divya 300.00 Commerce 68.6 C 12C
4 Arun 350.00 Humanities 73.1 B 12C
5 Sabina 500.00 Nonmedical 90.6 A 11A
6 John 400.00 Medical 75.4 B 12B
7 Robert 250.00 Humanities 64.4 C 11A
8 Rubina 450.00 Nonmedical 88.5 A 12A
9 Vikas 500.00 Nonmedical 92.0 A 12A
10 Mohan 300.00 Commerce 67.5 C 12C
(c) Delete the details of ‘Mohan’. Undo the changes. Save the details permanently.

(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

(f) List all students sorted by AvgMarks in descending order

(g) Display the average stipend of each stream


(h) Display the details of students who scored Avgmarks less than 75 and Grade is B

(i) Display the total stipend spent for class 12

(j) List the name and stream of students whose name contains letter ‘a’

(k) List the details of students whose grade is either A or C

(l) Display No, Name and Class of students whose score is in the range 60 to 80

(m) Display the different streams in the table

(n) Display the number of students in each stream

(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

(b) Insert the given records into the table

(c) Display all information about teachers of PGT category

(d) To list the names of female teachers of Hindi Department

(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’

(h) Display gender wise average salaries

(i) Display total salary of each category

(j) To list the details of teachers who joined in year 1980

(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

E101 Monika Das 100000 2019-01-20 Finance


E102 Mehek Verma 600000 2019-01-15 IT
E103 Manan Pant 890000 2019-02-15 Banking
E104 Shivam Agarwal 200000 2019-02-25 Insurance
E105 Alisha Singh 220000 2019-02-28 Finance
E106 Poonam Sharma 400000 2019-05-10 IT
E107 Anshuman Mishra 123000 2019-06-20 Banking
Table: Reward
Employee_id Date_reward Amount
E101 2019-05-11 1000
E102 2019-02-15 5000
E103 2019-04-22 2000
E106 2019-06-20 8000
Write queries for the following:
a) Display the first name, last name and amount of reward for all employees.
b) Display first name and salary of all the employees whose amount is less than 2000.
c) Display the first name and date of reward of those employees who joined on Monday.
d) Display sum of salary of those employees whose reward amount is greater than 3000.

You might also like