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

L3 Flowcharts Student

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

L3 Flowcharts Student

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

FLOWCHARTS

PROGRAMMING
CONSTRUCTS
AN INTRODUCTION WITH
PYTHON
FLOWCHART ALGORITHMS
DNA
BBC TECHNOLOGY section – READ and SHARE

Pl a
des nners
k on
STARTER
You’re in a room with three treasure chests
– At least one chest has treasure in it
– If a chest doesn’t have treasure it will have a deadly poison
– Each chest has a message, but all the messages are lying.
Which treasure chest would you open?
STARTER ANSWER

– The middle chest has treasure – so it is NOT in the middle chest


– All chests have treasure – so it is NOT in all the chests
– Only one chest has treasure – so it is NOT in just one chest
– Therefore it is in two chests, but NOT the middle chest
RECAP OF LESSON 2
• Decomposition…? • Abstraction…?
LEARNING OBJECTIVES:

Learning Objectives:
• Identify flowchart symbols
• Develop flowchart(s) to solve problems

Key terms:
Literacy Objectives: • Flowchart
• Process
• Begin to use the relevant key terminology in
• Flow control
class discussions and written work • Input/output
https://www.youtube.com/wa
tch?v=kxZJv56BxU8
FLOWCHART SYMBOLS Optional YouTube video to
explain the symbols

Start/Stop
Decision

Process Input/Output

Flow control
EXAMPLE OF A FLOWCHART

Scenario: Student task (paper based):

• start Draw a flowchart to meet the criteria


• This flowchart accepts 2 inputs in on the left.
the form of numbers
• Carries out the process of addition Decision
on the 2 inputs. Start/Stop
• Outputs the total of the calculation
• stops
Process Input/Output
SUCCESS CRITERIA
In your GoogleClass workbook turn to:
Lesson3 – Flowchart algorithms (Pg.9-11)

In this example the problem of how to Create a suitable flowchart to show


water plants in a garden has been step-by-step how to cross a road.
broken down into three steps. You must use at least 1 decision
Start shape.

Turn
Is Temp > 20? fan on

Turn
fan off
A hinge question is a diagnostic tool
which a teacher employs when their

HINGE QUESTION students reach the “hinge” point.


Students' responses provide the
teacher with valuable evidence about
what their students know, don't know
and need to do next.

Select the only correct statement regarding Flowcharts:

1. Focusses on the important information only

2. Looks for similarities among and within problems

3. Step-by-step way of completing a task

4. Breaking down a complex problem or system into smaller,


more manageable parts
PLENARY:
• Explain any feature regarding a decision symbol used in a
flowchart

Use the random name selector to get students to share their


• Be prepared to share
definitions/understanding your
of key termsthoughts
introduced with the class
this lesson
FLOWCHART SYMBOLS
Start

Process
Get watering
can out of
garden shed
• This symbol is used to show a single step
that is part of a bigger problem Fill watering
can with water
• Process symbols may have only one line
going into and one line going out of them
• In this example the problem of how to water Pour water on
plants
plants in a garden has been broken down
into three steps
Stop
FLOWCHART SYMBOLS

Output Start

• Output symbols have only


one line going in and one No Turn fan
Is it hot?
off
line going out of them
• This flowchart describes
Yes
the problem of how to
Turn fan
keep a room cool with a
on
fan
FLOWCHART SYMBOLS Start

Stand at the
Decision kerb

Look left and


• This symbol is used when a question must be right for
asked to decide what to do next vehicles

• Decision symbols have one YES and one NO


No
arrow going out of them to show what must Is the road clear?
happen next, depending on the answer to the
question Yes
Cross to other
• This flowchart describes the problem of how to
side of road
cross the road
Stop
PROGRAMMING
CONSTRUCTS
“There are 3 different constructs used
in computer programming.”

 SEQUENCE – A SERIES OF ORDERED


PROCESSES.
 SELECTION – A DECISION, WHICH IS BASED
O N W H E T H E R A C E R TA I N C O N D I T I O N I S
M E T.
 I T E R AT I O N – T H E R E P E T I T I O N O F A
PROCESS (LOOP).
PROGRAMMING CONSTRUCTS - FLOWCHARTS
Flowcharts are often used in program design to aid understanding.
Sequence Selection Iteration / Loop

Flowcharts are used often in program design but they are not the
only method. Another useful method is to write pseudocode.
STUDENT CHALLENGE #1
Complete the gaps, and place the activity (boxes) in the correct location.
S_ _ _ _ _ _ _ S_ _ _ _ _ _ _ _ I_ _ _ _ _ _ _ _ / L_ _ _

Go to the
Put on coat
cinema

Stay at home
Add water and watch TV

Is
Have
Check contents the cup at least £10?
Of wallet/purse
full?
Put on jumper
Stop Put on shirt
STUDENT CHALLENGE #1 - SOLUTION
Complete the gaps, and place the activity (boxes) in the correct location.

Sequence Selection Iteration / Loop

Check contents
Put on shirt
Of wallet/purse
Add water

Have
Stay at home
Put on jumper at least £10? and watch TV Is
the cup
full?

Go to the
Put on coat
cinema
Stop
STUDENT CHALLENGE #2
Drag text to each symbol to complete the flowchart. The first one’s done for you.

Start


STUDENT CHALLENGE #2 - SOLUTION
The completed flowchart…

i) Identify two INPUTS.


ii) Identify two OUTPUTS.
iii) Identify a PROCESS.
iv) Identify a SELECTION.
LOOK AT THE FOLLOWING SNIPPETS OF PYTHON…

Are they a sequence, a selection or an iteration?

?
Sequence

?
Selection

?
Iteration
STUDENT CHALLENGE #3
Are they a sequence, a selection or an iteration?

?
Selection

?
Iteration

?
Sequence
PROGRAMMING INTRODUCTION - RECAP
What are the 3 constructs used in computer programming?

? ?

?
Now attempt the Sequencing, Selection and Iteration Quiz
(Press Shift + F5 to run this slide, and then click the above link)
PYTHON CHALLENGE
If you already have some Python programming experience, try this challenge.
Here is the familiar ‘Hello World’ program. Cut & paste it to your IDLE editor.

print ("What is your name?")


firstname = input()
print ("Hello ",firstname)

print ("\nWhere are you from?")


print ("1. England")
print ("2. France")
print ("\nSelect: 1 - 5:")

language = input()

if language == "1":
print ("Hello World!")

Add to it so it will output ‘Hello World’ in one of 5 different languages,


depending on which language you speak. You may choose your own languages!
(Hint: Google Translate may well come in handy!)

You might also like