Concept Map

Explore 19 Python concepts, follow their progression through the exercises, and see their Australian Curriculum: Digital Technologies v9.0 connections. The concepts are listed in a suggested teaching order that always respects their dependencies.

1. Printing output

print() is how a program talks to the person using it. Whatever you put in the brackets appears on the screen.

Australian Curriculum: AC9TDI8P06 (trace algorithms to predict output for a given input and to identify errors); AC9TDI10P06 (validate algorithms and programs by comparing their output against a range of test cases)

Lessons: Printing Output

2. Variables

A variable is a labelled box. Put a value in it, and from then on you can use the label instead of the value.

Australian Curriculum: AC9TDI6P05 (implement algorithms as visual programs involving control structures, variables and input); AC9TDI8P09 (implement, modify and debug programs involving control structures and functions in a general-purpose programming language)

Lessons: Variables

3. User input

input() pauses the program, waits for the person to type something and press Enter, then hands that text back.

Australian Curriculum: AC9TDI6P05 (implement algorithms as visual programs involving control structures, variables and input); AC9TDI8P06 (trace algorithms to predict output for a given input and to identify errors)

Lessons: Reading Input

4. Strings

Strings are text values, written inside quotes. Use them to store names and messages, clean up input, check text and build readable output. The string "7" is text, while 7 is a number.

Australian Curriculum: AC9TDI8P07 (design the user experience of a digital system); AC9TDI10P07 (design and prototype the user experience of a digital system); AC9TDI8P01 (acquire, store and validate data from a range of sources using software, including spreadsheets and databases); AC9TDI10P01 (develop techniques to acquire, store and validate data from a range of sources using software, including spreadsheets and databases); AC9TDI8P09 (implement, modify and debug programs involving control structures and functions in a general-purpose programming language); AC9TDI10P09 (implement, modify and debug modular programs, applying selected algorithms and data structures, including in an object-oriented programming language)

Lessons: String Formatting, String Methods

5. Arithmetic

The usual maths symbols, plus three that are new to most students: // for whole-number division, % for the remainder, and ** for powers.

Lessons: Data Types and Operations, Modulo and Divisibility

6. Comparisons and logical operators

Questions Python answers with True or False: is this equal to that, is it bigger, is it smaller. Combine these questions with and / or, or flip one with not. Python spells logical operators as words, not symbols.

Australian Curriculum: AC9TDI10P05 (design algorithms involving logical operators and represent them as flowcharts and pseudocode)

Lessons: Comparisons and Logical Operators, Membership Testing

7. Indexing

Use a position to retrieve a character from a string or an item from a list. Positions start at 0; -1 means the last item. A slice selects a range of positions, excluding its stop position. Dictionary lookup uses a key rather than a numbered position.

Australian Curriculum: AC9TDI10P09 (implement, modify and debug modular programs, applying selected algorithms and data structures, including in an object-oriented programming language)

Lessons: Indexing

8. Lists

One name holding many values in order, instead of twenty separate variables.

Australian Curriculum: AC9TDI10P09 (implement, modify and debug modular programs, applying selected algorithms and data structures, including in an object-oriented programming language)

Lessons: Lists, Unpacking Values, Nested Data

9. Defining functions

Give a name to a block of code, then run that whole block whenever you want by writing its name.

Australian Curriculum: AC9TDI8P09 (implement, modify and debug programs involving control structures and functions in a general-purpose programming language)

Lessons: Defining Functions

10. if / elif / else

Choose between paths. Python checks each condition in order and runs the first one that is true, then skips the rest.

Australian Curriculum: AC9TDI8P05 (design algorithms involving nested control structures and represent them using flowcharts and pseudocode); AC9TDI8P09 (implement, modify and debug programs involving control structures and functions in a general-purpose programming language)

Lessons: if, elif, else

11. while loops

Keep repeating for as long as something stays true. Use it when you do not know in advance how many repeats you need.

Australian Curriculum: AC9TDI8P05 (design algorithms involving nested control structures and represent them using flowcharts and pseudocode); AC9TDI8P09 (implement, modify and debug programs involving control structures and functions in a general-purpose programming language)

Lessons: While Loops

12. for loops

Do the same thing once for every item in a collection. Use it when you do know how many repeats you need.

Australian Curriculum: AC9TDI8P05 (design algorithms involving nested control structures and represent them using flowcharts and pseudocode); AC9TDI8P09 (implement, modify and debug programs involving control structures and functions in a general-purpose programming language)

Lessons: For Loops, The range() Function, The Accumulator Pattern, break and continue, Tracking the Best Candidate

13. Dictionaries

A list finds things by position; a dictionary finds them by name. Ideal for records — a student with a name, a year and a score.

Australian Curriculum: AC9TDI10P09 (implement, modify and debug modular programs, applying selected algorithms and data structures, including in an object-oriented programming language); AC9TDI8P03 (model and query the attributes of objects and events using structured data)

Lessons: Dictionaries

14. Parameters & return

Parameters are what you hand a function; return is what it hands back. Together they turn a function into something reusable.

Lessons: Parameters & Return, Stopping a Search with return

15. Nested loops & ifs

Putting one loop or if inside another. The inner one runs all the way through on every single pass of the outer one.

Australian Curriculum: AC9TDI8P05 (design algorithms involving nested control structures and represent them using flowcharts and pseudocode)

Lessons: Nested Loops & Ifs

16. Decomposition

Decomposition means breaking a problem or program into smaller, manageable parts. At a high school level, this generally means breaking a program down into appropriately named functions, each with a clear job. The names should describe what the functions do.

Australian Curriculum: AC9TDI10P09 (implement, modify and debug modular programs, applying selected algorithms and data structures, including in an object-oriented programming language); AC9TDI10P04 (define and decompose real-world problems with design criteria and by interviewing stakeholders to create user stories); AC9TDI8P04 (define and decompose real-world problems with design criteria and by creating user stories)

Lessons: Decomposition

17. Data validation

Check that data meets the rules before using it, whether it comes from a person, a file or another program. Convert text with int() or float() when a number is needed, handle failed conversions, then check rules such as an allowed range. str() converts a value to text. Converting successfully does not prove the data is valid.

Australian Curriculum: AC9TDI8P01 (acquire, store and validate data from a range of sources using software, including spreadsheets and databases); AC9TDI10P01 (develop techniques to acquire, store and validate data from a range of sources using software, including spreadsheets and databases)

Lessons: Data Validation

18. Tracing code

Walking through code by hand, line by line, writing down what each variable holds — before running it.

Australian Curriculum: AC9TDI8P06 (trace algorithms to predict output for a given input and to identify errors); AS_8 (They design and trace algorithms and implement them in a general-purpose programming language.)

Lessons: Tracing Code

19. Debugging

Working out why a program does something other than what you wanted, then fixing it and showing the fix worked.

Australian Curriculum: AC9TDI8P09 (implement, modify and debug programs involving control structures and functions in a general-purpose programming language); AC9TDI10P09 (implement, modify and debug modular programs, applying selected algorithms and data structures, including in an object-oriented programming language)

Lessons: Debugging

All Python lessons · Explore Python Fundamentals