Question: 1) Write a few lines of code that will add the squares of the even numbers from 40 to 100 inclusive. (No ifs! Make good

1) Write a few lines of code that will add the squares of the even numbers from 40 to 100 inclusive. (No ifs! Make good use of for i in range(___, ___, ___) ) What is the output?

2) Write a few lines of code that will sum the harmonic series, 1/1 + 1/2 + 1/3 + ... . Compute up through the term +1/100.

Answer to 5 decimal places:

Now, compute through the term +1/1000.

(If your answer is bigger than 10, you probably forgot to reset your sum to 0.) Answer to 5 decimal places:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!