# CBSE IP Board Practical Paper 1 Solution 2024

In this article, I am going to discuss CBSE IP Board Practical Paper 1 Solution 2024. CBSE has already released the guidelines for the board practical exam for the current academic year. According to that practical exam will start from 01.01.2023 to 15.02.2023. Let us start!

Topics Covered

## CBSE IP Board Practical Paper 1 Solution 2024

The CBSE IP Board Practical Paper 1 Solution 2024 contains 2 questions. Question 1 is based on Python Pandas and Matplotlib as question 2 is based on MySQL Queries. Here we go!

## Question 1 Python Pandas and Matplotlib

Q:1    Write Python code for the following questions:

a)         Create a dataframe named CWC.   [2]

b)         Display the team having more than 50 wins.    [1]

c)         Add a new row values as(005, New Zealand, 59, 38, 1, 1, 99)       [1]

d)         Add new column ‘Title Won’ with data (6,2,2,1,0)                                                  [1]

e)         Display Total no. of rows in dataframe.                                                                  [1]

f)         Draw a bar chart to visual performances of wins of teams. (Add labels, legend, title)     [2]

## Solution

``````import pandas as pd
d={'ID':['001','002','003','004'],
'Team':['Australia','India','West Indies','England'],
'Win':[78,63,43,52],
'Lost':[25,30,35,39],
'No Result':[1,1,0,1],
'Tie':[1,1,2,1],
'Total':[105,95,80,93]
}
CWC=pd.DataFrame(d)
print(CWC)

print(CWC[CWC.Win>50].loc[:,'Team'])

#CWC.loc[CWC.shape[0],:]=['005',' New Zealand', 59, 38, 1, 1, 99]
CWC.loc[len(CWC),:]=['005',' New Zealand', 59, 38, 1, 1, 99]
#d1={'ID':'005','Team':'New Zealand','Win':59,'Lost':38,'No Result':1,'Tie':1,'Total':99}
#CWC.append(d1,ignore_index=True)
print(CWC)

#CWC['Title Won']=[6,2,2,1,0]
#CWC.loc[:,'Title Won']=[6,2,2,1,0]
CWC.insert(CWC.shape[1],'Title Won',[6,2,2,1,0])
print(CWC)

print(len(CWC))
print(CWC.shape[0])

import matplotlib.pyplot as plt
plt.bar(CWC.Team,CWC.Win)
plt.title("World Cup Summary")
plt.legend(["Win"])
plt.xlabel("Teams")
plt.ylabel("Wins")
plt.show()
``````

## Question 2 MySQL Queries

Q:2     Consider the following Table ‘Patient’ with the records given in it.

a) Create the above given table with appropriate data type and constraints.                                             [1]

b) Count the number of patients belongs to doctor no D201.  [1]

c) Display name of patient paying highest charge. [1]

d) Display pno, name of patient in descending order of date of admission.                                             [1]

e)  Display the last name of patients from pname with date of admission.             [1]

f)  Display the patients details with charges converted to whole number.                                                 [1]

g) Display details of the patient paying minimum charge. [1]

## Solution

create table patient
(pno char(4) primary key,
pname varchar(20) not null,
docno varchar(20),
charges decimal(7,2));

insert into patient values
(‘P001′,’Vimal Jani’,’D201′,’2011-10-11′,20000.00),
(‘P002′,’Isha Roma’,’D506′,’2011-12-12′,50000.00),
(‘P003′,’Vina Verma’,’D201′,’2011-09-13′,15000.00),
(‘P004′,’Rita Sharma’,’D506′,’2011-08-05′,18000.00),
(‘P005′,’Shiv Roy’,’D210′,’2011-08-05′,20000.00);

select count(*) from patient where docno=’D201′;

select pname from patient where charges=(select max(charges) from patient);

select pno,pname from patient order by date_adm desc;