ebnkk0ytetany9aR ebnkk0ytetany9aR
  • 08-11-2016
  • Computers and Technology
contestada

Use pseudocode to specify a recursive algorithm to compute the nth value of the harmonic series, for some integer n.

Respuesta :

antonsandiego
antonsandiego antonsandiego
  • 11-11-2016
Well, this task is pretty easy, I bet after my countings you will immediately understand how to figure it out : 
At first, def h(n): 
As it is done, n = 0, so after returning 0
[tex]sum = 1./n + h(n-1)[/tex]
The last thing you should do is to return sum
hope it helps =)

Answer Link

Otras preguntas

Find The Slope && Y-Intercept Of The Graph ...Y = 6x + 11
what three parts make up a single nucleotide
Find The Slope && Y-Intercept Of The Graph ...Y = 6x + 11
what three parts make up a single nucleotide
what three parts make up a single nucleotide
Find The Slope && Y-Intercept Of The Graph ...Y = 6x + 11
Find The Slope && Y-Intercept Of The Graph ...Y = 6x + 11
what three parts make up a single nucleotide
what three parts make up a single nucleotide
what three parts make up a single nucleotide