class StepCounter:
    def __init__(self, name):
        self.name = name
        self.steps = 0

    def walk(self, s):
        self.steps += s

    def get_calories(self):
        return self.steps * 0.04


counter = StepCounter("홍길동")
counter.walk(5000)

calories = counter.get_calories()
print(calories)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: