open_in_new
content_copy
n=5 s=0 for i in range(1,n+1): # adding cube sum using pow() function s=s+pow(i,3) print(s)