Pseudocode (P1) Flashcards

1
Q

Inequalities, not equal, and equal

A

<=, >=, =, <> (does not equal)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what div does

A

returns how much of a number fits into something x whole times

8 div 3 returns 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what mod does

A

gives us the remainder when dividing 2 numbers.

14 mod 5 returns 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

if statement set up 3 variations

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

while loop setup

A

loop while (condition)
//process
end loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

for loop setup

A

loop COUNT from 0 to 4
//process
end loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

STR.length()

A

returns the number of characters of a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

STR.SubStr(S,L)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Declaring new array

A

myArray = new Array(SIZE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

all collection methods

A

NAMES = new Collection()

NAMES.hasNext()

NAMES.getNext()

NAMES.resetNext()

NAMES.addItem()

NAMES.isEmpty()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly