Hiring Partners
Segilola Resources Operating LimitedTaviatech TechnologiesFCMBMTN NigeriaAdvans La Fayette Microfinance BankAboki AfricaFirst Bank of NigeriaOPay
← Advanced Software Engineering · Lesson 3 of 10

Module Two

📖 Every lesson in this course is free to read right here, no account needed. Create a free account to track your progress, take the exam, and earn your certificate.
3
Module 2 · Advanced Software Engineer

🧱 Module 2: Building Blocks – Variables, Data & Simple Code

Hello again, future software engineer! In Module 1, you learned how to think like an engineer. Now it’s time to start building! Just like a builder uses bricks, cement, and wood, a software engineer uses variables, data types, and instructions to create programs.

In this module, we will learn the most basic parts of any programming language. We will not use a specific language (like Python or JavaScript) – instead, we will learn the ideas that work in every language. Once you understand these ideas, you can learn any coding language easily!

We will learn how to store information, how to name it, and how to give simple instructions. We will also learn how to make decisions using conditions. By the end, you will be able to write your first simple programs – on paper or on a computer. Let’s jump in!

🎯 Learning Objectives

After this module, you will be able to:

  • Explain what a variable is and why we use it.
  • Name different types of data (numbers, text, true/false).
  • Create your own variables and give them values.
  • Understand what an instruction (statement) is.
  • Use conditions to make your program choose between actions.
  • Follow simple algorithms written in pseudo‑code.
  • Understand how computers remember things.

📖 Warm‑up Story: Ada’s Shopping List

Ada’s mum gave her a shopping list: “Buy 2 loaves of bread, 5 apples, and 1 bottle of juice.” Ada went to the shop. She remembered “2”, “5”, and “1” – but when she reached the shop, she forgot what the 2 was for! Was it bread? Or apples?

So Ada took a notebook and wrote:

bread = 2
apples = 5
juice = 1

Now she knew exactly what each number meant. When she bought the items, she crossed them off. She even changed the numbers: bread = 1 (after buying one).

Her notebook acted like a computer’s memory. Each item name was a variable, and the number was its value. That is exactly how programs work – they store information in variables so they can use it later.

Now let’s learn how to do that with code!

📘 Lesson 1: What is a Variable?

Definition: A variable is a named container that holds a piece of information. It’s like a labelled box where you store something.

Why is it important? Without variables, a computer could not remember anything – it would forget everything after each step!

Simple explanation: Imagine a jar labelled “cookies”. You can put 10 cookies in it, or take some out. The jar always has a name, and the number of cookies inside can change. That’s a variable.

Real‑life example: Your school locker – you put books in it, and you can change what’s inside. The locker has a number (like Locker 42) – that’s the variable name, and the books are the value.

School example: Your test score – you might have a score of 85. Later, you get 90. The variable is “score”, and its value changes.

Home example: Your piggy bank – the variable is “piggyBank”, and the value is the amount of money inside.

Nigerian example: The number of people in a bus – the variable is “passengers”, and its value changes as people get on and off.

Illustration:

   +-------------+
   |   name: age |    ← variable name
   |   value: 10 |    ← variable value
   +-------------+

Mini summary: A variable is a labelled box that holds a piece of information that can change.

📘 Lesson 2: Data Types – Numbers, Text, and True/False

Definition: Data types tell the computer what kind of information a variable holds – like a number, a word, or a yes/no answer.

Why is it important? Because the computer needs to know how to handle the information. You can do math with numbers, but not with words.

Simple explanation: Think of three different boxes: one for numbers (like your age), one for words (like your name), and one for true/false (like “is it raining?”).

Real‑life example: A form asks for your name (text), age (number), and whether you are a student (true/false).

School example: Your teacher records your name (text), your test score (number), and if you did homework (true/false).

Home example: A recipe: 2 cups of flour (number), “sugar” (text), and “oven is hot?” (true/false).

Nigerian example: In a bank app: your account number (text), balance (number), and “is account active?” (true/false).

Illustration:

   +----------------+------------------+------------------+
   |    Number      |      Text        |   True/False     |
   |    (integer)   |     (string)     |   (boolean)      |
   +----------------+------------------+------------------+
   |   10, 3.14, 0  |  "Hello", "Ada"  |   true, false    |
   +----------------+------------------+------------------+

Mini summary: Data types help the computer understand what kind of data it is working with – numbers, text, or true/false.

📘 Lesson 3: Naming Variables

Definition: Naming variables means giving them clear, descriptive names so you and others know what they represent.

Why is it important? Good names make your code easy to read and understand – like having clear labels on boxes.

Simple explanation: If you name a variable “x”, nobody knows what it means. But if you name it “score”, everyone knows it holds a score.

Real‑life example: A teacher’s attendance sheet has columns like “Name”, “Absent”, “Tardy” – clear names.

School example: Your notebook headings: “Math Homework”, “Science Notes” – clear names.

Home example: Storage boxes labelled “Christmas Decorations” or “Winter Clothes”.

Nigerian example: A market trader labels baskets: “Tomatoes”, “Onions”, “Peppers” – not “Box1”, “Box2”.

Rules for naming:

  • Use letters, numbers, and underscore (_).
  • Start with a letter or underscore.
  • No spaces – use underscore: first_name.
  • Be descriptive: totalScore is better than ts.

Illustration:

   ✅ Good:   playerName, age, isHungry
   ❌ Bad:    p, a, 1var, my variable

Mini summary: Use clear, descriptive names for your variables – it helps everyone understand your code.

📘 Lesson 4: Assigning Values (Putting Things in Boxes)

Definition: Assigning means putting a value into a variable. We use the assignment operator (usually =) to do this.

Why is it important? Because a variable is empty until you assign a value to it.

Simple explanation: It’s like saying “my piggy bank has 100 naira” – you are putting the value 100 into the variable “piggyBank”.

Real‑life example: You set your alarm clock to 7:00 – you are assigning the value 7 to the variable “alarmTime”.

School example: The teacher sets the score for your test: score = 85.

Home example: You tell your smart speaker the volume: volume = 5.

Nigerian example: You set your mobile data to “1GB” – that’s assigning a value.

Illustration:

   age = 10   ← assignment
   ↑     ↑
   name  value

Mini summary: Assignment is putting a value into a variable using the equals sign.

📘 Lesson 5: Reading Variables (Looking Inside Boxes)

Definition: Reading means using the value stored in a variable. You can use it in calculations, display it, or compare it.

Why is it important? Because storing data is useless if you can’t use it later!

Simple explanation: Like checking your piggy bank to see how much money you have – you read the value.

Real‑life example: Your phone displays your battery percentage – it reads the variable “batteryLevel”.

School example: Your teacher reads your name from the attendance list.

Home example: You check the temperature on your thermostat.

Nigerian example: A POS machine reads your account balance before a withdrawal.

Illustration:

   age = 10
   print(age)   ← reads and displays the value (10)

Mini summary: Reading a variable means using its value.

📘 Lesson 6: Changing Variables (Updating Boxes)

Definition: Changing a variable means giving it a new value. The old value is replaced.

Why is it important? Because programs need to update information – like a game score that increases.

Simple explanation: You start with 10 cookies, you eat 2, now you have 8. The value changes.

Real‑life example: A football score starts at 0, then becomes 1, then 2 – the variable “score” changes.

School example: Your class attendance increases by 1 each day.

Home example: Your savings grow as you add money.

Nigerian example: The number of passengers on a bus changes at each stop.

Illustration:

   score = 0      ← initial value
   score = 1      ← new value, old 0 is gone
   score = score + 1   ← adds 1 to current score (now 2)

Mini summary: You can change a variable by assigning a new value.

📘 Lesson 7: Simple Instructions (Statements)

Definition: A statement is a single instruction that the computer executes – like a command.

