I'm pretty beginner at coding and have coded a few simple games, but just now i have started to learn classes. I'm not sure what's the difference between
user.walk()
and
Person.walk(user)
Here is the class definition:
class Person():
def __init__(self, age, weight, height, first_name, last_name):
self.age = age
self.weight = weight
self.height = height
self.first_name = first_name
self.last_name = last_name
def walk(self):
print('Walking')
Here i define who is user:
user = Person(13, 50, 170, 'First name', 'Last name')
So if anybody has time to answer this question, please help me understand this.