W3snippets
  • Home
  • Php
  • Jquery
  • Css
  • Html
  • Codeigniter
  • Laravel
  • Nodejs
  • Javascript
  • Python

Python Program for cube sum of first n natural numbers

In this example, We will explain to you python program for cube sum of first n natural numbers. so you can see our python example.

Example

def sumOfSeries(n):
    sum = 0
    for i in range(1, n+1):
        sum +=i*i*i
    return sum
n = 5
print(sumOfSeries(n))

Output

225

Related Article

  • Python Program for Find minimum sum of factors of number
  • check if a triangle of positive area is possible with the given angles in python
  • Python Program for Find minimum sum of factors of number
  • Python Program to find sum of array
  • Python program for sum of square of N natural numbers

Recent Posts

  • How to get the tag name in jQuery
  • How to get html tag in javascript
  • PHP fopen() function with example
  • PHP rand() function with example
  • PHP sqrt() function with example
  • PHP pow() function with example
  • PHP max() function with example
  • PHP min() function with example

Popular Posts

  • PHP ucfirst() function with example
  • PHP fopen() function with example
  • JQuery CSS Classes
  • Laravel Cookie
  • JQuery Get
  • JQuery Dimensions
  • JQuery Traversing
  • How to get the tag name in jQuery

W3snippets

Quick Links

  • About Us
  • Contact Us
  • Terms & Conditions
  • Privacy Policy

We are providing

  • Web Design
  • Web Development
  • Product Management
  • Marketing
  • Graphic Design

Our Social Networks

© Copyright W3snippets. All Rights Reserved