#在控制台中錄入總秒數,計算幾小時零幾分鍾零幾秒
程序:
total_second = int(input("請輸入總秒數:"))
hour = total_second // 3600
minute = total_second // 60 % 60
second = total_second % 60
print("result:" + str(hour) + "小時" + str(minute) + "分" + str(second) + "秒")
#在控制台中錄入總秒數,計算幾小時零幾分鍾零幾秒
程序:
total_second = int(input("請輸入總秒數:"))
hour = total_second // 3600
minute = total_second // 60 % 60
second = total_second % 60
print("result:" + str(hour) + "小時" + str(minute) + "分" + str(second) + "秒")
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。