1
Beginner's Corner / Re: [Python] [spoiler] Project Euler Question Two- Critique Please
« on: March 23, 2015, 08:16:58 pm »Well tell you what you should really read about the numbers before coding it out. Bruteforcing isn't a good practice. You should carefully observe the stuff.
I will give you a simple hint with which you can improve your code.
Lets examine the Fibo series :-
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, .....
Do you observe something ?
What we observe is that every third number is even.
Well that's your hint for now.
Ah, I get it.
For loop incrementing the fib sequence by 3 at a time, adding to the tally/total avoiding the need to verify whether it is even or not.
I posted this before receiving your feedback in the first project euler question. I'll look back into it all for a while before doing any more as I clearly have more to learn before I can benefit fully from the exercises.