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

Property for 8+(-8)=0 Math homework
Oración con caprichosito
Indentfy whether the sentence is an example of figurative language or if it has a literal meaning.The city council plans to build skate board and trick bike par
Is the line through points P(0, –9) and Q(2, –8) perpendicular to the line through points R(1, 4) and S(3, 3)? Explain
how do sports drinks change your rate of absoprtion? Why are they preferable to drinking plain water?
Read this passage: How great was Kovaloff's terror and astonishment when he saw that it was his own nose! At this extraordinary sight, everything seemed to turn
Luke wants to raise $175 for a school fundraiser. She had raised $120 so far. How much more does she need to reach her goal
Rational number as decimal 8/9
The line of symmetry for the quadratic equation y = ax2 + 8x - 3 is x = 4. What is the value of "a"?
It is flu season! The flu is caused by a virus. Scientists continue to debate whether or not viruses are alive. If we consider the image of the flu virus seen