Python program to print series 1,4,9......15 terms


Program:

for i in range(1,16):

j=i*i

print(j)

Output:

1 4 9 16 25 36..................225

Python program to print series 1,4,9......15 terms Video:





45 views0 comments

Recent Posts

See All

The mathematical formula to find the sum of 1²+2²+3²+….+n² is n(n+1)(2n+1)/6 So to find the sum of series we use this formula. Program: n = int(input("Enter Positive Number : ")) sum = 0 sum= (n*(n+