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

How does science works
PLEASE HELP, THIS IS AN EASY QUESTION BUT I'M OVERTHINKING IT :(( there are some parts of the world where more than two plates react in complex ways. one exampl
A bakery sells doughnuts for $1.00, muffins for $1.50 bagles for $1.20. The bakery makes three times as many doughnuts as bagels. If the bakery sells all 130 it
which of these phrases best summarizes the trend represented by this graph?
Your friend has a collection of CDs. 2/3 of the CDs have booklets, 1/2 of the CDs are singles, and one for our singles with booklets. All but two of the CDs are
During a sale all t shirts are $5 off. Timani used a coupon to get an additional $10 off his purchase. If the original price of a T-shirt was $30, how much did
Why is florida’s Python Hunt important to the Everglades?
At a local store, kelly and martin bought some notebooks and pencils. Kelly bought 4 notebooks and 25 pencils for 16.71. Martin bought 6 notebooks and 20 pencil
In which sentence does the underlined pronoun correctly complete the elliptical clause
According to the table the investment has doubled in worth by the start of which year?