<prompt> Write a function to calculate the area of a triangle given the lengths of its sides.  <response>: Sure! Here is a Python function that calculates the area of a triangle given the lengths of its sides using Herons Formula:pythondef triangle_areaa, b, c: calculate the semi-perimeter s a b c 2 calculate the area area ss-as-bs-c 0.5 return area example caseprinttriangle_area3, 4, 5 result should be 6.0Here, a, b, and c are the lengths of the sides of the triangle, and s is the semi-perimeter of the triangle. The area is then calculated using Herons formula, which states that the area of a triangle is the square root of ss-as-bs-c. 