Skip to content

Instantly share code, notes, and snippets.

@seisvelas
Created May 12, 2020 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seisvelas/1ccb63f0d05b09fb5c631a6195745615 to your computer and use it in GitHub Desktop.
Save seisvelas/1ccb63f0d05b09fb5c631a6195745615 to your computer and use it in GitHub Desktop.
Solution to rend. with cassid. newsletter
from math import sqrt
def golden(a, b):
a, b = max(a, b), min(a, b)
return a / b == (a + b) / a
print(
golden(1 + sqrt(5), 2)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment