Apr-01-2019, 11:42 PM
(This post was last modified: Apr-01-2019, 11:56 PM by BillMcEnaney.)
(Apr-01-2019, 07:21 PM)mcgrim Wrote: this is what I came up with but not sure if is right.You need an if statement to make the computer decide when to stop recusing. Where does the value of i come from? Should i be another argument in your recursive function?
For x sub (n)= x sub (n-1) + 10
would it perhaps be
def f(x): return x(i-1) + 10?
(Apr-01-2019, 11:42 PM)BillMcEnaney Wrote:I meant to type "recursing."(Apr-01-2019, 07:21 PM)mcgrim Wrote: this is what I came up with but not sure if is right.You need an if statement to make the computer decide when to stop recusing. Where does the value of i come from? Should i be another argument in your recursive function?
For x sub (n)= x sub (n-1) + 10
would it perhaps be
def f(x): return x(i-1) + 10?