sec=int(input("Enter a number of seconds: ")) hours = 0 minutes = 0 while sec >= 60: sec = sec -60 minutes = minutes + 1 while minutes >= 60: minutes = minutes - 60 hours = hours + 1 print(hours, "hours", minutes, "minutes", sec, "seconds") #long ones take a while #works