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

WILL GIVE A BRAINLIEST PLEASE HELP!!! Use the formula below to find the 6th term in the geometric sequence. a(n)=(5)x(3/2)n-1 A. 5 B. 15/2 C. 1,215/32 D. 3,645/
What is the area of the rectangle shown on the coordinate plane?
Los hombres ____________________ por muchas horas en el mar. a.han pescadob. hayan pescadoc. tienen pescadod. han pescando
When communicating with a client with a psychiatric diagnosis, the nurse uses silence. when silence is used in therapeutic communication, clients should feel:?
Consider the function given by the graph. What are these values? f(–2 ) =__ f(0) = __ f(4) = __
What further instigated the Hutu militia’s 1994 attack on the Tutsis in Rwanda? (1 point) The United Nation’s evacuation order of Rwanda Famine and disease rava
Simplify 5 square root of 11 end root minus 12 square root of 11 end root minus 2 square root of 11. negative 33 square root of 9 negative 11 square root of
How do we do this? Answer as soon as possible? is it a or b?
Find the slope of the line that goes through (-4,5) and (3,-1)
Sutton has a learning disability. his academic performance is lower than that of his classmates, and he has trouble persisting at academic tasks assigned in cla