I'm having a problem turninf1g this code into a recursive function . My main problem is trying to figure out how to check if its greater than f1 in the recursion . Th code works perfectly on its own but i wish to turn it to a recursive function if possible.
def countTerms(n):
f1=1+1+1/math.factorial(n)
m=1
f2=pow((1+1/m),m)
while f2<f1:
m+=1
f2=pow((1+1/m),m)
return round(f2,2)