In this article, we will learn to find the sum of the square of the first n number using the python program.
We find the sum of the square of positive numbers from 1 to nth using two methods:
- using for loop
- using mathematical formula
the sum of the square of n numbers:
12 + 22 + 32 + 42 + ....... + (n-1)2 + n2