Followers

Total Pageviews

Translate

Wednesday, November 13, 2019

Pseudo-code

Pseudo code

  • Pseudo-code is an informal high-level description of the operating principle of a computer program or other algorithm.
  • It uses the structural conventions of a normal programming language, but is intended for human reading rather than machine reading.
  • It is simply a numbered list of instructions to perform some task.

Why use Pseudo-code

  • The purpose of using pseudocode is an efficient key principle of an algorithm.
  • It is used in planning an algorithm with sketching out the structure of the program before the actual coding takes place.
  • Pseudocode is understood by the programmers of all types.

  How is Pseudo-code Written

  • Pseudocode is a method of writing out computer code in the English language.
  • Instead of jumping straight into a programming language, computer programmers use pseudocode to clearly and concisely list out what they hope to accomplish with their new program.

Rules of Pseudo-code

  • Write one statement per line : After getting the formal design, such as lists of major tasks, subtasks and so on.
  • Capitalize Initial Keywords 
  • Indent to show hierarchy 
  • End Multiline Structure 
  • Keep statements language independent 

Advantage of Pseudo-code 

  • It is a language-independent it can be used by most programmers it allows the developer to express the design in plain and natural language.
  • It is easier to develop a program from a pseudo code as compared to the flow chart. Programmers do not have to think about syntax, we simply have to concentrate on the underline logic.
  • The focus is on the steps to solve a problem rather than how to use the computer language.
  • Often it is easy to translate pseudocode into a programming language, a step which can be accomplished by less experienced
  • The uses of words and phrases in pseudo code, which are in the lines of basic computer operations simplify the translation from the pseudo code algorithm to the specific programming language.

Disadvantage of Pseudo-code

  • The main disadvantages are that it does not provide a visual representation of the program
    ming logic.
  • There are no accepted standards for writing the pseudo code. Programmers use their own styles of writing pseudo code.
  • The pseudo code cannot be compiled nor executed and there is no real formative of a syntax of rules. It is simply one step, an important one, in producing the final code.

Keys of Pseudo-code

  • Do While
  • EndDo
  • Do
  • Until
  • .Enddo
  • Case
  • EndCase
  • If
  • Endif
  • Call

1 comment: