#program for finding area of triangle height = int(input("Enter the height of the triangle")) base=int(input("Enter the base of the triangle")) Area = height*base/2 print("Area is: ", (Area)) ...................................................... output: Enter the height of the triangle Enter the base of the triangle Area is: ------------------------------------------------------
Here is what the above code is Doing:
1. It is taking input from the user for the height and base of the triangle.
2. It is calculating the area of the triangle using the formula: Area = height*base/2
3. It is printing the area of the triangle.