Hey I'm new to this python thing. Have few days to learn all about classes but at the beginning I have problem. I got this kind of error TypeError: __init__() missing 1 required positional argument: 'nazwa'. Can you help me with solution? I want to print out calculation for my object.
class Figura(object):
def __init__(self,nazwa):
self.nazwa = nazwa
def calculate(self):
print(self.nazwa)
class Kolo(Figura):
def __init__(self,nazwa,promien):
Figura.__init__(self)
self.promien = promien
def calculate(self):
Figura.calculate(self)
print(2 * 3.1415 * promien)
kolo1 = Kolo('kolo',4)
kolo1.calculate()