1. Introduction to maths python

Examples of using python to implement mathematical algorithms are illustrated in the following pages.
From the list below, those in bold are implemented here.

level 5 Follow a mathematical algorithm involving branching and repetition (iteration); create and use algorithms involving a sequence of steps and decisions and digital tools to experiment with factors, multiples and divisibility; identify, interpret and describe emerging patterns (VC2M5N10)
  • simulating a simple random walk

  • manipulating sets of numbers using a given rule, for example, if a number is even, halve it; or if a number is odd, subtract 1 then halve it

  • creating algorithms that use multiplication and division facts to determine if a number is a multiple or factor of another number; for example, using a flow chart that determines whether numbers are factors or multiples of other numbers using branching, such as yes/no decisions

  • identifying lowest common multiples and highest common factors of pairs or triples of natural numbers; for example, the lowest common multiple of {6, 9} is 18, and the highest common factor is 3, and the lowest common multiple of {3, 4, 5} is 60 and the highest common factor is 1

  • using the ‘fill down’ function of a spreadsheet and a multiplication formula to generate a sequence of numbers that represent the multiples of any number you enter into the cell, and describing and explaining the emerging patterns


level 6 Design and use algorithms involving a sequence of steps and decisions that use rules to generate sets of numbers; identify, interpret and explain emerging patterns (VC2M6A03)
  • using an algorithm to create extended number sequences involving rational numbers, using a rule and digital tools, and explaining any emerging patterns

  • designing an algorithm to model operations, using the concept of input and output, describing and explaining relationships and any emerging patterns; for example, using function machines to model operations and recognising and comparing additive and multiplicative relationships

  • designing an algorithm or writing a simple program to generate a sequence of numbers based on the user’s input and a chosen operation, discussing any emerging patterns; for example, generating a sequence of numbers and comparing how quickly the sequences are growing in comparison to each other using the rule ‘add 2 to the input number’ compared to multiplying the input number by 2

previous level 6
  • devising flowcharts to represent algorithms for a common processes such as adding two fractions


level 7 Design algorithms involving a sequence of steps and decisions that will sort and classify sets of shapes according to their attributes, and describe how the algorithms work (VC2M7SP04)
  • creating a classification scheme for triangles based on sides and angles, using a flow chart that uses sequences and decisions

  • creating a flow chart or hierarchy for quadrilaterals that shows the relationships between trapeziums, parallelograms, rhombuses, rectangles, squares and kites

  • creating a classification scheme for regular, irregular, concave or convex polygons that are sorted according to the number of sides

level 7 Use mathematical modelling to solve practical problems involving rational numbers and percentages, including financial contexts such as ‘best buys’; formulate problems, choosing representations and efficient calculation strategies, designing algorithms and using digital tools as appropriate; interpret and communicate solutions in terms of the situation, justifying choices made about the representation (VC2M7N10)
  • modelling additive situations involving positive and negative quantities; for example, a lift travelling up and down floors in a high-rise apartment where the ground floor is interpreted as zero, or in geography when determining altitude above and below sea level

  • modelling contexts involving proportion, such as the proportion of students attending the school disco, proportion of the bottle cost to the recycling refund, proportion of the school site that is green space, 55% of Year 7 students attended the end of term function or 23% of the school population voted ‘yes’ to a change of school uniform; and interpreting and communicating answers in terms of the context of the situation

  • modelling financial problems involving profit and loss, credits and debits, gains and losses; for example, holding a fundraising sausage sizzle and determining whether the event made a percentage profit or loss

  • finding the sum of a set of consecutive numbers using a loop structure

  • constructing geometric patterns such as a honeycomb, using dynamic geometry functionality

  • using mathematical modelling to investigate the proportion of land mass/area of Aboriginal Peoples’ traditional grain belt compared with Australia’s current grain belt


  • Debugging search-and-sort programs

  • Testing a number for divisibility


level 9 design, test and refine algorithms involving a sequence of steps and decisions based on geometric constructions and theorems; discuss and evaluate refinements (VC2M9SP03)
  • creating an algorithm using pseudocode or flow charts to apply the triangle inequality, or an algorithm to generate Pythagorean triples

  • creating and testing algorithms designed to construct or bisect angles, using pseudocode or flow charts

  • developing an algorithm for an animation of a geometric construction, or a visual proof, evaluating the algorithm using test cases


level 10 implement algorithms that use data structures using pseudocode or a general purpose programming language (VC2M10A06)
  • Using two-dimensional arrays such as matrices to represent and implement sequences of transformations of sets of points in the plane

  • Using pointers in algorithms


  • Applying a systematic guess-check-and-refine algorithm to identify an approximate value for the root of an equation in an interval

  • Developing simulations for counterintuitive problems in probability such as the Monty Hall problem or derangements


1.1. Previous curricula

level 9 Apply set structures to solve real-world problems (VCMNA307)
  • Using a sort algorithm to determine the median of a set of numbers

  • Exploring variation in proportion and means of random samples, drawn from a population