Skip to content

Instantly share code, notes, and snippets.

@JSkally
Created September 30, 2012 21:02
Show Gist options
  • Save JSkally/3808441 to your computer and use it in GitHub Desktop.
Save JSkally/3808441 to your computer and use it in GitHub Desktop.
cuz...gaza
def fib_check (l):
StartNumber = l[0]
EndNumber = len (l) +1
def fib (n):
if n < 2:
Return n
return fib (n-2) + fib (n-1)
x = map (fib, range (StartNumber, EndNumber))
print x
if x == l:
print 'True'
else:
q=l [len (l)-1]
y=l [len (l)-2]
z=q/y #using the golden ratio
z="%.1f" % z
if z == '1.6':
return 'true'
else:
return 'false'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment