@@ -0,0 +1,903 @@
+def evenFibonacciNumbers():%0A    fib=1%0A    fib2=2%0A    temp=0%0A    sum=0%0A%0A    while temp%3C4000000:%0A        temp =fib2%0A%0A        if temp %252 == 0:%0A            sum =sum+temp%0A%0A        temp= fib+fib2%0A        fib=fib2%0A        fib2=temp%0A%0A    return sum%0A%0Aprint(%22%5CnIf we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9.%5Cn%22%0A      %22The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.%5Cn%22)%0A%0Aprint(sum(x for x in range(1, 1000) if x%253==0 or x%255==0))%0A%0Aprint(%22%5CnEach new term in the Fibonacci sequence is generated by adding the previous two terms.%22%0A      %22%5CnBy starting with 1 and 2, the first 10 terms will be:%22%0A      %22%5Cn1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...%22%0A      %22%5CnBy considering the terms in the Fibonacci sequence whose values do not exceed four million,%22%0A      %22%5Cnfind the sum of the even-valued terms.%22)%0A%0Aprint(evenFibonacciNumbers())

Add existing file