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

Module Three

📖 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.
4
Module 3 · Advanced Software Engineer

🔄 Module 3: Loops, Lists & Real Code (Pseudo‑code to Python)

Hello, superstar coder! In Module 2, you learned about variables, data types, and conditions. You can now store information and make decisions in your programs. But what if you need to repeat something many times? Or what if you have a whole list of items to work with?

Welcome to Module 3 – where we learn about loops (doing things again and again) and lists (holding many items together). We will also take our first steps into real code using a language called Python. Don’t worry – we will start slowly and explain everything.

By the end of this module, you will be able to write simple Python programs that use variables, conditions, loops, and lists. You will feel like a real programmer!

🎯 Learning Objectives

After this module, you will be able to:

  • Explain what a loop is and why we use it.
  • Use a while loop and a for loop (in pseudo‑code and Python).
  • Understand what a list is and how to access items in it.
  • Write simple Python code with variables, conditions, and loops.
  • Combine loops and lists to solve problems.
  • Read and understand simple Python programs.
  • Know the difference between pseudo‑code and real code.

📖 Warm‑up Story: Chidi’s Morning Chores

Chidi had to water 10 plants every morning. He walked to each plant, poured water, and moved to the next. That’s a lot of walking! He thought, “I wish I could tell someone to do this for me.”

His older brother, who was a software engineer, said: “Chidi, you can tell a computer to do it. Just say: repeat 10 times: water a plant.”

Chidi also had a list of plants: “Rose, Mango, Banana, Orange…” He kept the list on his phone. He could go through the list one by one.

That day, Chidi learned about loops (repeating) and lists (keeping items together). He realised that computers are great at doing boring, repetitive tasks quickly.

Now, let’s learn how to make computers do the same!

📘 Lesson 1: What is a Loop?

Definition: A loop is a programming structure that repeats a block of code multiple times.

Why is it important? Without loops, you would have to write the same code over and over – very boring and error‑prone!

Simple explanation: Think of a loop as telling your computer: “Do this thing, and keep doing it until I tell you to stop.”

Real‑life example: A washing machine runs a cycle – it repeats washing, rinsing, and spinning.

School example: Your teacher takes attendance every morning – that’s a daily loop.

Home example: You brush your teeth twice a day – that’s a loop.

Nigerian example: A traffic light cycles through red, yellow, green – that’s a loop.

Illustration:

   +------------------+
   |  Start           |
   +--------+---------+
            |
   +--------v---------+
   |  Do something    | <--+
   +--------+---------+    |
            |               |
   +--------v---------+    |
   |  Still need to   |    |
   |  repeat?         | ---+ (if yes, go back)
   +--------+---------+
            |
   +--------v---------+
   |  End             |
   +------------------+

Mini summary: A loop repeats a block of code as many times as needed.

📘 Lesson 2: The While Loop – “While this is true, keep going”

Definition: A while loop repeats as long as a condition is true.

Why is it important? It allows you to repeat actions based on a condition – very flexible.

Simple explanation: “While my piggy bank is not full, I will add more money.”

Real‑life example: While the water is boiling, keep stirring.

School example: While there are still questions on the test, keep answering.

Home example: While the popcorn is popping, keep the lid on.

Nigerian example: While the bus is not full, the driver keeps waiting for more passengers.

Illustration:

   count = 0
   while count < 5:
       print("Hello")
       count = count + 1
   // This prints "Hello" 5 times.

Mini summary: The while loop runs as long as the condition is true.

📘 Lesson 3: The For Loop – “For each item in a group”

Definition: A for loop repeats a block of code for each item in a collection (like a list or a range of numbers).

Why is it important? It’s perfect when you know exactly how many times you want to repeat, or when you want to go through a list.

Simple explanation: “For each fruit in my basket, I will eat it.”

Real‑life example: A teacher calls each student’s name from the register – one by one.

School example: You check each question on a test paper.

Home example: You go through each item on your shopping list.

Nigerian example: A cashier scans each item in a customer’s basket.

Illustration:

   for i in range(1, 6):
       print(i)
   // Prints: 1, 2, 3, 4, 5

Mini summary: The for loop runs for each item in a collection.

📘 Lesson 4: What is a List?

Definition: A list is a collection of items stored together in one variable. It can hold numbers, text, or even other lists!

Why is it important? Lists let you group related items so you can work with them easily.

