JHS Portal/Computing / ICT/Computational Thinking, Algorithms & Flowcharts
All Topics
ICTJHS 1 • Term 3Topic 15Free Trial Lesson

Computational Thinking, Algorithms & Flowcharts

Learn algorithm step-by-step problem solving, pseudocode, and standard flowchart symbols (terminal oval, input/output parallelogram, process rectangle, decision diamond).

Curated Video Lesson

Visual explanation and practical step-by-step walk-through

Watch on YouTube

Comprehensive Study Notes

Aligned with Ghana NaCCA & WAEC BECE syllabus standards

Topic Introduction & Real-World Context:

Behind every video game, Google search, robot, and automated traffic light lies an algorithm. An algorithm is simply a clear, step-by-step recipe for solving a problem. In modern computing, developing computational thinking—breaking complex challenges into sequential, manageable steps and mapping them with flowcharts—is the foundational doorway into computer programming.

What You Will Master in This Lesson (NaCCA Objectives):

Define an algorithm and analyze the characteristics of an effective algorithm.
Represent algorithms using structured English Pseudocode.
Identify and draw standard ANSI flowchart symbols: Terminal, Input/Output, Process, and Decision.
Trace and construct flowcharts for fundamental mathematical and real-world problems.

1. What is an Algorithm? Core Characteristics

An Algorithm is a finite, unambiguous, step-by-step sequence of logical instructions designed to solve a specific problem or perform a task. • Everyday Analogy: A cooking recipe for preparing Ghanaian Jollof rice is an algorithm: it lists the ingredients (inputs), specifies the exact chronological steps to follow (processing), and produces delicious jollof rice (output). • Essential Characteristics of a Good Algorithm: 1. Finiteness: The algorithm must terminate after a definite, countable number of steps (it cannot loop infinitely). 2. Definiteness (Unambiguous): Every single instruction must be crystal clear with only one possible logical interpretation. 3. Input: Must accept zero or more clearly defined inputs. 4. Output: Must produce at least one defined output or result. 5. Effectiveness / Feasibility: Each step must be simple enough to be realistically executed using available resources.
Key Takeaway: An algorithm is a finite, clear, step-by-step set of instructions designed to solve a problem.
Real-World Application: The step-by-step instructions for withdrawing cash from an ATM machine represent a financial transaction algorithm.

2. Representing Algorithms: Pseudocode

Pseudocode is an informal, high-level way of describing an algorithm using structured, plain English statements that resemble programming code without strict programming language syntax. • Common Keywords Used in Pseudocode: - START / BEGIN: Marks the initiation of the algorithm. - INPUT / READ: Accepts data from the user. - CALCULATE / COMPUTE: Performs mathematical operations. - DISPLAY / PRINT / OUTPUT: Presents results to the user. - IF...THEN...ELSE: Represents conditional decision-making. - STOP / END: Marks the termination of the algorithm. • Pseudocode Example 1: Sum of Two Numbers: START INPUT Number1, Number2 Sum = Number1 + Number2 OUTPUT Sum STOP • Pseudocode Example 2: Determining Exam Pass or Fail: START INPUT Score IF Score >= 50 THEN OUTPUT "Congratulations! You Passed" ELSE OUTPUT "You Failed. Please Retake" ENDIF STOP
Key Takeaway: Pseudocode uses plain English keywords (START, INPUT, CALCULATE, OUTPUT, STOP) to outline program logic.
Real-World Application: Software engineers write pseudocode on whiteboards to plan out program logic before typing actual Python or Java code.

3. Standard Flowchart Symbols (ANSI Standard)

A Flowchart is a visual graphic diagram representing an algorithm, where individual steps are illustrated using standardized geometric shapes connected by directional arrows (flowlines): 1. OVAL (Terminal Symbol): - Represents the START or STOP / END of an algorithm. 2. PARALLELOGRAM (Input / Output Symbol): - Represents entering data into the system (e.g. 'INPUT Base, Height') or outputting results (e.g. 'DISPLAY Result'). 3. RECTANGLE (Process Symbol): - Represents calculations, data assignments, or internal actions (e.g. 'Area = 0.5 * Base * Height'). 4. DIAMOND / Rhombus (Decision Symbol): - Represents a logical conditional question with two possible exit branches: 'Yes' or 'No' (or 'True' and 'False') (e.g. 'Is Age >= 18?'). 5. FLOWLINE (Arrows): - Connects the symbols and indicates the exact sequential direction of program execution (typically top-to-bottom or left-to-right).
Key Takeaway: Oval = Start/Stop; Parallelogram = Input/Output; Rectangle = Process/Calculate; Diamond = Decision.
Real-World Application: A traffic light control system uses a decision diamond: 'Has the timer reached 60 seconds? Yes → Switch to Amber; No → Remain Green'.

4. Constructing Flowcharts for Practical Problems

• Example Problem: Flowchart to Calculate the Perimeter of a Rectangle: Step 1: Draw an OVAL containing 'START'. Step 2: Draw a downward arrow to a PARALLELOGRAM containing 'INPUT Length, Width'. Step 3: Draw a downward arrow to a RECTANGLE containing 'Perimeter = 2 * (Length + Width)'. Step 4: Draw a downward arrow to a PARALLELOGRAM containing 'OUTPUT Perimeter'. Step 5: Draw a downward arrow to an OVAL containing 'STOP'. • Rules for Drawing Flowcharts: - Use standard geometric symbols neatly. - Flowlines should not cross each other haphazardly. - Decision diamonds must always have two clearly labeled exit paths ('Yes' and 'No'). - Every flowchart must have exactly ONE Start symbol and at least one Stop symbol.
Key Takeaway: Flowcharts visually map algorithms: connect symbols logically with directional arrows from Start to Stop.
Real-World Application: Flowcharts are used in medicine to guide emergency doctors through resuscitation protocols step by step.
Common Mistakes Students Make in BECE Examinations:
⚠️Using a rectangle for Input/Output operations (Input and Output MUST use a Parallelogram).
⚠️Forgetting to label the exit branches of a Decision Diamond with 'Yes' and 'No'.
⚠️Creating an algorithm with no termination point (an infinite loop violates finiteness).
⚠️Using an oval for calculations (ovals are strictly for Start and Stop).
Teacher's BECE Exam Pro-Tips:
⭐In BECE Section A and B, match symbols precisely: Oval = Start/Stop; Parallelogram = Input/Output; Rectangle = Process/Calculation; Diamond = Decision.
⭐When writing pseudocode, always begin with 'START' and conclude with 'STOP'.
⭐Ensure decision diamonds have two exit lines pointing to different outcomes based on condition.
Quick Revision Summary Checklist:
Can define an algorithm and state 3 characteristics (finite, unambiguous, feasible).
Know how to write algorithms in structured Pseudocode.
Can identify and draw the 5 standard flowchart symbols (Oval, Parallelogram, Rectangle, Diamond, Arrow).
Can trace a simple algorithm to calculate mathematical formulas.

Step-by-Step Worked Examples (2)

Real BECE exam-standard problems with complete solution steps

Example 1: Writing an Algorithm to Calculate the Area of a Rectangle
Problem StatementWrite a step-by-step algorithm in pseudocode to calculate and display the area of a rectangle given its length and breadth.
Step-by-Step Solution:

Step 1: START

Step 2: INPUT length (L) and breadth (B)

Step 3: CALCULATE Area = L * B

Step 4: OUTPUT Area

Step 5: STOP

💡
Key Takeaway / Exam Rule: Algorithms follow a logical sequence: Start → Input → Calculate → Output → Stop.
Example 2: Selecting Flowchart Symbols for Problem Solving
Problem StatementWhich flowchart symbols should be used to represent: (a) Starting a program, (b) Checking if Age is greater than 18, (c) Calculating Total = Price + Tax?
Step-by-Step Solution:

(a) Starting a program: OVAL (Terminal symbol).

(b) Checking if Age is greater than 18: DIAMOND (Decision symbol with Yes/No exit paths).

(c) Calculating Total = Price + Tax: RECTANGLE (Process/Calculation symbol).

💡
Key Takeaway / Exam Rule: Oval = Start/End; Diamond = Decision; Rectangle = Process/Calculation.
Mastery Diagnostic Quiz

Ready to test your knowledge on Computational Thinking, Algorithms & Flowcharts?

Timed computerized test with instant feedback, scoring, and comprehensive question rationales.