• Unit 5: Functions

    The understanding of variable definitions and control statements is fundamental to any programming language. Furthermore, the syntax of basic data structures such as lists and strings is foundational to mastering the Python language. In this unit, we take another step to improve upon our program organization skills by introducing functions. When a given task is performed many times throughout a program, it is usually wrapped within a function so that it can be used or "called" whenever needed. This notion of creating a specific function or "procedure" to achieve a given task is part of a programming methodology known as "procedural programming". We will also briefly contrast this approach with the use of methods that are used in "object-oriented programming". We will discuss these in greater detail in Unit 10.

    Completing this unit should take you approximately 4 hours.

    • 5.1: The Basics of Functions

    • 5.2: Some Useful Modules

    • 5.3: Application

    • Unit 5 Assessment

      • Receive a grade