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

Use synthetic division to solve (3x^4+6x^3+2x^2+9x+10)/ (x+2)
Find the volume of a square pyramid with base edges of 48 cm and a slant height of 26 cm. Question 4 options: 768 cm3 11,520 cm3 23,040 cm3 7,680 cm3
how many fluid ounces are in 3 pints
Segment AB and segment BC are tangent to circle D. Find x if AB = 5x + 11 and BC = 3x + 25.
What is the origin of the Judaism group
Approximately how many miles of wiring is assembled and installed in each​ ambulance?
9. How many times did the temperature rise one degree per hour? A none B 1 C 2 D 3
If the rectangular filed has a width of 3 feet and a perimeter of 54 feet , calculate the area of the field
What important consideration needs to be made about the use of plastic sealing gaskets with oxygen regulators?
How many (total) data plots are to be completed for this experiment account for each?