class poly:
def __init__(self,a,b,c):
self.a = float(a)
self.b = float(b)
self.c = float(c)
a= int(input("a="))
b= int(input("b="))
c= int(input("c="))
class triangle(poly):
def __init__(self,a,b,c):
super().__init__(a,b,c)
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.get_area()))
I found a lot of mistakes. There are two underscores (_), not one, in the first __init__. Python 3's input function returns a string, so you must typecast it to an int before performing any arithmetic operations to avoid receiving a TypeError. Third, you failed to invoke the init method to make a superclass reference. Finally, you wrote get area rather than area in the function.