from IPython.core.display import HTML
HTML(open("custom.html", "r").read())
Fields:
Introduction to basic topics and concepts
We can not learn all Python features
Exercise section for every topic:
Your programming speed will vary, so: some of you will not manage to solve all exercises in the given time, this is why we have some optional exercises.
Official versions from http://python.org
Anaconda: https://www.anaconda.com/products/individual
Miniconda: https://docs.conda.io/en/latest/miniconda.html
Linux distributions ship with Python usualy, Mac also, might not be up-to-date though.
pyenv: https://github.com/pyenv/pyenv
easy to read syntax and easy to learn
interpreted language, no compilation step needed:
supports efficient programming: Python Code is usually 3-5 times shorter than Java Code and 5-10 times shorter than C++ code.
multi paradigm: object oriented, procedural and functional concepts
huge eco system of external libraries (Python packages, "batteries included")
multi purpose: scientific applications, web frameworks, game programming, ...
open source, thus supports reproducible science.
platform independent (almost)
The y-axis has logarithmic scaling ! So what you see as a line is actually exponential.
the square boxes contain code
below such a box you see the output
try to match output to code
Dont copy-paste !
jupyter
has strengths and some weaknesses.
Benefits:
Drawbacks:
git
is inconvenient for jupyter
notebooks.For programming beyond 100 lines of code I recommend the integrated development environments (IDEs)
PyCharm
(https://www.jetbrains.com/pycharm/), free community edition, many featuresVisual Studio Code
(https://code.visualstudio.com/), free, setup instructions for Python at https://code.visualstudio.com/docs/python/python-tutorial, less heavy and faster than PyCharm
.spyder
(https://www.spyder-ide.org/) IDE which attempts to mimic the Matlab environment.We use jupyter
notebooks for teaching as you can mix documentation and code execution.
print(42)
in the cell belowSHIFT + RETURN
to run the code42
below the cell.