COMP132 (2020) - Programming for the Natural and Social Sciences


This course addresses the fundamental programming skills required to process, transform, analyse and present data. The course will explore a range of kinds of data, kinds of analysis and kinds of visualisation that can be performed on the data, and give students expertise in a variety of programming techniques and tools to accomplish this analysis and visualisation. The practical assignments will enable students to develop programming skills that they will be able to apply in many different fields of study. The course does not assume any background in programming.

Course learning objectives

Students who pass this course will be able to:

  1. Understand and create Python programs to perform basic operations on data sets, including statistical summaries and searching according to a criterion.
  2. Use basic file and database tools to organise, manage, and store data.
  3. Use Python programming tools to create simple visualisations of data in order to enable understanding of data sets and analyses of data.

Withdrawal from Course

Withdrawal dates and process:


Teaching Format

This course will be offered in-person and online.  For students in Wellington, there will be a combination of in-person components and web/internet based resources. It will also be possible to take the course entirely online for those who cannot attend on campus, with all the components provided in-person also made available online.
The course will involve lectures to present key ideas, demonstrate programming techniques, and review student work. The labs will explore the material from the lectures and online material and develop the skills needed to work on the assignments. Students will also need to work on assignments outside the scheduled lab sessions.
All lectures and labs will be offered in person. All lectures will be recorded and the videos will be available online on Blackboard. We will provide online help sessions for students who can not attend the labs in person.

Student feedback

Student feedback on University courses may be found at:

Dates (trimester, teaching & break dates)

  • Teaching: 13 July 2020 - 18 October 2020
  • Break: 17 August 2020 - 30 August 2020
  • Exam period: 19 October 2020 - 25 October 2020

Class Times and Room Numbers

13 July 2020 - 16 August 2020

  • Monday 10:00 - 10:50 – LT323, Hunter, Kelburn
  • Wednesday 10:00 - 10:50 – LT1, Te Toki a Rata, Kelburn
  • Thursday 10:00 - 10:50 – LT1, Te Toki a Rata, Kelburn
31 August 2020 - 18 October 2020

  • Monday 10:00 - 10:50 – LT323, Hunter, Kelburn
  • Wednesday 10:00 - 10:50 – LT1, Te Toki a Rata, Kelburn
  • Thursday 10:00 - 10:50 – LT1, Te Toki a Rata, Kelburn

Other Classes

There will be two labs each week and the students need to sign up.

  • Lab A: choose one of TBA
  • Lab B: choose one of TBA
The labs start in the second week of the trimester. You must sign up for two lab sessions on the web: (at ) (also linked from the course home page).
We will also run one online help desk each week from the second week of the course. The details for all of these are available on the weekly timetable page.


The textbook is intended to be a resource and to provide you with explanations that will complement the lectures.
The textbook for COMP 132 is:

  • Python for Data Analysis, Data wrangling with pandas, numpy and Ipython, by Wes McKinney, 2nd Edition, published by O'Reilly (2018: ISBN 9781491957660).

Mandatory Course Requirements

In addition to achieving an overall pass mark of at least 50%, students must:

  • submit reasonable attempts for at least 4 assignments. A "reasonable attempt" is a D (40%) or better.

If you believe that exceptional circumstances may prevent you from meeting the mandatory course requirements, contact the Course Coordinator for advice as soon as possible.


Assessment ItemDue Date or Test DateCLO(s)Percentage
First assignment (about 5 hours, including lab time)Week 2, Friday 5pmCLO: 1,2,310%
5 Fortnightly assignments (about 10 hours each, including lab time)Friday 5pmCLO: 1,2,312%
Test 1 (about 1 hour)Week 7CLO: 1,2,315%
Test 2 (about 1 hour)Assessment weekCLO: 1,2,315%


3 LATE DAYS POLICY for Assignments. Each student will have 3 "late days" which you may choose to use for any assignment or assignments during the course. There will be no penalty applied fo these late days. You do not need to apply for these - any late days you
have left will be automatically applied to assignments that you submit late.
Any late assignments submitted after you run out the 3 days will generally not be marked, unless you have made arrangements on the basis of exceptional circumstances with the lecturer.


Individual extensions will only be granted in exceptional personal circumstances, and should be negotiated with the course coordinator before the deadline whenever possible. Documentation (eg, medical certificate) may be required.

Submission & Return

All work must be submitted through the ECS submission system, accessible through the course web pages. Marks and comments will be returned through the ECS marking system, also available through the course web pages.
Assignments are due Friday 5pm, and you have about two weeks to finish each assignment. You should target to finish at about noon time. We strongly advise you NOT to leave the assignments to the last minute, since there may not be any help available near the submission deadline.
When you have completed them, the assignments should be submitted via the online submission system. This means that you can submit assignments from the ECS labs or from a computer at home (or anywhere on the internet). You may resubmit as many times as you wish, but the most recent submission of a file will be marked . (You'll learn about how to submit assignments using a web browser in the first assignment).

Group Work

We encourage you to discuss the assignments in small groups in the labs.
But all assignments must be your own code and you are not allowed to share code. Make sure you read the section on plagiarism.

Required Equipment

Students are not required to have their own computers, but it helps and the first assignment provides information on how to work on the programming assignments on their own computers.


Although the workload will vary from week to week, you should expect to spend approximately 10 hours per week on the course to give a total of 150 hours study time for the course. To work on your assignments beyond the scheduled lab times, you may use any of the ECS computing labs on the second floor of Cotton at any time, unless they are booked for another class. You may also use your own computer.

Teaching Plan


Communication of Additional Information

All online material for this course can be accessed at

Offering CRN: 30095

Points: 15
Duration: 13 July 2020 - 25 October 2020
Starts: Trimester 2
Campus: Kelburn