COMPSCI101 Principles of Programming
COMPSCI101 Overview
- 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.
How COMPSCI101 is assessed
| Component | Weight | Format |
|---|---|---|
| Laboratory Attendance | 2% | Practical attendance component; current class and recording conditions are controlled by the Semester Two site |
| Assignment | 3% | Programming assignment; current brief and deadline must be checked live |
| Test 1 | 5% | Invigilated CodeRunner assessment |
| Test 2 | 15% | Invigilated CodeRunner assessment |
| Test 3 | 25% | Invigilated CodeRunner assessment |
| Final Examination | 50% | 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.
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.
Values, Input and Expressions
value and type · expression · user input · predict the type and value of an input-driven expression before running the Python code02Conditionals and Boolean Logic
Boolean expression · conditional statement · branch coverage · trace an if-elif-else chain and design inputs that expose overlap, order and missing branches03While Loops and Program State
loop condition · state update · termination · build a trace table showing how a while loop progresses to termination04Strings, Lists and Sequence Operations
sequence · index · slice · predict indexing, slicing and method effects without confusing mutation with creation of a new value05For Loops, Range and Traversal
iterable · range · accumulator · trace a for loop over range or a sequence and verify its iteration count and accumulated result06Functions, Parameters and Return Values
parameter · local scope · return value · trace a function call from arguments through local state to its returned value and side effects07Files and Persistent Data
file handle · record parsing · resource control · read a small text file, validate its records and produce a bounded result while guaranteeing closure08Dictionaries and Keyed Data
dictionary · key lookup · frequency table · construct and update a frequency dictionary while handling a previously unseen key09Nested Structures, Testing and Debugging
nested iteration · test case · debugging · localise a defect in nested data processing using trace evidence and a minimal failing testIt 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.
Trace a loop that filters and totals values
- 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.
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.
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.
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.
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.