CHAPTER 6
Functions
Objectives
- To define functions with formal parameters (§6.2).
- To invoke functions with actual parameters (i.e., arguments) (§6.3).
- To distinguish the differences between the functions that return and do not return a value (§6.4).
- To invoke a function using positional arguments or keyword arguments (§6.5).
- To pass arguments by passing their references (§6.6).
- To develop reusable code that is modular and is easy to read, debug, and maintain (§6.7).
- To create modules for reusing functions (§6.7).
- To determine the scope of variables (§6.8).
- To define functions with default arguments (§6.9).
- To define a function that returns multiple values (§6.10).
- To develop the functions for generating random characters (§6.11).
- To develop ...
Get Introduction to Python Programming and Data Structures, 3rd Edition by Pearson now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.