Worksheet:-2.
2
Student Name:-Roushan kumar UID: 22MCI10205
Branch: MCA Group/ Section: MAM-1/B
Semester: 1st Semester Date of Performance: 04/12/2022
Subject Name: Python Programming Subject Code: 22CAH-635
1. Aim/Overview of the practical:
Task to be done:
Experiment No. 1: Write a python program to generate a simple bar graph using matplotlib.
The graph should be properly labelled.
Experiment No. 2:. Write a python program to generate Pie-chart using matplotlib. The graph
should be properly labelled.
Experiment No. 3: Write a Python program to plot the function y = x2 using the matplotlib
libraries.
1. Code for experiment/practical:
1.
import numpy as np
import [Link] as plt
value1=[Link](['DAA','AGILE','STATISTICS','PYTHON','LINUX'])
value2=[Link]([90,80,70,95,100])
[Link](value1, value2, color ='b',width = 0.5)
[Link]("Subjects")
[Link]("Marks")
[Link]("Result")
[Link]()
2.
from matplotlib import pyplot as plt
import numpy as np
value1=[Link](['DAA','AGILE','STATISTICS','PYTHON','LINUX'])
value2=[Link]([90,80,70,95,100])
[Link](value2, labels = value1)
[Link]()
3.
import [Link] as plt
import numpy as np
x = [Link](-2, 2, 100)
y = x ** 2
[Link](x, y)
[Link]()
2. Result/Output/Writing Summary:
Learning outcomes (What I have learnt):
1. Bar graph
2. Pie chart
3. Plotting Mathematical Expressions in python
Evaluation Grid:
Sr. No. Parameters Marks Obtained Maximum Marks
1. Demonstration and Performance 5
(Pre Lab Quiz)
2. Worksheet 10
3. Post Lab Quiz 5