Reading Time: 1 minutes
Sum of Series in Python
Write a Python Program to calculate sum of series 1/2, 2/3, 3/4,... upto 10 terms.
Calculate Sum of Series 1/2, 2/3, 3/4
numberOfTerms = 10 summation = 0 for nthTerm in range(1, numberOfTerms + 1): summation += float(float(nthTerm) / (nthTerm + 1)) print( round(summation, 2) ) # 7.98