Learn Interfaces by Building an Equation Solver - Step 7

Tell us what’s happening:

Help me make this error make sense
TypeError: can’t instantiate abstract class Equation with abstract methods analyze, solve and "You should define a method named solve within the LinearEquation

from abc import ABC, abstractmethod


class Equation(ABC):
    @abstractmethod
    def solve(self):
        pass

    @abstractmethod    
    def analyze(self):
        pass
        
class LinearEquation(Equation):
    def solve(self):
        pass

eq = Equation()
lin_eq = LinearEquation()

Your code so far


# User Editable Region

from abc import ABC, abstractmethod


class Equation(ABC):
    @abstractmethod
    def solve(self):
        pass

    @abstractmethod    
    def analyze(self):
        pass
        
class LinearEquation(Equation):
    def solve(self):
        pass

eq = Equation()
lin_eq = LinearEquation()

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Challenge Information:

Learn Interfaces by Building an Equation Solver - Step 7

don’t do this, you can’t instantiate an abstract class

I imagine the instructions didn’t ask for this?

Step 4 required the eq variable assignment. I’m still working on it thanks.

So you have not read this part of the instructions

Therefore, delete the Equation instance to get rid of the error.

Thank you, [{reading is fundamental}]