-15

Đếm ngược thời gian

đã đăng vào 22, Tháng 11, 2024, 21:18

import time

my_time = int(input("Enter the time in seconds: "))

for x in range(my_time, 0, -1): seconds = x % 60 minutes = int(x / 60) % 60 hours = int(x / 3600) print(f"{hours:02}:{minutes:02}:{seconds:02}") time.sleep(1)

print("TIME'S UP!")


Bình luận

Hãy đọc nội quy trước khi bình luận.


Không có bình luận tại thời điểm này.