{"id":19475,"date":"2021-08-30T16:09:32","date_gmt":"2021-08-30T10:39:32","guid":{"rendered":"https:\/\/python-programs.com\/?p=19475"},"modified":"2021-11-22T18:36:30","modified_gmt":"2021-11-22T13:06:30","slug":"python-program-to-find-the-sum-of-series-1-2-2-2-3-2-n-2","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-the-sum-of-series-1-2-2-2-3-2-n-2\/","title":{"rendered":"Python Program to find the Sum of Series 1^2+2^2+3^2…+N^2"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Convert Binary to Octal using While Loop<\/a>
\nGiven a number N the task is to find the sum of the given series 1^2+2^2+3^2…+N^2<\/strong>\u00a0for the given number in Python.<\/p>\n

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

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

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

Given Number =3<\/pre>\n

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

The sum of the series till the given number { 3 } is : 14<\/pre>\n

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

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

Given Number =5<\/pre>\n

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

The sum of the series till the given number { 6 } is : 55<\/pre>\n

Program to find the Sum of Series 1^2+2^2+3^2…+N^2 <\/strong>in Python<\/h2>\n

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