Why is it important? Programs are made of many statements – they are the building blocks of code.

Simple explanation: It’s like saying “walk forward” – that’s one instruction.

Real‑life example: “Turn on the light” is a statement you give to your smart home.

School example: “Open your book” is a statement from the teacher.

Home example: “Set the timer for 10 minutes” is a statement.

Nigerian example: “Add 500 naira to my account” is a statement in a banking app.

Illustration:

   // These are statements:
   age = 10
   print(age)
   age = age + 1

Mini summary: A statement is one command that the computer performs.

📘 Lesson 8: Conditions – Making Decisions

Definition: A condition is a question that has a yes/no answer. Programs use conditions to decide what to do next.

Why is it important? Without conditions, programs would do the same thing every time – boring!

Simple explanation: “If it is raining, take an umbrella” – that’s a condition. If the answer is yes, you act; if no, you don’t.

Real‑life example: If your phone battery is below 20%, it shows a warning.

School example: If you score above 80, you get an A.

Home example: If the door is locked, you use a key.

Nigerian example: If the traffic light is red, you stop.

Illustration:

   if (temperature > 30) {
       wear_light_clothes()
   } else {
       wear_heavy_clothes()
   }

Mini summary: Conditions let your program make choices based on true/false questions.

📘 Lesson 9: Comparison Operators (Asking Questions)

Definition: Comparison operators are symbols that compare two values and give a true/false answer. Examples: >, <, ==, !=, >=, <=.

Why is it important? They allow us to write conditions.

Simple explanation: You compare numbers: “Is 10 greater than 5?” Yes! “Is 10 equal to 5?” No!

Real‑life example: “Is your age >= 18?” Then you can vote.

School example: “Is your score > 70?” Then you pass.

Home example: “Is the fridge temperature > 4?” Then it’s too warm.

Nigerian example: “Is your bank balance > 1000?” Then you can withdraw.

Illustration:

   5 == 5   → true
   5 > 3    → true
   5 < 3    → false
   5 != 3   → true

Mini summary: Comparison operators ask questions and return true or false.

📘 Lesson 10: Logical Operators (Combining Questions)

Definition: Logical operators combine two or more conditions. The main ones are AND, OR, and NOT.

Why is it important? Sometimes you need more than one condition to be true.

Simple explanation: “If it is raining AND I have an umbrella, I will go out.” Both must be true.

Real‑life example: A website asks: “If you are 18+ AND you agree to terms, you can sign up.”

School example: “If you did homework AND you studied, you will pass.”

Home example: “If the door is closed AND the window is locked, then the house is secure.”

Nigerian example: “If you have a valid ID AND you are on the list, you can vote.”

Illustration:

   age >= 18 AND hasID == true   → true only if both are true
   isWeekend OR isHoliday        → true if either is true
   NOT isRaining                 → true if it is NOT raining

Mini summary: Logical operators combine conditions to form more complex questions.

📘 Lesson 11: Input – Getting Data from the User

Definition: Input is data that the program receives from the user, like a name or a number.

Why is it important? Programs become interactive – they respond to what you tell them.

Simple explanation: When a game asks “What is your name?” and you type it – that’s input.

Real‑life example: You type your username and password to log in.

School example: You answer a question on a quiz app.

Home example: You tell your smart speaker to set an alarm.

Nigerian example: You enter your phone number to recharge airtime.

Illustration:

   name = input("What is your name?")   ← user types "Ada"
   print("Hello " + name)

Mini summary: Input allows the user to give data to the program.

📘 Lesson 12: Output – Showing Results

Definition: Output is the information that the program gives back to the user – like displaying a result on the screen.

Why is it important? Without output, you wouldn’t know what the program did!

Simple explanation: When you add two numbers on a calculator and it shows the sum – that’s output.

Real‑life example: A weather app shows the temperature – that’s output.

School example: The computer displays your test score.

Home example: Your microwave beeps and shows “DONE”.

