Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

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

OpenStudy (rsmith6559):

I'm not certain that I understand the math, but this Python does what I expect, (that we go from 1...n): >>> def harmonic( n ): ... if( n < 1 ): ... return 0.0 ... else: ... return( harmonic( n - 1.0 ) + ( 1.0 / n ) ) ... >>> n = 3.0 >>> harmonic( n ) 1.8333333333333333 >>> n = 4.0 >>> harmonic( n ) 2.083333333333333 >>> n = 5.0 >>> harmonic( n ) 2.283333333333333 You can pseudo it up.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!