Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started