In this lesson you will learn about how to call built-in Python functions, as well as how to create your own functions. Additionally, you will learn some fundamental concepts that you should implement in the functions that you define: generalization and encapsulation.
###Objectives ###
By the end of this lesson, you will be able to:
- Perform a python function call.
- Know the difference between different types of functions.
- Be able to define new functions.
- Understand how simple for loops work.
- Understand why generalization should be used.
Approximately 2 hours.
- Read Chapters 3-4 in Think Python and try some of the exercises shown in those two chapters.
- Python Functions Notebook.
- Google Developers Python Setup Guidelines on starting a Python interpreter or running a Python program at the command line. Note that in this course, the Docker image comes preinstalled with the latest version of Python3, as that is the future of the language. For the most part, there are no major differences that you will notice (the Python texts you will read are for Python 3), but since some optional readings still use Python 2, I want to make this point.
- Discussion of Differences between Python 2 and Python 3, and a shorter List of Changes from Python 2 to Python 3.
- Python website tutorial for Python 2 and Python 3.
When you have completed and worked through the above readings, please take the Week 3 Lesson 2 Assessment.