Pseudocode Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

how do you write:

“input”

A

READ

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

how do you write:

“output”

A

DISPLAY

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

how do you write:

“equal to”

A

is

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

how do you write:

“not equal”

A

!=

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

how do you write:

“less than”

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

how do you write:

“less than or equal to”

A

<=

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

how do you write:

“greater than”

A

>

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

how do you write:

“greater than or equal to”

A

> =

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

how do you write:

“modulus”

A

%

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

what does the modulus mean?

provide an example

A

the remainder or what is left over

e.g. 15%2 is 1

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

what are corner cases?

provide an example

A

cases on the border of a statement

e.g. if input <= 6 then we would test 6 because it is on the border, i.e. it is a corner case

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

what is an input?

provide the pseudocode

A

what you type into the system

READ

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

what is an output?

provide the pseudocode

A

what is displayed by the system

DISPLAY

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

what are error conditions?

A

anything that could be wrong with the inputs that would lead to error messages (need to be handled by the algorithm)

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

what is sequential control?

A

a step by step algorithm without any jumps

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

what is selection control?

A

an algorithm with jumps

IF, THEN, ELSE

17
Q

what is a relational operator?

A

whenever two values are being compared

18
Q

what is a logical operator?

provide the pseudocode

A
a negation (truth tables)
NOT, AND, OR
19
Q

which commands do NOT count as operations?

A
ELSE
ENDIF
ENDWHILE
ENDFOR
REPEAT
HALT
20
Q

which commands count as one operation?

A
READ
SET
ADD
SUBTRACT
COMPUTE
DISPLAY
21
Q

how do you count operations in boolean expressions?

A

each comparison counts as one operation

22
Q

what is one-way branching?

A

IF ___ THEN

DISPLAY

23
Q

what is two-way branching?

A

IF ___ THEN
ELSE
___
ENDIF

24
Q

what is multi-way branching?

A

nesting (multiple IF statements)