Python has become one of the most popular general purpose programming languages over the last decade. Regardless of your interests in programming, Python is a great choice. The language is used at scale to power everything from from web applications to bioinformatics.
This repository is designed to cover slightly more than just the basics of using Python to write programs. It leans slightly towards the use of Python for statistical analysis, but covers the fundamentals fairly rigorously, including:
- Basic Python syntax rules
- Data types
- Control flow and looping
- Functions
- Errors and error handling
- Classes
- Using, installing, and managing libraries
- Making basic web requests with the
requests
package - Performing basic statistical analysis and charting with
pandas
- Install python if needed (likely not, but sometimes)
- www.python.org/download
- The latest stable version is suggested,
- Anything before Python 3.3 is too old
- Install an IDE or good text editor.
- Visual Studio Code is a good starting point if you don't already have a preference.
- https://code.visualstudio.com/
- Install the Python extension if you go this route https://marketplace.visualstudio.com/items?itemName=ms-python.python
- There are instructions for installing 3rd party libraries in the folders for classes 7 and 8, where students will need them.
- The suggested order of the material is clearly denoted in the filenames.
- Each folder is designed to be done in a single two-hour session.
- Demonstrations work best while using the debugger to step through the code line by line.
- Exercises are designed such that some students will need additional time after class to complete them, but they should be expected to start in class.
- The general flow is for these materials is:
- Review the solution from the previous session
- Demonstration of new concepts (with micro-exercises)
- Longer Exercise
- Repeat
- The demonstration sections are written with knowledgeable instructors in mind, and might not contain all the information you'd need to complete an exercise.
- Consider doing additional research, there are many Python tutorials out there!
- I especially love the ones by Real Python
- Free Code Camp also has a lot of great Python tutorials.
- Get help from a friend, social network, or elsewhere (Teb's Lab contact information is on our website... I do typically answer emails from students).
- Try to look at the solutions only as a last resort.
- Consider doing additional research, there are many Python tutorials out there!
All of the material in this repository is dedicated to the public domain. See the LICENSE
file for more details.
These materials were created by Teb's Lab. We maintain several open source curriculum repositories, all with public domain dedications. Browse our repos on Github, or our website or click here to arrange a training from Teb's Lab.