Coding in the Classroom | Coding Definitions

Some definitions, with images, related to coding in the 1-8 grades
By: Steven Floyd and Lisa Anne Floyd

The Ontario Mathematics Curriculum for grades 1-8 includes expectations related to coding. With the release of the curriculum, the Ministry of Education also provided a valuable glossary of terms, which can be found here. The following lists the terms and definitions from the Ministry of Education’s glossary that relate to coding, as well as images to help represent the terms and definitions.

This article addresses the following terms:

algorithm – block-based programming – code – coding – computational modelling – computational representation – computational thinking – conditional statement – control structure – debugging – defined count – efficient code – execute – function – input – iterate – loop – nested events – optimization – outcome – pseudocode – repeating event – sequential events – subprogram – text-based programming – unplugged code

algorithm: A specific sequence of well-defined steps to solve a problem or perform a calculation.

The algorithms on the left will not accomplish the specific task, while those on the right will.

block-based programming: A way of programming a computer or other device in which executable actions are organized into blocks that can be clicked, dragged, altered, and connected to other blocks. This is sometimes referred to as visual programming.

Scratch, on the left, is an example of a block-based programming language.
Lynx, on the right, is a text-based programming language.

code: An instruction or set of instructions that can be executed by a computer or other device.

Two examples of instructions that can be run by a computer.
The code on the left is written with the ScratchJr programming language.
The code on the right is written in the Python programming language.

coding: The process of writing computer programming instructions.

Coding a computer does not have to be a solitary activity.
Students often enjoy working together, and sharing their work with others.

computational modelling: Using a computer program to create a model of a complex system in order to study its behaviour. This can involve a combination of mathematics, statistics, physics, and computer science.

The program on the left models the rolling of a die, while the program code on the right models the flipping of a coin.

computational representations: Representations or models of mathematical situations that use computing concepts and tools to find solutions to problems, automate tasks, visualize data, or simulate events.

Computational representations can be made for mathematical concepts like translations, using the Cartesian Plane in Scratch as a background.

computational thinking: The thought process involved in expressing problems in such a way that their solutions can be reached using computational steps and algorithms.

conditional statement: A type of coding instruction used to compare values and express and make decisions. A conditional statement tells a program to execute an action depending on whether a condition is true or false. It is often represented as an if-then or if-then-else statement.

Students enjoy making their own conditional statements with their own pseudocode, like on the left.
The right includes a conditional statement written using the Python programming language.

control structure: A line or block of code that influences the order in which other code is executed. Control structures affect the flow of the program and include sequencing lines of code, repeating lines of code (loops), or selection to execute or not execute specific lines of code (conditional statements). Sequence, repetition, and selection are all control structures.

Coding instructions are executed one right after the other, in a sequence. A loop can allow the instructions to repeat.
Selection allows the program to “select” certain lines of code to execute. In our selection example above, imagine a user types the word “triangle”, this will cause the program to skip the square drawing code, and select to execute the triangle drawing code.

debugging: The process of finding and fixing errors (known as “bugs”) in a computer program.

Finding and fixing a bug in a program can be an exciting and rewarding achievement!!

defined count: In coding, the number of times instructions are repeated based on a predefined value or until a condition has been met.

The code on the left will repeat 4 times to draw a square.
The code on the right will repeat until the value of total is greater than 1000.

efficient code: Code that uses the lowest number of instructions to accomplish a task, thereby minimizing storage space and execution time.

The first example of ScratchJr code is repetitive and can be made more efficient by adding a loop, thereby condensing the code.

execute: To run code or a computer program.

Each programming environment will have a different way to run, or execute the program.
Sometimes students will click on a green flag, or click a RUN button.

function: A small section of code that performs a single task and returns a value back to the main program.

This function, written in Python, is called addThreeNumbers.
The programmer would indicate what three numbers are being added,
then the function adds the numbers together, and then returns them back to the main program.

input: Information or instructions that are entered into a computer or device; the act of doing so.

The Input-Process-Output model is a very popular model used to describe how a computer program functions.
Information is inputted into the program, some processing is done on the data, and then the program generates output.

iterate: To repeat a mathematical or computational operation or movement again and again until a desired result or condition is attained.

Students should begin to understand that they may not obtain the correct answer the first time. This is all part of the learning process.

loop: A computer programming control structure that allows for a sequence of instructions to be repeated while, or until, a condition is met.

Repeating lines of code can be created in ScratchJr, Scratch, Python and Lynx.

nested events: Control structures that are placed inside other control structures; for example, loops occurring inside other loops, or a conditional statement being evaluated inside a loop.

Notice how the loop to draw the square is then placed inside a loop, to repeat the square 6 times?
This is an example of nested loops, one inside the other.

optimization: The action of finding the most favourable or efficient outcome for a situation. For example, the greatest playing surface (area) for the least fencing (perimeter) when fencing a playground.

Consider the two pathways for the lady bug to take to get to the leaf.
Is one more optimal in terms of the number of steps? Which one?

outcome: The result of code processed by a computer or device, which may include data on the screen or movement of a robot.

The outcome of a program could be a pattern, movement on the screen, data, or the turning on and off of LEDs.

pseudocode: An informal way of describing a computer program or algorithm that is an intermediary between everyday language and programming code. Pseudocode is often used before actual coding to explain the design process in a less technical way (e.g., fwd 10 steps, rt 45 degrees, bkwds 4 steps).

Pseudocode can be a great step in planning a program or when engaging in unplugged activities.

repeating event: Something that happens over and over again. In coding, loops are used to repeat instructions.

Repeating lines of code, or loops, can be created in ScratchJr, Scratch, Python and Lynx.

sequential events: A set of instructions carried out one after another, usually top to bottom or left to right on a screen.

In ScratchJr, Scratch, Python and Lynx, the coding commands are executed one after another, either from left to right or from top to bottom.

subprogram: A small set of instructions for completing one small task. Subprograms can be combined in a main program to accomplish a large task using small steps.

In the example on the left, two subprogams have been created in Scratch. One draws a triangle while the other draws a square.
In the example on the right, a subprogram has been written in Python that adds three numbers together.

text-based programming: A way of programming a computer or electronic device that involves typing out programming code instructions in the specific syntax of the programming language being used.

Scratch, on the left, is an example of block-based programming language.
Lynx, on the right, is a text-based programming language.

unplugged code: A set of instructions that can be performed without the use of a computer or device. Usually used to support the learning of writing and executing code.

The ScratchJr blocks on the left can be printed from this site, and then used for unplugged coding.
Students can also “program” their classmate to navigate the room and drop a paper in the recycling bin.

You can see the full Grades 1-8 Mathematics Glossary here:
https://www.dcp.edu.gov.on.ca/en/curriculum/elementary-mathematics/grades/g1-math/glossary

Scroll to Top