Learn Without Walls
← Back to Course Home

Module 9: Functions

Learn to write reusable blocks of code that make your programs organized and powerful

4 Lessons 15 Practice Problems 12-Question Quiz

Your Progress

Complete the lessons in order, then test yourself with practice problems and the module quiz.

Learning Objectives

By the end of this module, you will be able to:

Lessons

1

Defining Functions with def

Learn the syntax for creating your own functions, how to call them, and why functions are essential for writing clean, reusable code.

~35 minutes
2

Parameters and Return Values

Pass data into functions with parameters and get results back with the return statement. Learn about positional arguments and returning multiple values.

~35 minutes
3

Default and Keyword Arguments

Make your functions more flexible with default parameter values, keyword arguments, and an introduction to *args and **kwargs.

~30 minutes
4

Scope: Local vs Global

Understand where variables live and die in your programs. Learn about local scope, global scope, the global keyword, and best practices for variable naming.

~30 minutes

After the Lessons

Practice Problems

15 hands-on problems to reinforce what you learned

Start Practice

Module Quiz

12 questions to test your understanding

Take Quiz

Study Guide

Review key concepts and prepare for assessments

Study Guide

Quick Reference

Printable cheat sheet for Python functions

Quick Ref