← 7-8 Digital Technologies: Programming in Python

7-8 Digital Technologies: Programming in Python Hangman

Years 7–8 · Victorian Curriculum · 23 key terms.

Theme
Words

Every word, shuffled.

Players

Students learn to write, modify, test and debug Python programs that use control structures and functions, including turning their own pseudocode and flowcharts into 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.

CrosswordDesigning and tracing algorithms to Evaluating digital solutions · Pseudocode to Data structures · Searching and sorting algorithms and Errors and debugging · all 9

Word searchDefining and decomposing problems to Evaluating digital solutions · Pseudocode to Data sources and files · Object-oriented programming to Errors and debugging · all 9

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

1program
A text file of Python instructions. You write it in the editor, and when you press Run, Python does each line in order from first to last and shows the output in the output panel.
8int(input())
input() gives text, so int() wraps it to turn the typed text into a whole number you can calculate with. Use float() for decimals. str() turns a number back into text.
11and, or, not
Logical operators that combine or flip True/False conditions. and needs both True, or needs at least one True, and not reverses True to False (or False to True).
18count += 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.
20if inside a loop
An if indented inside a loop's block is checked again on every repetition, so each pass can make a different decision.
22break
A keyword that stops the loop it is in straight away. The program then carries on with the first line after the loop. It is often used inside while True to exit when a condition is met.
24list.append(value)
Adds a value to the end of a list, making it one item longer. Start with an empty list like scores = [] and use append() in a loop to build it up.
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.
26def name():
Creates a function: a named, reusable block of indented code that only runs when you call it. Define it first, then call it.
27addNumbers(3, 4)
Calling a function by writing its name followed by arguments in brackets, running its instructions and possibly producing a value
30local variable
A variable created inside a function. It only exists in that function, so using it outside gives a NameError. A variable made outside all functions is global and can be used anywhere.
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.
33import random
Gives your program the random module. Then random.randint(1, 6) gives a random whole number from 1 to 6, and random.choice(my_list) picks a random item from a list.
34score <- 0 becomes score = 0
Pseudocode steps map to Python lines: <- becomes =, input becomes input(), if becomes if with a colon, for becomes for in range(). END IF becomes un-indenting.
35if / 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().
36modify 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.
37syntax error
An error that occurs when Python cannot understand your code due to a typo, missing quote, or wrong bracket; Python stops and shows a message with the line number
38runtime error
An error that stops a program while it runs, shown as a named error like NameError, ValueError or ZeroDivisionError. Read the message to find the problem.
39logic 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.
40print("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.
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.
42test 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.

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 Victorian Curriculum Hangman

Investigating Issues in Technology21 key terms 5-6 Digital Technologies Vic Curric - Digital Systems & Security52 key terms 5-6 Digital Technologies Vic Curric - Data, Information and Privacy41 key terms 5-6 Digital Technologies Vic Curric - Creating Digital Solutions70 key terms 7-8 Digital Technologies Vic Curric - Digital Systems and Security74 key terms 9-10 Digital Technologies Vic Curric - Digital Systems and Security83 key terms Make your own hangman →Paste any word list and play