ITANN course: Introduction to Python Programming#

This course is an introduction to Python programming for data science. Python is a very versatile programming language that is used in many domains; simple scripting, web applications, desktop GUI applications, data processing pipelines, scientific computing.

This course focuses on Python programming for data science, with emphasis on literate programming: programming in a Notebook context. The learning outcomes of this course are in line with these:

Learning goals#

After succesfully attending the course, learners will be able to write basic Python code dedicated to data science challenges.
In more detail, after attending this course, students will

  • use correct data structures and syntax elements for a given purpose:

    • data types (scalars, list, dict, set)

    • flow control elements (if/else, for)

    • functions

  • understand the object-oriented nature of Python

  • run, edit and write Jupyter notebooks

  • read and apply Python documentation using the help() function or online resources

  • deal with a data analysis project in a logical and structured manner (formulate problem, reformulate in separate steps, rewrite in pseudocode, translate to Python)

  • analyse and solve bugs and errors in their own code

  • read data from, and write data to file using Pythons built-in functionality

  • create simple list comprehensions used for generating, filtering and processing collections

Besides these goals, students can choose to challenge themselves with these optional outcomes:

  • creating and using modules

  • being able to design, implement and use simple data classes

  • being able to define and use regular expressions

Program#

Day 1#

  • Morning

    • Course intro: Python, (Ana)conda, suggested toolbox

    • Wishes and expectations

    • Jupyter & Markdown

      • Practice: write an small blog on your favorite topic

    • Demo application

    • Python as calculator: scalars and operators

      • Practice: 12.2.1 & 12.2.2.

    • Operator precedence

      • Practice: 12.2.3 & 12.2.4.

  • Afternoon

    • Datatypes

      • Practice: 12.3.1

    • Slicing

      • Practice: 12.3.3 & 12.3.4 & 12.3.5.

    • Flow control

      • Practice: 12.4.1. & 12.4.3.

Day 2#

  • Morning

    • Review of previous topics

    • Functions

      • Practice: 12.5.2.

    • Comments: how and when

      • Practice: Comment 12.5.2.

    • File I/O

      • Practice: 12.6.1.

  • Afternoon

    • Standard library functions

      • Practice: 12.7.1-3

    • Sorting

      • Practice: 12.7.4.

    • Script design & error handling

      • As a group: 12.5.1. (12.4.4)

    • Learn how to program with one of the programming challenges, i.e. hangman, sudoku, sea battle (“zeeslag”) against the computer

      • Choose bigger project from 12.12.1-4

Day 3#

  • Morning

    • Review of previous topics

    • Python standard modules

    • List comprehensions

    • [Optional] OOP

    • [Optional] regular expressions

    • [Optional] writing and using modules

    • discussion of challenges

  • Afternoon

    • Leftovers

    • Evaluation of module

    • Guest lecture