Page 123 - Mathematics GRADE 9, DE-STREAMED (MTH1W)
P. 123

• use parameters in code to:
o act as placeholders to represent a quantity that influences the output of a mathematical
object but is viewed as being held constant; for example, in y = ax, a is the parameter o define values that are provided by the main program to subprograms when the
subprograms are called
• use equations and inequalities in code to:
o assign values to memory; for example, using y = 2x + 3: if x is defined as 2, y is assigned the
value 7
o increment a counter; for example, using counter = counter + 1 increments the value of
counter by 1 and updates the value of the variable
o test equality; for example, using y = 3x − 2: if y is assigned the value 5 and x is assigned the
value 2, this test of equality returns false because 5 is not equal to 4
o test a range; for example, using y < 3x − 2: if y is assigned the value 5 and x is assigned the
value 2, this test returns false because 5 is not less than 4
Instructional Tips
Teachers can:
• give students an opportunity to share their previous coding experiences and the coding tools or environments they have used;
• provide students with code that incorporates the algebraic concepts listed above and facilitate a discussion about the ways in which these concepts are used in coding;
• support student collaboration to plan their approach to writing code, using flow charts to organize their thinking;
• incorporate opportunities for students to use algebraic thinking and coding to solve various problems throughout the course;
• support students in making connections between their understanding of variables, parameters, equations, and inequalities and the use of these in coding, spreadsheets, computer algebra systems (CASs), virtual graphing and geometry tools, and text-based programming languages.
Note
The learning in C2.1, C2.2, and C2.3 is interconnected, and this should be reflected during instruction.
Teacher Prompts
• Which variables are used in this coding example?
• What values are stored in the variables, and why are they important to the program and to the
problem being solved?
• What are some ways in which variables (or parameters, equations, and inequalities) are used in
coding?
122






































































   121   122   123   124   125