QCE Digital Solutions Unit 4 — Prototype Digital Data Exchanges Hangman
Year 12 · QCE · 103 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.
Building and testing a working data exchange. 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.
CrosswordPrototype Digital Data Exchanges · Code repositories, APIs, libraries and AI assistants · Pseudocode to Data structures · all 36
Word searchDigital Methods for Exchanging Data to Prototype Digital Data Exchanges · Pseudocode to Data sources and files · What is Pseudocode to Reading and tracing complex pseudocode · all 27
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 103 key terms
- 10sequence
- A control structure where statements run one after another, top to bottom, so changing their order can change the result.
- 14nested if
- An if statement indented inside another if block. The inner condition is only checked when the outer condition is True.
- 20one-dimensional array
- A named, ordered collection of elements of the same data type. Each element is reached by its index, its position number (0-based in Python, often 1-based in pseudocode).
- 22scores = [0] * 10
- Creates a one-dimensional array (list) of 10 elements that all start with the value 0. Change the number to set the size, or use '' for strings.
- 25for item in my_list:
- Runs the indented block once for each value in the list. The variable item holds the current value each time round, starting with the first and finishing with the last.
- 26for i in range(len(arr)):
- Loops i through every index of arr, so arr[i] can be read or changed and you know each element's position. Used for totals, finding the largest value and editing in place.
- 31def main(): greet()
- A function can call another function inside its body. Big problems get split into small helper functions that each do one job, like boxes in a decomposition.
- 32def main():
- Defines a function called main that holds the main steps of your program. You call main() once at the end of the file, after the other functions are defined, to start the program.
- 35TypeError
- A runtime error when an operation gets the wrong data types, like '5' + 3 (string plus integer). Fix it by converting with int() or str(), e.g. int(input()).
- 37if value.strip() == '':
- An existence check tests that a value was actually entered. strip() removes spaces, so this is True for empty or space-only input, and an error message can be shown.
- 38type check
- A check that input is the expected data type, using .isdigit(), try/except around int() or float(), or isinstance(). input() is always text, so check before converting.
- 391 <= age <= 120
- A range check: tests that a number lies between a minimum and a maximum (inclusive here). Values outside the limits, such as 0 or 121, are rejected as invalid.
- 40if is_even(n):
- Calls a function that returns True or False and uses that result directly as the if condition. You do not need to write == True. It can also be combined with not, and, or.
- 41while not valid:
- A loop that keeps asking for input again until the answer is valid, so bad data (like an age of -5) can't get into your program. Show an error message each time.
- 42def is_valid_age(text):
- A validation function that runs the existence, type and range checks in order and returns True or False, so the same checks can be reused for many inputs and tested.
- 43MOD
- The pseudocode operator that returns the remainder after integer division. Example: 10 MOD 3 gives 1 because 10 divided by 3 is 3 remainder 1
- 44AND
- A VCAA pseudocode boolean operator that combines two conditions. The overall result is true only when BOTH conditions are true. Example: x > 0 AND x < 10
- 45end if
- The closing keyword that ends an if-then block in VCAA pseudocode. Every if block must be closed with end if at the same indentation level as the opening if keyword
- 46ELSE IF
- A keyword that adds another condition to check if the previous IF or ELSE IF condition was false
- 47FOR i FROM 1 TO n
- A loop that repeats its instructions a fixed number of times, counting the variable i from 1 up to n
- 48WHILE condition DO
- A loop that repeats its instructions for as long as the given condition remains true, checked before each repetition
- 49count <- count + 1
- A counter. It adds 1 to a variable each time a loop repeats. Set it to 0 before the loop. An accumulator works the same way: total <- total + x adds a value each time.
- 50scores[1]
- Accesses the array element at index 1, using square brackets to specify the position.
- 51define
- A keyword that starts a function definition, naming the function and listing the parameters it accepts
- 52return
- A keyword that sends a value back from a function to where it was called, ending the function's execution at that point
- 53trace table
- A table with one row per loop repeat. Record the IF condition result, change only the variables the branch updates, copy the rest down, and note any output.
- 54trace 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.
- 55print(variable)
- Debugging tool: print a variable at key points, then compare each value with your trace table of what it should be. The first mismatch shows where the bug is.
- 56desk check
- Trace by hand: record each function call's argument values, follow its statements to the return, then carry the returned value back into the caller's trace table.
- 57SQL
- Structured Query Language, the standard language for asking a database to return data (SELECT) or to add, change or remove it (INSERT, UPDATE, DELETE).
- 58PRIMARY KEY
- A field whose value is unique for every record in a table, such as a student ID number, so each record can be identified exactly. Names make poor keys because they can repeat.
- 59FOREIGN KEY
- A field in one table that holds the primary key value of a record in another table, linking the two tables together so related data is stored once and not repeated.
- 60CREATE TABLE
- SQL command that builds a new table by naming its fields and their data types, such as a PRIMARY KEY. INSERT INTO ... VALUES then adds one record to that table.
- 61DROP TABLE
- DROP TABLE name; permanently deletes a whole table and all its records. It cannot be undone. Add IF EXISTS to avoid an error when the table is missing.
- 62ALTER TABLE
- Changes the structure of an existing table, such as adding a column with ADD or removing one with DROP COLUMN. Existing rows keep their data and get empty (NULL) values in a new column.
- 63CHECK (age BETWEEN 0 AND 120)
- A constraint is a rule on a column. This CHECK rejects any record with an age outside 0 to 120. NOT NULL (must have a value) and UNIQUE (no repeats) are constraints too.
- 64UPDATE table SET field = value WHERE condition;
- UPDATE changes field values and DELETE FROM removes records. Always add WHERE so only the chosen records change. Without it, every record in the table is changed or deleted.
- 65SELECT name, age FROM students;
- SELECT lists the fields to show and FROM names the table. This returns the name and age columns for every record in students. SELECT * shows all columns. End with a semicolon.
- 66WHERE
- An SQL clause that keeps only the rows meeting a condition, such as WHERE age >= 15 or WHERE town = 'Perth'. Text goes in quotes, and AND or OR can combine conditions.
- 67ORDER BY
- Sorts the rows a SELECT query returns by a chosen field. It sorts A to Z or lowest to highest by default (ASC), or the reverse if you add DESC after the field name.
- 68SELECT AVG(score) FROM results;
- An aggregate function works out one value from many rows. COUNT, SUM, AVG, MIN and MAX give the count, total, mean, lowest and highest. This query returns the mean score.
- 69GROUP BY
- An SQL clause that sorts rows into groups sharing the same field value, then applies an aggregate like AVG or COUNT to each group, giving one result row per group (e.g. average score per class).
- 70HAVING
- Filters groups after GROUP BY using an aggregate condition, e.g. HAVING COUNT(*) > 2. WHERE filters rows before grouping. Order: WHERE, GROUP BY, HAVING.
- 71JOIN
- A join matches each foreign key value in one table to the primary key value in another, so rows from both tables show together. Rows with no match are left out.
- 72ON orders.customer_id = customers.customer_id
- The join condition: it matches the foreign key in one table to the primary key in the other. The = sign compares the two values to find matching rows. It does not assign a value.
- 73table.field
- Names the table a field comes from, like students.name. Needed in a join when both tables share a field name, or SQL gives an ambiguous column error.
- 74JOIN ... ON ... WHERE ... ORDER BY
- After JOIN ... ON links two tables, WHERE filters the joined rows and ORDER BY sorts them. Clause order: SELECT, FROM, JOIN ON, WHERE, ORDER BY.
- 75(SELECT ...)
- A sub-select is a SELECT inside brackets in a WHERE clause. It runs first and its result is used by the outer query, e.g. to compare with an AVG or to match values using IN.
- 77TXT file
- A plain text file holds unformatted characters, usually one line of text per line ended by a newline. It has no field headings or data types, so everything is read as a string.
- 81line.split(',')
- A string method that breaks a line of text into a list of field strings at each comma. Use strip() first to remove the newline, and int() or float() to convert fields.
- 82records.append(line.strip().split(','))
- Splits one CSV line into fields and appends them as one record to a list, so each row of the file becomes a record and the whole file becomes a table in memory.
- 83','.join(record)
- Joins a record's fields, which must all be strings, into one comma-separated line. Use str() on numbers first, then write the line plus a newline to the CSV file.
- 84open('data.bin', 'rb')
- Opens a file in binary mode so read() returns raw bytes, not text. Use 'wb' to write bytes. Binary data is type bytes, not str, and read(n) reads n bytes.
- 85conn = sqlite3.connect("school.db")
- Opens the SQLite database file school.db (creating it if missing) and returns a connection. Then conn.cursor() makes a cursor to run SQL, and conn.close() ends the connection.
- 86cursor.execute()
- Runs an SQL statement from Python. Then fetchall() returns the result rows as tuples, and conn.commit() saves INSERT or UPDATE changes. Use ? placeholders for values.
- 87library
- A collection of ready-made code you can reuse. The standard library comes with Python; third-party libraries are made by others and must be installed separately (e.g. with pip).
- 88pip install requests
- A terminal command that uses pip to download a third-party library (here requests) so a Python program can then import it. Add ==2.31.0 after the name to pick a version.
- 89import math
- Loads Python's math module, giving you extras like math.sqrt(), math.pi, math.ceil() and math.floor() that basic operators don't have. Call them with the math. prefix.
- 90API
- An application programming interface: a defined set of requests and responses that lets one program use the features or data of another program.
- 91requests.get(url)
- Sends a request to a web API endpoint at the given URL and returns a response object. Needs import requests. Check response.status_code (200 means success) before using the data.
- 92response.json()
- Converts the JSON text of an API response into Python dictionaries and lists, so you can read values by key, e.g. data['name'], or loop over a list of results.
- 93response.status_code
- Check a response's status code (200 OK, 404 not found) and wrap requests.get() in try/except so a failed API call shows a friendly message, not a crash.
- 94API key
- A secret code that identifies your program to an API. Keep it in a separate file, out of the repository and shared code, because it is linked to your usage limits.
- 95json.dumps()
- Turns a Python dictionary or list into JSON text (double-quoted keys, braces, square brackets) ready to send. json.loads() does the reverse and turns JSON text back into Python data.
- 96requests.post(url, json=data)
- Sends a Python dictionary to a web API as a JSON request body, unlike GET which only fetches data. Check the response with response.status_code.
- 97<student><name>Mia</name></student>
- XML stores data in nested, named elements. Each element has an opening and closing tag, and child elements sit inside a root element. The tags describe the data.
- 98xml.etree.ElementTree
- Python module that parses an XML file into a tree of elements. Use find() and findall() to reach elements and .text to read their values.
- 99TXT, CSV, XML
- Choose a data source by structure: TXT for simple lines, CSV for tables of records, XML for nested self-describing data shared between systems. All three store data between runs.
- 100receive -> process -> display
- A prototype pipeline: get external data into a variable, process it with a function, then show the result. Each step has its own function, called from main().
- 101encrypt
- To scramble data so nobody can read it without the key. This keeps private things like messages, passwords and bank details safe if someone steals or intercepts them.
- 102Encryption
- Turning a readable message into a scrambled, unreadable message using a key, so it can only be read again with decryption.
- 103Symmetric encryption
- Using the exact same secret key to both lock and unlock a message.
- 104Caesar cipher
- A cipher that encrypts a message by shifting each letter forward by a fixed number, and decrypts it by shifting each letter back by the same number.
- 105(position + shift) MOD 26
- Caesar wrap-around rule: with A=0 to Z=25, add the shift then take MOD 26 so letters past Z loop back to A. Example: X (23) + 5 = 28, MOD 26 = 2, which is C.
- 106ord() and chr()
- ord("A") returns the number code of a character (65). chr(65) turns a number code back into its character ("A"). Ciphers use them to change letters to numbers and back.
- 107ch.isalpha()
- Returns True if the character ch is a letter, so a Caesar loop can shift letters and leave spaces and punctuation unchanged. ch.isupper() checks for capitals.
- 108chr((ord(ch) - 65 + shift) % 26 + 65)
- Shifts an upper-case letter ch along the alphabet by shift, wrapping past Z back to A. A for loop applies it to each letter and builds the ciphertext with +=, skipping spaces.
- 109caesar(cipher, -shift)
- Decrypts by calling the same Caesar function with the negative of the original shift. Shifting back by the same amount undoes the encryption, and % keeps the letters wrapping.
- 110Polyalphabetic cipher
- A cipher that uses a repeating list of shift numbers, so different letters in a message are shifted by different amounts.
- 111Vigenere cipher
- A cipher that uses a keyword, where each keyword letter sets a different shift for the matching letter of the message.
- 112key[i % len(key)]
- Picks the keyword letter for position i and wraps back to the start with %, so each message letter gets its own shift. This is how a Vigenere cipher loop cycles the keyword.
- 113one-time pad
- A cipher that encrypts each letter with a random key letter. The key is as long as the message and is used once only, so it is unbreakable if used correctly.
- 114key = [random.randint(0, 25) for c in message]
- Builds a one-time pad key by picking one random number from 0 to 25 for each character in the message, so the key is as long as the message. Never reuse a key.
- 116XOR cipher
- Encrypts by XOR-ing (^ in Python) each character code with a key number. XOR-ing the result with the same key again restores the original, so one key encrypts and decrypts.
- 117shared secret key
- In symmetric encryption, the receiver can only decrypt if they hold the same key as the sender, so the key must be shared before any data is sent.
- 118data in transit
- Data moving across a network, such as email or web traffic. It is protected by encrypting it (e.g. HTTPS or a VPN) so intercepted data cannot be read.
- 119data at rest
- Data stored on a device, server or backup, not moving. Protect it with encryption (disk or database) and access control, so a stolen laptop or backup is unreadable.
- 120Misuse of personal data
- Using or sharing personal data in ways the person did not agree to or that harm them, such as selling it, identity theft, or using it for a different purpose.
- 121Inaccurate or incomplete data
- Wrong, missing or out-of-date data can lead to false conclusions that harm people or give an unfair picture, such as leaving out groups or using old records.
- 122Ownership and control of data
- Who has the right to hold, change, share and delete data about a person or topic. An organisation may hold the data, but the person it describes should keep some control.
- 123Security-impact evaluation
- Judging a data exchange on five aspects: use, dissemination, storage, accuracy and ownership of data, with evidence for each, then recommending a fix.
- 124normal, boundary and invalid data
- A good test set uses normal data (typical values), boundary data (values at the edges of a range) and invalid data (values that should be rejected), so every path in an algorithm is checked.
- 125test table
- A table with one row per test case. Its columns are test number, purpose, input, expected result, actual result and pass or fail.
- 126assert
- Checks a condition is True, like assert add(2, 3) == 5. If the result is not what you expected, it raises an AssertionError, so test cases can run automatically.
- 127unit testing
- Testing one function or class on its own, with its own test table, before joining it to the rest of the program, so a failing test points to that module.
- 128accuracy testing
- Comparing the prototype's actual output with expected results worked out by hand from known data, to find wrong values such as rounding or conversion errors.
- 129reliability testing
- Checking a prototype keeps working when the data source is offline, missing, empty, slow or sends malformed data, and gives consistent results on repeated runs.
- 130efficiency
- How well a solution uses resources such as time, processing, memory, storage and user effort to do its job. An efficient solution is fast, light on memory and storage, and saves the user time.
- 131Effectiveness
- How well a solution does what it was meant to do, giving correct, complete and usable results that meet the requirements and suit its purpose.
- 132maintainable code
- Code organised so it can be fixed or extended later without breaking other parts, using small functions, classes that hide detail and constants instead of repeated values.
- 133internal documentation
- Explanation written inside the code to say what it does and why, so other programmers can understand, fix and update it later.
- 134usability
- How easily, quickly and accurately users can learn and use software to achieve their goals, including ease of learning, efficiency of use, and error prevention and recovery.
- 135apply evaluation criteria
- Gather evidence for each criterion, compare it with the target, then judge if it is met or not met, for both efficiency and effectiveness.
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.