write a python programm to convert a given integer(second) to hour,minute, second.

 # write a python programm to convert a given integer(second)

# to hour,minute, second.
sec=int(input("Enter Second"))
hour=sec//3600 # 25300//3600=7hour
second=sec%3600 #25300%3600=100
minute=second//60 # 100//60= 1 minute
second=second%60  # 100%60=40 second
print("H:M:S-",hour,':',minute,':',second)

Comments

Popular posts from this blog

Write a python script to display the current date and time. First create variables to store date and time, then display date and time in proper format (like: 13-8-2022 and 9:00 PM """