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

given: quadrilateral ABCD with ∠A= ∠C and BD the bisector ∠ABC prove: DB bisects ∠ADC
The sales tax rate is 8%. Estimate the tax on a jacket that costs $69.95.
How do you say little sister, little brother, older sister, and older brother in Korean? I hope someone who actually know Korean can answer this question.
A biome that contains a layer of permanently frozen soil, called permafrost, would be classified as A. taiga B. desert C. tundra D. savannah E. temperate decidu
A pizza with 2 toppings from Maria's Pizza Place costs $11.00.A pizza with 5 toppings from Maria's Pizza Place costs $14.75.Each topping at Maria's Pizza Place
Which cells undergo cell division? a. prokaryotic cells only b. eukaryotic cells only c. cancer cells only d. both prokaryotic and eukaryotic cells
What caused the rise of military government in Japan?
What is the average of 30, 40, and 80?
Estimate the angle of elevation from the trailhead to the summit.
Which of the following are examples of trisomy? Turner Syndrome, Down's syndrome, or Klinefelter's Syndrome