Auckland · COMPSCI101 · Principles of Programming

COMPSCI101: pass the exams, not just read the notes

Your complete guide to University of Auckland's principles of programming course. See where the marks are, work real practice questions, and study with an AI tutor that knows COMPSCI101.

15 credit points Stage 1 undergrad Offered Summer / S1 / S2 ~50% exams School of Computer Science

Sia generates COMPSCI101 practice questions, walks through variables and expressions step by step, and quizzes you on the material the exam weights most heavily.

Spot the bug

Find what is wrong

Multiple choice · the fix is revealed after you answer

What does this program print?

def tally(values):
    total = 0
    for v in values:
        if v % 2 == 0:
            total += v
    return total

nums = [3, 4, 7, 10, 5]
print(tally(nums))
print(total)
The fix

Trace the loop. Only even values are added: 4 and 10. The total returned is 14, so the first print shows 14.

Look at the second print. The name total was created inside tally, so it is local to the function and does not exist at the top level.
Python raises a NameError on print(total). The output is 14 followed by an error, which is option A.
Option B assumes the function's local variable leaks out; option C ignores the even filter; option D forgets that the return value is printed before the error.

The trap: Assuming a variable assigned inside a function is visible after the call. Scope questions are a staple of the CodeRunner tests, and the trap is to trace the arithmetic correctly and then miss the NameError. classic slip!

your whole grade
Where your grade comes from Exams 50% · Test 45% · Coursework 3% · Pracs 2%

One exam decides 50% of your grade. Lane 1 (no AI); plussage applies. This whole page is built around that.

Overview

What COMPSCI101 is, and where it sits

COMPSCI 101 is the University of Auckland's first programming course, taught in Python and designed for students with no prior programming experience. The catalogue describes it as lab-based: there are no formal lectures, short Panopto videos are watched before each lab, and an optional weekly lectorial walks through worked examples of the current lab topics.

The content is the catalogue's key topic list — simple variables, expressions, input and output, control structures, functions, standard data structures such as lists and dictionaries, and standard Python modules — with nine learning outcomes that run from reading and explaining a program through code tracing, testing, debugging and using the Python API documentation.

Assessment is 95% invigilated: three CodeRunner tests worth 5%, 15% and 25% plus a 50% CodeRunner exam, with an assignment (3%) and lab attendance (2%) making up the rest. Each test can be resat once with the higher mark counting, plussage lets the exam stand in for the tests, and passing requires 50% overall and 50% in the test-plus-exam component. The course runs in Summer Semester, Semester One and Semester Two.

How it differs from its first-year siblings. Every mark that matters in COMPSCI 101 is earned typing code into CodeRunner in a lab with the firewall on. If you can only program with an assistant open, the assessment design is built to find that out.

Always treat your own course outline and the exam timetable as authoritative.

Difficulty & time commitment

Is COMPSCI101 hard, and how much time does it take?

COMPSCI101 is manageable if you keep a weekly rhythm and treat the back half as the main event. The pattern is consistent: it starts gently and steepens, and the heaviest assessment is the part that separates grades.

Difficulty
2.9 / 5
Moderate. Gentle early, demanding back half. Hard to fail with steady work; a top grade takes consistent practice.
Exam load
50%
The exams decide most of the grade. The heaviest single component is 50%.
Weekly time
~10 hrs
Around 10 hours per week including class, across lectures, study and assessment.
Variables, expressions, input/output, conditionalssteady
Functions, loops, lists, dictionaries, modulessteep

The difficulty curve and the assessment weighting point the same way: the back half is harder and worth more. Front-loading effort there is the highest-return decision in the course.

Is this course for you

Who tends to do well, and who tends to struggle

You will likely do well if

  • You write code every week, in the lab, on a lab machine, without an assistant.
  • You trace programs by hand until predicting output is automatic.
  • You use the resit as a second attempt, not a first attempt.
  • You watch the Panopto videos before the lab, because the lab assumes them.

You may struggle if

  • You rely on AI to write code — it is banned in 95% of the assessment and the firewall enforces it.
  • You skip labs; attendance is graded and the tests are held in them.
  • You treat the 5% Test 1 as unimportant; it is the first look at the exam format.
  • You leave decomposition and functions until late; the exam builds on them.
