Class 24 — March 19

Form with function

Why do I clang so — Is that to be my function — The Paw Patrol knows

Practice makes perfect — Is more than a platitude — Take it to your heart


Look both ways


Agenda


Gallery


Using functions

import module-name

module-name . function-name ( arguments )


Flow of control


Implementing functions

  • The information is called the parameter list. A parameter is a variable. Parameters are automatically initialized using information passed to it upon function startup.
  • A function typically produces a value that is returned to the code that invoked it. Python provides the return statement for this purpose.

return function-result

  • The algorithm is written as code. The code is known as a statement block or as the body of the function.

Function invocation syntax and terminology

def function-name( parameters ) :

  ''' header-comment '''

  action


Functions


To do


pitch perfect poster