Preview

Pseudocode Building Blocks

Satisfactory Essays
Open Document
Open Document
504 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Pseudocode Building Blocks
Pseudocode building blocks http://youtu.be/Xg6alMKCQXU – part 1 http://youtu.be/NaFrBLgRyWY – part 2
- Reading material pseudocode does not match up with answer key.
- Pseudocode can more closely model real world languages as is shown below.
Sequential Commands
[Module Name] Module
- Keyword
- Must have an End Tag
- Must be one word
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 (real & integer are numbers), String

Example: Declare NumSandwiches As Integer Declare FirstName As String

Display (or Write) [String or data variable to be displayed]
- If string 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 FirstName As String NumBurgers = 2 Display NumBurgers Display “The number of burgers is: “ & NumBurgers

Call [ModuleName] Module
- ModuleName must be a valid module declared in the program (needs to be a single word).
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 Declare NumBurgers As Interger 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 languages. (Use = instead)
Example 1: Set NumBurgers = 10
Example 2: NumBurgers = 10

Conditional / Selection Control Structures

If [conditional statement] Then
- Must have an End tag
- Else logic is optional
- Conditional

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Bsbwor501 Final Exam

    • 397 Words
    • 2 Pages

    (TCO 1) The three types of data that can be entered in a cell in an Excel…

    • 397 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Week 1 Lab_ CIS_115

    • 439 Words
    • 2 Pages

    List all variables you will use (use valid variable names). Indicate whether the data type is string, integer, or decimal, and so on.…

    • 439 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    The column specification that determines what kind of data can be stored in that column, character versus numeric or date, for example.…

    • 327 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    You can't use a space, period (.), exclamation mark (!), or the characters @, &, $, # in the name.…

    • 218 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Unit 7 Assignment 1

    • 261 Words
    • 2 Pages

    2. A pretest loop is a loop tests the conditions before performing the iteration. A posttest loop performs the iteration then test the condition.…

    • 261 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
  • Better Essays

    REM these are the calls for the modules that can be ran. Not all modules will run…

    • 595 Words
    • 3 Pages
    Better Essays
  • Satisfactory Essays

    PT1420 Unit 3 Labs

    • 270 Words
    • 2 Pages

    The Network Systems Administration degree is awarded after 90 credits and Nolan Owen has 70 left to take before graduation.…

    • 270 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 Assignment

    • 1058 Words
    • 5 Pages

    1) Initialization: the variable is initialized 2) Test: the loop tests the variable by comparing it to the maximum value 3) Increment: to increase the value during each iteration the loop increments the counter variable by adding 1 to it.…

    • 1058 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    It 210 Final Project

    • 1033 Words
    • 5 Pages

    Write, “Select international currency type: Canadian dollars, Mexican pesos, English pounds, Japanese yen, French francs.”…

    • 1033 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    Unit 18 - Database P1, M1

    • 995 Words
    • 4 Pages

    Data type is the type of content and it decides the content can be input and the file size.…

    • 995 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    Data Base

    • 2312 Words
    • 10 Pages

    While designing and defining tables in databases, it is important to find out the data type for each column in the data tables. A data type is an attribute which defines the type of data an object can retain: integer, string, data and time, etc. There are basically three main types: text, numbers and date/times. The data types are different, depending on the database management system (DBMS), the various types of which include SQL Server, Oracle and MySQL.…

    • 2312 Words
    • 10 Pages
    Good Essays
  • Satisfactory Essays

    ITT Tech MA3110 Vocab 1

    • 539 Words
    • 3 Pages

    Categorical Data – data that can be separated into different categories that are distinguished by some nonnumeric characteristic.…

    • 539 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Pseudocode Standard

    • 1507 Words
    • 7 Pages

    Note that the logic must be decomposed to the level of a single loop or decision. Thus "Search the list and find the customer with highest balance" is too vague because it takes a loop AND a nested decision to implement it. It's okay to use "Find" or "Lookup" if there's a predefined function for it such as String.indexOf().…

    • 1507 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    2.4.1 Physical Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 1 2.4.2 Abstract Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 2 2.5 Operators. . . . . . . . . . .…

    • 4773 Words
    • 20 Pages
    Satisfactory Essays