Skip to content

Commit

Permalink
Merge pull request #88 from PresleyWong/issue_#1-solution
Browse files Browse the repository at this point in the history
Issue #1 solution
  • Loading branch information
the-vampiire authored Oct 15, 2018
2 parents 7145354 + 9414b25 commit 018c280
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions beginner/sum_of_all_numbers_presleywong.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def sum_all(input_list):
if type(input_list) is not list:
return

total = 0
input_list.sort()
start = input_list[0]
end = input_list[-1]+1

for n in range(start, end):
total += n

return total

0 comments on commit 018c280

Please sign in to comment.