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

In English, write about two regional dishes from Colombia. Be sure to include the name of the dish, the origins (if known), and the ingredients that make up tha
Plz do 8-30evens only And 38-41 Thx! Note: This is only a third of my homework! ✏️✂️✒️‍‍
Which reason best explains why the enzymes found in other parts of the body will not function one in the stomach?
What is static equilibrium?
is f(x)=-3 an odd function?
What is the primary cause for the change in seasons
Plz do 8-30evens only And 38-41 Thx! Note: This is only a third of my homework! ✏️✂️✒️‍‍
∠AED is formed inside a circle by two intersecting chords. If minor arc BD = 70 and minor arc CA = 180, what is the measure of ∠ AED?
If an industrial machine could make 418 pencils in a second, how many pencils would it have made in 15 seconds?
"The rain in Spain stays mainly on the plain." Classify which SOUND DEVICE is being used, and explain your reasoning.