CBSE Class 10CBSE Class 11CBSE Class 12CBSE CLASS 9

Important Class 12 IP Board Practical Paper 2 Solution 2024 | TutorialAICSIP

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!

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:

SNO Batsman Innings Runs SR
1 Virat Kohli 11 765 90.32
2 Rohit Sharma 11 597 125.95
3 Quinton de Kock 10 594 107.03
4 Rachin Ravindra 10 578 106.45
5 Daryl Mitchell 8 418 111.07

Questions:

a) Create a dataframe ‘Cric23’ using dictionary. [2]
b) Display the Batsman name along with runs scored. [1]
c) Add one more column ‘Average’ which contains the value as division of runs and innings. Add this column before SR column and after Runs column.   [1]
d) Change the data for Daryl Mitchell – Innings – 9 , Runs – 552. [1]
e)  Convert the dataframe as ’TOP5.CSV’. [1]
f) Using a dataframe ‘Cric23’ ,plot a labelled bar chart to compare the runs for all batsmen with x axis having Batter name and customize the chart appropriately with labels and legends. [2]

Solution

import pandas as pd
#Answer a
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)

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

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

#Answer d
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:

Gcode Gname Qty Price Company
G1001 Suiting 10 5000 Raymond
G1002 Shirting 15 2200 Vardhman
G1003 Jeans Pant 10 1500 Ruf n Tuf
G1004 Krutas 50 4800 Fabindia
G1005 Choli 30 18000 Arika
G1006 Formal Pant 50 5500 Raymond

Queries:

 a) Create above table garment [1]
 b) Count the unique company from garment. [1]
 c) Display maximum price of garment manufactured by raymond. [1]
 d) Display the average price of Pant. [1]
e) Display the garment number, garment name and company in the descending order of their price. [1]
f) Find the difference between maximum price and minimum price from the table. [1]
g) Display garment in upper case letters and ‘discountedprice’ which is price minus 5 % of price for price in between 2100 to 10000. [1]

Answers:

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');

Answer b
select count(distinct company) from garment;

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

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

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

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

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

Follow this link to download the question paper:

Download IP Paper for Board Practical Exams

Watch this video to understand the solution practically:





Show More
यौगिक किसे कहते हैं? परिभाषा, प्रकार और विशेषताएं | Yogik Kise Kahate Hain Circuit Breaker Kya Hai Ohm ka Niyam Power Factor Kya hai Basic Electrical in Hindi Interview Questions In Hindi