Simple explanation: A list is like a bag of marbles – you can put many marbles in one bag, and you can take them out one by one.

Real‑life example: A shopping list – you have many items in one list.

School example: A class list of students.

Home example: A list of chores for the week.

Nigerian example: A list of markets in Lagos: “Balogun, Mile 12, Tejuosho”.

Illustration:

   fruits = ["apple", "orange", "banana"]
   // fruits[0] is "apple"
   // fruits[1] is "orange"
   // fruits[2] is "banana"

Mini summary: A list stores multiple items in a single variable.

📘 Lesson 5: Accessing List Items

Definition: You can get an item from a list using its index (position). Indexing usually starts at 0.

Why is it important? You need to be able to read and change individual items in a list.

Simple explanation: If you have a list of 3 fruits, the first fruit is at position 0, the second at position 1, the third at position 2.

Real‑life example: In a queue, the first person is number 1 (but in programming we start at 0!).

School example: Your class list – the first student is at index 0.

Home example: The items on your shelf – first item at index 0.

Nigerian example: The list of players on a football team – the first player is index 0.

Illustration:

   fruits = ["apple", "orange", "banana"]
   print(fruits[0])   // apple
   print(fruits[1])   // orange
   print(fruits[2])   // banana

Mini summary: Use square brackets and the index number to access list items.

📘 Lesson 6: Changing List Items

Definition: You can change an item in a list by assigning a new value to its index.

Why is it important? Lists are dynamic – their contents can change while the program runs.

Simple explanation: If you have a list of the top 3 players, you can change who is number 1.

Real‑life example: You update your shopping list – crossing off items and adding new ones.

School example: You update the class attendance – marking students present or absent.

Home example: You change the chore list for the week.

Nigerian example: You update the list of items in your market stall.

Illustration:

   fruits = ["apple", "orange", "banana"]
   fruits[1] = "grape"   // now fruits = ["apple", "grape", "banana"]

Mini summary: You can change list items by assigning a new value to a specific index.

📘 Lesson 7: Adding and Removing List Items

Definition: You can add new items to a list (e.g., with append()) or remove items.

Why is it important? Real‑world lists change – you need to be able to add and remove.

Simple explanation: Like adding a new fruit to your fruit bowl or taking one out.

Real‑life example: You add a new friend to your contact list.

School example: You add a new student to the class list.

Home example: You add an item to your shopping list.

Nigerian example: You add a new product to your online store’s catalogue.

Illustration:

   fruits = ["apple", "orange"]
   fruits.append("banana")   // adds "banana" at the end
   // fruits is now ["apple", "orange", "banana"]

Mini summary: Lists can grow and shrink – you can add and remove items.

📘 Lesson 8: Looping Through a List

Definition: You can use a for loop to go through every item in a list.

Why is it important? This is one of the most common tasks in programming – processing all items in a collection.

Simple explanation: “For each fruit in my fruit list, I will print its name.”

Real‑life example: A waiter reads each order from a list.

School example: The teacher calls each name from the class list.

Home example: You go through your shopping list and tick each item.

Nigerian example: A bus conductor reads each passenger’s destination from a list.

Illustration:

   fruits = ["apple", "orange", "banana"]
   for fruit in fruits:
       print(fruit)
   // Prints: apple, orange, banana (each on a new line)

Mini summary: Loops let you process every item in a list efficiently.

📘 Lesson 9: From Pseudo‑code to Python

Definition: Python is a real programming language that is easy to read and write. We will now start writing actual Python code.

Why is it important? Python is used by millions of developers – it’s a great first language.

Simple explanation: Pseudo‑code is like a rough draft; Python is the final, running version.

Real‑life example: A chef writes a recipe (pseudo‑code) and then cooks the meal (Python).

School example: You plan an essay outline (pseudo‑code) and then write the full essay (Python).

Home example: You plan a party (pseudo‑code) and then execute the plan (Python).

Nigerian example: An architect designs a building (pseudo‑code) and then workers build it (Python).

Illustration:

   // Pseudo-code:
   score = 70
   if score >= 70:
       print("Pass")
   else:
       print("Fail")

   // Python code (exactly the same!):
   score = 70
   if score >= 70:
       print("Pass")
   else:
       print("Fail")

Mini summary: Python code looks very similar to pseudo‑code – it’s easy to learn!

📘 Lesson 10: Your First Python Program

Definition: A Python program is a file containing Python code. You can run it to see the output.

Why is it important? This is where you bring all your learning to life!

Simple explanation: You type code in a file, save it, and run it – the computer follows your instructions.

Real‑life example: You write a recipe, follow it, and enjoy the meal.

School example: You write a story, read it aloud, and others hear it.

Home example: You write a shopping list, go to the shop, and buy the items.

Nigerian example: You write a list of errands, go out, and complete them.

Illustration:

   # This is a Python program
   name = "Chidi"
   age = 10
   print("Hello, my name is", name)
   print("I am", age, "years old.")

Mini summary: A Python program is a file with code that you can run.

📘 Lesson 11: Python Conditions (if, elif, else)

Definition: Python uses if, elif, and else to make decisions, just like pseudo‑code.

Why is it important? This is how you add logic to your programs.

Simple explanation: “If it rains, take an umbrella; else, take sunglasses.”

Real‑life example: If your phone battery is low, charge it; else, keep using it.

School example: If you score above 80, you get an A; else, you get a B.

Home example: If the door is open, go inside; else, use the key.

Nigerian example: If the bus is full, wait for the next one; else, board.

Illustration:

   score = 85
   if score >= 70:
       print("Pass")
   elif score >= 50:
       print("Remedial")
   else:
       print("Fail")

Mini summary: Python conditions work just like the ones you learned in pseudo‑code.

📘 Lesson 12: Python While Loop

Definition: The while loop in Python repeats as long as a condition is true.

Why is it important? It gives you flexible repetition.

Simple explanation: “While I have money, I will keep buying.”

Real‑life example: While the traffic light is red, you wait.

School example: While the teacher is talking, you listen.

Home example: While the popcorn is popping, you wait.

Nigerian example: While the okada (motorcycle) is moving, you hold tight.

Illustration:

   count = 0
   while count < 5:
       print("Looping!")
       count = count + 1

Mini summary: Python's while loop works the same as in pseudo‑code.

📘 Lesson 13: Python For Loop

Definition: The for loop in Python iterates over a sequence (like a list or range).

Why is it important? It’s the most common way to iterate in Python.

Simple explanation: “For each player on the team, print their name.”

Real‑life example: For each item in your shopping list, buy it.

School example: For each student in the class, mark attendance.

Home example: For each chore on the list, do it.

Nigerian example: For each market in the list, visit it.

Illustration:

   fruits = ["apple", "orange", "banana"]
   for fruit in fruits:
       print("I like", fruit)

Mini summary: Python's for loop makes it easy to go through lists.

📘 Lesson 14: Combining Loops and Lists

Definition: You can use loops to process every item in a list – this is very powerful.

Why is it important? It allows you to perform operations on all items in a collection.

Simple explanation: You have a list of numbers, and you want to add 1 to each number.

Real‑life example: A teacher adds 10 points to each student’s score.

School example: You check each answer in a test.

Home example: You update the quantity of each item on your shopping list.

Nigerian example: A trader updates the price of each item in her store.

Illustration:

   numbers = [1, 2, 3, 4, 5]
   for i in range(len(numbers)):
       numbers[i] = numbers[i] + 1
   // numbers is now [2, 3, 4, 5, 6]

Mini summary: Loops and lists work together to process collections of data.

📘 Lesson 15: Real Python Programs – Putting It All Together

Definition: A real Python program combines variables, conditions, loops, and lists to solve a problem.

Why is it important? This is what software engineers do every day – writing programs that solve problems.

Simple explanation: You write a program that helps you organise your tasks.

Real‑life example: A to‑do list app that lets you add, remove, and view tasks.

School example: A program that calculates your average grade.

Home example: A program that helps you plan your weekly meals.

Nigerian example: A program that calculates the total cost of items in a market basket.

Illustration:

   # Program to calculate the average of numbers in a list
   numbers = [10, 20, 30, 40, 50]
   total = 0
   for num in numbers:
       total = total + num
   average = total / len(numbers)
   print("Average is", average)

Mini summary: Real programs combine all the elements you have learned to solve useful problems.

📚 Key Vocabulary

