Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

cuenta atras segundero python

import time

def countdown(num_of_secs):
    while num_of_secs:
        m, s = divmod(num_of_secs, 60)
        min_sec_format = '{:02d}:{:02d}'.format(m, s)
        print(min_sec_format, end='/r')
        time.sleep(1)
        num_of_secs -= 1
        
    print('Countdown finished.')

inp = input('Input number of seconds to countdown: ')
countdown(inp)
Comment

PREVIOUS NEXT
Code Example
Python :: python tuple index access 
Python :: dict python inpmenttion 
Python :: socialscan 
Python :: typing effect in python 
Python :: cyclic rotation python 
Python :: sqlalchemy validation at db level 
Python :: np sign no 0 
Python :: Best websites to learn Python 
Python :: random pick and remove index pandas 
Python :: ring add new items to the list using the string index 
Python :: localizar la fila y columna de un dato pandas 
Python :: ring Load Syntax Files 
Python :: loop over dict python looking for match in list 
Python :: Python loop aray 
Python :: dateentry python centered 
Python :: get most recurring element in a list python 
Python :: instaed of: output = "Programming" + "is" + "fun -- use join 
Python :: python mayusculas 
Python :: I want to add a new column to the DataFrame containing only the month of the measurement 
Python :: gensim wordvector vocabulary list 
Python :: how to perform a two-way anova with python 
Python :: python how to compress pytorch model 
Python :: mod trong python 
Python :: pip install rejson 
Python :: python token stealer 
Python :: Which function is used to write all the characters? 
Python :: pandas iat 0 
Python :: Univariant Variable Analysis - Multiple Plots 
Python :: To fix this error install pymongo with the srv extra 
Python :: How to add an item from another set or other data structures (lists, dictionaries, and tuples) to a set by using the update() method. 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =