Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON This problem is named after the hometown of 18th-century mathematician Leonhard Euler. The problem asks for the sum of the all of the numbers'

PYTHON

This problem is named after the hometown of 18th-century mathematician Leonhard Euler.

The problem asks for the sum of the all of the numbers' reciprocals, squared.

Mathematically, this can be represented like so:

112+122+132+142+...112+122+132+142+...

We are going to take it a step further by multiplying our output by six and getting its square root.

We can calculate a number's square root by raising that number to the power of 1/2.

1. Store the result in a variable. Set the variable equal to zero.

2. Loop over all of the numbers from 1 to 10,000

3. Square each number in the loop and get the reciprocal (121n2). Add this to the result.

4. After the loop completes, multiply your result by 6

5. Raise the product to the power of 0.5 (This is its' square root)

6. Output your result. What did you get?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago