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

What’s is the rate of change?
Find the unknown value (c).
Students surveyed boys and girls separately to determine which sport was enjoyed the most. After completing the boy survey, it was determined that for ever 3 bo
The global wind belts and their directions in order from the Equator to the North Pole are: Trade winds, east to west; Westerlies, west to east; Polar Easterlie
Please awnser and make sure it’s to
In which common foodborne intoxication illness are ten percent cases fatal? A. Staphylococcal B. Botulism C. Anisakiasis D. Salmonella
How can forces on objects be used to predict their motion?
i need somone to talk to pls
Explain the benefits and limitations of each type of scientific investigation.
i need app ideas for basic everyday problems​