Respuesta :

The code to compute the area of a triangle while given the height and the base is as follows:

def triangleArea(BASE, HEIGHT):

    return 1/2 * BASE * HEIGHT

print(triangleArea(2, 4))

Code explanation:

The code is written in python.

  • The first line of code, we declare a function named triangleArea. The function accept two arguments namely BASE and HEIGHT. The argument accept the users input as the base and height of the triangle.
  • The second line of code returns the computation of the area of the triangle
  • The last line of code, we use the print statement to print the area of the triangle after the user has inputted the parameters required.  

learn more on python code here: https://brainly.com/question/23460180