Trying to figure out some recursive algorithm using python new to the language can anyone with knowledge offer any help would greately appriciated.
so far have done to get n = 2n - 1
def new(n):if n == 1: return 1return 1 + 2 * new(n-1)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Farhan AhmedPosted Jul 1, 2020, 12:50 AM