{"id":19930,"date":"2021-09-02T15:22:46","date_gmt":"2021-09-02T09:52:46","guid":{"rendered":"https:\/\/python-programs.com\/?p=19930"},"modified":"2021-11-22T18:36:29","modified_gmt":"2021-11-22T13:06:29","slug":"python-program-to-find-sum-of-series-1-2-2-3-3-4-4-5-5-6-n-n-1","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-sum-of-series-1-2-2-3-3-4-4-5-5-6-n-n-1\/","title":{"rendered":"Python Program to Find Sum of Series 1\/2-2\/3+3\/4-4\/5+5\/6…+N\/N+1"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Find Sum of Series (1+(1*2)+(1*2*3)+…till N)<\/a><\/p>\n

Given a number N and the task is to find the sum of the given series (1\/2-2\/3+3\/4-4\/5+5\/6…+N\/N+1)<\/strong> for the given number in Python.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 17<\/pre>\n

Output:<\/strong><\/p>\n

The total sum of the series till the given number { 17 } =  0.6661398242280596<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 6<\/pre>\n

Output:<\/strong><\/p>\n

The total sum of the series till the given number { 6 } =  -0.2404761904761904<\/pre>\n

Program to Find Sum of Series 1\/2-2\/3+3\/4-4\/5+5\/6…+N\/N+1 in Python<\/h2>\n

Below are the ways to find the sum of the given series (1\/2-2\/3+3\/4-4\/5+5\/6…+N\/N+1)<\/strong>\u00a0for the given number in Python :<\/p>\n