williamgrimes / teach_python_in_notebooks

Jupyter notebooks for teaching Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction to Python Programming

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.

Course Material

Lecture:

Notebooks:

  1. Introduction to Jupyter Notebooks
  2. Hello World - first program
  3. Datatypes, strings, numbers and variables
  4. Lists, tuples, and sets
  5. If statements, and conditional logic
  6. Loops, and user input
  7. Dictionaries
  8. Functions introduction
  9. More Functions
  10. Classes and Object Oriented Programming
  11. Handling Exceptions
  12. Interfacing with external files
  13. Numpy library
  14. Matplotlib Library

Bonus notebooks:

Getting started

1. Install 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

2. Download the tutorial notebooks

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.

3. Running Jupyter Notebooks

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.

4. Start learning

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.

Minimum requirements

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.

Acknowledgements

This repository was edited from python-in-a-notebook by Valerio Maggio.

License and Sharing Material

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

About

Jupyter notebooks for teaching Python

License:MIT License


Languages

Language:Jupyter Notebook 99.8%Language:CSS 0.1%Language:Python 0.1%