Write a Python Program(with class concepts) to find the area of the triangle using the below formula.
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
Function to take the length of the sides of triangle from user should be defined in the parent class and function to calculate the area should be defined in subclass.
in the image the code that i have tried. but getting error. please help.``
`
class poly:
def _init_(self,a,b,c):
self.a = float(a)
self.b = float(b)
self.c = float(c)
a= input("a=")
b= input("b=")
c= input("c=")
class triangle(poly):
def get_area(self):
s = (a + b + c) / 2
return (s*(s-a)*(s-b)*(s-c)) ** 0.5
t = triangle(a,b,c)
print("area : {}".format(t.area()))
`