class HouseLocation():
def __init__(self,street_name,x,y):
self.street_name=street_name
self.x=x
self.y=y
def print_address():
print '{}: {},{}'.format(street_name,x,y)
I assume the code is very simple and explains itself I would assume now my problem is when I try to run it
k=HouseLocation('lol lo', 3,7)
k.print_address()
I get the following error message
Traceback (most recent call last):
File "", line 1, in
k.print_address()
TypeError: print_address() takes no arguments (1 given)
Can someone please explain what I am doing wrong?