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

Converting Day, Hour, Min, Sec By using Python

Linda Hamilton
Release: 2025-01-01 11:34:11
Original
275 people have browsed it

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 
Copy after login

                3 day    = 72 H 
                72 hour  = 4320 min 
                4320 min = 259200 sec 
Copy after login

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!

source:dev.to
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template