First time here? Check out the FAQ!
answered 2012-03-20 12:59:45 +0100
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