Skip to content

Instantly share code, notes, and snippets.

@ShaneRich5
Created September 29, 2018 07:41
Show Gist options
  • Save ShaneRich5/f4be945b06d741162da6a185cf3b9d7a to your computer and use it in GitHub Desktop.
Save ShaneRich5/f4be945b06d741162da6a185cf3b9d7a to your computer and use it in GitHub Desktop.
Fibonnaci Checker
def Fib_Checker(lst):
size = len(lst)
if size == 0:
return False
start = lst[0]
previous, current = 0, 1
while current < start:
current, previous = previous + current, current
for i in range(size):
if current != lst[i]:
return False
current, previous = previous + current, current
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment