Overview

Functions are a fantastic way of bundling a series of statements together conceptually to make your code much clearer. You’ve already been using them a lot, but now you’ll learn how to make your own and how to think through what they are doing.

Basic Learning Objectives

Before the start of class, you should be able to:

  • Define the term function
  • Give an example of invoking an existing function
  • Define the term parameter
  • Define and use a new function without parameters to accomplish a simple task

Advanced Learning Objectives

During and after class, you should be able to:

  • Explain when the code in a function is executed
  • Explain what the scope of a function is and how it impacts variables used inside the function
  • Define and use a new function with multiple parameters to accomplish a task
  • Identify when a function should be created

Readings

You should read/watch the following and complete the checks: