Professional Documents
Culture Documents
2.
Write a Python program that will accept the base and height of a
triangle and compute the area. Use a user de ned function.
3.
Write a Python program to compute the distance between the points
(x1, y1) and (x2, y2). You should know distance formula for this.
4.
for the following 2 examples, add the data in 2 separate CSV les,
read it using pandas dataframe, draw scatter plots and indicate X
and Y labels on the graph.
#temperature vs icecream sales
temp=[14.2,16.4,11.9,15.2,18.5,22.1,19.4,25.1,23.4,18.1,22.6,1
7.2]
sales =[215,325,185,332,406,522,412,614,544,421,445,408]
# age vs height
age = [3,4,5,6,7,8,9,10,11,12,13,14]
height = [2.3,2.4,2.5,3,3.2,2.9,4,4.5,4.3,3.8,5,5.7]