diff --git a/beginner/sum-of-all-numbers_sharan-nyn.py b/beginner/sum-of-all-numbers_sharan-nyn.py new file mode 100644 index 0000000..6177df0 --- /dev/null +++ b/beginner/sum-of-all-numbers_sharan-nyn.py @@ -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]) \ No newline at end of file