[Tutor] OverflowError in lucky numbers script

Alan Gauld alan.gauld at btinternet.com
Mon Jan 23 23:01:33 CET 2012


On 23/01/12 18:51, Shreesh bhat wrote:

> Since i m new to Python.I dont know all its recipes and tricks inlvolved
> to "charm-the-snake".
> So can i improve the islucky method more than what i mentioned before?

Not by enough to meet your constraints.

Just to be clear this has nothing to do with Python. It doesn't matter 
what programming language you choose there is not a PC on Earth that can 
do what you want using the technique you are using in 16 seconds.

> Can i work around that way in python or should i come up with a new
> algorithm?

You definitely need a fundamentally different algorithm.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list