IST Austria Courses
IST Austria logo

Introduction to Python

Instructor: Georg Osang

Teaching Assistant: maybe?

Description

 

This course provides an elementary introduction to programming with applications in science. The language of choice is Python as one of the most popular programming languages (both in and outside of academia), though many concepts also translate to other programming languages. The main topics include the general concepts of programming (variables, expressions, types, control structures, I/O) and usage of a few scientific toolboxes, such as numpy and matplotlib for data processing and visualization. More advanced exercises will be posed in the scientific context, such as data analysis, data visualization or stochastic simulations.

The course is to a good extent based on the Python course from February 2017, taught by Srdjan Sarikas.

The in-class sessions will be interactive and hand-on, with breaks when needed. The last of these sessions will be more open-ended and allow for discussing any further open questions. The sessions will consist of brief introductions of concepts followed by in-class exercises to practice these concepts.

More exercises will be expected to be completed individually at home, and submitted before the next session, which will begin with explanations and comments on the homework. Sometimes a session will depend on having done parts of the previous homework, this will be indicated in the homework sheet itself. Sometimes homework exercises will be more open-ended, so that students can optimize their time with respect to the skills they deem most useful. There will be no homework after the last session.


Software

The in-session and homework exercises will require all participants to have a computer with working software. We will be using Jupyter Notebook as the programming environment. However unlike the previous course, we will be using it with a newer version of python: Python 3.6. I expect everyone to have this installed and working before the first session. You can follow the outline below to install Jupyter Notebook with Python 3.6, and if you have questions e-mail me (ideally more than a day before the first session).

Installation

I suggest installing the distribution Anaconda, published by Continuum Analytics.

Download and run the 3.6 installer from their website.

To start the Jupyter Notebook, you can follow these instructions. Basically, in Windows there should be an icon for Jupyter Notebook in the start menu. Jupyter Notebook will open a browser window. Now you're ready for the first session. If you want, you can try to familiarize yourself with the interface already.

 


 
Credits and Final Grade 

Pass/Fail based on completion of exercises. No ECTS credits, but the course will appear on your transcript.

 

Schedule

Date Time Location Topic Materials
Fri September 15 16:00 Mondi 1 Info Session (optional) Slides
Mon September 25 9:00-12:00 Mondi 3 Types, Operators, Assignment Slides, Slides as ipynb, Notes on Assignment Operator
Wed September 27 9:00-12:00 Mondi 3 Conditionals, Loops Slides, Slides as ipynb
Mon October 2 9:00-12:00 Mondi 3 File I/O, Functions Slides, Slides as ipynb
Wed October 4 9:00-12:00 Mondi 3 Dictionaries, Arrays, Exceptions Slides, Slides as ipynb
Tue October 10 16:15-17:30 Mondi 2 Data Analysis Slides, Slides as ipynb, data.zip
Fri October 13 9:00-10:15 Mondi 3 Outlook: Other cool features Slides, Slides as ipynb

Other Resources

Python Tutor: See what happens in your code line by line.

Practice Python: Various exercises with solutions, tailored for learning Python.

Project Euler: a variety of fun problems.

Matplotlib (Examples, Gallery and Documentation)

Numpy User Guide and Documentation

Standard Library documentation

Python FAQ, in particular, why sometimes functions are like sorted(myList) and sometimes like myList.sort()

Python has names, other languages have variables

Homework

Task Due Date Notes
Install Python! Sun September 24  
Homework 1 Wed September 27 (before class)  
Homework 2 Fri September 29  
Homework 3 Mon October 2 (before class)  
Homework 4 Wed October 4 (before class)  
Homework 5 Mon October 9