Skip to content

Commit

Permalink
solution to #1 - sum-of-all-numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
sharan-nyn committed Oct 5, 2018
1 parent 29db125 commit 3a30176
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions beginner/sum-of-all-numbers_sharan-nyn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def sum_all(numbers):
return sum(range(min(numbers), max(numbers)+1))

print sum_all([1,4])
print sum_all([100,1])

0 comments on commit 3a30176

Please sign in to comment.