Here is my first attempt at this.
I have written this script in R
len <- 50
fibvals <- numeric(len)
fibvals[1] <- 1
fibvals[2] <- 1
for (i in 3:len)
{
if(fibvals[i-1]+fibvals[i-2] > 40000)
{
break
}
else
fibvals[i] <- fibvals[i-1]+fibvals[i-2]
len = len+1
}
fibvals
sum(fibvals[fibvals %% 2 ==0])
As of now I have fixed the length of the Fib series to 50... but m trying to make it dynamic ... shall try in some time
RE: 01. LPTHW (A Good First Program - ex1.py) || Announcement of the winners of the last challenge. || New challenges at the end.