zsdrfhn zsdrfhn
  • 03-01-2021
  • Computers and Technology
contestada

write a program to print the sum of series
1/2+3/4+5/6+/8+.......19/20

Respuesta :

Cytokine
Cytokine Cytokine
  • 03-01-2021

numerator = 1

denominator = 2

total = 0

while denominator != 20:

   total += (numerator/denominator)

   numerator+=2

   denominator+=2

print(total)

I wrote my code in python 3.8. Best of luck.

Answer Link

Otras preguntas

why was the three-fifths compromise added to the us constitution?
what was the monroe doctrine?
What type of sound device is most appropriate in lines 1-4 of Lewis carolls poem jabberwocky
What is the y-value for f(x) = tan(90°)?
You decide to buy your first car. However, when you go to the dealership they want you to pay in cash and provide you with no contract. What is the benefit of a
write a summary where you give the name of the biome you live in do research on your biome
Do you know when the last bus leaves? Which kind of clause are the words in bold? A. adverb clause B. noun clause C. adjective clause
what was taylor's destination when she left home? a.to go as far as her car would take her b.to go to the place where the ocean met the land c.to go to the cher
What is PEMDAS??? Like the meaning and i need an example too.. ._.
a versatile plant used by peruvians to build things like houses and boats is the