0% found this document useful (0 votes)
6 views

Unit I Pseudocode

Uploaded by

tv5874
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Unit I Pseudocode

Uploaded by

tv5874
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

School of Computing Science and Engineering

Course Code : E2UC102C Name: Programming for Problem Solving

UNIT I
Pseudo Code

Name of the Faculty: Shweta Mayor Sabharwal Program Name:B.Tech(CSE)


Objective

Objective of this lecture -


▪ Introduction to Pseudo Code
▪ Key Differences Between Algorithm and Pseudocode
▪ Writing pseudo-code from algorithm and flowchart
▪ Advantages of Pseudocode
Pseudocode

What is Pseudocode?
• Pseudocode is an artificial and informal language that helps you
develop algorithms.
• Pseudocode is similar to everyday English; it is convenient and user
friendly although it is not an actual computer programming
language.
• Carefully prepared pseudocode programs may be converted easily
to corresponding C programs or flowchart.
• Pseudocode programs are not executed on computers. Rather, they
merely help you "think out" a program before attempting to write it
in a programming language such as C.
Pseudocode

How Pesudocode is different from Algorithm?


Key Differences Between Algorithm and Pseudocode
• An algorithm is a definite, clear sequence-wise procedure. On the
other hand, pseudocode is a more plain and human understandable
form of algorithm.
• Easy to understand and interpret.
• Pseudocode involves natural language with high-level programming
builds.
• Pseudocode is easily constructed and debugged relative to the
algorithm.
Pseudocode

How to write Pseudocode?


• Arrange the sequence of tasks
• Start with stating main goal or the aim.
• For example: This program will allow the user to check the number whether it's even or
odd.
• Use appropriate naming conventions
• Elaborate everything or give details of process
• Use standard programming structures such as ‘if-then’, ‘for’, ‘while’,
‘cases’ the way we use it in programming.
• Check whether all the sections of a pseudo code is complete
• Don’t write the pseudo code in a complete programmatic manner.
Pseudocode

Finding the average of three numbers


Pseudocode

Advantages of Pseudocode
• Improves the readability of any approach. It’s one of the best approaches to
start implementation of an algorithm.
• Acts as a bridge between the program and the algorithm or flowchart. Also
works as a rough documentation, so the program of one developer can be
understood easily when a pseudo code is written out. In industries, the
approach of documentation is essential. And that’s where a pseudo-code
proves vital.
• The main goal of a pseudo code is to explain what exactly each line of a
program should do, hence making the code construction phase easier for the
programmer.
Summary

• Pseudocode is one of the tools that can be used to write a


preliminary plan that can be developed into a computer
program.
• Pseudocode is a generic way of describing an algorithm
without use of any specific programming language syntax.

Program Name: B.Tech (CSE)


References

• E. Balagurusamy 7th Edition, Programming ANSI C, McGraw-Hill


• Brian W. Kernighan and Dennis M. Ritchie, The C programming Language,
Prentice-Hall in 1988
• Byron Gottfried, Programming with C, Schaum's Outline

Program Name: B.Tech (CSE)

You might also like