do this ↘
What top students do differently
  • Practise on CodeRunner-style problems with the API documentation open and nothing else.
  • For every loop you write, trace it on paper for two iterations before running it.
  • Build a personal library of one-line idioms: accumulate, count, find max, filter a list, build a dictionary.
  • Sit Test 3 as a full exam rehearsal: same room, same tools, same time pressure.

Syllabus

The 12 topics, topic by topic

The exam-weight marker on each topic shows where the marks concentrate. The amber topics carry the highest exam weight.

1

T1 · Variables and program state

Key topics

Assignment, naming, and tracing how values change as a program runs.

High exam weightQuiz me on variables →
2

T2 · Expressions and arithmetic

Key topics

Operators, precedence, integer and float behaviour, string operations.

3

T3 · Input and output

Key topics

Reading input, formatting output, and the print function.

High exam weightQuiz me on input →
4

T4 · Conditionals

Key topics: control structures

Boolean expressions and if/elif/else control flow.

5

T5 · Loops

Key topics: control structures

For and while loops, accumulators and nested iteration.

High exam weightQuiz me on loops →
6

T6 · Functions

Key topics; learning outcome 4

Parameters, return values, scope, and functional decomposition.

High exam weightQuiz me on functions →
7

T7 · Lists

Key topics: standard data structures

Indexing, slicing, iteration and list methods.

High exam weightQuiz me on lists →
8

T8 · Dictionaries

Key topics: standard data structures

Key-value storage, lookup and iteration.

9

T9 · Standard Python modules

Key topics; learning outcome 9

Using modules such as math and random from the API documentation.

10

T10 · Testing and debugging

Learning outcomes 6 and 7

Writing tests against a specification and correcting errors.

High exam weightQuiz me on testing →
11

T11 · Code style and documentation

Learning outcomes 3 and 8

Meaningful identifiers and standard Python conventions.

12

T12 · Code tracing under test conditions

Learning outcome 5

Determining program state during and after execution, the exam skill.

How it's assessed

Assessment structure

ComponentWeightFormat & timing
Lab Attendance2%Attendance recorded at each lab, approximately 0.1% per lab. Weekly. Lane 2 (AI permitted).
Assignment3%One programming assignment. Mid-semester. Lane 2 (AI permitted).
Test 1 (on CodeRunner)5%Invigilated CodeRunner test in the lab; one resit allowed, higher mark counts. Early semester. Lane 1 (no AI).
Test 2 (on CodeRunner)15%Invigilated CodeRunner test in the lab; one resit allowed, higher mark counts. Mid-semester. Lane 1 (no AI).
Test 3 (on CodeRunner)25%Invigilated CodeRunner test in the lab; one resit allowed, higher mark counts. Late semester. Lane 1 (no AI).
Final Exam50%Invigilated CodeRunner examination in a lab room. Examination period. Lane 1 (no AI); plussage applies.
Lab Attendance2%
Attendance recorded at each lab, approximately 0.1% per lab.
Assignment3%
One programming assignment.
Test 1 (on CodeRunner)5%
Invigilated CodeRunner test in the lab; one resit allowed, higher mark counts.
Test 2 (on CodeRunner)15%
Invigilated CodeRunner test in the lab; one resit allowed, higher mark counts.
Test 3 (on CodeRunner)25%
Invigilated CodeRunner test in the lab; one resit allowed, higher mark counts.
Final Exam50%
Invigilated CodeRunner examination in a lab room.
  • Two thresholds, both required: at least 50% overall, and at least 50% in the Lane 1 mark. The Lane 1 mark is the higher of (45% tests + 50% exam) and (95% exam) — that is the plussage rule. The assignment and lab attendance (Lane 2, 5%) cannot rescue a Lane 1 mark below 50%.
  • The three tests escalate — 5%, 15%, 25% — and each has one resit with the higher mark kept, so the test sequence is a graded rehearsal for the 50% exam in the same CodeRunner environment. Plussage means a strong exam erases weak tests, but nothing erases a weak exam.
read this! If you read nothing else

This is an exam-cram course. With the exams at 50% of the grade and the final exam alone at 50%, your result is overwhelmingly decided by how well you perform under time pressure. Lane 1 (no AI); plussage applies.

Final exam timing: During the examination period. Confirm the exact date and venue on your exam timetable.

How to actually pass it

A weekly rhythm, two checklists, and the traps to avoid

