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

Which was a problem that the Roman Empire faced after A.D. 200? A. the spread of Christianity B. the strengthening of Egypt C. a changing climate that re
Consider the recorded transactions below. Debit Credit 1. Accounts Receivable 9,300 Service Revenue 9,300 2. Supplies 1,350 Accounts Payable 1,350 3. Cash 8,300
Which hygine claim is supported by reasearch
What is the sum of the polynomials? (7x3 – 4x2) + (2x3 – 4x2)
A truck can be rented from Company A for ​$100 a day plus ​$0.20 per mile. Company B charges ​$60 a day plus ​$0.70 per mile to rent the same truck. Find the nu
A paragraph summary of the French and India war​
Which source is the most reliable? a. a report published on wikipedia b. an article evaluated by other scientists c. a blog about plant growth d. an advertise
What is an ""acid""? What is a ""base""?
Which function describes this graph?A. y=(x-2)(x-6)B. y = x2-2x+6C. y = x2 + 8x +12D. y = (x-4)(x-4)​
whats -2-2+1= ?? pleaseeeeeeee helppp!!!!!!!!!!!