IGCSE Computer Science 0478 — 7c Pseudocode and Flowcharts Hangman
Years 10–11 · IGCSE · 89 key terms.
Every word, shuffled.
The names stay in this browser on this computer — they are never sent to Cloodit. A random student is called for each word.
Writing and reading algorithms before you write any code. See the whole journey →
Want your own words? Free Hangman Generator →
Same words, on paper
The quiet activity after the loud one. Free to print, answer keys included.
Crossword7c Pseudocode and Flowcharts · 7c Pseudocode and Flowcharts · 7c Pseudocode and Flowcharts · all 16
Word search7c Pseudocode and Flowcharts · 7c Pseudocode and Flowcharts · 7c Pseudocode and Flowcharts · all 11
Worksheetfor any module, with answer key
When your class is on devices — Snake Break and Diamond Dash run on the same modules, with a free class.
The 89 key terms
- 1pseudocode
- Cambridge's fixed format for planning an algorithm before it is written as program code. Paper 2 answers must use it, except the 15-mark question, which allows Python, VB or Java.
- 3NumberOfPlayers
- An identifier in Pascal case: a variable or constant name using only letters and digits, starting with a capital, with each word capitalised and no spaces or underscores.
- 44 spaces
- Indent every statement inside a FOR, WHILE or REPEAT loop by 4 spaces. Nested loops add 4 more; wrapped continuation lines use 2. An unindented loop body is a presentation error.
- 6INTEGER, REAL, CHAR, STRING, BOOLEAN
- The five basic pseudocode data types: whole numbers, decimals, a single character, text of any length, and TRUE or FALSE. A phone number should be a STRING.
- 7'Y' "Yes" 4.0 TRUE
- Literals have fixed forms: CHAR in single quotes, STRING in double quotes, REAL with a digit each side of the point, BOOLEAN as TRUE or FALSE in capitals.
- 8DECLARE Counter : INTEGER
- Creates a variable named Counter and states its data type (INTEGER) before it is used. The format is DECLARE <identifier> : <data type>, with a space on each side of the colon.
- 9CONSTANT HourlyRate ← 6.50
- Names a value set once with a literal. It never changes, needs no DECLARE, and can be updated in one place.
- 10<identifier> ← <value>
- Assignment stores the value on the right of ← in the variable on the left. The value must match the variable's data type, e.g. Counter ← Counter + 1.
- 11Score ← 5
- ← stores a value in a variable, so Score ← 5 saves 5 in Score. = only tests if two values are equal, as in IF Score = 5, and gives TRUE or FALSE. <> tests not equal.
- 13DIV(a, b) and MOD(a, b)
- DIV(a, b) gives the whole-number part of a divided by b, so DIV(10, 3) is 3. MOD(a, b) gives the remainder, so MOD(10, 3) is 1. Both take integers.
- 16Age >= 18
- Write a condition with symbols such as >=, <> and =, not words. Age >= 18 is correct; 'Age is 18 or more' is not accepted. This applies in pseudocode and flowcharts.
- 17AND OR NOT
- AND is TRUE only when both conditions are TRUE. OR is TRUE when at least one is TRUE. NOT reverses a BOOLEAN value. Use brackets to make complex conditions clear.
- 18Mark >= 0 AND Mark <= 100
- A range check joins two comparisons with AND, so a value is valid only if both are true. Never chain them like 0 <= Mark <= 100. Use OR to test for values outside the range.
- 19INPUT Answer
- INPUT followed by a variable name reads a value typed by the user and stores it in that variable. Use one variable per INPUT, and OUTPUT a prompt first.
- 20OUTPUT
- Displays text in double quotes, variable values or expressions on screen. Several values are separated by commas, e.g. OUTPUT "Score: ", Score
- 21sequence
- Statements are carried out one after another in the order they are written, from top to bottom, so changing the order can change the result.
- 22IF ... THEN ... ENDIF
- Runs the statements between THEN and ENDIF only when the condition is TRUE. If it is FALSE, they are skipped. Every IF must be closed with ENDIF, e.g. IF Score > 50 THEN OUTPUT "Pass" ENDIF.
- 23ELSE
- Gives the statements that run when the IF condition is FALSE. ELSE has no condition of its own, so exactly one of the two branches (THEN or ELSE) runs.
- 24THEN
- THEN and ELSE sit two spaces in from IF, on their own lines. The statements inside each go further in, and ENDIF lines up with IF. Nested IFs keep the same two-space step.
- 25nested IF
- An IF statement placed inside the THEN or ELSE part of another IF, with its own ENDIF. The inner condition is only checked when the outer one sends the program into that part.
- 26CASE OF ... ENDCASE
- Compares one variable with a list of single values and runs the statement for the first match only. Each case is indented two spaces and the structure ends with ENDCASE.
- 27OTHERWISE
- The last clause in a CASE statement. It runs when the value matches none of the listed cases, e.g. OTHERWISE OUTPUT "Beep". Without it, nothing happens if there is no match.
- 28CASE OF
- Use CASE OF to test one variable against single values, like a menu choice. Use IF for ranges, like grade boundaries, or when conditions combine several variables.
- 29FOR Index ← 1 TO 30
- Repeats the statements below once for each whole number from 1 to 30 inclusive. Index is an INTEGER that changes automatically each time. Close the loop with NEXT Index.
- 30STEP
- Sets how much the FOR loop variable changes each time round. STEP 2 counts in twos and STEP -1 counts down. The loop stops when the value goes past the end value.
- 31end - start + 1
- The number of times a FOR loop runs. FOR i ← 1 TO 5 runs 5 times, 3 TO 3 runs once, and 5 TO 1 runs zero times because the start value is bigger than the end value.
- 32WHILE ... DO ... ENDWHILE
- A loop that tests its condition before each pass and repeats its statements while the condition is TRUE. It may run zero times, and the body must change the condition.
- 33REPEAT ... UNTIL
- A loop that runs its statements first, then tests the condition. It stops when the condition is TRUE, so the body always runs at least once. It has no ENDREPEAT keyword.
- 34WHILE vs REPEAT
- WHILE tests first, so its body may never run, and it loops while the condition is TRUE. REPEAT tests after the body, so it runs at least once, and it stops when the condition is TRUE.
- 35FOR / WHILE / REPEAT
- Use FOR when the number of repeats is known, WHILE when the body might run zero times (such as reading until a sentinel), and REPEAT when the body must run at least once (such as validation).
- 36nested loop
- A loop placed inside another loop. The inner loop runs completely for every pass of the outer loop, so total passes = outer passes x inner passes.
- 37IF inside a loop
- An IF placed inside a loop body is tested again on every pass, so each pass can take a different branch. It is often used to count items that meet a condition.
- 38DECLARE StudentNames : ARRAY[1:30] OF STRING
- Creates a fixed-length array. Its 30 elements are numbered from lower bound 1 to upper bound 30, and every element holds the same data type, here STRING.
- 39StudentNames[1]
- Reads or changes one array element: the array name, then one index in square brackets. The index must be between the array's lower and upper bound. StudentNames[1] ← "Ali" stores a value.
- 41DECLARE NoughtsAndCrosses : ARRAY[1:3, 1:3] OF CHAR
- Declares a 2D array of characters with 3 rows and 3 columns. Reach one element with a row index then a column index, e.g. NoughtsAndCrosses[2,3] ← 'X'.
- 42flowchart symbols
- Cambridge 0478 flowcharts use only six standard shapes: terminator, process, input/output, decision, subroutine and flow line. Each shape must be drawn correctly and used for its own job.
- 43Terminator
- A rounded (oval) flowchart shape that marks the Start and the Stop of a flowchart. There is one Start, every path ends at a Stop, and no arrow goes into Start.
- 44flow line
- An arrow that joins two flowchart shapes and shows which step runs next. The arrowhead points the way control passes, from Start to End, and a line can loop back to repeat steps.
- 45Process symbol
- A rectangle in a flowchart that shows one action, such as a calculation or an assignment, written inside it, e.g. Total ← Total + Mark or Count ← 0.
- 46parallelogram
- The flowchart shape for an input or output step, like getting a name from the user or showing a result. Write the action and variable inside, e.g. Input age.
- 47decision diamond
- A diamond shape in a flowchart that holds a yes/no question. One arrow labelled Yes and one labelled No lead to different steps, and the paths can join up again later.
- 48Subroutine symbol
- A rectangle with extra vertical lines at each side. It shows a call to a procedure or function that is drawn as a separate flowchart, with the subroutine's name written inside.
- 49Count ← Count + 1
- Flowchart symbols hold precise pseudocode, not sentences. Process boxes use ← statements like this, decisions use conditions like Mark >= 50, parallelograms use INPUT or OUTPUT.
- 50flowchart sequence
- A line of rectangles joined by arrows from the Start oval to the End oval, with one arrow in and one arrow out of each step. Each step is a short action phrase.
- 52chained decisions
- Putting one decision diamond after another, so a No arrow leads to the next diamond. This lets a flowchart choose between three or more paths, and every path reaches End.
- 53nested decision
- A diamond placed on the Yes or No path of another diamond, so the second question is only asked after the first answer. Every path still ends at the End shape.
- 54WHILE condition DO
- In a flowchart the decision comes first. Yes runs the body and an arrow returns to the decision. No leaves the loop to the next step. The body may run zero times.
- 56FOR loop flowchart
- Set Counter ← 1 in a process box, test Counter <= 10 in a decision, run the body on Yes, then do Counter ← Counter + 1 and flow back to the test. No leaves the loop.
- 57flowchart loop
- An arrow that goes back to an earlier shape, usually from a decision diamond, so the steps repeat until the exit condition is met and the exit arrow is followed.
- 58decision inside a loop
- A diamond on the loop path is asked on every pass. Both its Yes and No branches rejoin, then go back to the loop test, usually after the counter update.
- 59Start to Stop
- List the inputs, processes and outputs, then draw Start, the steps in order with the correct symbols, and Stop. Check every path reaches Stop, then trace it with test values.
- 60Pseudocode to flowchart
- Each pseudocode statement becomes one flowchart symbol: assignment is a process box, INPUT/OUTPUT a parallelogram, and IF or loop conditions a decision diamond.
- 61Flowchart to pseudocode
- Follow the flow lines and turn each symbol into a statement. A diamond becomes IF, a back arrow shows a loop, and you add ENDIF, NEXT, ENDWHILE or UNTIL. Write keywords in capitals.
- 62Age = int(input())
- Python for INPUT Age: = replaces the arrow, input() reads text, and int() turns that text into a whole number. OUTPUT Age becomes print(Age); use float() for decimals.
- 74if/elif/else
- Python has no CASE, so write it as an if/elif chain testing the same variable. The first value uses if, each other value uses elif, and OTHERWISE becomes else.
- 77for i in range(1, n + 1):
- Python for FOR i ← 1 TO n. range() stops before its end value, so use n + 1 to include n. A third argument is the STEP; a negative step counts down.
- 79while True:
- Python's version of REPEAT ... UNTIL: the body runs at least once, then an if with break at the end stops the loop when the UNTIL condition is True.
- 82scores[i - 1]
- A pseudocode array starting at index 1 becomes a Python list starting at 0, so element Scores[i] is written scores[i - 1] in Python.
- 83if / while
- A flowchart diamond (a decision) becomes if, or while when an arrow loops back to it. Rectangles become statements and parallelograms become input() or print().
- 84count += 1
- Set count = 0 before a loop, then use count += 1 inside it to add 1 each repeat. Use total += value to build a running total.
- 85purpose
- What the whole algorithm achieves, stated in one sentence, such as 'finds the largest of ten numbers'. It is not a line-by-line description. Check the OUTPUT and identifier names for clues.
- 86Input, process, output
- Every algorithm takes INPUT data, carries out processes on it (calculations, decisions, storing in variables or arrays), then gives OUTPUT results.
- 87Trace table
- A table that records the value of each variable at every step of an algorithm, used to check its logic by hand.
- 89Tracing a loop
- Work through the loop body once per pass, recording changed values in a new row each time. Test the condition before the body for WHILE and after it for REPEAT. Check the final row.
- 90dry run
- Running an algorithm by hand with test values, then comparing the inputs with the final outputs to work out its purpose, such as totalling, counting or finding the largest.
- 91Describe the processes
- State, in order and in plain words, what each part of the algorithm does with the data: set up variables, what the loop repeats, what the decision does, then the output.
- 92Describing a loop
- State how many times the loop repeats or the condition it stops on, and what happens to the data each time round, e.g. each mark is added to Total.
- 93Explaining a flowchart
- Follow the flow lines from Start, say what each symbol does and what each decision tests (Yes and No paths), then state the overall purpose.
- 94error in an algorithm
- A mistake that breaks pseudocode rules or gives wrong results. Find it by reading the code, then trace it with test values and compare the actual output with the expected output.
- 95Total ← 0
- Use ← to store a value, so write Total ← 0, not Total = 0. Use = only to compare, as in IF Score = 5, not IF Score ← 5. Swapping them is an error.
- 96ENDIF NEXT ENDWHILE UNTIL
- Closing keywords that end IF, FOR, WHILE and REPEAT. Each one must match its opening statement. A missing or mismatched closing keyword is an error.
- 98Mark < 0 OR Mark > 100
- Use OR, not AND, to catch an invalid mark. A mark cannot be below 0 and above 100 at once, so AND is never TRUE. OR is TRUE when either part is TRUE.
- 100off-by-one error
- A FOR loop with the wrong start or end value runs one time too many or too few, e.g. TO 9 instead of TO 10, or starting at 0 for a 1-based array. Check the bounds with a trace table.
- 101infinite loop
- A loop that never ends because nothing in the body changes the tested variable, or the condition can never reach its exit value.
- 102wrong loop type
- Using REPEAT when the body must sometimes not run, or WHILE when it must run at least once. REPEAT always runs once; WHILE may run zero times.
- 103Data type error
- An error caused by using a value its data type does not allow (e.g. a STRING stored in an INTEGER, or an index outside the array) or by using a variable that was never DECLAREd.
- 104flowchart error
- A mistake in a flowchart, such as the wrong symbol shape, a missing Yes or No label, a path that never reaches Stop, or a loop arrow joining the wrong place.
- 105Line 3 should be Total ← 0
- To suggest a correction, name the wrong line or symbol, say why it is wrong, write the corrected statement, and explain what the fix changes in the algorithm's output.
- 106logic error
- A mistake that lets a program run with no error message but give the wrong result, caused by a wrong condition, operator (> or >=), range() off by one, or steps in the wrong order.
- 107Total ← Total + Value
- Totalling builds a running total. Set Total ← 0 before the loop, add each Value to Total inside the loop, then OUTPUT Total after the loop has finished.
- 109IF Value > Max THEN Max ← Value
- Finds the largest value: set Max to the first value, loop through the rest, and replace Max whenever a larger value is found. The minimum works the same way using < instead.
- 110Average ← Total / Count
- An average is the total divided by the count. Work it out after the loop ends, and only when Count is not 0. Store it in a REAL variable.
- 111linear search
- Checks each array element in order from the first, comparing it with the target, until a match is found or the end of the array is reached.
- 113bubble sort
- A sort that makes repeated passes, comparing neighbouring items and swapping them using a Temp variable if they are in the wrong order, until a pass makes no swaps.
- 116DECLARE, INPUT, process, OUTPUT
- To write an algorithm from a problem, DECLARE variables first, then INPUT, process with IF, CASE or a loop, then OUTPUT. Check each part against the problem and use the exam format.
- 117flowchart
- A diagram that solves a problem using symbols for start, input, process, decision, output and stop, joined by arrows. Label each decision Yes or No and test every path to Stop.
- 118amend an algorithm
- Find the part that must change for the new requirement, change only that part, then re-trace the algorithm to check the rest still works.
- 119REPEAT INPUT Mark UNTIL Mark >= 0 AND Mark <= 100
- A validation loop: it asks for INPUT again and again until the value passes the check (here a range check), so invalid data never enters the algorithm.
- 120command word
- The exam word that tells you what to write: state the purpose, describe the processes, identify the error, suggest the correction, each in precise terms.
Frequently Asked Questions
Do I need an account?
No. Hangman runs straight from this page — no account, no sign-up, nothing to install. If you add your class names, they are saved in your own browser and never sent to Cloodit.
How do I play it with my class?
Put the page on your whiteboard or projector and press Play. The class calls out letters and you click or type them. Six wrong letters and the word gets away. After every word its definition appears, so each round ends on the meaning, not just the spelling.
Can I use my own words?
Yes. The free Hangman generator at cloodit.com/hangman/ takes any list: one word or phrase per line, with a definition after a dash if you want it shown at the end of the round.
Can I put my students' names in?
Yes. Add your class list and a random student is called for each word. The list stays in this browser on this computer, so it is still there next lesson.
Are the worksheets free too?
Yes. Every module in this journey has a free printable worksheet with a full answer key, and there are crosswords and word searches built from the same key terms.