lindajones2268 lindajones2268
  • 02-01-2021
  • Computers and Technology
contestada

Write a program to find the sum of given series: (a) S = 1 + (1/2) + (1/3) + ...... + (1/20)

Respuesta :

Cytokine
Cytokine Cytokine
  • 02-01-2021

total = 0

numerator = 1

denominator = 1

while denominator != 20:

   total += numerator/denominator

   denominator+=1

print(total)

I wrote my code in python 3.8. I hope this helps.

Answer Link

Otras preguntas

According to the study, putting one quote after another in an essay without connecting them is called a(n) . A. origin paper B. quote collage C. paraphra
Louis XIV ruled from his lavish palace located in A. Paris. B. St. Petersburg. C. Madrid. D. Versailles.
Please Help!! Find the measure of angle 2. Image Attached
Disability income policies usually have a(n) _____, which is a time delay from the date of the issuance of the policy until benefit privileges are activated.
which best describes the authors purpose in dwaina brooks
The growing trend toward universal customers and products means _____ has become an important factor in purchasing and the supply chain.
Public health is a field devoted to the science and art of protecting and improving the health of communities through what?
If 9a+5b+5c=9 what is -10c-18a-10b?
Serological testing is based on the fact that
The cold protective response may be activated when a person's face is submerged in water that is less than ________ degrees fahrenheit.