
# Function parameters can also be given default arguments, 
# which only need to be specified when you want a value other than the default:

def my_print(message="my default message"):
    print(message)

my_print("hello") 	# prints 'hello'

my_print() 		# prints 'my default message'

# RULE: default arg MUST be the last N arguments

def f1(a, b, c=0):	# OK, because last arg default
   return a + b + c

def f2(a, b=0, c=0):	# OK, because last args default
   return a + b + c

def f3(a, b=0, c):	# ERROR, non-default argument c follows default arg b
   return a + b + c
