goo hey

goo hey

  • 1.8k
  • 25
  • 768

Recursive algorithmn using python

Jun 26 2020 5:04 PM
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)  
 
 

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (1)