Python | Program to Find Area of Right Angle Triangle

Mathematically, area of triangle is defined as Region occupied by three lines which are connected with each other consequently. Specifically for a right angled triangle area can be defined as (base * height)/2. Let’s configure this mathematical formula as Python Code for finding the area of a Right Angled Triangle.

Python Algorithmic Steps For Finding Area of Right Angled Triangle

  1. Ask user or manually configure base, height of Right Angled Triangle.
  2. Make a Python Expression multiplying base, height and 0.5 while will return Area of Right Angled Triangle

Python Code – Area of Right Angled Triangle

# Python Code for Finding Area of Right Angled Triangle

base = float(input('Enter base of triangle => '))  
height = float(input('Enter height of triangle => ')) 

# calculate the area  
area_of_triangle = (base * height) * 0.5

print('The area of the triangle is =>', area_of_triangle)

Output of Above Code

Enter base of triangle => 3
Enter height of triangle => 4
The area of the triangle is => 6.0
Comments to: Python | Program to Find Area of Right Angle Triangle

Your email address will not be published.