Area of a Triangle from the given lengths of medians | Python3 program to calculate area of a triangle from the given lengths of medians ; Function to return the area of triangle using medians ; Driver Code ; Function Call ; Print the final answer
import math NEW_LINE def Area_of_Triangle ( a , b , c ) : NEW_LINE INDENT s = ( a + b + c ) // 2 NEW_LINE x = s * ( s - a ) NEW_LINE x = x * ( s - b ) NEW_LINE x = x * ( s - c ) NEW_LINE area = ( 4 / 3 ) * math . sqrt ( x ) NEW_LINE return area NEW_LINE DEDENT a = 9 NEW_LINE b = 12 NEW_LINE c = 15 NEW_LINE ans = Area_of_Triangle ( a , b , c ) NEW_LINE print ( round ( ans , 2 ) ) NEW_LINE