def fibonacci_loop(n):
  """Calculate the nth Fibonacci number using a loop"""
  nn = n - 2 #Already done 1st and second vals
  fib = [1, 1]
  while nn > 0:
    tmp = fib[0]
    fib[0] = fib[1]
    fib[1] +=tmp
    nn -= 1
  #If even, return the first val, else, the second
  return fib[n%2]