Python timer not working in real time -
i writing countdown in python doesn't work.
for countdown in 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, quit(): print (countdown)
that's code. countdown zooms , quits program. there way make countdown comply real time , countdown , quit in 10 seconds. not immediately.
you need tell wait otherwise run code fast processor can it.
from time import sleep countdown in range(10,0,-1): print(countdown) sleep(1)
Comments
Post a Comment