Tuesday 2 September 2008

First Project Euler problem solved!

Well, the first problem was easy enough, at least after I managed to get my for loop working.

This is the python script I ended up with:

x=0
for i in range(1, 1000):
    if i % 3 == 0 or i % 5 == 0:
    x=x+i
print x


If you found this little bit of code helpful, then please consider donating so that I can continue coding.

You can donate here

No comments: