Lesson Notes By Weeks and Term v4 - JHS 1

INTRODUCTION TO PROGRAMMING

Download the Lessonotes Mobile Ghana app for faster lesson access on Android and iPhone.

Subject: Computing

Class: JHS 1

Term: 3rd Term

Week: 7

Grade code: B7.4.1.1.1

Strand code: 4

Sub-strand code: 1

Content standard code: B7.4.1.1

Indicator code: B7.4.1.1.1

Theme: COMPUTATIONAL THINKING

Subtheme: INTRODUCTION TO PROGRAMMING

Lesson Video

This page supports the lesson note with a companion video and a short classroom-ready summary.

For class groups and homework, share this lesson page so learners also get the summary, objectives, and full lesson context.

Performance objectives

Lesson summary

This lesson introduces the foundational language of computer programming. Just like we use words to give instructions to people, we use a special language to give instructions to computers. In Ghana today, we interact with computer programs everywhere—from using a mobile money app on our phones to the traffic lights that control our roads in Accra and Kumasi, to even the games we play. Understanding the basic words (terminologies) used in programming is the first step to understanding how these technologies work and how we can one day create our own. This lesson will equip learners with the essential vocabulary needed to talk about and understand the world of programming.

Lesson notes

This section breaks down the essential words you need to know to understand programming. We will use the analogy of cooking Jollof rice to make these ideas easier to understand. Group 1: The "Who" and "What" of Programming

| Terminology | Explanation | Ghanaian Analogy (Cooking Jollof Rice) | | :--- | :--- | :--- | | Programmer | A person who writes instructions for a computer to follow. They are the creators, the problem solvers. | The Chef or the Cook. This is the person who knows the recipe and writes it down for others to follow. | | Program | A set of step-by-step instructions written in a special language that a computer can understand and execute. | The Recipe itself. It's the complete list of ingredients and all the steps, written down from start to finish. | | Programming Language | The specific language a programmer uses to write a program. Examples include Python, Scratch, Java, and C++. Computers don't understand English or Twi directly. | The Language the recipe is written in. Is it written in English? Twi? Ewe? Ga? You must use a language that the person following the recipe understands. | | Code (or Source Code) | The actual text and symbols written in a programming language. It's the "writing" itself. | The specific words and sentences in the recipe. For example, "First, chop the onions," or "Add two cups of rice." | Group 2: The "Rules" and "Plan" of Programming

| Terminology | Explanation | Ghanaian Analogy (Cooking Jollof Rice) | | :--- | :--- | :--- | | Algorithm | A clear, step-by-step plan or procedure for solving a problem or completing a task. It is the *idea* before you start writing the code. | The plan in the chef's mind before writing the recipe. The chef thinks: "1. I will wash the rice. 2. I will prepare the stew base. 3. I will mix them. 4. I will let it cook." This logical plan is the algorithm. | | Syntax | The set of rules, or the "grammar," of a programming language. If the syntax is wrong, the computer will not understand the instructions. | The grammar of a language. In Twi, you say "Kofi kɔ sukuu" (Kofi goes to school). You cannot say "Sukuu kɔ Kofi." This is wrong grammar. Similarly, every programming language has grammar rules (syntax) that must be followed. | | Variable | A container or a placeholder in a program's memory used to store information that can change. We give it a name to easily refer to it. | An ingredient bowl or container. You might have a bowl labelled "Salt" that holds your salt. The amount of salt might change depending on the taste. In a program, you could have a variable called `studentAge` that holds the number `12`. | | Input & Output | Input is the data or information that you give to the program. Output is the result or information the program gives back to you after processing the input. | Input: The raw ingredients you put into the pot (onions, tomatoes, rice, oil, water). Output: The delicious, finished Jollof rice that you serve. | Group 3: The "Process" and "Problems" of Programming

| Terminology | Explanation | Ghanaian Analogy (Cooking Jollof Rice) | | :--- | :--- | :--- | | Bug | An error, mistake, or fault in a program that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. | A mistake in the recipe. For example, the recipe says "add 1 cup of salt" instead of "1 teaspoon of salt". This will lead to a very bad result! | | Debugging | The process of finding and fixing bugs (errors) in a program's code. | Tasting the food, finding the mistake, and fixing it. You taste the Jollof and realise it's not salty enough. You then find the problem (not enough salt was added) and fix it by adding a little more. This process is debugging. | | Compiler / Interpreter | A special program that translates the code written by a human (source code) into a language that the computer's hardware can understand (machine code/binary). | A Translator. Imagine your recipe is in Twi, but the person cooking only understands English. You need a translator to read the Twi instructions and say them in English. A compiler/interpreter translates the programming language into the computer's language. |

Evaluation guide