I had originally coded the program wrongly. Instead of returning the Fibonacci numbers between a range (ie. startNumber 1, endNumber 20 should = only those numbers between 1
there is a very easy method to realize that!
you can run this code online freely by using http://www.learnpython.org/
# Set the variable brian on line 3!
def fib(n):
"""This is documentation string for function. It'll be available by fib.__doc__()
Return a list containing the Fibonacci series up to n."""
result = []
a = 0
b = 1
while a < n:
result.append(a) # 0 1 1 2 3 5 8 (13) break
tmp_var = b # 1 1 2 3 5 8 13
b = a + b # 1 2 3 5 8 13 21
a = tmp_var # 1 1 2 3 5 8 13
# print(a)
return result
print(fib(10))
# result should be this: [0, 1, 1, 2, 3, 5, 8]