Preview

Pseudocode Building Blocks

Satisfactory Essays
Open Document
Open Document
475 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Pseudocode Building Blocks
Pseudocode Building Blocks * Reading Material pseudocode does not match up with answer key. * Pseudocode can more closely model real world languages as shown below.

Sequential Commands * Refer to reading material in chapter 2 pages 33-37.

[ModuleName] Module * Keyword * Must have an End Tag
Example:
Main Module End Main 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: Float, Real, Integer, String.
Example:
Declare NumSandwiches As Integer
Declare FirstName As String
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 “Hello World”
Example 2:
Declare FirstName As String
FirstName= “Jack”
Display FirstName
Example 3: Declare NumBurgers As Integer NumBurgers = 2 Display NumBurgers Display “The Number of Burgers is:” & NumBurgers
Call [ModuleName] Module * ModuleName must be a valid module declared in the program
Example:
Main Module
Call DisplayTest Module
End Main Module
DisplayTest Module Display “This is a test”
End DisplayTest Module
Input [VariableName] * VariableName must be a valid variable declared in Main or the local module
Example:
Main Module Declared NumBurgers As Integer Display “Please enter the number of burgers:” Input NumBurgers Display “The number of burgers you entered is” & NumBurgers End Main Module
Set [VariableName] * Worthless pseudocode command that is not necessary and is not used by most real world
Example 1: Set NumBurgers = 10
Example 2: NumBurgers = 10 (does the same thing)
Conditional / Selection Control Structures * Refer to Chapter 3 pages 62-71
If [conditional statement] Then * Must have an End tag * Else logic is optional * Conditional statement must use a relational operator * Valid

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Newport News County has a T-Ball league in Hampton, VA situated in the Mallory community. . This is a part of a large community of the local T-Ball and youth league programs offered in the area. The league is for young children between the ages of four and seven. The league is for building character, teaching team work and development. Each T-ball team consists of 12-14 kids from all the surrounding cities. The league allows for parents to come in and volunteer as a means to save cost. Though all cities don't have a team, those that have teams are named after current MLB team names.…

    • 545 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 2 NT1430

    • 377 Words
    • 2 Pages

    8. What is the result of giving the which utility the name of a command that resides in a…

    • 377 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 week 2

    • 320 Words
    • 3 Pages

    Pseudocode is an informal language that has no syntax rules, and is not meant to be compiled or executed.…

    • 320 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    As the user is deciding which they would like to select an international currency type. When the user enters a number between 5 and 26 corresponding with a currency type, then the program is set to false. If 26 is selected the program displays “Quitting Currency Conversion.” But if the user does not enter a number between 5 and 26 the program displays “Error 4: Invalid Menu Selection” and the set it true.…

    • 1052 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    CPT Coding

    • 267 Words
    • 1 Page

    Write a 250- to 350-word response in which you assume you are a medical office manager who wants to make the coding process easier for employees to understand. To facilitate a better understanding of this process, respond to the following:…

    • 267 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    W8 Comp

    • 898 Words
    • 4 Pages

    3) What VBScript decision-making statement would be for a single condition and a single code block…

    • 898 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    The Uniform Commercial Code (UCC) is govern commercial transaction through modernized laws. The primary purpose of the UCC is clarify and unify commercial laws.…

    • 152 Words
    • 1 Page
    Satisfactory Essays
  • Better Essays

    4) Assume that a pseudocode program contains the following module: Module display( Integer arg1, Real arg2, String arg3) Display " Here are the values:" Display arg1, " ", arg2, " ", arg3 End Module…

    • 1580 Words
    • 11 Pages
    Better Essays
  • Satisfactory Essays

    Cs Programming Chapter 1

    • 2450 Words
    • 10 Pages

    ____ data items may involve organizing or sorting them, checking them for accuracy, or performing calculations with them.…

    • 2450 Words
    • 10 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Design a modular program that asks the user to enter a distance in kilometers, and the converts that distance to miles. The conversion formula is as follows:…

    • 620 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    A letter, number, word or combination of those that a command needs in order to work.…

    • 290 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Lab 3 Student

    • 1264 Words
    • 7 Pages

    This lab requires you to think about the steps that take place in a program by writing pseudocode. Read the following program prior to completing the lab.…

    • 1264 Words
    • 7 Pages
    Satisfactory Essays
  • Good Essays

    Coding Tips

    • 1061 Words
    • 5 Pages

    The term first-listed diagnosis/condition is used in the outpatient setting in lieu of principal diagnosis, once again because of the timing. Often, diagnoses are not established at the time of the initial encounter in the outpatient setting and it may take two or more visits prior to a confirmed diagnosis. The documentation to support the reason for the visit should describe the patient's condition, using terminology that includes either specific diagnoses and/or symptoms, problems, or reasons for the encounter. In the instance where a discrepancy is discovered, determining the first-listed diagnosis per the coding conventions of ICD-9-CM, as well as the general and disease-specific guidelines within ICD-9-CM, will have precedence over the outpatient guidelines.…

    • 1061 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    Synthesis Outline

    • 1382 Words
    • 6 Pages

    Analysis of the Non-Correspondence between Central Luzon State University Business Administration sophomore students’ major field of study and their freshmen preferred accounting course…

    • 1382 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Macro Examples

    • 1120 Words
    • 5 Pages

    True/False Questions. Read each statement carefully, and neatly write the word TRUE on the line next to the statement if you believe the statement is true, or neatly write the word FALSE on the line next to the statement if you believe the statement is false.…

    • 1120 Words
    • 5 Pages
    Good Essays

Related Topics