Nigerian example: A POS machine prints a receipt – that’s output.

Illustration:

   print("Welcome to the game!")
   print("Your score is " + score)

Mini summary: Output shows the user the results of the program.

📘 Lesson 13: Combining Variables and Data

Definition: You can combine variables to create new values. For example, adding numbers or joining text together.

Why is it important? This lets you build more complex information.

Simple explanation: If you have “first name” and “last name”, you can join them to get “full name”.

Real‑life example: In a game, your score is the sum of points from different levels.

School example: Your total grade is the average of all your test scores.

Home example: Your total savings = pocket money + gifts.

Nigerian example: Your monthly airtime = your recharge + bonus.

Illustration:

   total = price + tax
   fullName = firstName + " " + lastName

Mini summary: You can use variables together to compute new values.

📘 Lesson 14: Simple Pseudo‑code (Writing Algorithms)

Definition: Pseudo‑code is a way to write algorithms that looks like code but is easy to read – it is not a real programming language.

Why is it important? It helps you plan your code before you write it in a specific language.

Simple explanation: It’s like writing a recipe in your own words – not in a special cooking language.

Real‑life example: A teacher writes the steps of a math problem on the board in plain English.

School example: You write the steps to solve a problem before actually solving it.

Home example: You write a to‑do list using simple words.

Nigerian example: A planner writes the steps for organising a community event.

Illustration:

   // Pseudo-code to calculate grade
   INPUT score
   IF score >= 70 THEN
       grade = "A"
   ELSE
       grade = "B"
   END IF
   PRINT grade

Mini summary: Pseudo‑code is a simple way to write algorithms without worrying about strict syntax.

📘 Lesson 15: Code is Everywhere!

Definition: Code is used in almost every electronic device – from phones to traffic lights.

Why is it important? It shows you that coding skills are useful in many areas.

Simple explanation: Every app, game, and website runs on code.

Real‑life example: Your calculator, your smartwatch, your TV remote – all contain code.

School example: The school portal, the lunch ordering system – all code.

Home example: Your Wi‑Fi router, your fridge with a screen – all code.

Nigerian example: The e‑Naira app, the NIN registration – all built with code.

Illustration:

   +-------------------+
   |  Code is Everywhere |
   |  Phones, Cars, Games, |
   |  ATMs, Traffic Lights |
   +-------------------+

Mini summary: Code is everywhere – learning it opens many doors!

📚 Key Vocabulary

WordSimple Definition
VariableA named box that holds a value.
Data TypeThe kind of data: number, text, or true/false.
AssignmentPutting a value into a variable.
StatementA single instruction in a program.
ConditionA question that is true or false.
Comparison OperatorSymbols like >, <, == to compare values.
Logical OperatorAND, OR, NOT to combine conditions.
InputData that the user gives to the program.
OutputData that the program shows to the user.
Pseudo‑codePlain‑language description of an algorithm.

🧠 Important Concepts

  • Memory: Variables are stored in the computer’s memory. Think of memory as a giant set of labelled boxes.
  • Data Flow: Data flows from input → processing (using variables) → output.
  • Code Execution: Code runs line by line, from top to bottom.
  • State: The current values of all variables at a moment in time.

👣 Step‑by‑Step Explanations

How to write an algorithm with variables

  1. Identify what data you need to store (e.g., name, age, score).
  2. Choose descriptive variable names.
  3. Assign initial values to the variables.
  4. Write statements that use the variables (calculations, comparisons).
  5. Add conditions to make decisions.
  6. Show output to the user.

How to write a simple decision

  1. Identify the condition (e.g., score > 70).
  2. Decide what to do if true.
  3. Decide what to do if false (optional).
  4. Write it in pseudo‑code.

🌍 Real‑life Examples

  • Speedometer: A variable “speed” stores the car’s speed. It is updated every second.
  • Bank ATM: Variables hold your balance, withdrawal amount, and PIN.
  • Calculator: Variables store the numbers you enter and the result.