WordSimple Definition
LoopRepeating a block of code multiple times.
While LoopA loop that repeats while a condition is true.
For LoopA loop that repeats for each item in a collection.
ListA collection of items stored together.
IndexThe position of an item in a list (starting at 0).
AppendAdding an item to the end of a list.
PythonA real programming language that is easy to learn.
PrintA Python function that displays output.
RangeA function that generates a sequence of numbers.
IterateTo go through each item in a collection.

🧠 Important Concepts

  • Iteration: The process of repeating a block of code. Loops are the main tool for iteration.
  • Collection: A group of items, like a list. You can store many pieces of data in one variable.
  • Syntax: The rules of a programming language. Python has simple, clear syntax.
  • Indentation: In Python, indentation (spaces) is used to define blocks of code – very important!

👣 Step‑by‑Step Explanations

How to write a while loop in Python

  1. Start with the keyword while.
  2. Add a condition (e.g., count < 5).
  3. Follow with a colon :.
  4. Indent the block of code that should repeat.
  5. Inside the block, update the condition (e.g., count = count + 1) to avoid infinite loops.

How to write a for loop to go through a list

  1. Start with for.
  2. Choose a variable name (e.g., fruit).
  3. Add in and the list name (e.g., fruits).
  4. Follow with a colon :.
  5. Indent the block of code that should run for each item.

🌍 Real‑life Examples

  • Traffic light controller: Uses a loop to cycle through red, yellow, green.
  • Grocery self‑checkout: Uses a loop to scan each item, and a list to store the items.
  • Music playlist: A list of songs, and a loop to play each one.

🇳🇬 Nigerian Examples

  • Market price tracker: A program that loops through a list of markets and fetches prices.
  • Bus passenger list: A list of passengers, and a loop to check if everyone has paid.
  • School attendance system: A list of students, and a loop to mark each as present or absent.
  • Bank transaction list: A list of transactions, and a loop to calculate the total balance.

🎮 Fun Examples Children Can Relate To

  • Minecraft: A loop can be used to place blocks in a line.
  • Roblox: A loop can be used to spawn enemies one by one.
  • Pokémon: A loop can be used to heal all your Pokémon in a row.
  • FIFA: A loop can be used to cycle through players on the team.

🏠 Everyday Examples

  • Morning routine: A loop of “wake up, brush teeth, eat breakfast”.
  • Chores: A list of chores, and a loop to do each one.
  • Homework: A list of subjects, and a loop to complete each assignment.

🧑‍🏫 Teacher Notes

This module is a transition from pseudo‑code to real Python. Focus on the similarities – Python code looks almost exactly like pseudo‑code. Emphasise indentation and the importance of avoiding infinite loops. Use interactive exercises where students can run Python code (even mentally). Celebrate each small success.

👪 Parent Tips

Encourage your child to write small Python programs on paper. Help them set up a Python environment on a computer if possible. Ask them to explain what a loop is and how it works. Relate loops to daily routines – “What do you repeat every morning?”

✨ Interesting Facts

  • Python was named after the comedy group “Monty Python” – not the snake!
  • The first version of Python was released in 1991.
  • Python is used by NASA, Google, and many Nigerian tech companies.

💡 Did You Know?

  • Did you know that the for loop in Python can also loop through strings, not just lists?
  • Did you know that Python is one of the most popular languages in the world?
  • Did you know that many Nigerian startups use Python to build their web apps?

🔔 Remember This

  • Loops repeat code – they save you from writing the same thing many times.
  • Lists hold multiple items in one variable.
  • Python code looks like pseudo‑code – it’s easy to learn.
  • Always indent your code in Python.
  • Make sure your loop condition will eventually become false – otherwise you get an infinite loop!

⚠️ Common Mistakes

  • Forgetting to indent – Python uses indentation to define blocks.
  • Infinite loops – forgetting to update the condition in a while loop.
  • Off‑by‑one errors – forgetting that index starts at 0, not 1.
  • Using = instead of == in conditions – assignment vs comparison.
  • Mixing data types – adding a number and a string accidentally.

✅ Best Practices

  • Always indent your code consistently (4 spaces is standard).
  • Use meaningful variable and list names.
  • Avoid infinite loops – ensure your loop condition changes.
  • Test your loops with small data first.
  • Write comments to explain what your code does.

📊 Diagrams & Tables

Flowchart: While Loop

   Start
     |
     v
   Condition true? → No → End
        |
       Yes
        |
        v
   Execute block
        |
        v
   (go back to condition)

