lindajones2268 lindajones2268
  • 02-01-2021
  • Computers and Technology
contestada

Write a program to find the sum of given series: (a) S = 1 + (1/2) + (1/3) + ...... + (1/20)

Respuesta :

Cytokine
Cytokine Cytokine
  • 02-01-2021

total = 0

numerator = 1

denominator = 1

while denominator != 20:

   total += numerator/denominator

   denominator+=1

print(total)

I wrote my code in python 3.8. I hope this helps.

Answer Link

Otras preguntas

Solve the following quadratic by completing the square.
HURRY Susan has two dogs named Murphy and Fido. She feeds each of them the same type of dog food. Murphy eats 2/3 of a can of dog food each day. Fido eats 1/2 o
Please help!!! I will give brainliest. Just please try your best. Jackson has a cube. Each edge of the cube is 5 centimeters long, as shown below. Part A Jackso
I just want to let all of the people on this website that the answers they give you are wrong because I just got a 0 on my assignment because of this website ju
Two fish tanks have measurements as shown. Which tank has a greater volume? How much greater is its volume? Use the drop-down menus to explain and show your ans
I need help on this ASAP!
Which of these is a ball and stick model?
what was Pablo Picasso inspired by when he painted head of a sleeping woman? his wife African mask the weather a still life
Find the average of this set of numbers.1, 9, 11, 13, 26 A) 12 B) 13 C) 14 D) none of the above
Circuit A has a voltage of 10 V, and circuit B has a voltage of 15 V Which statement about the circuits is correct? (1 point) If the resistance in circuit A equ