Code 43: Python Program to find the Sum of squares of first n natural numbers | 365 Days of Code
Опубликовано: 06 Апрель 2025 на канале: Code House
112
0
Here is the python program to find the Sum of squares of first n natural numbers.
Code -
def sum_square(number):
sum = 0
for i in range(1, number + 1):
sum += (i*i)
return sum
print(sum_square(4)) # 1 + 4 + 9 + 16 = 30