CDT501 Computer Systems and Programming Basics
CDT501 Overview
- Lingnan University
- Term 1, 2026-27
- Postgraduate course
- Computer Science
- Assessment guide
What this course asks you to build
CDT501 introduces computer systems and programming for students with limited prior experience. The published course description connects programs, programming languages and execution on a computer, then develops statements, operators, variables, types, control structures and functions.
- Assessment Assignments and in-class discussion and the group project each carry thirty per cent; the individual final paper carries forty per cent.
- Core method Predict state and type before execution, then test the boundary that would make a plausible wrong program disagree.
- Group mark The teacher group score supplies eighty per cent of the project result and the contribution score supplies twenty per cent.
- Final submission Show a reproducible technical implementation and original analysis that clearly extends beyond the group foundation.
How CDT501 is assessed
| Component | Weight | Format |
|---|---|---|
| Assignment and In-class discussion | 30% | Weekly assignments on Moodle and participation in class |
| Group project | 30% | Report and presentation; 80% teacher group mark plus 20% contribution score |
| Final paper | 40% | Maximum 10 pages excluding references, with technical implementation and original analysis |
The course introduction publishes these three weighted components and they total 100%. It consistently names the final component Final paper and gives paper requirements and submission timing. Attendance is a separate published condition requiring at least 80 percent of scheduled classes. Falling below 80 percent may prevent a student from satisfying the attendance pass condition and may lead to an F; consult the course Moodle page for its course-specific application. The generic attendance paragraph uses different assessment-access terminology, so this guide preserves that conflict without changing the Final paper label.
Assessment structure
The segment widths reproduce the published weights and sum to 100%.
Current CDT501 dates
| Date | Item | Control |
|---|---|---|
| 3 or 6 December 2026 | Final paper | The course schedule and final-paper guidance give section-specific submission timing in the final teaching session. |
| 6 December 2026 | Group report and slides | The course introduction gives this date for the final group materials. |
Dates are as published in the published course introduction and section schedules for the current offering. Confirm exact deadlines and submission settings in the live LMS.
What CDT501 covers
Eight chapters move from computer components and program execution through Python state, collections, decisions, loops and objects to a reproducible data-analysis pipeline.
Computer Systems and Execution
data paths through processor, memory, storage and network servicesFollow the data before naming the fault
This chapter treats a computer as cooperating parts.
- Input, processing, output and storage
- CPU fetch-decode-execute cycle
- RAM versus persistent storage
- Workload bottlenecks and parallel engines
- Client-server requests and responses
Programming Meaning and Environments
syntax, semantics, Python tools, notebook state and reproducibilitySeparate valid syntax from correct meaning
This chapter distinguishes language grammar, execution meaning and fit with the actual problem.
- Syntax, semantics and intent
- Python and other language roles
- Editors, IDEs and notebooks
- Hidden notebook state
- Minimal reproducible debugging reports
Variables, Types and Expressions
assignment state, numeric operators, conversion and weighted calculationsMake state changes visible
This chapter treats assignment as evaluation followed by rebinding.
- Variable names and bindings
- Assignment and augmented assignment
- Numeric and string types
- Explicit input conversion
- Weighted calculations with intermediate values
Strings, Lists and Mutability
indexing, slicing, aliases, copies and collection choiceAccess by position, change by identity
This chapter draws slice bounds as cuts between characters, with an included start and excluded stop.
- Zero-based and negative indexing
- Stop-exclusive slicing
- Immutable strings
- List methods and aliases
- Copies and collection selection
Functions, Decisions and Boundary Tests
return values, Boolean logic, branch order and edge-case testingTurn verbal rules into testable contracts
This chapter separates returned values from printed output, maps positional arguments to parameters and translates verbal intervals into ordered if-elif-else conditions.
- Function inputs and return contracts
- Print versus return
- Comparisons and Boolean logic
- If, elif and else ordering
- Boundary and exception tests
Loops, Dictionaries and State
termination, ranges, nested iteration and exact-key lookupProve progress and make lookup exact
This chapter represents a loop as initial state, condition, body and update. It selects for when an iterable already describes the repetitions and while when continuation depends on changing state.
- While-loop progress and termination
- For loops and stop-exclusive ranges
- Nested loop counts
- Dictionary keys and updates
- Nested collection shapes
Classes, Inheritance and Composition
instances, self, method lookup, parent construction and ownershipTrace ownership through every dot
This chapter binds self to one concrete receiver and separates class definitions from independent instances.
- Classes and independent instances
- Self and instance attributes
- Method calls and returned values
- Inheritance and parent initialisation
- Composition and object ownership
NumPy, pandas and Visualisation
data shape, split-apply-combine, chart choice and reproducibilityKeep the table visible behind the picture
This chapter compares numerical arrays with labelled DataFrames, then builds a load, inspect, transform and visualise pipeline.
- NumPy arrays and shapes
- Pandas DataFrames and types
- Groupby split-apply-combine
- Chart choice and visual encodings
- Reproducible analysis pipelines
Its learning outcomes extend that foundation into computer literacy, language comparison, procedural and object-oriented solutions, debugging, coding conventions and best practice.
The guide follows that progression by asking one question repeatedly: what state exists now, and which operation changes it?
How the chapters fit together
The first chapter follows data through input, memory, the processor, output, storage and network services.
The second separates syntax from semantics and shows how an editor, IDE, Jupyter notebook and hosted Colab runtime can run the same Python language while carrying different file and state assumptions. Variables and expressions then establish a line-by-line trace, before strings and lists introduce indices, slices, mutability and aliases.
Functions and decisions compress transformations while making contracts and boundary rules visible. Loops repeat state changes, dictionaries replace positional lookup with named keys, and classes organise state and behaviour into separate instances.
The final chapter uses NumPy, pandas and matplotlib to turn loaded records into a checked grouped table and an appropriate chart.
How assessment shapes preparation
The published plan has three components totalling one hundred per cent. Assignment and in-class discussion carries thirty per cent, the group project carries thirty per cent, and the final paper carries forty per cent.
Within the group project, the teacher's report and presentation mark supplies eighty per cent of the individual component result and a contribution score supplies twenty per cent. The final paper must extend the group research through technical implementation and original analysis. That makes reproducibility, explicit assumptions and a visible individual contribution more valuable than a large amount of unexplained code.
Attendance is a separate published condition: students are required to attend at least 80 percent of scheduled classes. Falling below 80 percent may prevent a student from satisfying the attendance pass condition and may lead to an F; consult the course Moodle page for its course-specific application.
How to study with the guide
For every example, cover the answer and write the next state before running anything.
Record both value and type, draw the boundary positions for slices and branches, and name the progress measure for loops. When code fails, preserve the first error and classify its layer before editing. When code runs, compare it with a hand-computed case and an edge case.
The practice chapter then combines environment, data shape, state and evidence into integrated tasks, while the final page is a submission-day check for the assessed paper.
Worked example · free
Trace a weighted result without flattening the group formula
- 3Calculate the individual group score from the teacher and contribution inputs.
- 3Apply the three course weights to the correct component values.
- 2State why the contribution score is not a fourth course component.
Key terms
- Assignment
- The operation that evaluates a right-hand expression and binds the name on the left to the resulting value.
- Mutability
- The capacity of an object such as a list to change while retaining its identity.
- Slice
- A selected sequence region whose start position is included and whose stop position is excluded.
- Return Value
- The value a function supplies to its caller, distinct from text the function prints.
- Boundary Case
- An input at or immediately beside a point where a rule, comparison or valid range changes.
- Iteration
- One execution of a repeated loop body or the general process of repetition over state or elements.
- Dictionary Key
- An exact, unique identifier used to locate the associated value in a dictionary.
- Instance
- A particular object created from a class, carrying its own attribute state.
- Inheritance
- A subtype relationship through which a child class receives and may specialise a parent interface.
- Composition
- An ownership or collaboration relationship in which one object contains or uses another object.
- DataFrame
- A pandas table with labelled rows and columns that can hold different column types.
- Groupby
- A split-apply-combine operation that partitions rows by keys and calculates a summary for each group.
CDT501 FAQ
What does the published assessment consist of?
The course introduction lists Assignment and In-class discussion at thirty per cent, the Group project at thirty per cent and the Final paper at forty per cent. The numeric rows total one hundred per cent. The final item is consistently described as a paper with technical implementation and original analysis, so prepare a reproducible submission rather than an invented timed-exam format.
How is the individual group-project result calculated?
The teacher's group mark for the report and presentation supplies eighty per cent of the individual group-project result, while the contribution score supplies twenty per cent. The contribution element is informed by teammate ratings and reviewed by the instructor. Keep contribution evidence during the project because members of one group can receive different results.
What must the final paper add beyond the group work?
The published guidance says the individual paper must build on the group research foundation while adding technical implementation and original analysis beyond the group's scope. It may include code, data analysis or a technical case study and must distinguish your individual contribution. A narrow reproducible comparison is stronger than a large unexplained application.
How should I trace Python code by hand?
Write the current value and type of each relevant name before a line runs. Evaluate the right side from that state, apply mutation or rebinding, and record any returned value before moving to the next line. Stop at an exception because later lines do not run. For lists and objects, also record whether two names share identity.
Why can a notebook work before restart and then fail?
Notebook cells can be executed in an order different from the order shown on the page. A value created by a later setup cell may remain in memory while an earlier cell appears self-contained. Restart the runtime and run all cells from top to bottom. Move imports, data loading and definitions before their first use so the visible order reproduces the state.
What should I check before trusting a pandas chart?
Inspect the loaded table's shape, labels, types and missing values, then review the filtered or grouped table that supplies the plot. Confirm one summary by hand and match every visual mark to the table. State the unit of observation, aggregation and chart encoding. A polished chart can display a mistaken conversion or grouping rule perfectly.
Does attendance carry a published condition?
The course introduction states that attendance of at least 80 percent of scheduled classes is required. Falling below 80 percent may prevent a student from satisfying the attendance pass condition and may lead to an F under the programme process. Its generic paragraph uses different assessment-access terminology from the Final paper plan, so consult the course Moodle page for its course-specific application.
Questions students ask in each CDT501 chapter
- Why does more storage not always make a program faster?
- Storage capacity answers how much persistent data can be kept, while speed depends on the limiting stage of the workload. A task may instead wait on memory, processor work or a network response. Measure loading, computation and saving separately before deciding which resource constrains progress. Chapter 01 · Computer Systems and Execution
- How can valid code still solve the wrong problem?
- The interpreter checks language rules and performs the operations written. It does not know an omitted weight, unit, threshold or intended output. Expose those premises in variable names, comments and tests, then compare the result with a hand-worked case whose correct answer is independently known. Chapter 02 · Programming Meaning and Environments
- Why is x equals x plus one valid in Python?
- Python reads it as assignment rather than a timeless mathematical equality. The right side uses the current value bound to x, adds one and produces a result. Only after that evaluation succeeds does the left side update the binding so x refers to the new value. Chapter 03 · Variables, Types and Expressions
- Why does a Python slice exclude the stop value?
- Slice bounds describe cuts between elements. The start cut is included and the stop cut is excluded, so the number of selected positions often equals stop minus start. This convention aligns slices with sequence lengths and makes adjacent regions meet without duplicating an element. Chapter 04 · Strings, Lists and Mutability
- What is the difference between print and return?
- Print displays a representation for a person and usually returns None. Return sends a value back to the caller so it can be stored, combined or tested. Keep reusable calculation inside the function and let the caller decide whether and how the returned result should be displayed. Chapter 05 · Functions, Decisions and Boundary Tests
- How do I know whether a while loop terminates?
- Identify the state used by the condition and show that every path through the body moves it toward making the condition false. If one branch leaves the progress measure unchanged, the loop can stall. Trace the first few passes and the final intended pass before trusting the implementation. Chapter 06 · Loops, Dictionaries and State
- Why do two instances keep different values?
- Each construction creates a separate object and its instance attributes belong to that object. The objects share method definitions through the class but not ordinary per-instance state. A change through one receiver therefore remains on that receiver unless both objects deliberately reference another shared mutable object. Chapter 07 · Classes, Inheritance and Composition
- What is the practical difference between an array and a DataFrame?
- A NumPy array offers regular numerical structure and shape-based operations, while a pandas DataFrame adds labelled rows and columns and can hold different column types. Converting between them may lose labels or alter dimensions, so inspect both shape and meaning after each conversion rather than relying on similar printed output. Chapter 08 · NumPy, pandas and Visualisation
How to prepare for the assessments
Begin each study session with a five-minute trace from the previous topic. Write values and types without running the code, then compare your prediction with a fresh execution. For strings, lists and ranges, draw positions and stop-exclusive cuts. For functions, write the contract and test every return path. For branches, test immediately below, at and above each threshold.
For loops, name the progress measure that changes on every pass. For dictionaries, distinguish missing keys from false or empty values. For classes, bind self to one concrete object and follow ownership through every dot. For pandas, preserve intermediate tables and verify a group by hand before plotting. Keep a defect ledger with the layer, evidence, repair and verification for each mistake.
Near the final-paper deadline, select one narrow technical question, rebuild the analysis from original inputs in a fresh runtime and remove any output the prose does not interpret. This routine turns debugging into cumulative knowledge instead of repeated trial and error.
Your AI Computer Science tutor for CDT501
Stuck on a hard CDT501 question? Sia is AskSia’s AI Computer Science tutor — ask any CDT501 Computer Systems and Programming Basics 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.