Back to Freecodecamp

Step 4

curriculum/challenges/english/blocks/learn-classes-and-objects-by-building-a-sudoku-solver/6606933d6813a8308c962dd1.md

latest613 B
Original Source

--description--

In order to be an instance method, a method requires a special parameter, named self by convention. This parameter is a reference to the instance of the class and must always be the first parameter.

Add a self parameter to your spam method.

--hints--

Your spam method should have a self parameter.

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

--seed--

--seed-contents--

py
--fcc-editable-region--
class Board:
    def spam():
        pass
    
gameboard = Board()
--fcc-editable-region--