Download presentation

Presentation is loading. Please wait.

Published byJune Baker Modified over 2 years ago

1
**Session Objectives# 24 COULD code the solution for an algorithm**

SHOULD write pseudocode for an algorithm MUST identify flow chart symbols Recreate the solution in a high level language with a continue or exit clause.

2
**Pseudocode Flow Chart Syntax Error Logic Error Algorithm IDE**

Key Words Key Words Pseudocode Flow Chart Syntax Error Logic Error Algorithm IDE

3
**Flow Chart Symbols Revisited**

Using white boards display what these symbols mean? 1. 2. 3. 4. 5. START/STOP Decision (IF or CASE Statements) Process either arithmetic ‘a + b’ or action ‘open file’ Input or Output Subroutine symbol – a subroutine is like a program within the program. It is used to simplify complex flow charts

4
Flow Charts KEY POINTS Commands are in caps, variables in lower case e.g Processes are generally a LET statement Other constructs include: IF process ELSE process 2 ENDIF or Loops (FOR –NEXT, REPEAT – UNTIL or WHILE – END WHILE) Pseudocode START/BEGIN INPUT width INPUT height LET area = width * height OUTPUT area STOP/END What will this programme do? Now write an algorithm for this programme START Input Width Input Height Area = Width x Height Output Area STOP

5
**Creating Flow Charts & Pseudocode**

Flow charts and pseudocode are methods of designing algorithms to solve problems. They are useful to make sure the logic of the algorithm is correct with no logic errors before starting to programme, when the programmer is then faced with the prospect of language specific syntax errors. Logic errors – problems with the flow and structure of a programme Syntax errors – problems with the spelling and punctuation of a programme. TASKS: Now turn to page 156 and complete tasks 1 – 4. Extension Task 1 and the code a solution to any of your algorithms in Python. Aim to include a continue/exit feature.

Similar presentations

OK

LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.

LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on international business environment Ppt on aerobics step Ppt on self development Ppt on technical topics related to electrical engineering Ppt on model view controller java Ppt on group development theories Seminar ppt on power electronics Ppt on renewable energy for today and tomorrow Ppt on eye osiris Ppt on depth first search vs breadth