How to write a Pseudo-code?

  1. Arrange the sequence of tasks and write the pseudocode accordingly.

  2. Start with the statement of a pseudo code which establishes the main goal or the aim. Example: This program will allow the user to check
    the number whether it’s even or odd.

  3. The way the if-else, for, while loops are indented in a program, indent the statements likewise, as it helps to comprehend the decision control and execution mechanism. They also improve the readability to a great extent. Example:

    if “1”
    print response
    ”I am case 1”

    if “2”
    print response
    ”I am case 2”

  4. Use appropriate naming conventions. The human tendency follows the approach to follow what we see. If a programmer goes through a pseudo code, his approach will be the same as per it, so the naming must be simple and distinct.

  5. Use appropriate sentence casings, such as CamelCase for methods, upper case for constants and lower case for variables.

  6. Elaborate everything which is going to happen in the actual code. Don’t make the pseudo code abstract.

  7. Use standard programming structures such as ‘if-then’, ‘for’, ‘while’, ‘cases’ the way we use it in programming.

  8. Check whether all the sections of apseudo_code is complete, finite and clear to understand and comprehend.

  9. Don’t write the pseudo code in a complete programmatic manner. It is necessary to be simple to understand even for a layman or client, hence don’t incorporate too many technical terms.