time = int(input("Enter a number of seconds:")) hours = 0 mins = 0 seconds = 0 time1 = time while time >= 3600 : time = time - 3600 hours = hours + 1 while time >= 60 : time = time - 60 mins = mins + 1 seconds = time print (time1,"seconds is",hours ,"h", mins,"m", seconds,"s")