Preview:
n=5
s=0
for i in range(1,n+1):
    # adding cube sum using pow() function
    s=s+pow(i,3)
print(s)   
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter