MCPcopy Index your code
hub / github.com/qiwsir/StarterLearningPython / area_triangle

Function area_triangle

newcodes/answers/q50.py:39–43  ·  view source on GitHub ↗
(sides_lst)

Source from the content-addressed store, hash-verified

37 return "acute"
38
39def area_triangle(sides_lst):
40 x, y, z = sorted_sides(sides_lst)
41 s = (x + y + z)/2
42 a = math.sqrt(s*(s-x)*(s-y)*(s-z))
43 return round(a, 3)
44
45if __name__ == "__main__":
46 triangle_sides = input("please input three sides of triangle, and split them by space:")

Callers 1

q50.pyFile · 0.85

Calls 1

sorted_sidesFunction · 0.85

Tested by

no test coverage detected