What is python
?
python
is a programming language. python
is designed to be easily human-readable, and uses whitespace as a major feature of the language. The language is open source, and free to use. It is also widely used across the sciences, technology industry, and has such a large user base that it is one of the main lingua franca of programming today. For all of these reasons, we will be using python
as a major element of this course. Through the exercises and tasks you complete here, you will gain transferrable programming skills while learning other science and math concepts. A programming language is a great tool to have in your back pocket. Frankly, you could not ask for a better one than python
. Here is a simple example of how to use python to tell the computer to do three things: (1) define two variables and assign each of them a value, (2) add the two numbers together and assign it to a new variable, and (3) print the result so that we can read it.
# this is a comment, the computer does not pay attention to anything after the "#"
# assign variables
a = 1
b = 2
# sum the two
c = a + b
# print the result
print(c)
In this course, we will take a very gentle introduction to python
, but I will not be doing a full tutorial course on this. Accordingly, you should seek help in one of the many online tutorials and help resources for python. I have linked to a few good ones below.
What is a Jupyter Notebook?
Jupyter Notebooks are a tool for doing what is commonly known as “literate programming.” In essence, it is a document format that allows you to mix code (in almost any language of your choice, but we will be using python
) with regularly formatted text, equations, and images. The format is excellent because it allows you to execute snippets of code interactively, while recording your thoughts and narration in the same place. It is a good tool for sharing research, scientific findings, exploring numerical models, and analyzing data.
What is JupyterHub?
JupyterHub is a software tool that allows one to run and execute Jupyter notebooks on a server, rather than your home computer or laptop. In this course, we will be using JupyterHub to distribute and grade your assignments, exams, and projects. This has the benefit of ensuring that you do not have to install Jupyter and python
on your PC, and that everyone has access to the same software packages. It also allows the TAs and I to efficiently grade and return your assignments with feedback. You will have login credentials that you set yourself (please note down your password somewhere) and can access the Hub from anywhere with internet. You can, of course, install Jupyter and python
locally for yourself if you like (I recommend Anaconda if you are going to do this), but it is not required, and you will have to do your assignments through the web-based Hub anyway.