;

Python Program to Find the Area of a Triangle Using Base and Height


Tutorialsrack 12/05/2020 Python

In this python program, we will learn how to find the area of a triangle using base and height.

Formula

Here is the source code of the program to find the area of a triangle using base and height.

Python Program to Find the Area of a Triangle Using Base and Height
# Python Program to Find the Area of a Triangle using base and height

# Area = base*height/2

# Take the input from the user
base = float(input("Enter the Base of a Triangle: "))
height = float(input("Enter the Height of a Triangle: "))

# calculate the area
area = (base * height) / 2

# Print the Output
print("\nThe Area of a Triangle using", base, "and", height, " = ", area)
Output

Enter the Base of a Triangle: 52

Enter the Height of a Triangle: 32

 

The Area of a Triangle using 52.0 and 32.0  =  832.0


Related Posts



Comments

Recent Posts
Tags