Sparklabs Learning / Digital Technology
SS 1 First Term
Week 10: Computer Languages and Programming
- School
- Creative Brains Academy
- Subject
- Digital Technology
- Pack
- Full pack
- Prepared
- 7 November 2026
Week index
- 01Computer Systems and Digital Technologies
- 02History and Evolution of Computing
- 03Computer Hardware Architecture
- 04Input Devices
- 05Output Devices
- 06Storage and Memory
- 07Computer Software
- 08Operating Systems
- 09Introduction to Word Processing
- 10Computer Languages and Programming
- 11Revision
- 12Examination
Week 10 / First Term
Computer Languages and Programming
Monday 9 November 2026 to Friday 13 November 2026
Lesson notes
Learning Objectives
- Distinguish between machine, assembly and high-level languages.
- Explain the work of a compiler and an interpreter.
- Describe sequence, selection and iteration.
- Write a simple set of instructions in a high-level language.
Machine, Assembly, and High-Level Languages
Computers only understand binary (0s and 1s). Writing an entire program in binary would be extremely slow, error-prone, and impractical. Computer languages provide human-friendly ways to write instructions, and translation tools convert those instructions into the machine code the CPU needs.
Machine language (also called machine code) is the lowest-level language. It consists entirely of binary digits (0s and 1s) that the CPU can execute directly. Each type of CPU has its own specific machine language. Machine language is extremely fast because the CPU executes it directly, but it is nearly impossible for humans to write or read.
Assembly language replaces binary codes with short, human-readable mnemonics. For example, 'MOV A, 5' means move the value 5 into register A, and 'ADD A, B' means add the value in register B to register A. Assembly language is easier to write and read than machine code, but it is still closely tied to the specific CPU hardware. A program written in assembly for one type of processor may not work on another type.
High-level languages are designed to be close to human English. They use words like 'print', 'if', 'while', and 'input' to express logic. Examples include Python, Java, C++, JavaScript, and BASIC. High-level languages are portable, meaning the same code can run on different types of computers. However, they must be translated into machine code before the CPU can execute them.
Compilers, Interpreters, and Why We Program
A compiler reads the entire source code at once, checks it for errors, and translates it into machine code. The resulting machine code file (the executable) can then be run independently without the compiler. Compilers are used for languages such as C, C++, Java, and Pascal. They are efficient because the translation happens only once, but any error in the code means the entire program must be recompiled.
An interpreter reads the source code one line at a time, translates it, and executes it immediately before moving to the next line. If an error is found, the interpreter stops at that line. Interpreters are used for languages such as Python, JavaScript, and BASIC. They make debugging easier because errors are shown line by line, but the program runs more slowly because translation happens every time.
Programming is the process of writing instructions for a computer to follow. We program because computers can perform tasks far faster and more accurately than humans, but they need precise instructions. Programming allows us to automate repetitive tasks, create software and apps that solve real problems, build websites and digital services, control devices and robots, analyse large amounts of data, and develop games and educational tools.
A First Taste of Python
Python is a high-level, interpreted programming language created by Guido van Rossum in 1991. It is known for its simple, readable syntax that resembles English. Python is used in web development, data science, artificial intelligence, automation, education, and many other fields. It is an excellent first language for learners because of its clarity and wide availability.
The print() function displays text or values on the screen. Variables are named containers that store values. The assignment operator (=) puts a value into a variable. The input() function asks the user to type something and stores it in a variable. Python can perform calculations using standard math operators, such as + for addition, - for subtraction, * for multiplication, and / for division.
When a Python program runs, the Python interpreter reads each line, translates it into intermediate bytecode, and executes it. The bytecode is then processed by the Python virtual machine, which eventually sends instructions to the CPU in machine code form. The chain goes from source code (human-readable) to bytecode (intermediate) to machine code (CPU-executable).
Language Levels at a Glance
Computer languages are organised into levels showing how far they are from the binary instructions the processor understands and how close they are to human language. Machine language is the lowest level, made entirely of binary digits that the CPU executes directly. Assembly language uses short mnemonics such as ADD and MOV. High-level languages use English-like words and are easy for humans to read. Each level trades readability for control.
The three levels are linked to three translation tools. An assembler translates assembly language into machine code. A compiler translates a whole high-level program into machine code in one pass. An interpreter translates and runs a high-level program line by line. Compiled programs run quickly once built, while interpreted languages make debugging easier because errors are reported immediately at the exact line.
Algorithm Flow: Sequence, Selection and Iteration
Every program is built from three core structures. Sequence runs instructions one after another in order. Selection makes a choice using conditions such as if a score is above 50 then pass, otherwise try again. Iteration, also called looping, repeats a group of instructions until a condition is met. Together these three structures let a programmer express any algorithm that a computer can follow.
Programming Paradigms
A programming paradigm is a way of thinking about and structuring a program. Procedural programming arranges a program as a sequence of steps and reusable functions. Object-oriented programming, or OOP, organises a program around objects that hold both data and the actions that operate on that data. Functional programming treats computation as the evaluation of functions and avoids changing state. Each paradigm is a different tool, and many modern languages support more than one.
| Feature | Machine language | Assembly language | High-level language |
|---|---|---|---|
| Readability | Almost impossible for humans | Difficult but manageable | Close to English, easy to read |
| Speed of execution | Fastest (directly executed) | Very fast | Slightly slower (needs translation) |
| Portability | Tied to one CPU type | Tied to one CPU type | Portable across platforms |
| Ease of writing | Extremely difficult | Tedious but possible | Relatively easy |
| Translation needed | None | Assembler | Compiler or interpreter |
| Example | 01000001 00000101 | MOV A, 5 | a = 5 |
| Feature | Compiler | Interpreter |
|---|---|---|
| Translation | Entire program at once | Line by line |
| Execution speed | Fast (pre-compiled) | Slower (translates while running) |
| Error reporting | All errors reported after compilation | Errors reported one at a time |
| Output | Standalone executable file | No separate executable file |
| Examples | C, C++, Java, Go | Python, JavaScript, BASIC, Ruby |
| Best for | Large, performance-critical programs | Small programs, scripting, learning |
| Area | How programming is used |
|---|---|
| Education | Learning platforms, educational games, typing tutors |
| Business | Accounting software, inventory systems, e-commerce websites |
| Health | Hospital record systems, health monitoring apps |
| Agriculture | Weather prediction models, farm management apps |
| Entertainment | Games, music apps, video streaming services |
| Government | Online registration systems, digital payment platforms |
| Daily life | Mobile banking, ride-hailing apps, social media |
| Python code | What it does |
|---|---|
| print('Hello, school!') | Displays Hello, school! on the screen |
| print(2 + 3) | Calculates 2 + 3 and displays 5 |
| name = 'Amina' | Stores the text Amina in the variable name |
| age = 13 | Stores the number 13 in the variable age |
| name = input('What is your name? ') | Displays the prompt and waits for the user to type |
| print('Hello,', name) | Displays a greeting using the entered name |
Practical Work
- Group three languages by level and say why each is at that level.
- Write two differences between a compiler and an interpreter.
- Write the steps for a task as sequence, then add a selection and an iteration.
- Write two lines in Python that print a greeting.
Scenario-Based Questions
- A programmer says machine language is the fastest of all. Explain why that is true, and why a human would still prefer to write a high level language such as Python even though it needs translation.
- A student's program has a bug on line 3. Which translator, a compiler or an interpreter, will show the error sooner and report it in a way that is easiest to fix? Justify your answer.
- A developer is forced to run a large performance critical system on slow hardware, while another learner wants a small teaching script on a fast school PC. For each situation recommend a compiler-based or interpreter-based language and justify both choices.
- A student writes print('Good day'), then name = input('What is your name? '), and then print(2 + 3). Explain what each line displays, and what the interpreter does with each line as the program runs.
- An assembler sees the line MOV A, 5 and asks why the programmer does not write the binary directly. Compare machine language and assembly language, state the translator each needs, and explain why assembly written for one processor may not run on another.
- A developer wants the same app to run on Android phones, office Windows PCs, and school Linux machines. Explain how a high level language is portable, and what must happen before each CPU can execute the translated code.
- A trader wants a program that greets each customer by name. Using print(), input(), variables, and the assignment operator, describe the program the student would write and what happens on each line as the interpreter runs it.
Teacher plan
LEARNING OBJECTIVES: BY THE END OF THE LESSON STUDENTS SHOULD BE ABLE TO:
| Cognitive | i. Distinguish between machine, assembly and high-level languages. ii. Explain the work of a compiler and an interpreter. iii. Describe sequence, selection and iteration. iv. Write a simple set of instructions in a high-level language. |
| Affective | i. Appreciate the value of Computer Languages and Programming in school, at home and in the community. ii. Show willingness to use digital tools carefully, safely and responsibly. |
| Psychomotor | i. Group three languages by level and say why each is at that level. ii. Write two differences between a compiler and an interpreter. iii. Write the steps for a task as sequence, then add a selection and an iteration. iv. Write two lines in Python that print a greeting. |
Rationale: Computers only understand binary (0s and 1s). Understanding machine, Assembly, and High-Level Languages, compilers, Interpreters, and Why We Program, a First Taste of Python, language Levels at a Glance helps learners use digital technology confidently, safely and responsibly.
Pre-requisite Knowledge: In Week 9, learners studied Introduction to Word Processing, including uses of a Word Processor, parts of the Window, creating and Saving a Document. The knowledge from that week is used again in this lesson.
Learning Material/Teaching Aid: Whiteboard, markers, computer or laptop where available, printed notes and charts on Computer Languages and Programming, practical task sheets, learners' notebooks and pens.
Reference Materials: Digital Technology for Senior Secondary Schools (SS 1); NERDC Digital Technology Curriculum; Digital Technology SS 1 First Term Notes (Week 10); First Term examination and Continuous Assessment question papers.
LESSON DEVELOPMENT
| Stage/Step (Time) | Teacher's Activities | Student's Activities | Learning Points |
|---|---|---|---|
| Introduction 5 MINUTES | Welcomes learners, revises Week 9 (Introduction to Word Processing) with two quick oral questions, and asks what they already know about Computer Languages and Programming. Elicits responses and writes the topic on the board. | Recall the previous lesson and share what they already know about Computer Languages and Programming. | Connecting prior knowledge to Computer Languages and Programming. |
| Step 1 6 MINUTES | Covers Machine, Assembly, and High-Level Languages: Computers only understand binary (0s and 1s). Writing an entire program in binary would be extremely slow, error-prone, and impractical. Covers Compilers, Interpreters, and Why We Program: A compiler reads the entire source code at once, checks it for errors, and translates it into machine code. The resulting machine code file (the executable) can then be run independently without the compiler. | Listen, take notes and answer oral questions on "Machine, Assembly, and High-Level Languages" and related points. | Understanding: Machine, Assembly, and High-Level Languages; Compilers, Interpreters, and Why We Program. |
| Step 2 6 MINUTES | Covers A First Taste of Python: Python is a high-level, interpreted programming language created by Guido van Rossum in 1991. It is known for its simple, readable syntax that resembles English. Covers Language Levels at a Glance: Computer languages are organised into levels showing how far they are from the binary instructions the processor understands and how close they are to human language. Machine language is the lowest level, made entirely of binary digits that the CPU executes directly. | Copy the key points, give examples from school and everyday life, and ask questions on "A First Taste of Python" and related points. | Understanding: A First Taste of Python; Language Levels at a Glance. |
| Step 3 6 MINUTES | Covers Algorithm Flow: Sequence, Selection and Iteration: Every program is built from three core structures. Sequence runs instructions one after another in order. Selection makes a choice using conditions such as if a score is above 50 then pass, otherwise try again. | Discuss in pairs, then report one point on "Algorithm Flow: Sequence, Selection and Iteration" to the class. | Understanding: Algorithm Flow: Sequence, Selection and Iteration. |
| Step 4 6 MINUTES | Covers Programming Paradigms: A programming paradigm is a way of thinking about and structuring a program. Procedural programming arranges a program as a sequence of steps and reusable functions. | Respond to questions, complete the examples on the board and note down "Programming Paradigms". | Understanding: Programming Paradigms. |
| Practical Work 6 MINUTES | Guides learners through the practical work: (i) Group three languages by level and say why each is at that level. (ii) Write two differences between a compiler and an interpreter. (iii) Write the steps for a task as sequence, then add a selection and an iteration. Moves round the class to check progress and correct unsafe or careless use. | Carry out the practical tasks individually or in pairs and record what they did in their notebooks. | Applying the lesson through hands-on practice. |
| Evaluation 3 MINUTES | Asks learners to: i. Distinguish between machine, assembly and high-level languages. ii. Explain the work of a compiler and an interpreter. iii. Describe sequence, selection and iteration. iv. Write a simple set of instructions in a high-level language. | Respond verbally and in writing to the evaluation questions. | Assessment and consolidation of the lesson content. |
| Conclusion 2 MINUTES | Recaps the main points: machine, Assembly, and High-Level Languages, compilers, Interpreters, and Why We Program, a First Taste of Python, language Levels at a Glance, algorithm Flow: Sequence, Selection and Iteration. Links them to the assignment and previews Week 11: Revision. | Listen, ask questions and copy the assignment. | Reinforcement of key concepts and a preview of the next lesson. |
Assignment: i. A programmer says machine language is the fastest of all. Explain why that is true, and why a human would still prefer to write a high level language such as Python even though it needs translation. ii. A student's program has a bug on line 3. Which translator, a compiler or an interpreter, will show the error sooner and report it in a way that is easiest to fix? Justify your answer.