Tell us what’s happening:
I am trying to call the spam method of the gameboard object to my code. Right now I have gameboard.spam() but it is not returning as correct and I am confused. Thanks!
These are the instructions:
To call an instance method, you need to use dot notation:
Example Code
instance_name.method_name()
Where instance_name
is the instance or object, and method_name
is the method you want to call.
Call the spam
method of the gameboard
object.
Your code so far
# User Editable Region
class Board:
def spam(self):
print('Spam!')
gameboard.spam()
gameboard = Board()
# 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/132.0.0.0 Safari/537.36
Challenge Information:
Learn Classes and Objects by Building a Sudoku Solver - Step 6