programming for gcse topic 8.2: pseudo code and flowcharts
DESCRIPTION
T eaching L ondon C omputing. Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts. William Marsh School of Electronic Engineering and Computer Science Queen Mary University of London. Aims. Design: what it about? Pseudo code Flowcharts My views. Design. Plan Before you build - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/1.jpg)
Programming for GCSE
Topic 8.2: Pseudo Code and Flowcharts
Teaching London Computing
William MarshSchool of Electronic Engineering and Computer Science
Queen Mary University of London
![Page 2: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/2.jpg)
Aims
• Design: what it about?• Pseudo code• Flowcharts• My views
![Page 3: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/3.jpg)
Design
• Plan• Before you build• How for s/w?
• Software is a description!
• Steps towards a solution
![Page 4: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/4.jpg)
PSEUDO CODE
![Page 5: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/5.jpg)
Pseudo Code
• Careless or informal code• Useful for• Making a start• Breaking a problem done (i.e. design)• Algorithms without code
• AQA has defined a syntax• Does this miss the point?
![Page 6: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/6.jpg)
Example: Shopping List
initialise shopping list and list of purchaseforever
get commandif command is 'add'
get item and add it to shopping listif command is 'buy'
get item; transfer from shopping to purchase list
if command is 'print'print both lists
![Page 7: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/7.jpg)
FLOWCHARTS
![Page 8: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/8.jpg)
Statement Block• Group of instructions• No jumps• Comments!
• Arrows implicit• downwards• across
description
![Page 9: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/9.jpg)
Decision• Choice of two• If statement
true
false
![Page 10: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/10.jpg)
Example – Largest Value• Input two
numbers• Output largest
start
stop
input X, Y
X > Y
print X print Y
true
false
![Page 11: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/11.jpg)
?
Quiz – Flowchart for A Loop• Pseudo code • Equivalent
flowchart
While conditionstatement 1
statement 2
Condition
Statement 1
true
false
Statement 2
![Page 12: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/12.jpg)
SYLLABUS
![Page 13: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/13.jpg)
Specification – Algorithms
• Also relevant to design in the practical programming activity
Candidates should be able to:(a) understand algorithms (written in pseudocode or flow
diagram), explain what they do, and correct or complete them
(b) produce algorithms in pseudocode or flow diagrams to solve problems.
![Page 14: Programming for GCSE Topic 8.2: Pseudo Code and Flowcharts](https://reader036.vdocuments.us/reader036/viewer/2022081502/568164de550346895dd73b9f/html5/thumbnails/14.jpg)
Summary
• Flowcharts may be useful for understanding programs
• Pseudo code like code without the syntax errors