# Important Class 12 IP Board Practical Paper 2 Solution 2024

Class 12 IP Board Practical Paper 2 Solution 2024 gives you a solution for the Informatics Practices Board Practical Exam paper. So let’s begin!

Topics Covered

## Class 12 IP Board Practical Paper 2 Solution 2024

Recently I uploaded Informatics Practices Class 12 Paper 1 Solution for Board Practicals. Here I am going to provide you with another set of question papers and solutions for the same.

In this question paper, the questions will be asked from the following topics:

1. Python Pandas and data transfer between Dataframe and CSV
2. MySQL Queries and functions

So here we go!

## Question 1 – Pyhton Pandas and Data Transfer between DataFrame and CSV

The first question in Class 12 IP Board Practical Paper 2 Solution 2024 is from Python pandas and data transfer between dataframe csv. The question is as follows:

Q – 1 Write Python code for the following:

Questions:

## Solution

``````import pandas as pd
d={'SNO':[1,2,3,4,5],
'Batsman':['Virat Kohli','Rohit Sharma','Quinton de Cock','Rachin Ravindra','Daryl Mitchell'],
'Innings':[11,11,10,10,8],'Runs':[765,597,594,578,4180],
'SR':[90.32,125.95,107.03,106.45,111.07]
}
Cric23=pd.DataFrame(d)
print(Cric23)

print(Cric23.loc[:,['Batsman','Runs']])

Cric23.insert(4,'Average',Cric23.Runs//Cric23.Innings)
print(Cric23)

Cric23.loc[4,['SNO','Batsman','Innings','Runs','SR']]=[5,'Daryl Mitchell',9,552,111.070]
print(Cric23)

#Asnwer e
Cric23.to_csv("TOP5.CSV")

#Asnwer f
import matplotlib.pyplot as pyl
pyl.bar(Cric23.Batsman,Cric23.Runs)
pyl.xlabel("Batsman")
pyl.ylabel("Runs")
pyl.title("Top 5 Worldcup 23")
pyl.show()
``````

## Question 2 – MySQL Queries and Functions

The second question is based on MySQL queries and functions. The question is as follows:

Consider the following Table ‘Garment’ with the records given in it. Write SQL queries for the following:

Queries:

``````Answer a
create table garment
->        (gcode char(5) primary key,
->        gname varchar(30),
->        qty int(2),
->        price int(5),
->        company varchar(30));

insert into garment values
('G1001','Suiting',10,5000,'Raymond'),
('G1002','Suiting',15,2200,'Vardhman'),
('G1003','Jeans Pant',10,1500,'Ruf n Tuf'),
('G1004','Kurtas',50,4800,'Fabindia'),
('G1005','Choli',30,18000,'Arika'),
('G1006','Formal Pant',50,5500,'Raymond');

select count(distinct company) from garment;

select max(price) from garment where company='Raymond';

select avg(price) from garment where gname like '%Pant%';

select gcode, gname, company from garment order by price desc;

select max(price)-min(price) from garment;

select upper(gname),price-price*0.05 as "Dicounted Price" from garment where price betw
een 2100 and 10000;``````