0
Why isnât my code working??? It keeps crashing with this error âarea not definedâ
class Class: def __init__(self, width, height, bool): self.width=width self.height=height self.bool=bool def area(): print("Running") return self.width * self.height def calc(self): if self.bool == True: print("Running") area() else: print("Stopped") @classmethod def sub(cls, length, val): return cls(length, length, val) square = Class.sub(5, True) print(square.calc())
4 Answers
+ 1
Ravilnicki, Thanks. It stopped the error messageđ€©đ„łđđœ
But now it out puts âNoneâđđ Instead of 25