请问你能把多少秒转换成小时、分钟和秒呢?
- 内容介绍
- 文章标签
- 相关推荐
本文共计88个文字,预计阅读时间需要1分钟。
pythontime=int(input(请输入秒数:))s=round(time / 1)m=round(s / 60, 2)h=round(s / 3600, 2)print(f换算后等于{h}小时,{m}分钟,{s}秒)
time = int(input("请输入秒数:"))s = round(time/1)m = round(s/60,2)h = round(s/3600,2)print(f"{0}换算后等于{s}秒,等于{m}分钟,等于{h}小时")利用了format运用
本文共计88个文字,预计阅读时间需要1分钟。
pythontime=int(input(请输入秒数:))s=round(time / 1)m=round(s / 60, 2)h=round(s / 3600, 2)print(f换算后等于{h}小时,{m}分钟,{s}秒)
time = int(input("请输入秒数:"))s = round(time/1)m = round(s/60,2)h = round(s/3600,2)print(f"{0}换算后等于{s}秒,等于{m}分钟,等于{h}小时")利用了format运用

