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

What is the republic
The last common ancestor of all animals was probably a(n) The last common ancestor of all animals was probably a(n) algae. chytrid. yeast. protist. fungus.
What effect would a decrease in volume have on pressure, assuming that temperature (T) and moles of gas (n) are kept constant
[tex]solve : - \\ \\ factorise \: (x {}^{2} + 30x + 216) \\ \\ please \: help \: [/tex]​
1. Choose the option that presents the information clearly and correctly. A. Unlike his brother. John loved books of all kinds, B. Unlike his brother: John lov
a story that ends with indeed it is terrible to befriend a bad person.​
Carol ran a 100 meter race in 13. 4 seconds. But, it was wrongly measured as 14.1 seconds. What is the percent error involved in the measurement?
2c(u-6)+(u-6) complete the expression
The__________is an HTML tag that provides information on the keywords that represent the contents of a Web page.
One cause of the Panic of 1819 was Select one: a. decreased foreign demand for American agricultural goods.