psuedocode Flashcards

1
Q

constants

A

CONSTANT <identifier> = <value>
eg CONSTANT pi = 3.14</value></identifier>

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

assignment

A

uses <-
eg num <- 1

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

input/ putpt

A

num <- USERINPUT
OUTPUT num

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

arithmetic operations

A

+ - / *
MOD
DIV

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

logical operations

A

AND OR NOT XOR

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

random num generation

A

RANDOM_INT (min, max)

(includes min and max)

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

selection

A

IF <condition> THEN
<statement>
ELSE
<statement>
ENDIF</statement></statement></condition>

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

count controlled iteration

A

FOR <identifier> <- <value1> TO <value2> (STEP <increment>)
<statement>
ENDFOR</statement></increment></value2></value1></identifier>

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

pre condition iteration

A

WHILE <condition> DO
<statement>
ENDWHILE</statement></condition>

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

post condition iteration

A

REPEAT

<statement>
UNTIL <condition>
</condition></statement>

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

procedures

A

PROCEDURE <identifier> (parameters)
<statement>
ENDPROCEDURE
(for function replace procedure with function and add RETURN)</statement></identifier>

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