0% found this document useful (0 votes)
36 views

Algorithms and Flowchart

Uploaded by

BrightKidsHQ
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Algorithms and Flowchart

Uploaded by

BrightKidsHQ
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Algorithms

and
Flowcharts
Learning Objective
• Design, create and test algorithms involving a sequence of steps and
decisions.

Success Criteria
• I can understand what is an algorithm.
• I can recognise flowchart symbols.
• I can use and create flowcharts.
• I can use and create algorithms to solve problems.
Traffic Lights Warm-up
Observe the sequence of lights on the traffic light.
Try to remember the correct sequence.

Click Here to
activate
Traffic Lights Warm-up
Here’s the correct sequence again:

Green Yellow Red Red & Yellow Green


Algorithms
• Traffic lights are usually controlled by a
computer and are programmed to
follow the same sequence over and
over again.

• These sequences are called algorithms.

• Some traffic light algorithms on busy


roads are very complex, containing
many steps. Others are much shorter
and are easier to predict.
Algorithms
An algorithm is a step-by-step set of instructions or a set
of rules to perform a specific task or solve a particular
problem. It is a well-defined procedure that, when
followed, guarantees the solution to the problem or the
completion of the task. Algorithms are fundamental in
computer science and are used in various fields to
automate processes and make decisions. Even a recipe
can be considered an algorithm. If you follow the
instructions exactly, you will reproduce the recipe.

In maths, an algorithm serves as a systematic and well-


defined procedure used to tackle various problems and
tasks. For example, you could use an algorithm to help
you classify shapes. It would guide the process of
categorising these shapes based on criteria such as the
number of sides or specific geometric properties. By
following the sequence of steps, you provide a structured
and systematic approach to problem-solving and ensure
accuracy and consistency.
Algorithm Challenge
Let's try creating an algorithm for making a cup of tea.

Write down an algorithm (a step-by- step instructions)


that anyone could follow to make a cup of tea.

You have 5 minutes!

1
4
3
2
TIME’S
Click here to
START
UP
Cup of Tea Algorithm
Is your algorithm anything like this?

1. Fill a kettle with water and switch it on to boil.


2. Place a teabag into a mug.
3. Wait for water to boil.
4. Pour the water into the mug. Fill the mug with
water until it is about 80-90% full.
5. Leave the teabag in the hot water for 2 minutes
so that it can stew.
6. Add milk if wanted.
7. Add sugar if wanted.
8. Remove the teabag from the mug.
9. Stir the tea until it resembles a uniform mixture.
10. Serve and enjoy!
Flowcharts
We can also display our algorithm in a flowchart.
A flowchart is a visual representation of a process or algorithm, using various shapes
and arrows to illustrate the steps of the sequence and the flow of information. It is a
diagrammatic tool commonly used in fields such as computer programming,
business process modelling and problem-solving to depict the logical steps and
decision points within a system.

Key Term
An algorithm is a set of
step-by-step instructions to
describe a task or process.
Pause for Thought
So putting these together,
Key Term we could say that a
A flowchart is a visual method flowchart is a visual
for describing algorithms. method for describing a set
of step-by-step instructions
for a task or process.
Flowcharts
In a flowchart:

Shapes: Different shapes represent different elements in the process. For example:

Symbol Name Function

Oval Indicates the start or end of the process.

Rectangle Represents a process or activity.

Denotes a decision point, where a yes/no question or


Diamond
condition is evaluated.

Shows the flow of the process from one step to another.


Arrows connect the shapes and illustrate the direction
Arrow
of the flow, indicating the sequence in which the steps
or decisions are executed.

Flow Direction: Typically, the flow of the process goes from top to bottom or left to right,
following the sequence of steps in the algorithm.
Start

Flowcharts Fill a kettle with water and


switch it on to boil.
Turning our algorithm into a
Water boiled? No wait
flowchart could look like this. Yes
Pour the water into the
mug containing a tea bag.

Has the tea


stewed enough? wait
No

Do you want
Yes Add the
milk or sugar?
No milk
and/or
Remove the teabag from the mug. sugar.

Stir the tea.


No
Is everything
dissolved?
Yes
Serve and Enjoy!
Flowcharts
When drawing flowcharts we need to remember the following:
We always start at the top of the flowchart.
We then work our way down the flowchart from top to bottom, one step at a time.
The flowchart algorithm finishes at the bottom.
We need to learn the correct flowchart symbols. This oval is called a
terminal.
Start
A rectangular box is called
Put water in kettle and switch on. a process.

This diamond is called a


Is the water decision.
boiled?
The arrows are called
Put teabag in cup or mug. flow lines.

This oval is also called a


Stop terminal.
Test Your Knowledge
What is an algorithm? What is a flowchart?

a special type of computer program a chart for guiding echidnas


used by smartphones back to their homes

a set of step-by-step instructions to a method for making a


describe a task or process great cup of tea

a strong and lightweight metal used a visual method for


to make aircraft describing algorithms

What do we call this What do we call this


flowchart symbol? flowchart symbol?

Turn Left Start

a terminal a terminal

a process a process

a flow line a flow line


Let’s Bring It All
Together
Key Term
An algorithm is a set of step-
by-step instructions to describe
a task or process.

Key Term
A flowchart is a visual method
for describing algorithms.

Pause for Thought


So putting these together, we
could say that a flowchart is a
visual method for describing a
set of step-by-step instructions
for a task or process.

You might also like