University of Auckland · S2 2026 · FACULTY OF COMPUTER SCIENCE

COMPSCI101 Principles of Programming

- one subject, every graph, every model, every mark
9 Chapters25-page Bible
Our own words - no uploaded lecturer files
Built to mirror S2 2026 · updated this semester
The Complete Exam Bible · S2 2026

COMPSCI101 Overview

Principles of Programming
— A source-grounded COMPSCI101 guide to value and type, expression, user input and the complete published assessment structure.
  • School of Computer Science, University of Auckland
  • Semester Two, 2026
  • Stage 1 undergraduate course
  • 15 points
  • A foundational programming course used across computing study paths.
  • Laboratory attendance is worth 2%, an assignment 3%, Test 1 5%, Test 2 15%, Test 3 25%, and the final examination 50%.

COMPSCI 101 Principles of Programming teaches Python expressions, selection, iteration, sequences, functions, files, dictionaries, testing and debugging. It is taught within School of Computer Science, University of Auckland. It is Stage 1 undergraduate course. It carries 15 points.

  • Two-lane pass rule Students need 50 overall and 50 in the 95% tests-and-exam lane; practical marks cannot compensate for a failed Lane 1.
  • Progressive tests The three CodeRunner tests grow from 5% to 15% to 25%, so early tracing defects become increasingly expensive if left unresolved.
  • Plussage is conditional Lane 1 uses the better of the normal tests-plus-exam calculation and the published exam-based alternative; Lane 2 remains separate.
  • Trace before run Predict state, branch and output for a normal, boundary and invalid input before executing code; a mismatch then identifies the faulty rule.
COMPSCI101 · University of Auckland
An independent, AskSia-authored study guide. AskSia is not affiliated with, endorsed by, or sponsored by University of Auckland; the course code and name are used for identification only.
Assessment

How COMPSCI101 is assessed

ComponentWeightFormat
Laboratory Attendance2%Practical attendance component; current class and recording conditions are controlled by the Semester Two site
Assignment3%Programming assignment; current brief and deadline must be checked live
Test 15%Invigilated CodeRunner assessment
Test 215%Invigilated CodeRunner assessment
Test 325%Invigilated CodeRunner assessment
Final Examination50%Invigilated CodeRunner assessment; contributes with the tests to the Lane 1 pass rule

The current public page publishes 2% laboratory attendance, 3% assignment, tests worth 5%, 15% and 25%, and a 50% final exam. Students need 50% overall and 50% in Lane 1; plussage selects the higher of the published Lane 1 calculations.

Contents · every chapter, one map

What COMPSCI101 covers

Read Values, Input and Expressions as the foundation, For Loops, Range and Traversal as the main change in method, and Nested Structures, Testing and Debugging as the final application of the course.

01

Values, Input and Expressions

value and type · expression · user input · predict the type and value of an input-driven expression before running the Python code
02

Conditionals and Boolean Logic

Boolean expression · conditional statement · branch coverage · trace an if-elif-else chain and design inputs that expose overlap, order and missing branches
03

While Loops and Program State

loop condition · state update · termination · build a trace table showing how a while loop progresses to termination
04

Strings, Lists and Sequence Operations

sequence · index · slice · predict indexing, slicing and method effects without confusing mutation with creation of a new value
05

For Loops, Range and Traversal

iterable · range · accumulator · trace a for loop over range or a sequence and verify its iteration count and accumulated result
06

Functions, Parameters and Return Values

parameter · local scope · return value · trace a function call from arguments through local state to its returned value and side effects
07

Files and Persistent Data

file handle · record parsing · resource control · read a small text file, validate its records and produce a bounded result while guaranteeing closure
08

Dictionaries and Keyed Data

dictionary · key lookup · frequency table · construct and update a frequency dictionary while handling a previously unseen key
09

Nested Structures, Testing and Debugging

nested iteration · test case · debugging · localise a defect in nested data processing using trace evidence and a minimal failing test

It is positioned as A foundational programming course used across computing study paths.

The course combines small practical marks with three progressively weighted CodeRunner tests and a 50% final exam; plussage changes the Lane 1 calculation while leaving the practical lane separate.

Assessment in COMPSCI101 is distributed as follows: Laboratory attendance is worth 2%, an assignment 3%, Test 1 5%, Test 2 15%, Test 3 25%, and the final examination 50%.

Lane 1 is the 95% tests-and-exam portion; Lane 2 is the 5% assignment-and-attendance portion.

The operational assessment conditions matter here. The current public page describes the tests and final examination as invigilated CodeRunner assessments.

Check the Semester Two course site and official timetable for dates, venue and permitted materials.

What makes COMPSCI101 demanding is concrete: The main challenge is tracing program state across nested control flow and data structures, then explaining why a function or loop works on ordinary, boundary and invalid inputs rather than only reproducing syntax.

Passing requires at least 50% overall and at least 50% in Lane 1. Plussage calculates Lane 1 as the higher of the published tests-plus-exam combination and a 95%-scaled examination result.

Read Values, Input and Expressions as the foundation, For Loops, Range and Traversal as the main change in method, and Nested Structures, Testing and Debugging as the final application of the course.

Worked example · free

Trace a loop that filters and totals values

Q [5 marks]. An AskSia-authored function loops through [3, -1, 4, 0, 5], adds only positive even values and returns the total. Trace the result and identify one boundary test.
  • 1Initialise the accumulator at zero and state the positive-even condition.
  • 1Reject 3 and -1 because each fails at least one part of the condition.
  • 1Add 4, leaving the accumulator at four.
  • 1Reject 0 under the strictly positive condition and reject 5 because it is odd.
  • 1Return 4 and propose the empty list as a boundary test with expected result zero.
The function returns 4. A useful boundary test is an empty list, which should complete without entering the loop and return the initial accumulator value of zero.
Sia tip — State both halves of a compound condition; zero is even but is not positive.
Glossary

Key terms

Expression
A combination of literals, variables, operators and function calls that Python evaluates to produce a value.
Dictionary
A mutable mapping that associates unique hashable keys with values and retrieves entries by key rather than position.
Conditional statement
A control structure that selects which block executes according to the truth value of one or more conditions.
Boolean logic
Reasoning with true and false values through comparison, conjunction, disjunction and negation to form program conditions.
While loop
An iteration structure that repeatedly executes a block while its condition remains true and must make progress toward termination.
Sequence
An ordered collection whose elements can be accessed or traversed by position, including strings, lists and tuples.
For loop
An iteration structure that binds a loop variable to each value produced by an iterable in a defined order.
Function
A named reusable unit of program behaviour with parameters, a local execution context and an optional returned value.
File I/O
Program operations that open, read, write and close persistent files while controlling representation and error conditions.
FAQ

COMPSCI101 FAQ

Does COMPSCI101 have a hurdle or component-level pass rule?

Passing requires at least 50% overall and at least 50% in Lane 1. Plussage calculates Lane 1 as the higher of the published tests-plus-exam combination and a 95%-scaled examination result.

How is COMPSCI101 assessed?

Laboratory attendance is worth 2%, an assignment 3%, Test 1 5%, Test 2 15%, Test 3 25%, and the final examination 50%. Lane 1 is the 95% tests-and-exam portion; Lane 2 is the 5% assignment-and-attendance portion.

Where do students usually lose marks in COMPSCI101?

The main challenge is tracing program state across nested control flow and data structures, then explaining why a function or loop works on ordinary, boundary and invalid inputs rather than only reproducing syntax.

What is the COMPSCI101 exam or final-task format?

The current public page describes the tests and final examination as invigilated CodeRunner assessments. Check the Semester Two course site and official timetable for dates, venue and permitted materials.

Which offering does this COMPSCI101 guide cover?

It is aligned to Semester Two, 2026; confirm your enrolled class and timetable in the current institutional system.

What prerequisites or restrictions apply to COMPSCI101?

Check the current official handbook before enrolling in COMPSCI101; prerequisites are not inferred from its course number.

Is this COMPSCI101 resource an official university guide?

No. It is an independent COMPSCI101 study resource; current institutional instructions remain authoritative for assessment operation.

Study strategy

How to study for the exam

Retrieve the course map, practise the recurring method—state the input and expected output, trace values and control flow by hand, implement the smallest clear Python solution and test ordinary, boundary and invalid cases before explaining the failure or result—on changed scenarios, and verify every operational assessment detail in the live institutional system.

Study COMPSCI101 with AI

Your AI Computer Science tutor for COMPSCI101

Stuck on a hard COMPSCI101 question? Sia is AskSia’s AI Computer Science tutor — ask any COMPSCI101 Principles of Programming question and get a clear, step-by-step explanation grounded in how the course is actually taught and assessed. Read this whole study guide free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 15 of your University of Auckland subjects - and 1,000+ Bibles across every Australian university.
Sia - your COMPSCI101 tutor, unlimited, worked the way the exam marks it
The full 25-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works
Unlock the full COMPSCI101 Bible + 15 University of Auckland subjects
$0.99 Trial