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
Having the same working environment as the rest of the class will help you follow the practical classes and ensure everyone is on the same page throughout the exercises, as well as eliminate the risk of accidentally messing up system and or personal files when learning to use the terminal and finally helps me assisting you through your exercises.
This course will cover basic command line operations in Bash (which is the shell used in Linux distributions).
-
Download and install Virtual Box
-
Download Ubuntu Desktop 18.04.1 LTS.
-
Open Virtual Box and create your Virtual Machine using the downloaded .iso file (click on New - Top left corner). If you're not sure about which configurations to choose, use the recommended ones.
-
Launch your newly created virtual machine and proceed.
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/joaopfonseca/introduction_to_programming.git
Otherwise navigate to the following webpage (where you are reading this readme):
https://github.com/joaopfonseca/introduction_to_programming
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 adapted from teach_python_in_notebooks
by William Grimes.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.