Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.

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

Sagot :

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.