← All printables
Python · Modules 21–30

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

A free printable Python definitions worksheet with 40 key terms, built from the key terms of Functions (Modules 21–30) — range(), Error Handling – try/except basics, break and continue, Functions – Defining, Functions – Parameters, Functions – Return Values and more. Print it or save it as a PDF — the answer key starts on its own page. No login needed.

Python Definitions Worksheet: Functions (Modules 21–30)

Name:
Date:
Class:

Key terms

Write what each term means, in your own words.

1
range(stop)
2
range(start, stop)
3
range(start, stop, step)
4
Step
5
try
6
except
7
ValueError
8
Error handling
9
break
10
continue
11
while True: + break
12
Loop control
13
def
14
Function
15
Call
16
Function body
17
Parameter
18
Argument
19
def greet(name):
20
greet('Alice')
21
return
22
Return value
23
None
24
return vs print
25
Scope
26
Local variable
27
Global variable
28
NameError
29
Default argument
30
Optional parameter
31
Required parameter
32
Override
33
Index
34
string[0]
35
Negative index
36
IndexError
37
Slice
38
[start:stop]
39
[:stop]
40
[start:]

Answer Key

Python · Modules 21–30 · Student wording will vary for definitions
1range(stop) — Creates numbers from 0 up to but not including stop.
2range(start, stop) — Creates numbers from start up to but not including stop.
3range(start, stop, step) — Creates numbers from start, stepping by step, up to but not including stop.
4Step — How much to count by - default is 1, use -1 to count backwards.
5try — Block containing code that might cause an error.
6except — Block that runs only when an error occurs in the try block.
7ValueError — Error when a value is the wrong type e.g. int('abc').
8Error handling — Using try/except to manage errors without crashing.
9break — Immediately exits the entire loop.
10continue — Skips the rest of this iteration and goes to the next one.
11while True: + break — Common pattern: loop forever until a condition triggers break.
12Loop control — Using break and continue to control the flow of a loop.
13def — Keyword that creates (defines) a new function.
14Function — A reusable block of code with a name.
15Call — Running a function by writing its name with parentheses.
16Function body — The indented code that runs when the function is called.
17Parameter — A variable name in the function definition that receives data.
18Argument — The actual value passed to a function when calling it.
19def greet(name): — Defines a function with one parameter called name.
20greet('Alice') — Calls greet passing 'Alice' as the argument for name.
21return — Sends a value back to the code that called the function.
22Return value — The value a function sends back when it finishes.
23None — Default return value when no return statement is used.
24return vs print — return sends data for code to use; print just displays text.
25Scope — Where a variable can be accessed - local or global.
26Local variable — Variable inside a function that only exists in that function.
27Global variable — Variable outside all functions that is readable everywhere.
28NameError — Error when a variable doesn't exist in the current scope.
29Default argument — A pre-set value used when no argument is provided.
30Optional parameter — A parameter with a default that the caller can skip.
31Required parameter — A parameter without a default that the caller must provide.
32Override — Passing an argument to replace the default value.
33Index — The position number of a character in a string, starting at 0.
34string[0] — Accesses the first character of the string.
35Negative index — Counts from the end: -1 is last, -2 is second-to-last.
36IndexError — Error when the index is beyond the string length.
37Slice — Extract a portion of a string using [start:stop].
38[start:stop] — Get characters from start up to but not including stop.
39[:stop] — Get characters from the beginning up to stop.
40[start:] — Get characters from start to the end of the string.

Modules this definitions worksheet covers

Every module has its own free printable worksheet with an answer key, and students can practise the same terms interactively on Cloodit.

Part of: Python Coding, VCE Software Development - U3O1 - Programming, VCE Software Development - U4O1 - development and evaluation, 7-8 Digital Technologies: Programming in Python, 9-10 Digital Technologies: Python foundations, 9-10 Digital Technologies: Modular programs and algorithms, 9-10 Digital Technologies: Object-oriented programming, debugging and testing, VCE Applied Computing U1O2 Programming: Strings, input, operators and imports, VCE Applied Computing U1O2 Programming: Control structures, VCE Applied Computing U1O2 Programming: Procedures and functions, VCE Applied Computing U1O2 Programming: Validating data, IGCSE Computer Science 0478 — 7c Pseudocode and Flowcharts, ACARA Digital Technologies Years 7–8 — Programming with Control Structures and Functions (Python), ACARA Digital Technologies Years 9–10 — Testing and Validating Programs, ACARA Digital Technologies Years 9–10 — Modular and Object-Oriented Programming (Python), QCE Digital Solutions Unit 1 — Algorithms and Programming Techniques, QCE Digital Solutions Unit 1 — Programmed Solutions, QCE Digital Solutions Unit 2 — Prototype Data Solutions, QCE Digital Solutions Unit 4 — Prototype Digital Data Exchanges, WA Computer Science ATAR Year 11 — Control Structures and Data Types, WA Computer Science ATAR Year 11 — Modular Programming

More Python printables

This printable is free — no login needed.

Free classroom tools, no account: Hangman · Random Team Generator · Random Name Picker Wheel · Seating Plan Maker

Make a free class, give it a journey, and you also get:

Create a free teacher account →

No credit card. No setup fee. Make a class and invite students in under three minutes.