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

According to Newton, which of these will determine if and how an object will move?
Can someone help me with this??
uppose IQ scores for adults follow a Normal distribution with a standard deviation of 15. Previous analyses have determined that national average adult IQ score
the sum of two numbers is 15 and their difference is 3 find the numbers​
Evaluate the expression below when h 3 and j = 13 . 2j + 3h3 45 6,597 107 5,967
Charles sells computer hardware for a computer manufacturer. He is paid 4% for the first $8,000 of sales, 6% on the next $10,000, and 8.5% on sales over $18,000
Why did the Americans want to expand across the continent?
Variable manufacturing costs are $150 per unit, and fixed manufacturing costs are $75,000. Sales are estimated to be 6,000 units. How much would variable costin
Barney is spinning a spinner with 5 equal parts. The parts are numbered 1, 1, 2, 2, 4. If he spins the spinner 20 times, how many times should he expect to spin
Do you think women have equal rights to men today? Why or why not? own words plz.