Basic countdown timer

 import time


def countdown_timer():

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

    while seconds > 0:

        print(f"Time remaining: {seconds} seconds")

        time.sleep(1)

        seconds -= 1

    print("Time's up!")


countdown_timer()

Comments

Popular Posts