Computer Programming I – SS2 Digital Technologies Lesson Note (Second Term)
Download this term · ₦1,000Lesson note at a glance
- Subject
- Digital Technologies
- Class
- SS2
- Term
- Second Term
- Topic
- Computer Programming I
- Order
- Topic 1 of 8 this term
- Reading time
- 4 min
A computer program is a set of clear, step-by-step instructions that tell a computer exactly what to do. Before writing a program in a language such as Python or Java, programmers plan it with algorithms, which are written lists of steps, and flowcharts, which are diagrams of those steps. Logic gates combine ON and OFF signals.
Behavioural objectives
By the end of the lesson, students should be able to:
- define a program and an algorithm;
- state the characteristics of a good algorithm;
- name the standard flowchart symbols and state what each one is used for;
- draw a simple flowchart from an algorithm;
- explain the AND, OR and NOT logic gates.
What is a program?
Computers cannot think for themselves. If you tell a computer to “make a sandwich”, it will not know where to start.
A program is a set of very clear, step-by-step instructions that tell a computer exactly what to do. Before we write those instructions in a language like Python or Java, we must first plan them using algorithms and flowcharts.
What is an algorithm?
An algorithm is a step-by-step list of instructions written in plain English to solve a problem.
Think of it as a recipe: if you miss a step in a cake recipe (like forgetting the eggs), the cake fails. If you miss a step in an algorithm, the program may fail or give a wrong result.
Example: algorithm to cross a busy road
- Walk to the edge of the pavement.
- Look to the left.
- Look to the right.
- If a car is coming, wait and go back to Step 2.
- If no car is coming, walk across the road.
Characteristics of a good algorithm
- Precision: Every step is clear.
- Uniqueness: There is no confusion about what to do next.
- Finiteness: It must eventually end (it should not go on forever).
What is a flowchart?
Sometimes a list of words is hard to follow. A flowchart is a diagram that uses different shapes to show the “flow” of an algorithm. It is a visual way to see how a program makes decisions.
The standard symbols
Flowchart shapes follow a standard. Each shape has a specific meaning:
| Shape | Name | Purpose |
|---|---|---|
| Oval | Start/End | Where the program begins and finishes. |
| Parallelogram | Input/Output | Used when you ask the user for data (input) or show a result (output). |
| Rectangle | Process | Used for “doing” things (calculations, moving data). |
| Diamond | Decision | Used for “Yes/No” or “True/False” questions. |
| Arrows | Flow lines | They show which way the logic is moving. |
How do you draw a simple flowchart?
Take the “Crossing the Road” algorithm and turn it into a flowchart.
- Start with an oval (Start).
- Use a rectangle for “Look for cars.”
- Use a diamond to ask: “Is a car coming?”
- If YES, the arrow loops back up to “Wait.”
- If NO, the arrow goes down to “Cross road.”
- End with an oval (Finish).
What are logic gates?
At the most basic level, computers work with “ON” and “OFF” signals (1 and 0). We use logic gates to combine these signals.
- AND gate: Both signals must be “ON” for the result to be “ON” (for example, you can only enter the lab if you have a key AND the teacher is present).
- OR gate: At least one signal must be “ON” for the result to be “ON” (for example, you can pass the exam if you score high in the Test OR high in the Exam).
- NOT gate: It flips the signal. If you put in “ON”, you get “OFF”.
Algorithm, flowchart and pseudocode compared
| Tool | Format | Best for… |
|---|---|---|
| Algorithm | Written list | Planning the steps in plain English. |
| Flowchart | Visual diagram | Seeing the “big picture” and the decisions. |
| Pseudocode | Half code, half English | The final step before typing real code. |
Class practical activity
- Group work: On a piece of paper, write an algorithm for “Withdrawing money from an ATM.” (Do not forget the PIN check.)
- Individual task: Draw a flowchart that asks a user for their age. If they are 18 or older, display “You can Vote.” If they are younger, display “Too Young.”
Evaluation
- What is a program?
- State the three characteristics of a good algorithm.
- Name the flowchart shape used for a decision and say what it is used for.
- Explain the difference between an AND gate and an OR gate, with one example of each.
Assignment
Draw a flowchart that combines two “Decision” diamonds. Use the correct symbols for Start/End, Input/Output, Process and Decision, and label the YES and NO arrows.
This term's Digital Technologies topics
SS2 Second Term · 8 topics
Get Digital Technologies as PDF and Word
Every week of SS2 Digital Technologies, Second Term, formatted and ready to print. Ad-free, and the copy lock comes off.
Get this term Card, bank transfer, USSD or OPay

