Download Pseudocode Structure Diagrams

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Corecursion wikipedia , lookup

Hardware random number generator wikipedia , lookup

Computational complexity theory wikipedia , lookup

Expectation–maximization algorithm wikipedia , lookup

SahysMod wikipedia , lookup

K-nearest neighbors algorithm wikipedia , lookup

Factorization of polynomials over finite fields wikipedia , lookup

Algorithm characterizations wikipedia , lookup

Multiplication algorithm wikipedia , lookup

Types of artificial neural networks wikipedia , lookup

Pattern recognition wikipedia , lookup

Time complexity wikipedia , lookup

Algorithm wikipedia , lookup

Planted motif search wikipedia , lookup

Transcript
Student Notes
Form 3
P s e udoc ode
Pseudocode is another method of how an algorithm can be written down. In
pseudocode, the steps of the algorithm are written in simple English using some
reserved words (key words). Pseudocode is usually used when the algorithm is
too cumbersome to be displayed as a flowchart.
The following reserved words are normally used when developing pseudocode;
Arithmetic: add, subtract, multiply, divide, calculate
Data transfer: move, store, replace
Input/output: read, input, output, print
Decision: if...then...else
Repetition: repeat...until, while...endwhile, for...endfor
Structure Diagrams
Structured diagrams show how a complex problem may be broken down in
simpler parts. For example, a problem can be broken down in 3 main sections
(Input, Processing and Output). Each Section is then broken down into a number
of small points as shown below.
Flowchart
Pseudocode
Structured diagram
Sum of 2 numbers
1. Read X
2. Read Y
3. Total = X + Y
4. Print Total
Input
Read X
1/1
Process
Read Y
Total = X + Y
Output
Print Total
Aquilina K.