반응형
- 코드 작성
import time
print("Timer starting...")
start_time = time.time()
remaining = 10
while remaining > 0:
print("{} seconds remaining".format(int(remaining)))
time.sleep(1)
remaining = 10 - (time.time() - start_time)
print("Time's up!")
반응형