def calculateTotalSum(*args):
totalSum = 0
for number in args:
totalSum += number
print(totalSum)
calculateTotalSum(15, 3, 7, 89, 2)
def add(*numbers):
sum = 0
for x in numbers:
sum = sum + x
print(sum)
add(10, 20, 30)
add(10, 20, 30, 40, 50)
print("Total score for %s is %s ", name, score)
# 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