🇳🇬 Nigerian Examples

  • e‑Naira app: Variables hold your wallet balance, transaction history, and user ID.
  • Paystack: Variables store merchant IDs, payment amounts, and transaction status.
  • NIN verification: Variables hold your name, birth date, and NIN number.
  • Traffic light controller in Lagos: Variables store timer values for red, yellow, green.

🎮 Fun Examples Children Can Relate To

  • Minecraft: Your health bar is a variable. It decreases when you get hurt.
  • Roblox: Your in‑game currency is a variable that increases when you earn points.
  • Fortnite: Your shield is a variable – it goes up when you find potions.
  • Snapchat: The number of streaks is a variable – it increases every day you chat.

🏠 Everyday Examples

  • Alarm clock: The variable “alarmTime” stores when to ring.
  • Fridge: The variable “temperature” is checked to keep food cold.
  • Piggy bank: The variable “savings” grows when you add money.

🧑‍🏫 Teacher Notes

This module introduces the fundamental building blocks of programming. Focus on concepts over syntax. Use physical objects (like boxes or jars) to demonstrate variables. Encourage students to write pseudo‑code for everyday tasks. Emphasise that naming variables well is a sign of a good engineer.

👪 Parent Tips

Ask your child to identify variables in daily life – e.g., “What variables do we have when cooking?” (ingredients, quantities). Encourage them to think about conditions: “If it rains, what do we do?”. This strengthens their logic and prepares them for coding.

✨ Interesting Facts

  • The first programming language, FORTRAN, was created in 1957 – it used variables!
  • There are over 700 programming languages in the world.
  • Some variables can hold images, sounds, and even videos!

💡 Did You Know?

  • Did you know that the first computer had no variables – it was hard‑wired!
  • Did you know that the first video game used variables for score and lives?
  • Did you know that Nigeria has a coding curriculum for primary schools?

🔔 Remember This

  • Variables are like labelled boxes that hold information.
  • Always use clear, descriptive names.
  • Data types help the computer know how to treat your data.
  • Conditions allow your program to make decisions.
  • Pseudo‑code helps you plan before you code.

⚠️ Common Mistakes

  • Forgetting to assign a value – using a variable without giving it a value.
  • Using confusing names – like a, b, c – instead of meaningful names.
  • Mixing data types – trying to add a number and text together.
  • Using = instead of == in conditions – = is assignment, == is comparison.

✅ Best Practices

  • Always initialise variables (give them an initial value).
  • Use meaningful names – score not s.
  • Keep data types consistent.
  • Test your conditions with different values.
  • Write comments to explain tricky parts.

📊 Diagrams & Tables

Flowchart: Decision Making

   Start
     |
     v
   Is score >= 70?
     /   \
   Yes    No
    |      |
    v      v
  Pass   Fail
    |      |
    v      v
   End    End

Comparison Table: Data Types

TypeWhat it holdsExample
IntegerWhole numbers10, 0, -5
FloatDecimal numbers3.14, 2.0
StringText"Hello", "Ada"
BooleanTrue or Falsetrue, false

Comparison Operators Table

OperatorMeaningExample
==equal to5 == 5 → true
!=not equal to5 != 3 → true
>greater than5 > 3 → true
<less than5 < 3 → false
>=greater than or equal5 >= 5 → true
<=less than or equal5 <= 3 → false

📝 End‑of‑Module Summary

You have completed Module 2, and you now understand the core building blocks of all programming languages. You learned about variables – how to name them, assign values, and change them. You discovered different data types – numbers, text, and true/false. You also learned how to write statements, ask questions with conditions, and combine conditions with logical operators. Finally, you explored input and output, and you practiced writing pseudo‑code.

Remember: a program is just a series of instructions that manipulate variables. With these skills, you can start building simple programs – even games! You are now ready to learn a real programming language in Module 3.

