Tell us what’s happening:
What is wrong in the code? I think the lesson is bugged
Your code so far
from abc import ABC, abstractmethod
class Equation(ABC):
degree: int
def __init__(self):
pass
# User Editable Region
def __init_subclass__(cls):
if not hasattr(cls, "degree"):
raise AttributeError (f"Cannot create '{cls.__name__}' class: missing required attribute 'degree'")
@abstractmethod
def solve(self):
pass
@abstractmethod
def analyze(self):
pass
class LinearEquation(Equation):
# User Editable Region
def solve(self):
pass
def analyze(self):
pass
lin_eq = LinearEquation()
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Challenge Information:
Learn Interfaces by Building an Equation Solver - Step 11