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

Which nutrients contribute most of the energy needed for physical activity -?
What is the correct current value if the selector is in the 0.5 dcma position?
Help??? The second law of thermodynamics states that the total entropy, or disorder, of a system tends to increase over time. In other words, the organization o
About what percent is oxygen than silicon on the earths crust
What form of a quadratic function would be graphed having the vertex at the same point as the y-intercept
How to move quickly through a range of teaching techniques to engage all students?
How do you say “i have thirty pesos left” in spanish?
A six-sided die is thrown 50 times. the numbers of occurrences of each face are shown below. face 1 2 3 4 5 6 count 12 5 9 11 6 7 can you conclude that the die
Atomic weight of gold is 197.2 ami Calculate no of gram atoms in 7.5g of gold
Hoy en día, ¿en qué se convirtió “El Palacio de los Capitanes Generales”? a. en un club c. en un restaurante b. en el museo de la ciudad d. en un templo