Skip to content

harshithkumar2/countdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

countdown

easy program in python

import the time module

import time

define the countdown func.

def countdown(t):

while t: 
    mins, secs = divmod(t, 60) 
    timer = '{:02d}:{:02d}'.format(mins, secs) 
    print(timer, end="\r") 
    time.sleep(1) 
    t -= 1
  
print('Fire in the hole!!') 

input time in seconds

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

function call

countdown(int(t))

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published