Closed
Description
from time import sleep
class Workout:
def init(self, exercise,time):#time with seconds
self.exercise = exercise
self.time = time
def counting_time(self):#time with secons
for i in range (self.time, 0, -1):
sleep(1)
print(i)
sleep(1)
print(f"{self.exercise} has been finished succesfully in {self.time} seconds")
workout1=Workout("Running", int(input("Enter the time that you want to exercise > ")))
workout1.counting_time(self.time)
Metadata
Metadata
Assignees
Labels
No labels