# Using Computational Thinking to solve a Math problem

In this class, we use computational thinking to solve a mathematical problem.

## Class Activity – Finding the sum of a range of numbers

Task: Without the aid of your classmates, find the sum of all whole numbers from 1 to 200 inclusive.

(15 minutes)

Discovery: at least 3 different methods were found. One interesting solution was the addition of al the ones (1+11+21..+91 = 460) then all twos (2+12+22+…+92 = 470) etc.

### Teacher Demonstration and Discussion

Practical: Observe students suggestions, pattern recognition, past algorithms, decomposition into sub problems

Demonstrate:

1+2+3+4+…………+197+198+199+200

Observe the sum of pairs from out going in always sum to 200.

Determine the number of pairs.

Note that the steps to solve this problem are:

• Find the sum of the first and last numbers (1+200)
• Find the number of pairs (200/2)
• Multiply the results of 1 and 2.

### Further Exersises and Discussion – Finding the Sum of a Range Of numbers

Homework:

• Using a similar approach as shown above, write the set of steps to find the sum of numbers from 1 to 10
• Write the steps to find the sum of any range of numbers from which form a complete number of pairs. (e.g 5 to 10)
• Write the steps to find the sum of any range of numbers from which form an incomplete number of pairs. (e.g 5 to 11)