This lesson is intended to follow on from our Introduction to Python lesson. It is designed to be used in both Data Carpentry and Software Carpentry workshops. This lesson assumes that you will be working from the command-line with Python files and the Python interpreter. The exercises could be completed in other environments such as Jupyter or an IDE, but this may require some small adaptations to the exercises.
Why Python 3?
Please note that this lesson uses Python 3 rather than Python 2. Support for Python 2 is due to end in 2020, and users are strongly urged to move to Python 3 as soon as possible. Given this, it makes sense that new users should start with Python 3. As an added bonus, this allows us to make use of some new features of Python 3.
Prerequisites
- Learners need to have a basic familiarity with the command line. Specifically, you need to understand:
- what files and directories are,
- what a working directory is,
- how to edit a text file,
- how to start a Python interpreter,
- and how to execute Python files.
Learners must install Python before the class starts. The Anaconda distribution is a free distribution that provides a consistent set of scientific Python libraries for Windows, Linux, and Mac. We recommend you use Anaconda for this course, however any Python 3 will work.
Learners must download the data before class starts. Please download and unzip the file intermediate_python_data.zip.
Please see the setup instructions for details.