[Edu-sig] project Euler

kirby urner kirby.urner at gmail.com
Thu Feb 12 22:14:37 CET 2009


> Sum of multiples of three (3-999), plus multiples of five (5-995),
> minus multiples of 15 (15-990). No programming required.
>

Getting this as one line in Python would be a fun challenge though.

>> The second - "Find the sum of all the even-valued terms in the Fibonacci
>> sequence which do not exceed four million."
>
> Sum of every third term in the sequence. Set x=phi^3 and sum 2×(1 + x
> + x^2...) up to floor log 4e6 base x, and round the result. Also no
> programming.

So you're doing that in your head?

I think the word "programming" is misleading in some contexts.

Using Python as a calculator is what Guido mentions in his tutorial.

Python or TI?

XO or TI?

Kirby

>
>> It's fun looking at the previous solutions in all kinds of other languages.
>> Really shows the elegance of Python.
>>
>> It reminds me somewhat of JavaBat.  There was some discussion earlier about
>> doing something similar in Python?
>>
>> - Michel
>>
>> _______________________________________________
>> Edu-sig mailing list
>> Edu-sig at python.org
>> http://mail.python.org/mailman/listinfo/edu-sig
>>
>>
>
>
>
> --
> Silent Thunder (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) is my name
> And Children are my nation.
> The Cosmos is my dwelling place, The Truth my destination.
> http://wiki.sugarlabs.org/go/User:Mokurai (Ed Cherlin)
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>


More information about the Edu-sig mailing list