0% found this document useful (0 votes)
11 views1 page

Pseudocode and Algorithm in relation to Structured Programming 2

Pseudocode is a high-level representation of algorithms that combines natural language and programming syntax, making it easier to convert into actual code compared to flowcharts. It is simpler to modify, requires less time and space, and incorporates structured design elements. Algorithms, on the other hand, are sets of instructions that require input, process it, and produce output while adhering to properties like finiteness and correctness.

Uploaded by

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

Pseudocode and Algorithm in relation to Structured Programming 2

Pseudocode is a high-level representation of algorithms that combines natural language and programming syntax, making it easier to convert into actual code compared to flowcharts. It is simpler to modify, requires less time and space, and incorporates structured design elements. Algorithms, on the other hand, are sets of instructions that require input, process it, and produce output while adhering to properties like finiteness and correctness.

Uploaded by

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

Pseudocode

Pseudocode is a high-level representation of a computer program or algorithm that uses a


combination of natural language and programming-like syntax to describe the steps involved in
solving a problem or achieving a specific goal.

Reasons why Pseudocode is better than flowcharting in achieving a well-structured


computer program.

(i) Conversion of pseudocode to a program (in any programming language) is much easier than a
flowchart
(ii)Pseudocodes are much easier to modify (when required) as compared to a flowchart.
(iii) Less time and effort are used while writing a pseudocode in comparison to drawing a flowchart
(iv) Pseudocodes consume lesser space than flowchart
(v) Pseudocode implements structured design elements while flowchart does not.

Rules for writing Pseudocode

(i) Write only one statement per line


(ii) Capitalize Initial Keyword
(iii)Indent to show hierarchy
(iv) End multiline structures
(v) Keep statements independent of programming language.

Algorithm
Algorithm is a set of instructions or steps used solve a specific problem or perform a particular
task. It is usually written in a natural human language like English Language.

Characteristics/properties of Algorithms

(i) Input: An algorithm receives input, this can be inform of numbers, text, images, or other data
types.
(ii) Processing: An algorithm processes the input data using a series of instructions or operations.
(iii) Output: An algorithm produces output, which is the result of the processing step.
(iv) Finiteness: An algorithm must terminate after a finite number of steps.
(v) Correctness: An algorithm must produce the correct output for a given input.
(vi) Generality: An algorithm should be able to handle a wide range of inputs and produce the
correct output.

You might also like