CS1602Introduction to Computation
Lab 16Part 6 Pythonic Python and Modern PracticeAI Level 0

Team Project Submission (week 16)

There is no lab session in week 16, and the team project has no defence — you simply submit it. This page is the final submission checklist and the full marking criteria; work against it from week 14 onwards.

Due:Sunday, 23:59 for final code and report
Contents

What week 16 is for

Week 16 has a lecture only. There is no lab session, and no defence. The team project is finished when you submit the archive described below.

WhenWhat you should be doing
week 14form pairs, hand in the design sketch, start writing
week 15hand in the progress check; the basics should run
week 16finish the tests, write the report, self-check against the marking criteria
Sunday, 23:59submit the archive

Run it yourself before you submit

Do not submit something you have not run. Open a terminal and actually run it:

a = Array([[1, 2, 3], [4, 5, 6]])
print(a)
print(a.transpose())
print(a.reshape(3, 2))
print(a + a)
print(a.sum(axis=0))

Then run the tests:

python3 -m pytest -v

A test suite going green is more persuasive than any sentence in your report. Save that full output — it is one of the things you hand in.

While you are at it, ask yourselves

These are the places a TA looks first. Go through them yourselves; anything you cannot answer is something that is not finished.

  • Why did you choose that internal representation? What is wrong with the alternative?
  • How is reshape implemented? Why does it not have to move the data?
  • What happens on a shape mismatch? Is there a test for it?
  • What is dot’s complexity? How long does 100×100 take?
  • Which test was hardest to write? Why?
  • Which parts did an AI write, and how did you verify them?

Marking criteria

25% of the course grade, allocated as follows.

Required functionality (40%)

ItemMarksHow it is checked
construction and shape validation5does an irregular nested list raise?
shape / ndim / size3tested in 1-D and 2-D
__repr__ / __eq__4readable output, correct equality semantics
indexing a[i] / a[i,j] / slices8including negative indices and out-of-range raising
arithmetic (Array and scalar)8shape mismatches must raise
reductions sum/mean/max/min with axis6axis=None/0/1 all correct
reshape / transpose4element-count mismatch must raise
zeros/ones/arange/dot2

Tests (15%)

ItemMarks
tests run, and there are enough (25+)5
exception paths covered (mismatches, out of range)4
edges covered (empty, single element, 1-D)3
cross-checked against NumPy3

Code quality and design (10%)

  • complete type annotations (3)
  • clear naming and structure, no duplicated code (4)
  • consistent error handling (3)

Documentation (5%)

The README must contain:

  • project conventions (internal representation, naming, error handling)
  • how to install and run it
  • usage examples (at least three)
  • division of work
  • known limitations

Technical report (10%)

  • design decisions explained, with the trade-offs (5)
  • test strategy and the problems you hit written concretely, not in platitudes (3)
  • division of labour accurate and consistent with the code (2)

Optional extensions (up to +30%)

ItemMarksRequirement
broadcasting+5(3,1) plus (1,4) gives (3,4)
boolean indexing+5a[a > 5]
three or more dimensions+5at least reshape, indexing and arithmetic
performance work+5a different representation or algorithm, with measurements
pretty printing+5aligned output, in NumPy’s style
something else+5your own idea, explained in the report

Capped at 100% overall.


Final submission (Sunday, 23:59)

One archive containing:

  1. all code (implementation and tests)
  2. README.md (see the documentation requirements above)
  3. report.md, at most two pages, answering:
    • What is your internal representation? Why that one? What did you consider and reject?
    • Which part was hardest, and how did you solve it?
    • What was your testing strategy? Which bugs did cross-checking find?
    • Division of work: who did what, in what proportion
    • If you did it again, what would you change?
  4. the complete output of pytest

Wrapping up

The final exam

  • Time and place per the university notice
  • Closed book, 50% of the course grade
  • Scope and question types in L16, section 3
  • Focus on: the frequent-traps table

How to revise

  1. Work through L16’s frequent-traps table until you can explain each entry
  2. Revise along the five threads (reference model, cost awareness, divide and conquer, verification, the dirty outside world), not lecture by lecture
  3. Write code by hand — no completion in the exam hall, and no AI
  4. Modify the runnable blocks in the notes and re-run them

Questions

  • Ask in the course group any time
  • There will be a revision session the week before the exam; the time will be announced

Finally

That is the end of the course.

Sixteen weeks ago many of you had never written a line of code. You have now finished a project of several hundred lines, with tests, with documentation, built by two people working together.

That is a larger distance than it currently feels.

Good luck in the exam. And I hope that after this course, the code you write is code people are willing to read.