class Timer:
def __init__(self, time):
self.time = time
def discount(self):
while self.time > 0:
self.time -= 1
def __str__(self):
return f"Timer(time={self.time})"
time = Timer(50)
time.discount()
print(time)
To embed this project on your website, copy the following code and paste it into your website's HTML: