Questions
Write a python program to find the sum of the series 1^2 + 2^2 + 3^2 + …….n^2
Last Updated : 10 Sep 2026
Jan 23, Jan 24
Solution:
number = int(input("Please Enter any Positive Number : "))
total = 0
total = (number * (number + 1) * (2 * number + 1)) / 6
print("The Sum of Series upto {0} = {1}".format(number, total))
Output:
Please Enter any Positive Number : 6
The Sum of Series upto 6 = 91.0