First time here? Check out the FAQ!
answered 13 years ago
What you wrote works. You were just missing a colon after else.
def a(n): if n==1: return 1 else: return a(n-1)+1/a(n-1)^2