Write a Python program that accepts the base and height of the triangle as inputs and compute the area.

Python Data Types in Python (Article) Data Types in Python (Program)

120

Program:

base = int(input("Input the value  of the base :")) #Enter the base of the triangle
height = int(input("Input the value of the height :")) #Enter the height of the triangle
area = base*height/2 # Formula for computing the area
print("The  area  of  the  triangle  is =", area) #Display the area of the triangle

Output:

Input the value  of the base :12
Input the value of the height :15
The  area  of  the  triangle  is = 90.0

Explanation:

no

This Particular section is dedicated to Programs only. If you want learn more about Python. Then you can visit below links to get more depth on this subject.