xxxxxxxxxx
# Here we define the function with three parameters
def addtwo(a, b, c):
added = a + b + c
return added
# Here we call the function and give that value to a variable
# We must give three parameters when calling the function,
# if not it will give a Type Error
x = addtwo(3, 5, 10)
# Now we print the variable
print(x) # Output - 18
xxxxxxxxxx
def calculateTotalSum(*args):
totalSum = 0
for number in args:
totalSum += number
print(totalSum)
calculateTotalSum(15, 3, 7, 89, 2)