Your Favorite and Mine, Fibonacci!

Difficulty:
Easy

Tags:
arithmetic

Instructions:
Write a method that handles Fibonacci sequences. Have it return the nth item in the Fibonacci sequence. Hint: The first item in the sequence is 0.

Code:
def fibo_finder(n)
  ___
end

assert_equal 0, fibo_finder(0)
assert_equal 1, fibo_finder(1)
assert_equal 3, fibo_finder(4)
assert_equal 13, fibo_finder(7)
assert_equal 55, fibo_finder(10)

Your Solution

Ruby 1.9.3

Back to Problems