Answers for "sum of positive numbers in array with negative python"

0

sum of positive numbers in array with negative python

def positive_sum(numbers):
    positive_sum = 0
    for n in numbers:
        if n > 0:
            positive_sum += n
    return positive_sum
positive_sum([1,-4,7,12])
Posted by: Guest on February-03-2021

Code answers related to "sum of positive numbers in array with negative python"

Python Answers by Framework

Browse Popular Code Answers by Language