Pseudocode Flashcards
Description of NOT gate
triangle with circle in front
WHERE in SQL
query/condition of data to be displayed
COUNT in SQL (2)
counts number of records where field matches condition
used with SELECT
RANDOM() Library routine
returns a random number between 0 and 1
SUM in SQL (2)
sum of all values in field
used with SELECT
Components of decomposition in analysis stage (4)
input - what is put into system
processes - action taken to achieve result
output - what is taken out of system
storage - what needs to be kept in for future use
NAND gate rule
if both input = 1, then output = 0
Case Statement Structure (4)
CASE OF “Name”
1:
2:
OTHERWISE OUTPUT
ENDCASE
ROUND library routine (2)
returns value rounded to specified number of decimal places
rounded to highest or lowest value
Validation check meaning (2)
checks that data input is reasonable + meets certain criteria
automated check carried out by computer
Bubble Sort (8)
Swap <– False
REPEAT
if variable 1 > variable 2
then var <– variable 1
variable 1 <– variable 2
variable 2 <– var
Swap <– True
UNTIL Swap = True
Range check
checks that data is within certain range
Coding of Program Development Life Cycle (2)
uses design from previous stage
written using IDE
Function structure with parameters (3)
FUNCTION Name (variable : type) RETURNS type
RETURN (“action”)
ENDFUNCTION
OR gate rule
output = 1 if either input = 1
ORDER BY in SQL
sorts results numerically or alphabetically
Extreme Data
largest and smallest data that algorithm should allow
Procedure with parameters structure (6)
PROCEDURE Stars (Number : INTEGER)
DECLARE Counter : INTEGER
FOR Counter –> 1 to Number
OUTPUT “*”
NEXT Counter
ENDPROCEDURE
CALL Stars(7) //outputs 7 *
Design of Program Development Life Cycle (3)
visually representing program before coding
will help to explain how code works
e.g flowchart
MOD
remainder of division
Type check
checks that data entered is correct type (e.g integer, string)
Substrings code (2)
SUBSTRING(STRING, position of start character, length of substring)
string starts at position 1
Description of AND gate
curved rectangle