Program to find the sum of squares of n numbers
num =input("Enter the number upto which the sum of squares is to be found : ")
sum=0
for i in range(num+1):
sum+=i**2
print"The sum is : ",sum
OUTPUT :
Enter the number upto which the sum of squares is to be found : 4
The sum is : 30
Enter the number upto which the sum of squares is to be found : 5
The sum is : 55
Enter the number upto which the sum of squares is to be found : 12
The sum is : 650
No comments