Jun-19-2018, 07:45 PM
Could some one tell me how to make a timer that counts down? I have no problem making one that counts up, but I am at a loss with trying to figure out how to make one count down. To start I create a list of numbers.
time = [2,0,0,0]This represents 20:00.(I combine all the numbers in to one string and display it as text. I can't figure out how to make it count down. If I were to make it count up I would do this.
time[3] += 1 if time[3] == 10: time[2] += 1 time[3] = 0 if time[2] == 6: time[1] += 1 time[2] = 0 if time[1] == 10: time[0] += 1 time[1] = 0I have this in a loop that runs once every second. Then when time[0] == 6 I just stop the loop. But How would I make a timer that counts down?