On 15/12/15 17:10, Alan Gauld wrote:
>
> import tkinter as tk
>
> def count_down(start,stop):
>display['text'] = str(start)
>if start > stop:
> top.after(1000, lambda : count_down(start-1,stop))
>
> top = tk.Tk()
> display = tk.Button(top,text="Press"
On 15/12/15 14:18, Evan Sommer wrote:
> Hey there Alan!
>
> So I tried some of your modifications, and they seem to be doing some
> pretty interesting things with the program. For some reason, now the
> program runs extremely fast, and doesn't now count down in one second
> intervals. I think this
Hey there Alan!
So I tried some of your modifications, and they seem to be doing some
pretty interesting things with the program. For some reason, now the
program runs extremely fast, and doesn't now count down in one second
intervals. I think this is a result of the root.after command. I still
ge
On 01/12/15 10:16, Alan Gauld wrote:
>>> def count_down():
>>> # start with 4 minutes --> 240 seconds
>>> for t in range(240, 120, -1):
>>> # format as 2 digit integers, fills with zero to the left
>>> # divmod() gives minutes, seconds
>>> sf = "{:01d}:{:02d}".forma
On 30/11/15 19:23, Evan Sommer wrote:
> Hello again Alan!
>
> Do you think you could write a revised code with the modifications that
> you suggested? I tried changing the code with your recommendations and I
> keep getting syntax errors.
My code was just an approximation known as 'pseudo code'
Hello again Alan!
Do you think you could write a revised code with the modifications that
you suggested? I tried changing the code with your recommendations and I
keep getting syntax errors.
If you could do that, I would greatly appreciate it!!
Thank you for all your help!
Evan Sommer
On Tue,
On 24/11/15 19:48, Laura Creighton wrote:
> Welcome Evan.
>
> In a message of Tue, 24 Nov 2015 18:19:22 +, Alan Gauld writes:
>> def update_display()
>>display_period = target_time - time.time()
>>min,sec = divmod(display_period,60)
>>if min < 2: set color to yellow
>>elif: min
Welcome Evan.
In a message of Tue, 24 Nov 2015 18:19:22 +, Alan Gauld writes:
>def update_display()
>display_period = target_time - time.time()
>min,sec = divmod(display_period,60)
>if min < 2: set color to yellow
>elif: min < 1: set color to red
>else: set color to green
>
On 24/11/15 14:01, Evan Sommer wrote:
> goal is for the clock to change from green to yellow at 2 minutes, and
> yellow to red at 1 minute.
> def count_down():
> # start with 4 minutes --> 240 seconds
> for t in range(240, 120, -1):
> # format as 2 digit integers, fills with zer
Hello there!
I am working on a project for an engineering class that I am in at my high
school, and our task has been to create a clock that counts down the time
between periods, so that the students walking the hallways know how much
time they have to get to class. The timer will be displayed on
10 matches
Mail list logo