Python provides many functions that we can call. For example, previously we called the function type in order to determine the type of a value. We will analyze the function call, see more built-in functions, and take a look at the Python documentation that lists and describes the available functions.

A module contains Python code. There are modules in the Python Standard Library that we can import and then use. We can also write our own modules to perform computation or do specific tasks.

Lessons - watch before lecture

  1. Built-In Functions (6 minutes) These functions are always available. You can find all the built-in functions and their description, on the Python Documentation page.
  2. Module-Based Functions (3 minutes) Besides the built-in functions, you can get access to many other functions by importing modules. We will use the math module as an example.
  3. Python Documentation (5 minutes) Python documentation has a very specific format. Let's learn the format so that we can understand the documentation.
  4. Modules (4 minutes) A module is a file that stores Python code.
  5. Module Structure (6 minutes) How is a module organized? In addition to Python code, we show two different ways to write comments.

Also read: 3.1 - 3.3, 2.4 (html version)


Lecture materials

Slides: individual slides for viewing, 6-up layout for printing

Examples: my_module.py, fah2cel.py, script.py

Lecture Recording