def approximation_of_golden_ratio(eps): first_k = 1 while True: next_k = 1 + 1/first_k if eps > (next_k - first_k): break