Course Content
L1: Algorithm Decomposition and Abstraction
In this topic we will focus on the definition of: - Algorithm - Decomposition - Abstraction You will also decompose and develop abstraction from given problems.
0/2
L2: Developing Algorithms using Pseudocode
0/1
L3: Developing Algorithm using flowcharts
0/1
L4: Linear and Binary Search
0/1
L5: Bubble Sort
0/1
L6: Merge Sort
0/1
L7: Assessment
0/1
8525 Unit 1: Fundamentals of Algorithm – COMING SOON
About Lesson

Lesson 01: Introduction To Algorithms


Specification Points Addressed in this lesson:

  • Use a systematic approach to problem solving and algorithm creation representing those algorithms using pseudo-code, program code and flowcharts.
  • Explain simple algorithms in terms of their inputs, processing and outputs.
  • Determine the purpose of simple algorithms.

Flowcharts

Flowchart is a graphical representation of an algorithm, where each action (input, output, process, decision) is represented with a symbol and the symbols are joined by an arrow to show the direction that the  path that the algorithm follows.  

Here is a list of the six flowchart symbols, their name and what they are used for.

8f61c917 f265 4c4c 90c5 a32dc47c5766

Flowcharts terminal symbol is used to start as well as end the diagrams.  The following flowchart takes a number as a score from the user and prints “pass” if the score is 60 otherwise prints “fail”.

Passfail. Drawio 1
Pass Fail Flowchart

 

Use the following to guide you when drawing a flowchart:

  • Always include the start and stop symbol when possible.
  • parallelogram is used for both input and output, the context should make the distinction for example score is an input, but “Pass” and “Fail” are output.
  • Decisions must always have to lines leaving, one for yes and one for no, these must be labelled.

In the following example, two subroutine calls are made namely playgame() and updateLeader(user, score).

Subroutine calls

Notice that the playgame() doesn’t take any arguments, therefore the brackets are empty, however the updateLeader(user, score) requires two arguments.  Both of these subroutines can be further specified as a subprogram with it’s own flowchart and clearly labeled.

0% Complete
Scroll to Top