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

Somatization is associated with a. schizophrenia. b. depression. c. conversion disorder. d. paranoia.
The first factor in determining how an advertisement should be designed is a. its use of humor. b. the time and date. c. the intended audience. d. the font
According to the geological time scale, in what era did most types of animals first appear? -Haden -Paleozoic -Mesozoic -Cenozoic
Which region of the sun is brightest in x-ray and uv images? a. core b. corona c. photosphere d. chromosphere
No aceptan ____ en los puestos del mercado. a. dinero en efectivo c. billetes b. monedas d. tarjetas de crédito
Which of the following is an example of an extrusive igneous rock? A. rhyolite B. granite C. andesite D. coal
f(x) = x3 + 4x2 + x − 6 real zeros
equalent weight of oxalic acid
1 ________________ are sudden, unexpected moments of sleep that last 4-5 seconds.
After you set a price for your product you discover that your competitors are selling the same thing at a significantly lower price .one reasonable option you h