Module 2 "Program Logic Design and Formulation" Flashcards
______ is a procedure or formula for solving a problem, based on conducting a sequence of specified actions.
Algorithm
Algorithm can be expressed using __________ or ________.
pseudocode or flowchart
Plan the ______ that will transform the problem’s input into its output.
algorithm
Write the algorithm in the Processing column of the _____________.
Input- Process-Output (IPO) chart.
Each instruction in the _________ will describe an action that the computer needs to take.
algorithm
Thus, each instruction should start with a ______.
verb
Most algorithms begin with instruction to enter the _______ into the computer.
input items
record instructions to process the _______ to achieve the problem’s output.
input items
The processing typically involves performing one or more calculations using the _______.
input items
Most algorithms end with instruction to __________
display, print, or store the output items.
___________ refer to the computer screen, printer, and a file on a disk, respectively.
Display, print, and store
_________ is called false code because, it has no syntax like any of the programming language and thus can’t be compiled or interpreted by the computer.
Pseudocode
Pseudocode is simply an implementation of an algorithm in the form of ______________________.
annotations and informative text written in plain English.
Pseudocode is not __________.
standardized
In Pseudocode, _________ are used to indicate common input- output and processing operations. They are written fully in uppercase.
keywords
Pseudocode also used mathematical, relational and logical operators to express ________ and ________
arithmetic and logical operations.
When writing pseudocode, we assume that the order of execution of the statements is from ________
top to bottom.
This is the start of your pseudocode.
START (Upper case)
This is data retrieved from the user through typing or through an input device.
INPUT, ENTER, READ / GET
(Upper case)
This will show your output to a screen or the relevant output device.
PRINT, OUTPUT, DISPLAY, SHOW (Upper case)
This is used to calculate the result of an expression.
COMPUTE, CALCULATE, DETERMINE (Upper case)
To initialize values
SET, INIT:
To increase the value of a variable
INCREMENT, BUMP
to reduce the value of a variable
DECREMENT
COMMON OPERATORS:
← or :=
Assignment
COMMON OPERATORS:
+, −, ×, /, mod
Arithmetic
COMMON OPERATORS:
=, ≠, <, >, ≤, ≥
Comparison (Relational)
COMMON OPERATORS:
and, or
Logical
During _________, we need statements which evaluate expressions and execute instructions depending on whether the expression evaluated to True or False.
algorithm development
During algorithm development, we need statements which evaluate expressions and execute instructions depending on whether the expression evaluated to _______ or ________
True or False.
Here are some common conditions used in Pseudocode:
- IF — THEN – ENDIF
- IF – ELSE IF — ENDIF
- IF — ELSE IF — ELSE – ENDIF
- CASE – OTHERS – ENDCASE
_______ is to repeat a set of instructions in order to generate a sequence of outcomes.
ITERATION/LOOPING
ITERATION/LOOPING:
iteration bounds
sequence
FOR
ITERATION/LOOPING:
condition
sequence
WHILE
_______ is a pictorial representation of an ordered, step-by-step solution to a problem.
Flowchart
__________ is a diagram that uses a set of standard graphic symbols to represent the sequence of coded instructions fed into a computer, enabling it to perform specified logical and arithmetical operations.
Program Flowchart
Flowcharts can be used to express different structures: (3)
sequence
selection/conditional
loop.
In drawing a proper flowchart, all necessary requirements should be listed out in _________.
logical order
The usual direction of the flow of a procedure or system is from ________ or __________
left to right or top to bottom.
Only ___ flow line should come out from a process symbol
one
Only one flow line should enter a decision symbol, but __________, one for each possible answer, should leave the decision symbol.
two or three flow lines
Ensure that the flowchart has a logical __ and __
start and finish.
If the flowchart becomes complex, it is better to use _________ to reduce the number of flow lines
connector symbols
Avoid the ______ of flow lines if you want to make it more effective and better way of communication.
intersection