Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Provide a script that prints the sum of every even numbers in the range [0; 100].

def sum_even():
    return sum(i for i in range(0, 101 + 1) if i % 2 == 0)
print(sum_even())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Provide #script #prints #sum #numbers #range
ADD COMMENT
Topic
Name
7+8 =