GLOBAL
CD itt
Coun
Computational ToolsGLOBAL
CE@ Educational
= Courses
4-6 questions
* Algorithm
* structured programming
* spreadsheet
ALGORITHM FLOWCHARTS
Cc we <>
terminal decision
/—_""S —
j Cc)
Zz
connecter
¢npuvoutput
processing off-page
annatatian
predefined processThe terminal symbol starts or stops a process.
Problems on the FE exam will typically involve a
program fragment, so the terminal symbol might be
used to distinguish a complete program froma
fragment
The decision symbol is a branch point in a flowchart.
In a software flowchart, a decision can only have one of
two results, “yes” or “no.” The decision symbol equates
to an IFTHEN statement, the start of a WHILE loop, or the
start of a FOR loop.
The off-page, predefined processpand annotation
symbols will likely not be used-in the
FE exam, and their functionsare. avident anyway
GLOBAL.
GED Educa Educational
Courses
The input/output symbol may be used in a program to
receive data fromthe user or to output data to the user or
data storage
The connector symbol represents no processing of any
kind. It is simply a symbol that makes the chart more
clear by keeping arrow points from touching each other.
The Processing block is where mathematical
(numerical or string) operations take placeGLOBAL
== CD Educa Educational
‘Courses
ena
a GLOBAL
~ 680 Educational
= —Courses
What is the regularly scheduled workout on Wednesday
morning?
(A) bike
(B) rest
(C) run
(D) weights(1) What is the value of X at the completion of the following flow diagram?
(A)2 (B)4 @s5 (D) The loop never ends
Structured programming
_(PSEWDOCODE)
Simple calculations —
Add
Subtract
Multiply
Divide
or ** Exponentiation
sNaeld
The sequence of open operations proceeds from left to right in the following hierarchy:
Exponentiation, then.
‘Multiplication and division, then
Addition end subtraction
Raising one expression to the power of another expression depends on the language used
Examples of how X® might be expressed are:
x"*B
xBBasic Elements of Pseudo-code
* Assignment Operation
— This operation associates a value to a variable.
— While writing Pseudo-code you may follow
your own syntax.
— Some of the possible syntaxes are:
+ Assign 3 tox
* Set x equal to 3
° xX=3
Basic Operations of Pseudo-code
Read Operation
In this operation we intend to retrieve the
value previously assigned to that variable. For
example Set Value of x equal to y
Read the input from user
This operation causes the algorithm to get the
value of a variable from the user.
Get x Geta, b,cBasic Operations of Pseudo-code
Print the output to the user_
Print x (This will print value of variable x)
Print “Your mileage is” x
Cary out basic arithmetical computations_
Set x to 10
Set y to x*x/3
GLOBAL.
G0 Educational
‘Courses
A computer pseudocode program conta te following calculation, Whats the value of X?
X=(1"6)(53)
(Ay? )20 (44 (0)40GLOBAL
Go Educational
=—Courses
The IF THEN statement may be found ia FE exam problems. The
couditiou aust be satisfied or the action is uot executed aud the program moves ou to the
next operation.
IE-THEN statements
A computer psendocode program contains the following program segment. What is the value of
X after the segment is executed?
x=
IF T> X THEN X
(a2 (B)6 oy DY 11
GLOBAL
Educational
=—Courses
TO operations
A.GOTO (or GOL) Sperition moves the program to a number designator in the
program,
A computer pseudocode program contains the following program segment, What is the value of
X alter the segment 1s executed?
x=4
T=8
1 T=T-1
X=X+1
IFX>TTHENGOTO1
(6 @®)7 9s (D)11GLOBAL
Educational
/OursesS
WHILE loops
A set of instructions between the WHILE and the ENDWHILE lines of code
is repeated as long as the condition remains tue, The number of times the instructions are
executed depends on when the condition is no longer true. The variable or variables that
control the condition must eventually be changed by the operations or the WHILE loop
will continue forever (the dreaded endless loop).
A computer pseudocode program contains the following program segment. What is the value of
X after the segment is executed?
x=4
T=8
WHILE T2X
T=T-2
X=X+2
ENDWHILE
(A4 (B)6 (Os 4D) 10
GLOBAL,
Educational
FOR loops ‘Ourses
A. set of instructions Detweed the FOR and the NEXT “counter lines of
code is repeated for @fxedimtimber of loops that depends on the counter range, The
counter is a variable that can be used in operations in the loop, but the value of the
counter is not changed by anything in the loop except the NEXT statement.
A computer pseudocode program contains the following program segment. What is the value of
X after the segment is executed?
X=0
FORT
NEXTT
(A)2 (B)3 (4 (D)6IF ‘THEN ELSE . If the condition is satisfied, then action 1 is exe-
cuted. If the condition is not satisfied, action 2 is
executed.
DO/WHILE loops: A set of instructions between the
DO/WHILE and the ENDWHILE lines
of code is repeated as long, as the condition remains true.
The number of timoe the inetructione aro oxocutod
depends on when the condition is no longer true. The
variable or variables that control the condition must
eventually be changed by the operations, or the WHILE
loop will continue forever.
DO/UNTIL loops: A set of instructions between the
DO/UNTIL and the ENIQUNTIL lines
of code is repeated as long as th&gonditiof remains false.
The number of times thegaistztictions are executed
depends on when the conditién-is ye’ longer false. The
variable or variables tha /Cojtrol the condition must
eventually be changed by thespérations, or the UNTIL
loop will continue foreve
y GLOBAL |
Gee Educational
Courses
A computer structured programming segment contains
the following program segment. What is the value of G
after the segment is executed?
Set G=1 and X=0
DO WHILE G <5
G=G@x+1
x=G
ENDWHILE
(A) 5
(B) 26
(C) 63
(D) The loop never ends.Spreadsheet
Cell reference: When the contents of one cell are used for a calculation in another cell, the
contents of the cell being used must be referenced so the program Ruows what number to
‘use. Columns are given letter designators and rows are given naptbérdesignators
Qy GIG ea2eStionat
Cell reference
Absolute cell reference: The cell reference that idenfities a particular cell with an
“absolute” location has a “S” befateboth the vow and column designators. For example,
SASI always identifies the calli the Firsteoluma and first row, $AS3 always identifies
the cell in the first column, aud third 10. ‘and SC$1 always identifies the cel inthe third
column and first row, segatdless of Which cell the cell reference is in. If the contents of ar
absolute cell referencéiS copizdand pasted into another cell, the cell that it references
does not change.
Absolute column, relative row cell reference: The column reference can be absolute with
'S” while the row reference is relative. For example. the cell reference SA1 always
references a cell located in the first (A) column, but the row is dependent on which row
the cell reference appears in. Because this example uses “1,” the row referenced will
always be the current row in which the reference is entered. If the reference is entered into
acell in third row, it refers to a cell that is in the first column in the current (third) row. If
this reference is copied and pasted into a cell in the third row, it then references SA3.
Similarly, a reference of $A3 in the second row refers to a cell in the first column one row
below the current row. If this reference is copied and pasted into the third row, it then
references SA4.CED Farinas
Cell reference
fourth row. If this reference copied and pasted into the seventh row, it then references
ESA,
Relative column, absolute row cell reference: Sumular to the previous example. a row
reference can be absolute with a “$” while the column reference is relative. For example,
acell reference of BS4 in the fourth column refers to a cell two columns to the left in the
Relative cell reference: A relative cell reference is entirely dependent/ou! which cell itis
located in. For example, a cell reference of B4 located in the celhO2 refers to a cell that is
one column to the left and two rows down. If this veleteiice ts. copied and pasted into cell
BA. it then references A6
GLOBAL
om Cc Educational
i
‘Courses
“examples
Ina spreadsheet, the forniula.$A$4 + BS2 + B2 is entered into cell C3. The contents of cell C:
are copied and pasted into cell D5. The formula in cell Ds is:
(A) SAS4 + ($2 + C4 (B) SBS6+CS4+C4
(C)SAS4 + CS4+.C4 (D) $AS4 + BS2 +B?
In aspreadsheet, the number in cell A4 is set to 6, Then AY is set to A4 + $AS4, where §
indicators absolute cell address. This formula is copied into cells A6 and A7. The umber
shown in cell A7 is most nearly:
(Al (B)4 (C)36 (0) 216GLOBAL
Educational
SUM
Cells can be called out in square or rectangular blocks,
usually for a SUM function. The difference between the
row and column designations in the call will define the
block. For example, SUM(A1:A3) says to sum the cells
Al, A2, and A3; SUM(D3:D5) says to sum the cells D3,
D4, and D5; and SUM(B2:C4) says to sum cells B2, B3,
B4, C2, C3, and C4.
Example s
The cells in a spreadsheet aye GnitiAlize!! as shown. The
formula B1 + $A$1*A2 is extered info cell B2 and then
copied into cells B3 and@P4s What value will be dis-
played in cell B4?
(A) 123
(B) 147
(C) 156
(D) 173
GLOBAL.
CEO Educational
‘Courses