C3.2 Read and alter existing code involving the analysis of data in order to inform and communicate decisions, and describe how changes to the code affect the outcomes and the efficiency of the code.
Activity 1: Right-Angle Triangle or Not?
Introduce this code to students:

Ask if this code can determine if a triangle is a right-angle triangle. If not, ask students to alter the code so that it can determine if a triangle is a right-angle triangle.
Activity 2: Spreadsheets
Present the following spreadsheet to students:
Bin | Total Number of Objects | Number of Items in the Right Bin | Number of Items in the Wrong Bin | Percentage |
Recycling - Paper | 54 | 33 | 21 | 61.11% |
Recycling - Plastic and Metal | 42 | 26 | 16 | 61.90% |
Garbage Can | 31 | 25 | 6 | 80.65% |
Compost | 12 | 10 | 2 | 83.33% |
Bin | Total Number of Objects | Number of Items in the Right Bin | Number of Items in the Wrong Bin | Percentage |
Recycling - Paper | 64 | 25 | 39 | 39.06% |
Recycling - Plastic and Metal | 78 | 64 | 14 | 82.05% |
Garbage Can | 51 | 25 | 26 | 49.02% |
Compost | 3 | 2 | 1 | 66.67% |
Ask students what they observe.
Knowing that the acceptable threshold for the Eco-School program is 80%, ask students what they could do to improve the visualization of the above tables.