Algorithm: 1. Start 2. Start with N numbers 3. Determine the number of pairs, p = N/2 4. Find the sum of the first and last number , AL= Fn+Ln 5. Calculate sum, Sum = p* AL 6. Present the Sum. 7. Stop
In this class, we use computational thinking to solve a mathematical problem.
Class Activity – Finding the sum of a range of numbers
Complete the following task in your ICT notebook showing all working
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)
When solving a problem it is important to define what the problem is and identify the goal that must be achieved to solve the problem.
In doing so we must identify the possible ways of achieving the goal using the information available. To determine the possible ways, it is useful to produce a list of conditions that must be satisfied for the goal to be achieved.
Class Practical 1
In class demonstration: (Game: Wolf, Sheep, Cabbage)
Teacher Draws and Discusses the game with students with no prior information.
Homework
Create a list of conditions which must be satisfied when for solving the problem
Produce all possible, solutions to this problem
Class Practical 2
In this class we shall observe some logic games.
Preparation
Students are to divide their copybook page into two columns (page is folded vertically to quickly set up the scenario).
1 student is chosen at random to perform the task of solving the problem in the game. We call this student the “actor”.
All other students are instructed that they are not allowed to talk or assist during the exercise ( No blurting out “no” Prep students for self control)
The game is explained to the actor.
Discuss the first actions with the actor. Silent students must write their first action, the main student takes his own action.
As consequences emerge, students and the actor write down the rules.
Every reset, write down the steps.
Discussion
-Are there any students with a different solution?
Write down some of the rules for the games that you have played. Use the following format:
Game name
Goal(s)
Rules
Wolf, Sheep and Cabbage.
Main goal: Get all items safely across the river
Secondary Goals: Do not lose any items to ‘eating’
· Only one item is allowed in the boat
· The sheep and wolf should never be left alone
· The cabbage and the sheep should never be left alone.
In your notebook, complete at least 3 rows of the table. i.e the rules and goals for at least 3 logic games.
Updates to this post
22nd Apr 2024: Added “When solving a problem….” up to and including Class practical 1. This class practical is meant or use in a classroom with no lab .
The previous class practical was renamed to Class Practical 2 and is meant for use in a Computer lab.