prime number

Rocco Moretti roccomoretti at hotpop.com
Mon May 30 11:26:12 EDT 2005


lostinpython wrote:
> But needless to say, I'm stumped on this
> problem.  I keep ending up in a never ending loop.

I've been told that the trick with recursion/iteration is to always 
determine what your ending condition is first, and then construct the 
body of the recursion/loop to reach that ending condition eventually. If 
you post the specific code which is giving you problems, people here can 
point out why you're missing the exit.



More information about the Python-list mailing list