6 kyu
Even Fibonacci Sum
273 of 3,264krillgar
Description:
Give the summation of all even numbers in a Fibonacci sequence up to, but not including, the number passed to your function. Or, in other words, sum all the even Fibonacci numbers that are lower than the given number n (n is not the nth element of Fibonacci sequence) without including n.
The Fibonacci sequence is a series of numbers where the next value is the addition of the previous two values. The series starts with 0 and 1:
0 1 1 2 3 5 8 13 21...
For example:
Kata.Fibonacci(0) // returns 0
Kata.Fibonacci(33) // returns 10
Kata.Fibonacci(25997544) // returns 19544084
Algorithms
Similar Kata:
Stats:
Created | May 29, 2015 |
Published | May 29, 2015 |
Warriors Trained | 7032 |
Total Skips | 384 |
Total Code Submissions | 13984 |
Total Times Completed | 3264 |
C# Completions | 273 |
JavaScript Completions | 1073 |
Ruby Completions | 116 |
Python Completions | 1201 |
COBOL Completions | 7 |
Haskell Completions | 55 |
Julia Completions | 19 |
C Completions | 169 |
Java Completions | 273 |
SQL Completions | 134 |
C++ Completions | 169 |
Total Stars | 97 |
% of votes with a positive feedback rating | 91% of 510 |
Total "Very Satisfied" Votes | 433 |
Total "Somewhat Satisfied" Votes | 64 |
Total "Not Satisfied" Votes | 13 |
Total Rank Assessments | 34 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |