SURF-CLOUD Learn Robotics · AI · Programming
Free for students

B7.4.2.1.1 B7 (JHS 1) · Computational thinking · Algorithm

Sequence, selection, and iteration

You should be able to: explain algorithm, decomposition, and abstraction, and use sequence, selection, and iteration in a simple plan.

1. Learn

An algorithm is a clear, finite list of steps to solve a problem. Cooking jollof from a recipe is an algorithm. So is “how to pay school fees with MoMo”.

  • Decomposition — break a big problem into smaller ones. “Organise a sports day” → budget, teams, first aid, timetable.
  • Abstraction — hide extra detail so you can think. A trotro map shows stops, not every pothole.

Three ways steps flow:

  • Sequence — one after another, no branching. Example: wake up → brush teeth → wear uniform → go to school. Numbers 1 to 10 in order are a sequence.
  • Selection — a decision. If it is raining, take an umbrella; else leave it. Tea with sugar or without sugar still results in tea.
  • Iteration — repeat. Keep adding pupils’ scores until the list ends. Keep stirring until the soup thickens. Lightbot-style puzzles use iteration when you repeat “move forward”.

2. See

Draw three small flow sketches: a straight line of boxes (sequence); a diamond “yes/no” (selection); an arrow looping back (iteration). If you can, try a Lightbot or Scratch “repeat” block.

3. Practice

  1. Write your morning from waking to reaching the school gate as a sequence of 6–8 steps. No “if” yet.

    Show a sample

    Wake → wash → eat → wear uniform → take bag → walk to junction → board trotro → alight at school → enter gate.

  2. Add selection: what changes if it is raining?

    Show a sample

    If raining, wear a raincoat / take a taxi if you can; else walk as usual. You still arrive at school (same outcome, different path).

  3. Give an everyday iteration example in a Ghanaian market.

    Show a sample

    The seller keeps weighing and packing tomatoes until the customer’s bowl is full, or keeps calling prices until the last customer leaves.

  4. Decompose “send homework by email” into at least four smaller tasks.

    Show a sample

    Open mail → attach file → type teacher’s address → write subject → send → check Sent folder.

  5. Why is a map of Accra an example of abstraction?

    Show answer

    It keeps useful things (roads, names) and leaves out extra detail (every house colour, every pothole) so you can plan a route.

4. Project (GES exemplar)

Write numbers 1–10 in order (sequence). Write a day’s itinerary with no branching. Then present a case with two options that still meet the same goal (selection). Then design a small solution that uses iteration (Lightbot or a loop in words).

Submit: one page with three labelled mini-algorithms: Sequence / Selection / Iteration.

5. Check (GES proficiency)

  • Emerging — lists steps but they jump around
  • Developing — sequence is clear; selection and iteration are mixed up
  • Approaching proficient — three correct mini-examples
  • Proficient — uses decomposition and abstraction in the write-up
  • Highly proficient — a classmate can follow the algorithms without extra talk

Source: NaCCA Computing CCP B7.4.2.1 / B7.4.2.1.1. SURF-CLOUD Technology Institute.