
Grade 12 · 18 weeks
Computer Science
Build and test a Lantern Festival scorer, model data, and design a program that people can use without giving up unnecessary personal information.
Start Week 5Term 1 · Algorithms, programs and testing
Lists, loops and summaries
A list groups related values, and a loop applies a rule across entries. The same counting or filtering algorithm can summarize different subjects when the interface and assumptions match.
Read-aloud is not available in this browser. You can still read this text on screen.
Computing lab
Predict the total for the starter. Change it to count scores of 3 or higher, then reuse the counting process for a supplied or fictional daily reading data set. Compare named list operations with a loop for readability.
Keep for review. Two executions with empty-list and boundary tests, plus an explanation of how the rule transferred.
JavaScript starter code
Save this example as a .js file and run it in Node.js or an editor your educator approves.
const scores = [4, 2, 3];
let total = 0;
for (const score of scores) {
total += score;
}
console.log(total);Plan the week
- Read the lesson and explain its main idea in your own words.
- State the system or program’s goal and sketch its inputs, rules and output.
- Complete the investigation and keep the evidence listed above.
- Test or trace a second case and record any change it suggests.
- Answer the week’s check, then explain your reasoning using your evidence.

