title: My first ruby app - fibonacci sequence
body: <p>I am writing a method that returns the nth element in the Fibonacci sequence, but am running into an unexpected end error.</p>
  
  <pre><code>def fib_seq(n)
  
    a = [0]
  
    n.times do |i|
      if i==0
        a[i] = 0
      else if i==1
        a[i] = 1
      else
        a[i] = a[i-1] + a[i-2]
      end  
    end
  
    return a[n]
  end
  
  puts fib_seq(4)
  </code></pre>
  
  <p>Any tip on what I can be screwing up on?</p>