1 | initial version |
There are two issues here. First, n
cannot have a continuous range as the function defined only for integer n
. Second, plugging in a particular value of n
needs be done via functools.partial
. Here is a working example:
import functools
def w(x,n):
if n==1:
return x^x
else:
return x^(w(x,n-1))
plot([functools.partial(w,n=n0) for n0 in (1..10)], (x, 0.01, 0.99))