Skip to content

Commit

Permalink
Merge pull request #22 from BorysSerbyn/issue8
Browse files Browse the repository at this point in the history
Create SumEarnings
  • Loading branch information
the-vampiire authored Oct 5, 2018
2 parents bc8d7ca + 7c6808d commit d2e640b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions beginner/SumEarnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def sum_earnings(input):
final = 0
inputs = input_in.split(',')
for value in inputs:
final += int(val)
if final < 0:
final = 0
return final

0 comments on commit d2e640b

Please sign in to comment.