From a3db5b186c94aedd1ba08d6aeff5e37ee20e6807 Mon Sep 17 00:00:00 2001 From: "Vinh P. Nguyen" Date: Thu, 20 Feb 2020 11:36:51 +0900 Subject: [PATCH] new function: returnSum --- Python/Functions.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Python/Functions.py b/Python/Functions.py index 3a2048f..abbe881 100644 --- a/Python/Functions.py +++ b/Python/Functions.py @@ -15,3 +15,10 @@ def reverseMessage(x): for i in range((len(b)-1),-1,-1): r=r+b[i]+"" return print(r) + +def returnSum(*args): + """Return the summation of any number of arguments""" + sum = 0 + for number in args: + sum += number + return sum \ No newline at end of file