> If you think that people can routinely detect infinite loops, then 
> perhaps you would care to tell me whether this is an infinite loop or not:
> 
> i = 1
> while not is_perfect(i):
>     i += 2
> print "odd perfect number discovered"
> 
> 
> where is_perfect() returns True if the integer argument is perfect, and 
> False otherwise.

Sure it terminates...If you don't run out of RAM to represent the
number "i" in question, there's also this "heat death of the
universe" limit I keep hearing about ;-)

-tkc


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to