Python Program to Find Area of Triangle using Base and Height

Python Program to Find Area of Triangle using Base and Height

Write Python Program to Find Area of Triangle using Base and Height

# Python Program to Find Area of Triangle using Base and Height

# get the value of height and base of triangle
height = float(input("Enter Height of Triangle :--> "))
base   = float(input("Enter Base of Triangle :--> "))

area   = (height * base)/2.0       # area of triangle formula

print( "Area of triangle having height ", height, " and base ", base, " is :--> ", area)

Output:

Enter Height of Triangle :--> 12
Enter Base of Triangle :--> 15

Area of triangle having height  12.0  and base  15.0  is :-->  90.0