In this functions fundamentals mission, you will learn how to speed up your workflow using functions. You will also learn how to create your own functions, as well as combining and debugging custom functions. You will learn such concepts as parameters, keywords, and the three different kinds of arguments.
When writing a program, you could just keep rewriting the same code, but that would be quite tedious, and result in an unnecessarily large program. Functions are self-contained routines that perform a specific task that you can incorporate into your program. After declaring the function you are free to use the function anytime in an effort to save time and resources. A function displays these patterns: Takes an input, transforms the input, and gives back an output.
While learning about functions, you will create your own function including one to create a frequency table. For more information on frequency tables, you might want to check out our dictionary and frequency tables mission.
As you go through this mission, you’ll get to apply what you’ve learned from within your browser; there’s no need to use your own machine to do the exercises. The Python environment inside of this course includes answer-checking to ensure you’ve fully mastered each concept before learning the next.
- Learn what functions are and what they do.
- Learn how to create your own functions.
- Learn how to combine functions.
- Learn how to debug functions.
- Built-in Functions
- Creating Our Own Functions
- The Structure of a Function
- Parameters and Arguments
- Extract Values From Any Column
- Creating Frequency Tables
- Writing a Single Function
- Reusability and Multiple Parameters
- Keyword and Positional Arguments
- Combining Functions
- Debugging Functions
- Next steps