Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

What is a voucher?

Answered: 1 week ago

Question

Give a context-free grammar for {w {b, c}| #c(w) = #b(w)}.

Answered: 1 week ago