advice on this little script

James Stroud jstroud at ucla.edu
Wed Mar 8 23:56:43 EST 2006


John Salerno wrote:
> Grant Edwards wrote:
> 
>> On 2006-03-09, John Salerno <johnjsal at NOSPAMgmail.com> wrote:
>>
>>> from time import sleep
>>>
>>> minutes = input('Enter the number of minutes to wait: ')
>>>
>>> for x in range(minutes):
>>>     sleep(1.0)
>>>     minutes -= 1
>>>     print minutes, 'minutes remaining.'
>>
>>
>> for x in range(minutes,0,-1):
>>     sleep(60.0)
>>     print minutes, 'minutes remaining'
>>
> 
> I might be doing something wrong, but this just keeps printing out '10 
> minutes remaining' each time.

print x, 'minutes remaining'



-- 
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/



More information about the Python-list mailing list