Sparklabs Learning
ClassesSearchPrintable packs
Back to SS 1 First Term
Full packLearner notesTeacher plansCurriculum onlyInclude all weeks

Sparklabs Learning / Digital Technology

SS 1 First Term

Week 10: Computer Languages and Programming

School
Creative Brains Academy
Subject
Digital Technology
Pack
Learner notes
Prepared
7 November 2026

Week index

  1. 01Computer Systems and Digital Technologies
  2. 02History and Evolution of Computing
  3. 03Computer Hardware Architecture
  4. 04Input Devices
  5. 05Output Devices
  6. 06Storage and Memory
  7. 07Computer Software
  8. 08Operating Systems
  9. 09Introduction to Word Processing
  10. 10Computer Languages and Programming
  11. 11Revision
  12. 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.

FeatureMachine languageAssembly languageHigh-level language
ReadabilityAlmost impossible for humansDifficult but manageableClose to English, easy to read
Speed of executionFastest (directly executed)Very fastSlightly slower (needs translation)
PortabilityTied to one CPU typeTied to one CPU typePortable across platforms
Ease of writingExtremely difficultTedious but possibleRelatively easy
Translation neededNoneAssemblerCompiler or interpreter
Example01000001 00000101MOV A, 5a = 5
FeatureCompilerInterpreter
TranslationEntire program at onceLine by line
Execution speedFast (pre-compiled)Slower (translates while running)
Error reportingAll errors reported after compilationErrors reported one at a time
OutputStandalone executable fileNo separate executable file
ExamplesC, C++, Java, GoPython, JavaScript, BASIC, Ruby
Best forLarge, performance-critical programsSmall programs, scripting, learning
AreaHow programming is used
EducationLearning platforms, educational games, typing tutors
BusinessAccounting software, inventory systems, e-commerce websites
HealthHospital record systems, health monitoring apps
AgricultureWeather prediction models, farm management apps
EntertainmentGames, music apps, video streaming services
GovernmentOnline registration systems, digital payment platforms
Daily lifeMobile banking, ride-hailing apps, social media
Python codeWhat 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 = 13Stores 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

  1. Group three languages by level and say why each is at that level.
  2. Write two differences between a compiler and an interpreter.
  3. Write the steps for a task as sequence, then add a selection and an iteration.
  4. Write two lines in Python that print a greeting.

Scenario-Based Questions

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.

Sparklabs Learning / SS 1 First Term / Learner notes

Lesson content is provided for classroom planning. Adapt timings and tasks to the approved school calendar and available devices.

Sparklabs Learning

Digital Technology lesson notes and teaching plans for JSS 1 to SS 3.

Curriculum

Open educational resources for JSS 1 to SS 3 Digital Technology.

Quick links

Search the curriculumBrowse classesPrintable term packs

Academic session 2026 / 2027