# take inputs
      base = float(input('Enter the base of the triangle: '))
      height = float(input('Enter the height of the triangle: '))
      # calculate area of triangle
      area = (1/2) * base * height
      # display result
      print('Area of triangle = ',area)
      
      Python language logo

      AreaTriangle

      basicMaths
      beginner

      calculating the area of triangle

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.