def add(*args): # *args takes multiple inputs
return sum(args)
print(add(1,2,3,4,5)) # prints 15
print(add(10, 20, 30)) # prints 60
def calculate(n, **kwargs):
print(n + kwargs['add'])
print(n * kwargs['multiply'])
calculate(3, add=4, multiply=5)
def average2(*args):
listofvalues = []
for item in args:
listofvalues.append(item)
return sum(listofvalues) / len(listofvalues)