pseudocode Flashcards
if statement
IF, THEN, ENDIF
case
CASE, OF, OTHERWISE, ENDCASE
for loop
FOR, TO, NEXT
repeat loop
REPEAT
UNTIL
while loop
WHILE, DO, ENDWHILE
algorithm
sets out steps to complete a given task
types of algorithm
totalling, counting, finding max min and average, linear search, bubble sort
constant
unchangeable variable
eg.CONSTANT hourlyrate <- 6.5
arrays
stores elements of same data type
declare 1d array
DECLARE cars: ARRAY [1:7] OF STRING
DECLARE 2D ARRAY
DECLARE cars: ARRAY [1:7, 1:2] OF INTEGER
storing 1d array
cars[1] <- “dodge”
storing 2d array
cars [1,2] <- 2
string operation finding length
finds number of characters in a string
LENGTH(“days”)
or
LENGTH(days)
string operation turning into lower case
LCASE(“days”)
or
LCASE(days)