Home >Backend Development >Python Tutorial >Converting Day, Hour, Min, Sec By using Python

Converting Day, Hour, Min, Sec By using Python

Linda Hamilton
Linda HamiltonOriginal
2025-01-01 11:34:11325browse

Converting Day, Hour, Min, Sec By using Python

program on converting into day, hour, min, sec hours

d=int(input("Enter the Day:"))
h=d*24
m=h*60
s=m*60
print(""*50)
print("ttconverting day,hour,min,sec ")
print("
"50)
print(f"tt{d} day = {h} H ")
print(f"tt{h} hour= {m} min ")
print(f"tt{m} min``= {s} sec ")
print("
"*50)

output:

Enter the Day:3


    converting day,hour,min,sec 

                3 day    = 72 H 
                72 hour  = 4320 min 
                4320 min = 259200 sec 

The above is the detailed content of Converting Day, Hour, Min, Sec By using Python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn