0
点赞
收藏
分享

微信扫一扫

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

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 条评论