Write a Python program that will accept the base and height of a triangle and compute the area

code:-
base = int(input("Input the base : "))
height = int(input("Input the height : "))
 
area = base*height/2
 
print("area = ", area)
output 1:-

Input the base : 12
Input the height : 12
area =  72.0

output 2:-

Input the base : 12
Input the height : 30
area =  180.0

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post