Program to print area of a triangle in Python

 a=float(input("Enter first side of triangle"))

b=float(input("Enter second side of triangle"))

c=float(input("Enter third side of triangle"))

s=(a+b+c)/2

area=(s*(s-a)*(s-b)*(s-c)) ** 0.5

print("Area of triangle with sides {0},{1},{2} is {3}".format(a,b,c,area))


Comments

Popular posts from this blog

Data Science Matplotlib Library Data Visualization, ASSIGNMENT - 6, GO_STP_8113