Practical Examination – XII Informatics Practices 2024-25 Set – 1
Q2. Write the python code for the following (7 Marks)
a) Create [Link] file with 5 records. This file should have the following columns
Columns
Cust_Id
Cust_Name
Address
Tot_Purchase2024
b) Read the data into a dataframe.
c) Add a column Tot_Purchase2025 to the data frame cust.
d) Create a Line chart to show the values of column Tot_Purchase2024.
e) Give appropriate title and label to x axis and y axis.
import pandas as pd
import [Link] as plt
cust=pd.read_csv('[Link]')
print(cust)
[Link](cust['Tot_Purchase2024'])
cust['Tot_purchase2025']=[300,400,500,600,700]
[Link]('Y axis')
[Link]('Tot purchase 2024')
[Link]('Customer graph')
[Link]()
Q2. Write the python code for the following (7 Marks)
a) Create a [Link] file with a minimum of 5 records. The customer file should have the
following columns
Columns
Cust_Id
Cust_Name
Address
Tot_Purchase2024
b) Read the data into a dataframe.
c) Add a column Tot_Purchase2025 to the data frame cust.
d) Create a Line chart to show the values of column Tot_Purchase2025.
e) Give appropriate title and label to x axis and y axis.
import pandas as pd
import [Link] as plt
cust=pd.read_csv('[Link]')
print(cust)
[Link](cust['Tot_Purchase2024'])
cust['Tot_purchase2025']=[300,400,500,600,700]
[Link]('Y axis')
[Link]('Tot purchase 2025')
[Link]('Customer graph')
[Link]()
Practical Examination – XII Informatics Practices 2024-25 Set – 3
Q.2 Write the python code for the following (7 Marks)
a) Create a [Link] file with a minimum of 5 records. The file should have the following columns
Columns
Year
Percentage
b) Read the data into a dataframe.
c) Add a column class to the dataframe .
d) Create a bar chart in python to display the result of a school for five consecutive years.
e) Give appropriate title and label to x axis and y axis.
import pandas as pd
import [Link] as plt
df=pd.read_csv('[Link]')
df['class']=[8,9,10,11,12]
print(df)
x=[2021,2022,2023,2024,2025]
[Link](x,df['Percentage'])
[Link]('Percentage')
[Link]('Year')
[Link]('Result graph')
[Link]()
Year Percentage class
0 2021 89 8
1 2022 92 9
2 2023 70 10
3 2024 90 11
4 2025 65 12
Practical Examination – XII Informatics Practices 2024-25 Set – 4
Q.2 Write the python code for the following (7 Marks)
a) Create a [Link] file with a minimum of 5 records. The file should have the following
columns
Columns
Name
Runs_scored
b) Read the data into a dataframe.
c) Add a column age to the data frame .
d) Create a bar chart in python to display the runs scored by five different cricketers.
e) Give appropriate title and label to x axis and y axis.
import pandas as pd
import [Link] as plt
df=pd.read_csv('[Link]')
df['age']=[45,40,39,38,32]
print(df)
[Link](df['Name'],df['Runs_scored'])
[Link]('Runs')
[Link]('Name')
[Link]('Cricket graph')
[Link]()
Name Runs_scored age
0 Dhoni 100 45
1 Virat 90 40
2 Jadeja 80 39
3 Rohit 70 38
4 Shreyas 77 32