Find the length of the median of a Triangle if length of sides are given | Python3 implementation to Find the length of the median using sides of the triangle ; Function to return the length of the median using sides of triangle . ; Driver Code ; Function Call ; Print the final answer
import math NEW_LINE def median ( a , b , c ) : NEW_LINE INDENT n = ( 1 / 2 ) * math . sqrt ( 2 * ( b ** 2 ) + 2 * ( c ** 2 ) - a ** 2 ) NEW_LINE return n NEW_LINE DEDENT a = 4 NEW_LINE b = 3 NEW_LINE c = 5 NEW_LINE ans = median ( a , b , c ) NEW_LINE print ( round ( ans , 2 ) ) NEW_LINE