← ACARA Digital Technologies Years 9–10 — Algorithms with Logical Operators

ACARA Digital Technologies Years 9–10 — Algorithms with Logical Operators Hangman

Years 9–10 · Australian Curriculum · 58 key terms.

Theme
Words

Every word, shuffled.

Players

Designing algorithms that combine conditions, in flowcharts and pseudocode. 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.

CrosswordAlgorithms with Logical Operators · 7c Pseudocode and Flowcharts · 8.1b Sequence, Selection and Iteration · all 18

Word searchEntities, Relationships and Queries and Algorithms with Logical Operators · 7c Pseudocode and Flowcharts · 8.1b Sequence, Selection and Iteration · all 13

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 58 key terms

1= and <>
= tests whether two values are equal and <> tests whether they are not equal. Each gives TRUE or FALSE. Assignment uses <- instead, not =.
3Age >= 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.
4IF condition THEN ... ENDIF
Runs the indented statements only when the condition is TRUE. If it is FALSE they are skipped. ENDIF closes the selection and lines up with IF.
5ELSE
Adds a second branch that runs when the IF condition is FALSE, so exactly one of the two branches runs. ELSE has no condition of its own and lines up with its IF.
6flowchart 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.
7decision diamond
The flowchart shape for an IF. It asks a question, then the Yes path and the No path each run their own statements and rejoin before the next step.
8AND
AND joins two conditions and is TRUE only when both are TRUE, e.g. Age >= 13 AND Age <= 19. If either condition is FALSE, the whole condition is FALSE.
10NOT
A logical operator that reverses a condition: NOT TRUE is FALSE and NOT FALSE is TRUE. For example, NOT (Score >= 50) is TRUE only when Score is below 50.
11truth table
A table that lists every combination of true and false inputs and shows the result of AND, OR or NOT for each one. Two inputs give four rows.
12(A OR B) AND C
Brackets are worked out first. Without them NOT is done first, then AND, then OR. So A OR B AND C means A OR (B AND C), and brackets change that order.
13both = AND, either = OR, not = NOT
Key words in a worded rule signal the operator: both/and means AND, either/or means OR, not/unless/except means NOT. Use them to rewrite the rule as a compound condition.
14Mark >= 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.
15NOT (A AND B) = (NOT A) OR (NOT B)
De Morgan's law: to negate a compound condition, negate each part and swap AND for OR. Likewise NOT (A OR B) = (NOT A) AND (NOT B). A truth table can prove they match.
16Mark < 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.
17IF Age >= 13 AND Age <= 19 THEN
A compound condition joins tests with AND, OR or NOT so one IF checks several things at once. AND needs both tests true; OR needs at least one true.
18age >= 13 AND has_permission = Yes
A combined condition in one decision diamond. AND needs both parts true, OR needs just one, NOT reverses it. One diamond with AND matches two diamonds in a row.
19IF A AND B
In a flowchart, AND is two diamonds in a row: only Yes then Yes reaches the action, and a No from either diamond goes to the same next step.
20IF A OR B THEN
In a flowchart, OR is two diamonds whose Yes arrows both reach the same action. The second diamond sits on the first's No path. The action is skipped only if both are No.
21ELSE IF
A nested IF placed inside ELSE to choose between 3+ alternatives. Conditions are tested in order, only one branch runs, and every IF needs its own ENDIF.
22nested IF
An IF placed inside the THEN or ELSE branch of another IF. It is only checked when that outer branch runs, and each IF needs its own ENDIF, with the inner ENDIF written first.
23nested 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.
24nested IF vs AND
IF A AND B gives the same result as IF A THEN IF B when one action needs both tests. Use nesting when each test needs its own different ELSE outcome.
25FOR Count <- 1 TO 10
A count-controlled loop that repeats the indented lines end - start + 1 times, adding 1 to the counter each time. It is closed by NEXT Count, which names the same counter.
26WHILE Number <> 0 DO
A pre-condition loop: the condition is tested before every repeat, so the body may run zero times. The loop keeps going while the condition is TRUE and is closed by ENDWHILE.
27REPEAT UNTIL
A post-condition loop: the body runs first, then UNTIL tests the condition. It always runs at least once and stops when the condition is TRUE. There is no ENDREPEAT.
28FOR, WHILE or REPEAT
Choose FOR when the number of repeats is known, WHILE when the loop may run zero times, and REPEAT...UNTIL when the loop must run at least once.
29WHILE 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.
30REPEAT ... UNTIL
In a flowchart, the loop body comes first, then a decision. NO goes back to the body, YES leaves the loop, so the body runs at least once.
31FOR 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.
32WHILE Attempts < 3 AND Correct = FALSE DO
The loop repeats only while BOTH tests are TRUE. As soon as either test becomes FALSE, the whole condition is FALSE and the loop stops.
33UNTIL Guess = Secret OR Tries = 5
A REPEAT loop whose UNTIL condition uses OR stops as soon as either part becomes TRUE, so the loop has two ways to end: a correct guess or running out of tries.
34UNTIL X >= 10
Reverses WHILE X < 10. WHILE loops while TRUE, UNTIL stops when TRUE, so flip the condition. REPEAT also runs its body once before the first test.
35compound loop exit
A loop test using AND or OR is drawn as a back arrow to the first question, with one combined diamond or two diamonds. Both exit reasons must lead out of the loop.
36UNTIL Mark >= 0 AND Mark <= 100
Ends a REPEAT loop only when Mark is valid (0 to 100). Input is asked again until it passes this range check, so the program only continues with valid data.
37infinite loop
A loop that never ends because nothing in the body changes the tested variable, or the condition can never reach its exit value.
38IF inside a loop
An IF or CASE placed in a loop body is tested again on every repeat, so each pass can take a different branch depending on the current value.
39decision 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.
40Count <- Count + 1
Adds 1 to the counter each time the thing being counted happens. Set Count <- 0 before the loop, and put this inside the loop (inside an IF to count only some values).
41IF mark >= 50 AND mark <= 100 THEN count ← count + 1
Inside a loop, an IF with AND or OR tests each item and adds 1 to count only when the whole combined condition is true, so count ends as the number of items that qualify.
42sequence, selection, iteration
Set counters to 0 first (sequence), loop to read input (iteration), use IF inside the loop to pick values to count or total (selection), then OUTPUT the result after the loop.
43IF Mark >= 50 THEN
To trace an IF, work out if the condition is TRUE or FALSE for the current values, then follow only the THEN or ELSE path. Skipped statements get no row in the trace table.
44WHILE and REPEAT loop trace
Trace a loop by testing its condition each pass: WHILE tests before the body and may never run; REPEAT tests after the body so runs once at least. Stop when the loop ends.
45trace a compound condition
Work out each part as TRUE or FALSE for the current values, record both in the trace table, then combine them with AND, OR or NOT. Do brackets first.
46Count ← Count + 1
Trace table for counting and totalling: Count and Total start at 0 in the first row, change each pass (Count only if the IF is true), and the final values are output after the loop.
47Explaining 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.
48dry 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.
49purpose
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.
50Input, Process, Output
Plan before coding: read the problem, list what is input, what must be calculated or decided, and what is output. Then pick variables and spot repeats and decisions.
51Start 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.
52DECLARE, 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.
53Pseudocode 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.
54Flowchart 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.
55WHILE + IF + AND/OR/NOT
A complete design where a loop repeats, IF decisions use AND, OR or NOT, and the flowchart and the pseudocode do the same job, so both versions agree.
56test case
A chosen input paired with the output you expect. Run the algorithm, record the actual output, then compare: if actual matches expected it passes, otherwise it fails.
57test data
Values chosen so each part of a compound condition is TRUE and FALSE in turn, including boundaries like 17, 18 and 19 for Age >= 18, so every path gets tested.
58error 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.
59Line 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.
60amend 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.

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.

More Australian Curriculum Hangman

ACARA Digital Technologies Years 5–6 — Inside Digital Systems18 key terms ACARA Digital Technologies Years 5–6 — Networks and Sharing Data25 key terms ACARA Digital Technologies Years 5–6 — Representing Data with Numbers36 key terms ACARA Digital Technologies Years 5–6 — Algorithms with Branching and Repetition40 key terms ACARA Digital Technologies Years 5–6 — Staying Safe Online38 key terms ACARA Digital Technologies Years 5–6 — Digital Footprints55 key terms Make your own hangman →Paste any word list and play