Munch Lab

Applied Programming 2015

This course introduces basic Python programming to students with little or no experience with programming. After the course, participants will know the basic principles behind programming and will have sufficient experience with practical programming to tackle simple programming tasks.

Exam information

The exam is a programming exam so you obviously need to bring your laptop with Python installed. It is your own responsibility that your computer works and that Python is installed and functions correctly. There is usually access to power for the computers but the university is not responsible for supplying power. It is your own responsibility that your computer holds power for the duration of the exam in case power is not available.

You will be handed the exam assignment on paper and you will answer the assignment by writing a file with Python code on your laptop. At the end of the exam you will be allowed to go online and upload your file to blackboard. On blackboard you must upload the file under “Exam Assignment Applied Programming 2015”. If you are done with the assignment before the exam ends, you must ask for permission to go online to upload your assignment.

Internet access is not allowed at the exam and it is your own responsibility to download everything you need before the exam.

If you want to be able to access the Python online documentation you can download it here. After you download it you must “unzip” or “decompress” the package (usually by right-clicking it). If you do not do this it will not work. In the “python-2.7.11-docs-html” folder there is an “index.html” file you can double-click. That should show you the documentation front page in your browser.

If you also want to be able to access the book “Learn Python the hard way” you will need to download it too. I have made a package for you you can download here. After you download it you must “unzip” or “decompress” it (usually by right-clicking it). If you do not do this it will not work. In the “laernpythonthehardway” folder there is a “book” folder and in that there is an “index.html” file you can double-click. That should show you the book front page in your browser.

For exam training here is the exam set from last year and the associated input file.


Lectures are in Danish. Web resources are in English for the benefit of our
foreign students. Your lecturer is me (Kasper Munch). You can contact me on email:

Day Time Place Weeks
Tuesday 9 – 11 Auditorium G2 (building 1532 room 122) 45-51
Thursday 10 – 11 Auditorium G2 (building 1532 room 122) 44-50

Computer exercises

Each week you will complete a set of programming exercises. You should try to complete as much the the exercises you can before each TA session. Your teaching assistant (TA) is Dan Søndergaard ( By the time all classes have had their TA session the solutions will be available at the end each page with exercises.

Group Day Time Place Weeks
MM1 Friday 11 – 14 Room 1111-100, except Nov. 20. where it is in IT-huset, lokale 131(5523-131) 44-50
MM2 Thursday 13 – 16 Room (1110-214) 44-50
MM3 Friday 8 – 11 Room (1110-214) 44-50

Weekly assignments

Each week you will be assigned a mandatory assignment that you should hand in to your TA (Dan). You must hand it in by 12 noon on the following Tuesday and he will correct it and give you feedback at the following TA session.

All the weekly assignments must be handed in – and accepted by the TA – for you to qualify for the exam.

Reading material

The reading material for this course will mainly be Learn Python the Hard Way, which is an online tutorial. The chapters in the course outline below refer to the exercises in this tutorial. This will our focus in the first weeks four weeks. In the last three weeks we will focus on larger exercises.

Learning outcomes

At the end of the cource you should be able to:

  • Describe sufficient and unambiguous procedures for solution of problems
  • Apply the Python programming language to solve simple programming problems.
  • Read Python code written by others and adapt it to your own needs.
  • Outline programming tasks to a professional programmer.


The exam is a written exam where you will use your own computer. You will not have access to the internet for the duration of the exam. You will be handed an exam set with a list of assignments. Each assignment will ask you to write a piece of code. At the end of the exam you will be allowed internet access so you can upload your assignment. That your computer works at the exam is your own responsibility.

Course outline

For each week you are required to have read and completed the exercises in the online book (see the “Reading” column below) before the lectures. This material will then be treated at the lectures. At exercises (TØ) you be working on the exercises (in the “Exercise” column).

Week Reading before lectures Single Lecture Exercise/TØ Double lecture
1 Exercises 0 – 10 Introduction Install Python and a text editor.  Appendix A How Python works, Variables, Objects, Operators, Types, Logic
2 Exercises 11- 26 User input, Files, Objects Variables, Operators, Types, Logic, Substitution Functions, Scope
3 Exercises 27 – 38 Control flow Files, Functions Iteration, Lists
4 Exercises 39 Lists Comparing HIV sequences Dictionaries
5 None Dictionaries Base composition of HIV sequences Breaking down problems
6 None Breaking down problems Finding open reading frames in Streptococcus + Bonus exercise on codon usage Breaking down problems
7 None Canceled Genome assembly Wrap up, Evaluation

Python online documentation

When you want to learn more about something or just look up the use of some method use the
Python documentation website or more specifically the Python standard library

Weekly schedules

The detailed schedule for each week will be available about a week ahead of time. The table below will also contain links to slides and solutions to assignments. NB: At some point you will see week schedules for the entire course and you are welcome to sneak a peak, but I refer the right to change the program up to a week before material becomes relevant. So make sure you check for any last minute (or last week) changes as we go along.

Week Note Single lecture Double lecture Exercise solutions Assignment solutions
1 Note  Slides  Slides  None  None
2  Note  Slides Slides  None  Code
3  Note  Slides  Slides Code Code
4  Note  Slides  Slides Code Code
5  Note  Slides  Slides Code Code
6  Note  Slides  Slides Code +  Code Code
7  Note  None  Slides Code  None
%d bloggers like this: