{"id":20066,"date":"2021-09-06T13:34:28","date_gmt":"2021-09-06T08:04:28","guid":{"rendered":"https:\/\/python-programs.com\/?p=20066"},"modified":"2021-11-22T18:36:28","modified_gmt":"2021-11-22T13:06:28","slug":"python-program-to-find-the-sum-of-series-9-99-999-n","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-the-sum-of-series-9-99-999-n\/","title":{"rendered":"Python Program to Find the Sum of Series 9+99+999…..+N"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Remove the last Word from the String\/Sentence<\/a><\/p>\n

Given a number N and the task is to find the sum of the given series (9+99+999…..+N)<\/strong>\u00a0for the given number in Python.<\/p>\n

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

Example1:<\/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 } =  1111104<\/pre>\n

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

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

Given Number =11<\/pre>\n

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

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

Program to Find the Sum of Series 9+99+999…..+N in Python<\/h2>\n

Below are the ways to find the sum of the given series (9+99+999…..+N)<\/strong> for the given number in Python<\/p>\n