☰ Year plan · Communication Technology

Term 1 review and mini-project

Week 15 · Term 1 review (Chapters 1–13) and your own mini-project · 3 lessons
3

Your own mini-project: plan, build, test, explain

ICT Secondary 1 Term 1, Review: pp. 4–202
GoalPlan, build, test and explain a small project of your own: a Python program with a list and a function, or a page with a click action.
New words
mini-project · a small piece of work you plan, build, test and explain yourselftest table · a table of inputs, the expected result and the real resultplan · a short statement of the purpose and the partsAI helper · a tool that suggests text or code; you decide and check
Explanation

Your mini-project is your own, small and checkable on paper. Choose one of two shapes. Shape A is a Python program with a list and a function. Shape B is a small page with one click action. Work in four steps. Plan: write the purpose, who uses it, and the parts. Build: write the code in short pieces. Test: write a test table with the input, the result you expect, and the result you really get, then fix one thing at a time. Explain: say what it does, what an AI helper may do and what it may not. A helper may suggest ideas, explain an error or propose a piece of code to read. It may not decide for you, it may not be trusted without a check, and it may not receive personal data. In the sample program the list holds four invented prices in pounds, the function over_limit tells whether a price is above a limit, and the loop counts the prices above 20 (30 and 25, so 2). The test table checks other limits. Use only invented data in your project.

Worked examples
Python
1prices = [12, 30, 8, 25]
2
3def over_limit(p, limit):
4    return p > limit
5
6count = 0
7for p in prices:
8    if over_limit(p, 20):
9        count = count + 1
10print(count)
11print(sum(prices))
Output
2
75
Shape A, the sample program: a list of prices, a function with two parameters, a loop with a counter. It prints how many prices are over 20, and then the total of all prices.
limitexpected countreason
20230 and 25 are above 20
300no price is above 30
54all four are above 5
Its test table, worked out by hand before running. The results are checked with the program.
Html
1<h2 id="tip">Tip of the day</h2>
2<button id="more">More</button>
3<script>
4document.getElementById("more").onclick = () => {
5  document.getElementById("tip").textContent = "Drink water.";
6};
7</script>
Shape B, a page with one click action. The heading starts as Tip of the day. Clicking the button changes it to Drink water.
Class activity

Choose your own project idea (invented data only). Write the plan in three lines, the code on paper, a test table with at least three rows, and two sentences on what an AI helper may and may not do for you.

Practice
1
In the sample program, what is the total printed on the second line?
2
Why write the expected result before running the program?
3
Give one thing an AI helper may do and one it may not.
4
Change the limit to 10. How many prices are over 10?