Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanBaird authored Sep 13, 2022
1 parent e3ed4b3 commit d395333
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sum_of_positive_kyu8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Using onlt the positive numbers from a given array add them all together and return the sum of all positive numbers

def positive_sum(arr):
sum = 0
for number in arr:
if number > 0:
sum += number
return sum

0 comments on commit d395333

Please sign in to comment.