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