pseudocode Flashcards

1
Q

declare a variable

A

DECLARE variableName : DATATYPE

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

declare a constant

A

whatever your data is, could be a number or a string (stored in quotations)

CONSTANT variableName = data

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

declare a 1D array

A

DECLARE arrayName : ARRAY[lower:upper] OF DATATYPE

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

declare a 2D array

A

DECLARE arrayName : ARRAY[lower1:upper1, lower2,upper2] OF DATATYPE

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

assign individual array element

A

1D: arrayName[i] <- value
2D arrayName[i, j] <- value

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

assign a value to a group in the array

A
FOR Index ← n TO m
      arrayName[Index] ← value
NEXT Index

n and m are examples (integers), value is an example

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