class calculator:
    def __init__(self):
        self.result = 0

    def add(self, num):
        self.result += num
        return self.result

cal1 = calculator()
cal2 = calculator()

print(cal1.add(3))
print(cal1.add(4))
print(cal2.add(3))
print(cal2.add(7))

Embed on website

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