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

At some intersections the traffic signals have sensors to detect vehicles, and the traffic signal will only change if A: At least two vehicles have stopped at t
HELP NEED NOWWWWW I WILL GIVE U BRAINLIEST
Do alot of people change there major when they go to college?​
Please solve this question for Algebra 2
Answer? To this I need this last question
Who should unit members contact when reporting opsec concerns?.
How is the pattern of events in both passages similar? A. In both passages, the main events describe a good solution to a problem. B. In both passages, one
Determine the number of real solutions of 2x^2−5x+20=0a) Infinitely Manyb) Nonec) 1d)2
Find the area of the parallelogram. 10.7 ft. 5.5 ft. 14 ft.
What aggressive measure did Roosevelt take to build the canal