🔷 Flowchart symbols
Pseudocode describes the same steps in structured English, independent of any one language:
Before writing code, programmers plan algorithms with flowcharts or pseudocode, then test them by hand with a trace table to find mistakes early.
Pseudocode describes the same steps in structured English, independent of any one language:
A trace table has one column per variable (and one for output). Work through the algorithm line by line, writing each new value in a new row.
Algorithm:
In a flowchart, a decision is drawn as a:
Input and output use a:
Pseudocode is:
In pseudocode, total ← total + n means:
A trace table is used to:
FOR i ← 1 TO 4 runs the loop:
x ← 2 WHILE x < 50 x ← x * 2 ENDWHILE OUTPUT x
What is output?
Enter an exact answer, without rounding.total ← 0 FOR i ← 1 TO 5 total ← total + i NEXT i OUTPUT total
What is output?
Enter an exact answer, without rounding.count ← 10 REPEAT count ← count − 3 UNTIL count < 0 OUTPUT count
What is output?
Enter an exact answer, without rounding.Which flowchart symbol starts and ends an algorithm?
A process such as total ← total + 1 is drawn as a:
Why use a trace table?
A WHILE loop checks its condition:
A REPEAT…UNTIL loop always runs at least: