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

Roxanne is a surgical Intern. Her senlor doctor has asked her to assist in a cholecystectomy operation. Which surgery is Roxanne participatingIn?​
x^2-42^2 AND 58^2-48^2
In a video, a motionless image is called A a dialogue. B a sound element. C a still. D an animation.
Determine the domain of the function. (Image includes function and answer options)*Please show any and all work, thanks.*​
Read the excerpts from "Why the Sun Is Brighter Than the Moon.” Two of these fairies were sisters named Araw and Buwan. Araw was the younger sister, as beautifu
what type of poetry constituted the text of the Burgundian chanson?​
In an experiment Nyla collected the following information about a solution made from a certain food: pH = 3 tastes sour reacts with metals conducts electricity
In the Volume of Cylinders, Cones and Spheres section, what is the volume of a sphere with a radius of 6in? *
how do you find the radius of a circle with an area of 380.13 square inches
What’s the scientific notation for 1.) 0.079 2.)0.51 3.)0.413 4.)7,831 5.)418 6.)75.183