Looking for help with an assignment? Connect with an assignment Expert Now!

A whimsical variation

A whimsical variation. def kempner(n):

As we have learned in various math courses, the n:th harmonic number is equal to the sum of the reciprocals of the first integers, that is, H= 1/1 + 1/2 + 1/3 + … + 1/n. As approaches infinity, so does the harmonic number Hn, although quite slowly, but with all kinds of useful properties.

A whimsical variation known as Kempner series works otherwise the same way, but adds up only those fractions that do not contain the digit nine anywhere in them. Your function should compute and return Kn, the n:th term of the Kempner series by adding up the reciprocals of the first positive integers that do not contain the digit nine. For example, to compute K10, you would need to add up 1/1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 + 1/8 + 1/10 + 1/11, the first ten such reciprocals.

Instead of approximating the result inaccurately with fixed precision floating point numbers,  you must perform this computation with perfect accuracy using Fraction  objects from the fractions module. However, since the numerators and  denominators of these fractions grow pretty quickly as increases,  the result should be returned as a Fraction object given by the  approximation produced by calling the method limit_denominator(1000) to  approximate the true value of the result as the nearest fraction whose  denominator is less than one thousand.

A whimsical variation

Get a Quick Quote

Approximately 250 words
Total price (USD) $: 10.99

Pressed for time on your upcoming paper? We can help!

Bored with homework

Reviews from Clients who Ordered from Our Website

Client: 3425

Ive submitted over 30 assignments from this website and gotten an average of 3.8 G.P.A.

Client: 2516

Juggling school with family and work has always been hectic but this website made it easy to do my studies and work while raising my 3 year old girl.

Client: 3516

Great customer service and quality work delivered on time!

Client: 2718

Client: 7384

Client: 8291

Client: 162

Client: 827

They delivered a professional and well written Resume for me. Reccommend

Why Us?

Privacy

Your personal and payment details are safe with us. Our website uses secure encryption for all orders. We guarantee not to share your details with any third parties.

Flexible Pricing

We offer great discounts and flexible pricing tailored to your needs. Additionally, we provide offers for orders above 30 pages and returning customer.

Originality

Our Professional Team of Writers have great experience and writing techniques to provide you with Quality Non-plagiarized work.

Customer Support

Our Customer Support and Professional Team of Writers are always available to help you anytime. Our Team  of writers are also available to take care of your writing needs 24/7 Live Chat is available 24/7 

How it Works

Step1: Provide Instructions

 

Provide detailed instructions including deadline for your paper and any additional information

Step 2: Pay & Assign Writer

 

Complete payment through our safe checkout and wait for your order to be assigned to suitable writer

Final Step: Download & Review

 

Download & Review your paper. You may request revision if anything is not satisfactory and rate the writer.