Back to Freecodecamp

Step 2

curriculum/challenges/english/blocks/learn-interfaces-by-building-an-equation-solver/662bd456896f16d9bd03f1a6.md

latest969 B
Original Source

--description--

Within the Equation class, define two new instance methods named solve and analyze.

--hints--

You should define a method named solve within the Equation class.

js
({ test: () => assert(runPython(`_Node(_code).find_class("Equation").has_function("solve")`)) })

Your solve method should take one parameter, self.

js
({ test: () => assert(runPython(`_Node(_code).find_class("Equation").find_function("solve").has_args("self")`)) })

You should define a method named analyze within the Equation class.

js
({ test: () => assert(runPython(`_Node(_code).find_class("Equation").has_function("analyze")`)) })

Your analyze method should take one parameter, self.

js
({ test: () => assert(runPython(`_Node(_code).find_class("Equation").find_function("analyze").has_args("self")`)) })

--seed--

--seed-contents--

py
--fcc-editable-region--
class Equation:
    pass
--fcc-editable-region--