← ACARA Digital Technologies Years 9–10 — Modular and Object-Oriented Programming (Python)

ACARA Digital Technologies Years 9–10 — Modular and Object-Oriented Programming (Python) Hangman

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

Theme
Words

Every word, shuffled.

Players

Writing Python programs in reusable pieces, including with classes and objects. See the whole journey →

Want your own words? Free Hangman Generator →

Same journey, on the board

Two answers, the class points left or right and you reveal why. The journey’s own questions, no devices.

▶ Run Duo on the board

Same words, on paper

The quiet activity after the loud one. Free to print, answer keys included.

Add your class once in the Random Name Picker Wheel — it works here and in the Random Team Generator.

When your class is on devices

Sprint: a fast whole-class game on any module, where every student plays at their own level. Same modules, with a free class.

The 59 key terms

1functions - defining
Keyword that creates (defines) a new function.
2functions - parameters
A variable name in the function definition that receives data.
3functions - return values
Sends a value back to the code that called the function.
4procedure vs function
A procedure carries out a task without returning a value, while a function returns a value to the code that called it, so the result can be stored or used.
5type conversion
Converts the string "5" to the integer 5.
6if 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.
7functions - default arguments
A pre-set value used when no argument is provided.
8functions - scope
Where a variable can be accessed - local or global.
9snake_case
A naming style where all letters are lowercase and words are joined by underscores, like student_score. Python uses it for variables and functions, and it should be used consistently.
10"""docstring"""
A triple-quoted string placed first in a function or class that describes its purpose, parameters and return value. It is internal documentation.
11def 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.
12refactoring
Rewriting working code to make it clearer or simpler (e.g. renaming variables, moving repeated lines into a function) without changing what it does, then re-running tests.
13hierarchy chart
A diagram that splits one main problem into smaller sub-problems in boxes, level by level, until each box is a small task that can be solved on its own.
14def 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.
15more arithmetic operators (//, %, **)
Floor division - divides and rounds DOWN to the nearest integer.
16creating modules (making your own .py files to import)
Any .py file that can be imported and reused.
17lists - creation
An ordered collection of items in square brackets.
18lists - indexing
Access the first item in the list.
19len()
len() counts characters - len("Hello") gives 5.
20for loops
Loop that iterates through each item in a sequence.
21range()
Creates numbers from 0 up to but not including stop.
22lists - slicing
Get items from start up to but not including stop.
23lists - methods (append, remove, pop, insert)
Adds an item to the end of the list.
24sum(), min(), max()
Built-in functions that return the total, smallest and largest value in a list, replacing a hand-written loop with one short, clear line of code.
25def total_of(scores):
A function header with a list parameter. Pass a list when you call it, like total_of([5, 8, 9]), and the function can loop over or read its items.
26copy = items[:]
A function can change a list you pass in, altering the original in place. Make a copy with [:] first if you need to keep the original list unchanged.
27result = []
Start a function with an empty list, append each wanted item inside a loop, then return the finished list after the loop ends. Filtering builds a new list.
28sets - basics
An unordered collection of unique items in curly braces.
29dictionaries - basics (creation, accessing)
A collection of key-value pairs in curly braces {}.
30sets - operations
Combines all items from both sets with no duplicates.
31Traceback (most recent call last):
The start of Python's error report. It names the error type (like NameError) and the line number where it happened, so you know where to start looking for the bug.
32IndexError
A runtime error raised when code uses an index that is not in the list, such as items[5] in a 5-item list. The last valid index is len(items) - 1.
33print("total =", total)
A debug print. Add a line like this to show a variable's value while the program runs, so you can spot where it goes wrong. Put one inside a loop to watch it change, then remove it once fixed.
34breakpoint
A marker set on a line of code (click beside the line number) that pauses the program there in debug mode, so you can inspect variables and step through the code.
35step through
Run paused code one line at a time using step over, step into or step out, while the watch panel shows each variable change, to find where a value goes wrong.
36return
Sends a value back to the caller. If a function only prints and has no return, it gives back None, so the caller cannot use the result.
37modify code
Read a working program, then change one part, like a value, condition or message, to get new behaviour. Predict the result first, change one thing at a time, then run it.
38test case
A chosen input paired with the output you expect. Run the program with it, compare the real output to the expected result in your test table, then record pass or fail.
39assert
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.
40unit 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.
41object-oriented programming
A way of writing programs that groups related data and the code that uses it into one unit called an object, so programs modelling real things are easier to organise than separate lists and functions.
42class diagram
A box listing a class's name, attributes and methods. An arrow joins a child class to the parent it inherits from. You draw it as a plan before writing the code.
43oop - classes & objects
A blueprint that defines the structure of objects.
44oop - __init__ method
Constructor method that runs automatically when an object is created.
45object.attribute
Dot notation reads or changes an attribute stored in an object, like print(pet.name) or pet.age = 5. Each object keeps its own values. A missing attribute causes an AttributeError.
46oop - methods
A function defined inside a class.
47def deposit(self, amount):
A method can take extra parameters after self, like amount, and use return to send a value back to the code that called it.
48oop - string representation (__str__)
Returns a human-readable string used by print() and str().
49s2 = Student('Liam')
Creates a second object from the same class. Each object keeps its own attribute values, so changing s2 does not change s1, but both use the same methods.
50oop - practical application
Bundling data and methods that operate on it together in a class.
51objects.append(obj)
Adds an object to the end of a list so many objects are stored together. You can then loop over the list with a for loop to call each object's methods or find one by its attribute.
52oop - class variables vs instance variables
Variable defined in the class body and shared by all instances.
53encapsulation
Bundling an object's data and the methods that use it into one class, and controlling access so the data is only changed in safe ways through those methods.
54oop - private attributes (underscore convention)
Convention for internal use - don't access directly from outside the class.
55def set_balance(self, amount):
A setter method that changes a private attribute only after checking the new value is valid, such as rejecting a negative amount, so the object never holds bad data.
56oop - inheritance (basic)
A child class receives methods and attributes from a parent class.
57self.name = name
Saves a value on the object. Without self. the attribute is lost (AttributeError), and a method missing self as first parameter gives a TypeError for wrong argument count.
58assert obj.method() == expected
Creates an object, calls its method, then uses assert to check the result or attribute equals what you expect. If it is False, Python raises an AssertionError.
59modular program
A program split into parts: a class for its things, a list of objects, and small functions called from main(), planned with diagrams and checked with tests.

Frequently Asked Questions

Do I need an account?

No. Hangman runs straight from this page — no account, nothing to install. If you add your class names, they are saved in your own browser and sent to Cloodit only if you choose to save the class.

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 once, here, on a Hangman topic page or in the Random Name Picker Wheel, and a random student is called for each word. The class 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