python 输入秒数转化成常见的小时,分钟,秒

阅读 163

2022-12-20

time = int(input("请输入秒数:"))
s = round(time/1)
m = round(s/60,2)
h = round(s/3600,2)
print(f"{0}换算后等于{s}秒,等于{m}分钟,等于{h}小时")

利用了format运用

相关推荐

精彩评论(0)

0 0 举报