Udemy Python day 21 to 30

Day27

import math_func
import greet

print(math_func.add(1,3,4,5))

print(math_func.add(1,3,4,5,8,9))

print(math_func.multiply(1,3,4,5,8,9))

# kwargs
params = {"name": "Bob"}
greet.greet(**params)

params = {"name": "Bob", "greeting": "Hi"}
greet.greet(**params)
def greet(name, greeting="Hello"):
print(f"{greeting}, {name}!")
def add(*arg):
total = 0
for x in arg:
total += x
return(total)

def multiply(*arg):
total = 1
for x in arg:
total *= x
return(total)
13
30
4320
Hello, Bob!
Hi, Bob!