❓ Frequently Asked Questions

  1. What is a variable in simple terms? It’s a labelled box where you store a piece of information.
  2. Why do we need data types? So the computer knows what kind of data it is dealing with.
  3. Can a variable change its value? Yes, that’s the whole point!
  4. What is the difference between = and ==? = is assignment, == is comparison.
  5. What is input? Data that the user gives to the program.
  6. What is output? Data that the program shows to the user.
  7. What is pseudo‑code? A simple way to write algorithms in plain language.
  8. Can I have a variable with no value? Yes, but you should assign a value before using it.
  9. Is it important to name variables well? Yes, it makes your code easier to understand.
  10. What is a condition? A question that has a true or false answer.

🤔 Review Questions

  1. What is a variable?
  2. Name three data types.
  3. How do you assign a value to a variable?
  4. What does the == operator do?
  5. What is the difference between = and ==?
  6. What is a condition?
  7. Give an example of a condition in everyday life.
  8. What is input?
  9. What is output?
  10. Why is pseudo‑code useful?
  11. What is a statement?
  12. What is the AND operator used for?
  13. What is the OR operator used for?
  14. Can you change a variable after it has been assigned?
  15. Why should you use descriptive variable names?

📝 Fill‑in‑the‑Blank

  1. A ______ is a named container that holds a value.
  2. The three basic data types are numbers, ______, and true/false.
  3. We use the ______ operator to compare two values.
  4. ______ is data that the user gives to the program.
  5. ______ is data that the program shows to the user.
  6. A ______ is a single instruction in a program.
  7. ______ is a plain‑language description of an algorithm.
  8. The logical operator that means "both must be true" is ______.
  9. The logical operator that means "at least one must be true" is ______.
  10. Always use ______ variable names.

✅ True or False

  1. A variable can only hold a number. (False)
  2. You should always give a variable a value before using it. (True)
  3. == is used for assignment. (False)
  4. A condition returns true or false. (True)
  5. Pseudo‑code is a real programming language. (False)
  6. Input is data that the program shows to the user. (False)
  7. Output is data that the user gives to the program. (False)
  8. The AND operator requires both conditions to be true. (True)
  9. The OR operator requires both conditions to be true. (False)
  10. Using clear variable names is a good practice. (True)

🔘 Multiple Choice

  1. A variable is:
    A) A type of computer
    B) A named container for data
    C) A programming language
    D) A bug
    Answer: B
  2. Which of these is a valid data type?
    A) Integer
    B) Email
    C) Folder
    D) Window
    Answer: A
  3. What symbol is used to assign a value to a variable?
    A) ==
    B) =
    C) <
    D) >
    Answer: B
  4. What does age > 18 mean?
    A) age is less than 18
    B) age is greater than 18
    C) age is equal to 18
    D) age is not 18
    Answer: B
  5. What is pseudo‑code?
    A) A real programming language
    B) A plain‑language description of an algorithm
    C) A type of variable
    D) A bug
    Answer: B
  6. Which operator means "equal to"?
    A) =
    B) ==
    C) !=
    D) >
    Answer: B
  7. What is input?
    A) Data from the user
    B) Data to the user
    C) A variable
    D) A condition
    Answer: A
  8. What is output?
    A) Data from the user
    B) Data to the user
    C) A variable
    D) A condition
    Answer: B
  9. Which logical operator means "both must be true"?
    A) OR
    B) AND
    C) NOT
    D) XOR
    Answer: B
  10. Which logical operator means "at least one must be true"?
    A) OR
    B) AND
    C) NOT
    D) XOR
    Answer: A
  11. What is a statement?
    A) A single instruction
    B) A variable
    C) A data type
    D) A bug
    Answer: A
  12. Which of these is a good variable name?
    A) x
    B) score
    C) 1stScore
    D) my score
    Answer: B
  13. Can a variable change its value?
    A) Yes
    B) No
    C) Only once
    D) Only if it's a number
    Answer: A
  14. What does != mean?
    A) Equal to
    B) Not equal to
    C) Greater than
    D) Less than
    Answer: B
  15. Which of these is NOT a data type?
    A) Integer
    B) String
    C) Boolean
    D) Textbox
    Answer: D