The course rewards consistency over cramming, and practice over re-reading. Here is the loop that works, then what to have nailed before each exam.

The weekly loop

Before the lab
Watch the short videos and note the one idea each introduces.
In the lab
Finish the lab exercises without an assistant; attendance is 2% and the practice is everything.
After the lectorial
Re-solve the worked example from a blank file.
Before each test
Trace five programs by hand and write five small functions from a specification.

Before the mid-semester checklist

  • Trace variable state through assignments, arithmetic and conditionals.
  • Write a loop that accumulates or counts correctly.
  • Define a function with parameters and a return value.
  • Read a short program and explain what it does.

Before the final heaviest topics

  • Decompose a problem into functions and compose them.
  • Use lists and dictionaries with correct indexing and iteration.
  • Write tests that check a specification and debug a failing program.
  • Use module documentation to apply an unfamiliar function.

The mistakes that cost marks

01

Off-by-one in loops and slices. Ranges stop before the end value; slices exclude the stop index. Tracing on paper catches this.

02

Confusing print with return. A function that prints a value does not return it. Test questions are built around this distinction.

03

Mutating a list while iterating. Build a new list instead; the behaviour under mutation is exactly what the exam probes.

Teaching team

Who teaches COMPSCI101

The bios below are factual. We do not rate lecturers; any star ratings are submitted by students who have taken COMPSCI101.

Course Director

Andrew Luxton-Reilly

Student ratingNo student ratings yet
Course Coordinator

Ann Cameron

Student ratingNo student ratings yet

Teaching team as listed in the course materials reviewed. AskSia does not rate lecturers; star ratings are submitted by students who have taken COMPSCI101.

Formula & concept sheet

The vocabulary and formulas you must own

Variable
A named reference to a value; assignment binds the name to a new value.
Expression
A combination of values and operators that evaluates to a single value.
Conditional
An if/elif/else structure that chooses which statements run.
Loop
A for or while structure that repeats statements; for iterates over a sequence, while repeats until a condition fails.
Function
A named block that takes parameters and returns a value; the unit of decomposition.
Scope
The region of a program where a name is visible; local names live inside their function.
List
An ordered, mutable sequence accessed by zero-based index and slicing.
Dictionary
A mapping from keys to values, accessed by key rather than position.
Code tracing
Working out the state of a program by hand, step by step.
Module
A file of reusable Python functions imported by name, such as math or random.

Set texts

The prescribed reading

The syllabus references map straight onto these.

COMPSCI 101 coursebook

.

Where it fits

Prerequisites, related courses & why it matters

No prerequisite; designed for students with no programming experience. Restriction: COMPSCI 105, COMPSCI 107 and any Stage II or III COMPSCI course. COMPSCI 101 is 15 points at Stage 1, offered in Summer Semester, Semester One and Semester Two at the City campus, and prepares students for COMPSCI 130.

Why it matters beyond the grade. This is the entry point to the Computer Science and Information Systems majors and the course most non-CS students take to learn to program. Python and the habits of tracing, testing and decomposition transfer directly to data analysis, science and business roles.

FAQ

Frequently asked questions

Is COMPSCI 101 hard?

It rates moderate. The material is introductory, but 95% of the grade is invigilated CodeRunner work with a 50% pass threshold on that component, so the difficulty is in performing under test conditions rather than in the concepts.

What is the assessment breakdown?

Lab attendance 2%, assignment 3%, three CodeRunner tests at 5%, 15% and 25%, and a CodeRunner final exam at 50%, per the catalogue page.

What are Lane 1 and Lane 2?

Lane 1 is the tests and exam (95%), where AI is not permitted. Lane 2 is the assignment and lab attendance (5%), where AI is permitted but discouraged. You must score at least 50% in Lane 1 to pass.

What is plussage?

Your Lane 1 mark is the higher of 45% tests plus 50% exam, or 95% exam alone. A strong exam can replace weak tests.

Can I resit a test?

Yes, once per test. If you resit, the higher of the two marks counts.

Are there lectures?

No formal lectures. Short Panopto videos replace them and are watched before each lab; an optional weekly lectorial covers worked examples.

Study COMPSCI101 with Sia

Work through variables, expressions, input and the rest of the course with a tutor that knows it and quizzes you on the topics the assessments weight most heavily.

Start studying with Sia