sec = int(input("Enter a number of seconds: ")) mins = 0 hours = 0 while sec >= 60 : sec = sec - 60 mins = mins + 1 while mins >= 60 : mins = mins - 60 hours = hours + 1 print(hours, "hour", mins, "minute", sec, "seconds")