Python function execution

If it is a function, it needs to return something. Otherwise, running it is kind of useless.

So you probably need to say:

def multiply(a, b):
  return a * b

You probably want to read more about functions in Python and when this would make sense (passing by reference, for example). This can be a good starting point: Python functions.

Leave a Comment