1# import the time module
2import time
3
4# define the countdown func.
5def countdown(t):
6
7 while t:
8 mins, secs = divmod(t, 60)
9 timer = '{:02d}:{:02d}'.format(mins, secs)
10 print(timer, end="\r")
11 time.sleep(1)
12 t -= 1
13
14 print('Fire in the hole!!')
15
16
17# put time in seconds here
18t = 10
19
20# function call
21countdown(int(t))
22