Comparison Table: While vs For Loop

FeatureWhile LoopFor Loop
ConditionChecked each timeBuilt-in for each item
Best forWhen you don't know how many timesWhen you know the count or have a list
RiskInfinite loop if condition never falseLess risk, because it stops after the list ends

List Operations Table

OperationExampleResult
Accessfruits[0]First fruit
Changefruits[1] = "grape"Second fruit becomes "grape"
Add (append)fruits.append("mango")Adds "mango" at the end
Lengthlen(fruits)Number of items in the list

📝 End‑of‑Module Summary

You have completed Module 3 – a huge milestone! You learned about loops (while and for) that let you repeat code. You discovered lists – powerful containers that hold multiple items. Most importantly, you started writing real Python code that runs on a computer. You now understand the core elements of programming: variables, data types, conditions, loops, and lists.

You can now write simple programs that can solve real problems. Remember, programming is a skill – the more you practice, the better you become. In Module 4, we will go deeper into functions and more advanced Python features.

You are now an official Python beginner – well done!

❓ Frequently Asked Questions

  1. What is a loop in simple words? It’s a way to repeat instructions many times.
  2. What is the difference between while and for? while repeats based on a condition, for repeats for each item in a collection.
  3. What is a list? A container that holds multiple items.
  4. Why does index start at 0? It’s a convention in programming – it makes calculations easier.
  5. How do I add an item to a list? Use the append() method.
  6. What is Python? A real programming language that is easy to learn and use.
  7. Why is indentation important in Python? It defines which code belongs to which block.
  8. What is an infinite loop? A loop that never ends – it keeps running forever.
  9. How can I stop an infinite loop? You can stop the program (e.g., press Ctrl+C) or fix the code.
  10. What is range() in Python? It generates a sequence of numbers for loops.

🤔 Review Questions

  1. What is a loop?
  2. What does a while loop do?
  3. What does a for loop do?
  4. What is a list?
  5. How do you access the first item in a list?
  6. How do you change an item in a list?
  7. How do you add an item to the end of a list?
  8. What is the difference between while and for?
  9. What is Python?
  10. Why is indentation important in Python?
  11. What is an infinite loop?
  12. How can you avoid an infinite loop?
  13. What does len() do?
  14. What is the index of the third item in a list?
  15. Write a simple Python program that prints "Hello" 5 times.

📝 Fill‑in‑the‑Blank

  1. A ______ repeats a block of code multiple times.
  2. The ______ loop repeats while a condition is true.
  3. The ______ loop repeats for each item in a collection.
  4. A ______ is a collection of items.
  5. The position of an item in a list is called its ______.
  6. Adding an item to the end of a list is called ______.
  7. ______ is a real programming language that is easy to learn.
  8. In Python, ______ is used to define blocks of code.
  9. The function that displays output in Python is ______.
  10. A loop that never ends is called an ______ loop.

✅ True or False

  1. A for loop can only be used with lists. (False – it can also be used with strings, ranges, etc.)
  2. In Python, you must indent your code. (True)
  3. An infinite loop is a useful feature. (False – it’s usually a mistake.)
  4. List indices start at 1. (False – they start at 0.)
  5. You can change an item in a list. (True)
  6. Python code is case‑sensitive. (True)
  7. append() removes an item from a list. (False – it adds.)
  8. A while loop always runs at least once. (False – it checks the condition first.)
  9. Pseudo‑code and Python code are exactly the same. (False – pseudo‑code is informal.)
  10. You can use a loop to process every item in a list. (True)

