Pseudocode Flashcards
how do you write:
“input”
READ
how do you write:
“output”
DISPLAY
how do you write:
“equal to”
is
how do you write:
“not equal”
!=
how do you write:
“less than”
how do you write:
“less than or equal to”
<=
how do you write:
“greater than”
>
how do you write:
“greater than or equal to”
> =
how do you write:
“modulus”
%
what does the modulus mean?
provide an example
the remainder or what is left over
e.g. 15%2 is 1
what are corner cases?
provide an example
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
what is an input?
provide the pseudocode
what you type into the system
READ
what is an output?
provide the pseudocode
what is displayed by the system
DISPLAY
what are error conditions?
anything that could be wrong with the inputs that would lead to error messages (need to be handled by the algorithm)
what is sequential control?
a step by step algorithm without any jumps
what is selection control?
an algorithm with jumps
IF, THEN, ELSE
what is a relational operator?
whenever two values are being compared
what is a logical operator?
provide the pseudocode
a negation (truth tables) NOT, AND, OR
which commands do NOT count as operations?
ELSE ENDIF ENDWHILE ENDFOR REPEAT HALT
which commands count as one operation?
READ SET ADD SUBTRACT COMPUTE DISPLAY
how do you count operations in boolean expressions?
each comparison counts as one operation
what is one-way branching?
IF ___ THEN
DISPLAY
what is two-way branching?
IF ___ THEN
ELSE
___
ENDIF
what is multi-way branching?
nesting (multiple IF statements)