Course navigatorUnofficial student prototype · fictional course data

Overview›Foundations of Programming›Feedback

Portfolio 1 — Expressions and decisions

17 / 20 (85%) · worth 20% of Foundations of Programming

The assessment briefBack to OverviewReleased Fri, 4 Sept 2026, 4:40 pm · due Fri, 14 Aug 2026, 5:00 pm

Demonstration feedback. Fictional mark on fictional work.

Overall

Four working programs and four honest accounts of how they got there. This is what the portfolio is for.

17 / 20.

What worked

Entry 2 is the best thing here. You expected the loop to sum the list, it returned the last element, and you correctly identified that the accumulator was being reset inside the loop rather than before it. You then said the thing that earns the mark: the program ran and the answer was wrong, which is worse than crashing.

What to work on

Entry 4 has no account at all — the program worked first time and you wrote two lines saying so. If nothing broke, say what you checked to be confident it was right. “It printed the expected output for the supplied input, and for an empty list it printed 0” is a real answer.

Entry 3 uses range(len(items)) and then only ever uses items[i]. It is correct and it is harder to read than looping over the items. Worth changing before Portfolio 2, where one entry has to be a refactor.

For Portfolio 2

Pick entry 3 as your refactor. You already know what you would change, which means the hard part is done and you can spend the effort on the comparator output instead.