Timer || Python
In this we are going to see a basic program of Timer in Python Programming Language.


import time

def countdown(t):
    while t:
        mins, secs = divmod(t, 60)
        print(f"{mins} Minutes {secs} Seconds")
        time.sleep(1)
        t -= 1
    print('Ring Ring!!')


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

#Coded by Saahil

#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post