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

How many moles of CF4 can be produced when 8.95 mol C reacts with 7.88 mol F2? How many moles of each reactant are left over? (Note that at least one of the rea
Solve for the values of x and y.
AyudaVOCABULARY Nº 4TOWERING comes from the word TOWER. Towers are high, so towering is an adjective that says that something is high.• New York has lots of tow
What is the area of this trapezoid? 340 cm² 427.5 cm² 440 cm² 487.5 cm²
ways to reduce necluar weapons​
Put the items in the correct order. - Analysis: hypothesis testing. - Choose methods of analysis. - Hypothesis acceptance or rejection. - Report results - H
Claustrophobia and acrophobia are classified under which of the following types of anxiety-related disorders? A.Social anxiety disorders B.Specific phobia C.Obs
PLEASE HELP!! I will give you BRAINIEST "over the cobbles he clattered and clashed"This is an example ofa. metaphorb.simile c.personification d.alliterationPlea
16x^2+?x+36 perfect square trinomial
Rohit is taking a tuition class(passive voice)​