An open API service indexing awesome lists of open source software.

https://github.com/max-fitzpatrick/eulerpb2


https://github.com/max-fitzpatrick/eulerpb2

project-euler python

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# EULERPB2
ORIGINAL QUESTION (Euler project, problem 2):

"Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms."

This code is a generalized solution to this problem. Instead of using 4000000 as a static max value and instead of only summing even numbers, the program allows you to specify your own maximum value and allows you to choose between summing even/odd/all numbers of the sequence.