You are on page 1of 1

1.

Write a Python program to print all even numbers from a given


numbers list in the same order and stop the printing if any numbers
that come after 237 in the sequence. Go to the editor

Sample numbers list:
numbers =
[386,462,47,418,907,344,236,375,823,566,597,978,328,
615,953,345,399,162,758,219,918,237,412,566,826,248,86
6,950,626,949,687,217,815,67,104,58,512,24,892,894,767
,553,81,379,843,831,445,742,717,958,743,527]

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]

You might also like