Professional Documents
Culture Documents
Algorithm & Pseudo Code: Syed Zaid Irshad
Algorithm & Pseudo Code: Syed Zaid Irshad
Pseudo Code
– Algorithm
– What is an algorithm?
– How are mathematical statements and algorithms related?
– What do algorithms have to do with computers?
– Pseudo Code
– What is pseudocode?
– Writing pseudocode
– Pseudo Code vs Algorithm
What is an algorithm?
– Simply put, it's a set of practices and conventions for producing very precise, minimally
ambiguous descriptions of algorithms.
– One way this can be accomplished is through the use of algebraic conventions for variable
naming and expressions, as well as specialized notation from set theory, linear algebra, and
other branches of mathematics.
– The use of these mathematical conventions can go a long way toward reducing ambiguity in
the description of an algorithm.
– Ultimately, the most important characteristic of pseudocode is not really what it is, but what it
enables.
– Working from well-written pseudocode, virtually any programmer with professional
competence in a given programming language should be able to implement the algorithm
described by the pseudocode, in the given language, with little or no need for further
instruction.
Writing pseudocode
C=5/9 * (F – 32)
FahrenheitToCelsius()
Begin
Read: F;
Set C = 5/9 * (F – 32);
Print C;
End
Pseudo Code vs Algorithm