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
Post a Comment