🔘 Multiple Choice

  1. What does a loop do?
    A) Repeats code
    B) Stores data
    C) Prints output
    D) Defines a variable
    Answer: A
  2. Which loop repeats based on a condition?
    A) for
    B) while
    C) do
    D) repeat
    Answer: B
  3. What is a list?
    A) A single item
    B) A collection of items
    C) A type of loop
    D) A condition
    Answer: B
  4. What is the index of the first item in a list?
    A) 1
    B) 0
    C) -1
    D) It varies
    Answer: B
  5. How do you add an item to a list in Python?
    A) add()
    B) append()
    C) insert()
    D) push()
    Answer: B
  6. What is Python?
    A) A type of snake
    B) A programming language
    C) A data type
    D) A loop
    Answer: B
  7. What does print() do in Python?
    A) Reads input
    B) Shows output
    C) Defines a variable
    D) Starts a loop
    Answer: B
  8. Which of these is a valid for loop in Python?
    A) for i in range(5):
    B) for i to 5:
    C) for i=1 to 5:
    D) for i in 5:
    Answer: A
  9. What is an infinite loop?
    A) A loop that never runs
    B) A loop that runs once
    C) A loop that never ends
    D) A loop that runs 10 times
    Answer: C
  10. Why is indentation important in Python?
    A) It makes code look nice
    B) It defines code blocks
    C) It speeds up execution
    D) It is not important
    Answer: B
  11. What does len() do?
    A) Returns the length of a list
    B) Adds an item to a list
    C) Removes an item from a list
    D) Prints a list
    Answer: A
  12. Which of these is a correct way to access the second item in a list named items?
    A) items[1]
    B) items[2]
    C) items[0]
    D) items.get(1)
    Answer: A
  13. What is the purpose of a for loop?
    A) To define a list
    B) To iterate over a sequence
    C) To check a condition
    D) To print output
    Answer: B
  14. What does the range(1, 6) function generate?
    A) [1, 2, 3, 4, 5]
    B) [1, 2, 3, 4, 5, 6]
    C) [0, 1, 2, 3, 4, 5]
    D) [1, 2, 3, 4]
    Answer: A
  15. Which of the following is NOT a valid data type in Python?
    A) int
    B) float
    C) list
    D) text
    Answer: D (it’s called string)

🔗 Matching Exercises

TermDefinition
1. LoopA. A collection of items
2. ListB. Repeating code
3. IndexC. Position of an item in a list
4. AppendD. Add an item to a list
5. PythonE. A real programming language

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

✏️ Short Answer Questions

  1. Explain the difference between a while loop and a for loop.
  2. What is a list? Give an example.
  3. How do you access the third item in a list called names?
  4. Write a Python program that prints all even numbers from 2 to 10.
  5. What is the purpose of range() in a for loop?

🎭 Scenario‑based Exercises

Scenario 1: You are writing a program to calculate the total price of items in a shopping cart. The cart is a list of prices (e.g., [100, 50, 200]). Write the Python code to sum all the prices and print the total.

Scenario 2: You have a list of student scores. You want to give a bonus of 5 points to each student. Write the Python code to update the list with the bonus.

👥 Group Activity

In groups, come up with a simple problem that can be solved with a loop and a list. For example, “List of 5 favourite foods” – write a Python program to print each food with a number. Each group presents their program.

🧑 Individual Activity

Write a Python program that asks the user for 5 numbers, stores them in a list, and then prints the sum of all numbers. Use a loop to ask for the numbers.

💬 Classroom Discussion Questions

  1. Why are loops important in programming?
  2. When would you use a while loop instead of a for loop?
  3. Can you think of a situation where you would need a list?
  4. How does Python differ from pseudo‑code?

🛠️ Mini Project

Build a To‑Do List Program: Write a Python program that allows the user to add tasks, view the list, and mark tasks as done. Use a list to store tasks. Include a loop to keep the program running until the user chooses to exit.

📋 Practical Assignment

Write a Python program that takes a list of numbers and prints the largest and the smallest numbers. Test it with the list: [45, 78, 12, 90, 34].

🏆 Challenge Exercise

Write a Python program that generates a list of 10 random numbers (between 1 and 100) and then counts how many are even and how many are odd. (Hint: use a loop and the modulo operator %).

📌 Quiz Answers

Fill‑in‑the‑Blank: 1. loop, 2. while, 3. for, 4. list, 5. index, 6. append, 7. Python, 8. indentation, 9. print, 10. infinite.

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

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

🎁 Key Takeaways

  • Loops repeat code – they are essential for avoiding repetition.
  • Lists store multiple items – they are like containers.
  • Python is a real programming language that is beginner‑friendly.
  • Always test your loops to avoid infinite loops.
  • Practice writing Python code – the more you do, the better you get.

🔜 Preparation for Module 4

In Module 4, you will learn about functions – a way to group code into reusable blocks. You will also learn about more advanced data structures. To prepare, think about tasks you repeat often – those are perfect candidates for functions. Bring your ideas to the next class!

Amazing work, Python coder! See you in Module 4! 🐍

🏆 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.
→