I coded a Python solution for Problem #14 on the Project Euler website. I was
very surprised to find that it took 107 sec. to run even though it's a pretty
simple program. I also coded an equivalent solution for the problem in the old
MSDOS basic. (That's the 16 bit app of 1980s vintage.) It r
On Monday, February 18, 2013 2:58:57 PM UTC-7, Chris Angelico wrote:
> On Tue, Feb 19, 2013 at 8:56 AM, Chris Angelico wrote:
>
> > On Tue, Feb 19, 2013 at 8:55 AM, Chris Angelico wrote:
>
> >> How long did your BASIC version take, and how long did the Python
>
> >> version on the same hardwar
>
> > max=0
>
>
>
> "max" is a bad name -- it masks the built-in max() function
>
>
>
> > m=0
>
> > while m<=100:
>
> > m+=1
>
>
>
> Since "m" is only modified here and has a value of 1 for the first
>
> pass through, you can replace those three lines with
>
>
>