Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

summation

# addtion of all numbers till given number
def summation(num):
    n = 1
    sum = 0;
    while n <= num:
        sum = sum + n
        n+=1
    return (sum)
Source by www.codewars.com #
 
PREVIOUS NEXT
Tagged: #summation
ADD COMMENT
Topic
Name
9+5 =