Pseudocode (P1) Flashcards
Inequalities, not equal, and equal
<=, >=, =, <> (does not equal)
what div does
returns how much of a number fits into something x whole times
8 div 3 returns 2
what mod does
gives us the remainder when dividing 2 numbers.
14 mod 5 returns 4
if statement set up 3 variations
if (condition) then
//something
end if
if (condition) then
//something
else
//something else
end if
if (condition) then
//something
else if (condition)
// something else
else (condition
//another process
end if
while loop setup
loop while (condition)
//process
end loop
for loop setup
loop COUNT from 0 to 4
//process
end loop
STR.length()
returns the number of characters of a string
STR.SubStr(S,L)
Returns the substring that starts at index S and goes for up to L characters. If the string ends, it will return to the end of the string.
Declaring new array
myArray = new Array(SIZE)
all collection methods
NAMES = new Collection()
NAMES.hasNext()
NAMES.getNext()
NAMES.resetNext()
NAMES.addItem()
NAMES.isEmpty()