My loop is pretty simple. The function takes in two parameters, a and b; both are integers where a<=b. The function will then create a list of numbers from a to b.
This is what I created:
def cat(a,b):
j = []
for i in range (a,b):
j.append(a+1)
a +=1
I honestly cannot figure out how to turn this into a recursive function.. I have tried things which I realize don't make any sense and I'm not really sure where to start. Any help would really be appreciated :) Thanks
a += 1
statement has no effect at all and you can just delete it. And also, there is noreturn
statement. How about if you first show us a working solution without recursion, so that we can be sure you know what you're asking? $\endgroup$range(a,b+1)
. $\endgroup$