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

Why was cuba made a protectorate of the united states rather than given its own sovereignty?
How do you make spanish words plural
Coffee and nicotine can be lethal in large doses. A. True B. False
If the products formed from a burning candle are carbon (C), carbon dioxide (CO2), and water (H2O), what elements were in the reactants? carbon dioxide and wate
PLEASE HELP!!!! CORRECT ANSWER PLEASE!!!! Which statement about this argument is true? Argument: If today is Saturday, then there is no school. Today is Saturda
How are the limbs of the frog,whale,horse,lion,human,bat, and bird the same ?
(Select all that apply.) Choose from the following list the three groups of lipids. a. fatty acids b. steroids c. phospholipids d. amino acids e. proteins f. fa
A train travelled a certain journey and is supposed to arrive at midday. When its average speed is 40km/h, it arrives at 1pm. When its average speed is 48km/h,
In the chemical formula AuCI3, determine the elements and how many atoms of each one are present
what might happen if type weight is heavy