This repository contains a collection of Jupyter/IPython Notebooks introducing fundamental programming concepts in Python. These concepts are common to many programming languages, and can be applied in other languages with different syntax. The notebooks are intended to guide students in learning the basic functionality of programming in Python, as well as introduce some of the most useful Python libraries.
To begin make sure you have setup your programming environment correctly, in order to do this read the getting started guide. After that you are ready to start working with through the course material, starting by reviewing the lecture material and then working through the core notebooks zero to thirteen. Finally some bonus material is provided about code style, databases, modules, and python philosophy.
- Introduction to Jupyter Notebooks
- Hello World - first program
- Datatypes, strings, numbers and variables
- Lists, tuples, and sets
- If statements, and conditional logic
- Loops, and user input
- Dictionaries
- Functions introduction
- More Functions
- Classes and Object Oriented Programming
- Handling Exceptions
- Interfacing with external files
- Numpy library
- Matplotlib Library
- Bonus - Coding Style PEP8
- Bonus - Databases and data persistence
- Bonus - Importing modules
- Bonus - The Zen Of Python
If you have not yet installed Python the Anaconda distribution by Continuum Analytics is highly recommended. Anaconda is a completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing. Anaconda includes an easy-to-use installer for almost every platform, drastically reducing the burden of setting up the environment. In addition it comes packaged with the most useful Python libraries.
Anaconda python can be downloaded from this webpage: Anaconda Python
If you are familiar with git version control and have git installed then you can download the relevant course notebooks by doing a git clone:
git clone https://github.com/williamgrimes/teach_python_in_notebooks.git
Otherwise navigate to the following webpage (where you are reading this readme):
https://github.com/williamgrimes/teach_python_in_notebooks.git
And select Clone or download
, then download the zip file and extract.
Navigate to the directory of the unzipped or cloned course files, and open a Terminal, and type the following command:
jupyter notebook
The notebook will launch in a browser from the present working directory.
You are now setup to start working your way through the numbered notebooks in the Jupyter Notebook browser. Start with an introduction to Jupyter by selecting 00_introduction_to_jupyter_notebooks.ipynb
and work through in order.
If you are still curious after working through all the notebooks have a look at the extra notebooks for useful extra information.
If you have installed the Anaconda 3.x distribution as described above you will have fulfilled the basic requirements necessary to begin working. Otherwise, please ensure you have the following installed before starting the course:
- Python 3.x (2.x would work as well)
- IPython 4.x (with notebook support) or Jupyter:
- matplotlib library
- NumPy library
To check if these are installed you can run the following:
python -V
ipython -V
pip show matplotlib
pip show numpy
N.B. these coursenotebooks are written in Python 3, if you are running Python 2, you might want to consider adding Python 3 to your system.
This repository was edited from python-in-a-notebook
by Valerio Maggio.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.