You are on page 1of 1

Kemble La

Study Notes
An algorithm is a step by step sequence designed to solve a problem, either in
computing contexts or simple daily tasks.
Can be used to describe simple daily actions. For instance,
Algorithm to bake cookies:
Beat butter
Add sugar and salt
Add eggs and vanilla
Beat in the flour
Stir the remaining flour
Bake!
Algorithms conclude with a solution in a fixed number of steps. The steps must
be performed in order to solve the problem. For example, you cannot bake the
cookie without beating butter first.
Algorithms can be described using pseudocode and flowcharts.
Pseudocode: Indented lines and keywords used to describe an algorithm. It is
written using a word processor. Keywords (e.g. BEGIN and END) are bolded or
capitalised to emphasise its presence and indicate its potential action. Below is
an example on how to represent a mathematical pseudocode.
Problem: Write pseudocode to calculate the area of a triangle given the base of 3
cm and a height of 10 cm.
BEGIN
Make base length 3 cm
Make height 10 cm
Set area to x base height
Display area
END
Flowcharts: A pictorial or graphical method of describing an algorithm. Some
flowcharts are one-way/linear, making them easy to read and absorb info. On the
other hand, some flowcharts may break into many branches, resulting a complex
and difficult structure. Instead of keywords to highlight significance and purpose,
flowcharts use a set of symbols that are interconnected by lines called flowlines.
Problem: Design a flowchart to calculate the area of a triangle given the base of
3 cm and a height of 10 cm.

Begin Make base Make height Set area to Display area End
3cm 10cm x base
height
Rounded
rectangle Rectangle
represents represents a
start and finish process or
action

You might also like