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

Which of the following could cause inaccurate survey results? biased questions random samples generalizations inferences
PLEASE HELP 20 POINTS What is the equation of this line?
The nucleus of the nerve cell is located within the
In a gym class, 29 students took turns jumping. Pete recorded the height each student jumped. What is the median height
a train is going 110 mph. how long will it take it to go 275miles
after 3 days had only four toys made, but after nine days had ten toys made? find point slope and slope intercept.
What part of a refrigerator is the least preferable place to store eggs and dairy products?
Jace owns twice as many dvds as Louis. Bo has sixty fewer dvds than five times Louis’s collection. If jace and jace have the same amount of dvds, how many dvds
Which of these are associated with an active lifestyle? Select the three correct answers. A. High-quality sleep B. Good body composition C. Mental clarity D. Hi
The awareness that objects or people continue to exist when they are no longer in sight is called: a tertiary circular reaction. out of sight, out of mind. defe