Created
September 30, 2012 21:02
-
-
Save JSkally/3808441 to your computer and use it in GitHub Desktop.
cuz...gaza
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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