[Note: This site is not an official Software Carpentry lesson. The lesson is under development for use in the Doane Digital Imaging and Vision Applications in Science (DIVAS) Image Processing summer workshop.]
This lesson shows some basics to get you started with the Python programming language.
Prerequisites
Before beginning these lessons, you should have either the DIVAS virtual machine OR Python and a Python IDE installed on your computer (see the Setup page). The lessons will show you how to start the Spyder IDE within the DIVAS virtual machine. If you do not have the DIVAS virtual machine installed, any Python IDE will work. These example code and outputs shown in the lessons refer to Python 3.
Setup | Download files required for the lesson | |
00:00 | 1. Introduction | Why learn Python? |
00:30 | 2. Starting Python in the DIVAS VM | Where and how do I write and run Python code? |
01:00 | 3. Variables | How do we store data in variabes? |
02:00 | 4. Running code in the editor | How can I use the editor window to write and run multiple lines of code at once? |
02:30 | 5. Lists and Indexing | How can we group similar values or data into one variable? |
03:30 | 6. For Loops | How can I repeat the same operations on every item in a list? |
05:00 | 7. Conditionals | How can I make my program make choices? |
06:30 | 8. Reading and Writing Text Files | How can I read in data that is stored in a file or write data out to a file? |
08:00 | 9. Analyzing Data with Numpy | How can I analyze a data table? |
09:30 | 10. Defining Functions | How can I write my own functions? |
10:30 | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.