What Is Pseudocode?

Topics: Programming language, Algorithm, Real number Pages: 3 (413 words) Published: August 3, 2012
What is Pseudocode
First, you need to understand that pseudocode is not a programming language. Pseudocode cannot be compiled nor executed on a computer, and there is no real formatting or syntax rules. It is simply one step, a very important step, in producing the final code. The benefit of pseudocode is that it enables the designer to concentrate on the algorithms without worrying about all the syntactic details of a programming language. In fact, you can write pseudocode without even knowing what programming language will be used for the final implementation.

Pseudocode consists of short, English phrases used to explain specific tasks within a program's algorithm. Pseudocode should not include keywords in any specific computer languages. It should be written as a list of consecutive phrases.

How to write Pseudocode
[ModuleName] Module
Must have an End Tag

DisplayResults Module

End DisplayResults Module

Declare [DataVariableName] as [DataType]
DataVariableName can be any name chosen as long as it is one word. •DataType can be one of the following basic types: Real, Integer, and String. oReal – any positive or negative number that has decimals (2.34, -9.987) oInteger – any positive or negative whole number (768, -98) oString – any alphanumeric value (123 Main Street, Joe Smith)

Declare count As Integer
Declare lastName As String
Declare price As Real

Display (or Write) [Sting or data variable to be displayed]
If sting is used, you must have it start and end with quotations

Example 1:
Display “Good Morning”

Example 2:
Declare lastName As String
lastName= “Jones”
Display lastName

Example 3:
Declare testScore As Integer
testScore = 95
Display NumBurgers
Display “Your test score is: ”, testScore

Call [ModuleName] Module
ModuleName must be a valid module declared in the program

Main Module
Call DisplayResults Module
End Main Module...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Pseudocode Essay
  • Pseudocode Notes Essay
  • WHAT THE H2!? Essay
  • pseudocode Essay
  • Essay on Lab Assignment: Pseudocode
  • Essay about Pseudocode Standard
  • What Essay
  • what Essay

Become a StudyMode Member

Sign Up - It's Free