def fib(n): # This is the fib.py code from week 1 which feeds into fibname.py code
  """This function returns the nth Fibonacci number."""
  i = 0 # set inital value of i to 0
  j = 1 # set inital value of j to 1
  n = n - 1 # whatever value is inputed for n, take 1 away from the value of n and set this value as the new value of n

  while n >= 0: # while n is greater of less than 0 do the following...
    i, j = j, i + j # i becomes the previous j value for the next iteration of code, and j becomes the prvious i value plus the previous j value
    n = n - 1 # take 1 away from n and set n as this new value
  
  return i