🔗 Matching Exercises

TermDefinition
1. VariableA. A question that is true or false
2. Data TypeB. A named container for data
3. ConditionC. Kind of data: number, text, boolean
4. AssignmentD. Putting a value into a variable
5. OutputE. Data shown to the user

Answers: 1‑B, 2‑C, 3‑A, 4‑D, 5‑E

✏️ Short Answer Questions

  1. Explain what a variable is and give an example.
  2. What is the difference between an integer and a string?
  3. How do you write a condition to check if a number is greater than 10?
  4. What is pseudo‑code and why is it useful?
  5. Give an example of a logical operator and explain what it does.

🎭 Scenario‑based Exercises

Scenario 1: You are building a simple game. The player has 3 lives. Every time they lose, a life is removed. Write the pseudo‑code for this scenario.

Scenario 2: A school wants to check if a student has passed. If the score is 50 or above, they pass; otherwise, they fail. Write the pseudo‑code for this.

👥 Group Activity

In groups, choose a simple task (e.g., making a sandwich, planning a school event). Write down the steps (algorithm) for that task. Then, swap with another group and see if they can follow your steps. Discuss any missing details. This shows how clear instructions are crucial in software.

🧑 Individual Activity

Write a simple pseudo‑code program that asks the user for their name and age, then prints “Hello, [name]! You are [age] years old.”

💬 Classroom Discussion Questions

  1. Why do you think data types are important?
  2. Can you think of a situation where a condition would be useful in a game?
  3. What would happen if you used an uninitialised variable?
  4. How do you think variables are used in a banking app?

🛠️ Mini Project

Create a Simple Quiz: Write a pseudo‑code program that asks the user a question, checks if the answer is correct, and prints “Correct!” or “Try again!”. Use variables and conditions.

📋 Practical Assignment

Write a pseudo‑code program that calculates the total cost of items in a shop. Use variables for price and quantity. The program should ask for the price and quantity, then display the total. Include a condition: if the total is above 1000, give a 10% discount.

🏆 Challenge Exercise

Design a simple “Guess the Number” game using pseudo‑code. The program picks a secret number (e.g., 5). The user guesses a number. If the guess is correct, print “You win!”. If the guess is too high or too low, give a hint.

📌 Quiz Answers

Fill‑in‑the‑Blank: 1. variable, 2. text/string, 3. comparison, 4. Input, 5. Output, 6. statement, 7. Pseudo‑code, 8. AND, 9. OR, 10. descriptive.

True/False: 1F, 2T, 3F, 4T, 5F, 6F, 7F, 8T, 9F, 10T.

Multiple Choice: 1B, 2A, 3B, 4B, 5B, 6B, 7A, 8B, 9B, 10A, 11A, 12B, 13A, 14B, 15D.

🎁 Key Takeaways

  • Variables are containers for data.
  • Different data types exist for different kinds of information.
  • Conditions help programs make decisions.
  • Pseudo‑code is a great way to plan.
  • Always test your code with different inputs.

🔜 Preparation for Module 3

In Module 3, you will learn a real programming language! We will start with simple programs that use variables, conditions, and loops. You will also learn how to write code that actually runs on a computer. To prepare, think about what you would like to build – a game? A calculator? Bring your ideas to the next class!

Fantastic work, young coder! See you in Module 3! 🚀

🏆 Get Certified

🔒

Earn this certificate

Every lesson is already free to read. Sign up, finish the lessons, pass the exam (₦2,000 or 20,000 coins), and get a verified certificate with your name on it.

🎓 Sign Up to Get Certified
🛠️ Practice Tools
Hands-on simulators & labs - subscription required.
→
🎯 Internship Tasks
Real-world tasks to build your portfolio - unlock them with a subscription.
→