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

ABCD is rotated counterclockwise about the origin. By how many degrees was ABCD rotated? a- 180 b- 270 c- 90 d- 360
Karen's coffee shop makes a blend that is a mixture of two types of coffee. type a coffee costs karen $5.95 per pound, and type b coffee costs $4.20 per pound.
find the length of one side of a regular hexagon whose perimeter is 75 feet a. angle 1 and angle 3 b. angle 2 and angle 3 c. angle 2 and angle 5 d. angle 1 and
how can 2.5% = 1.025
SO my question is.. Jordan has 4/5 as many DVDs as Joseph. If Jordan has 56 DVDs. then how many does Joseph have? whoever shows the work gets brainlyest!
A good paragraph has ______ if it contains related sentences about a single idea or topic. unity interest witch one
Andy is buying a car. He negotiated a 7% decrease on a £6500 car. He will pay the full balance in 12 equal monthly payments. Calculate the amount paid each mont
Which molecule would you predict would be more stable: be2− 2 or be2?
What is the sequence rule for : 1.8, 2.58, 3.90, 4.95, 6
What is 1.625 rounded to the nearest hundreth?
good job