Functions Example: def distance(x1, y1, x2, y2): # Returns dist from pt (x1,y1) to pt (x2, y2) dx = x2 - x1 dy = y2 - y1 return math.sqrt(dx*dx + dy*dy) Notes: Parameters are passed by value Can return multiple values Function with no return statement returns None Allows Default values Allows Keyword arguments Allows variable number of arguments