Fitness Friend Lesson 2
This lesson focussed on the key concepts of decomposition and algorithms (pseudocode and flowcharts) as students begin to build their ‘Fitness Friend’ example.
- Computing: Algorithms (pseudocode & flowcharts), input and output devices, iteration, loops, decomposition, logical thinking, debugging
- Science: The heart
- P.E.: The importance of regular exercise
- PSHE: Healthy mind and body
Skills: Designing, analysing, problem solving, team working, time management.
It is assumed that you have first completed Lesson 1 of the Fitness Friend activity.
This lesson focussed on the key concepts of decomposition and algorithms (pseudocode and flowcharts) as students begin to build their ‘Fitness Friend’ example - a wearable device to encourage regular exercise by giving an audio and visual reminder after 25 minutes to move their body.
- To decompose a large problem into smaller, component parts
- To write a detailed, accurate algorithm using pseudocode and flowcharts
- To test and debug algorithms and understand why this is important
- To know what the ‘pomodoro technique’ is and that it can be helpful for health and concentration
- Introduction (10 minutes)
- Algorithm design (10 minutes)
- Team algorithms (15 minutes)
- Testing and refining algorithms (10 minutes)
- Flowcharts (10 minutes)
- Wrap up (5 minutes)
- Invite students to share what they recall about why regular exercise is important in the prevention of heart disease (slide 2).
- Recap some of the barriers to exercising regularly (e.g. lack of time, forgetting, being at a school desk etc) and some of their ideas from last lesson.
- Explain you will be taking them through an example which may help them to refine their ideas from last lesson using the micro:bit.
- Introduce the ‘Fitness Friend’ (slide 3) and explain this is the problem you will be focussing on in this lesson. If you wish use slide 4 to explain why you are using 25 minutes and introduce the Pomodoro technique.
- Highlight you will be focussing on the key Computational Thinking skills of decomposition and algorithms and share the learning objectives if you wish (slides 5 & 6).
- Show students the problem again (slide 7) and depending on students’ experience either as a class or in pairs write a basic, broad algorithm to solve the problem (slide 8). Ask questions to test understanding and encourage discussion such as:
- will this be detailed enough for someone to code?
- what would we need to do to make it detailed enough?
- Which parts are ambiguous and how would we address that?
- Highlight they have just decomposed the problem into smaller parts and explain they will now design more detailed, accurate algorithms for each part using pseudocode (slide 9).
- Split the class into their teams and give out the algorithm worksheets (ideally on A3 paper).
- Explain you want them to write a detailed algorithm using pseudocode that someone could follow accurately to write the code for the Fitness Friend. They may wish to split the team down to write different sections on rough paper before putting it all together. An example more detailed algorithm is given on slide 10 (with the ‘stop’ command missing) and more detailed on slide 11 including a start and stop button press.
Testing and refining algorithms
- Pair up teams and ask them to swop algorithms, test them and give feedback to the other team, comparing and debugging as necessary.
- Come up with a final algorithm as a class, ensuring an appropriate level of detail and accuracy according to your class’ experience and ability and addressing any misconceptions.
- Highlight they are using inputs and outputs (slide 12) and iteration and loops (slide 13).
- Invite students to share why creating a flowchart algorithm can also be helpful alongside or instead of pseudocode (graphical representation of algorithm, can be easier for a person to follow and to see decision points).
- Remind students if needed of the standard flowchart symbols (slide 14) and give each team a large sheet of paper and coloured pens. Ask them to create a flowchart for the algorithm and then share, test and debug as necessary as a class (example on slide 15).
Lesson wrap up
- Explain next lesson they will use their algorithms to code the fitness friend next lesson.
- Ask students a variety of questions to test their understanding (suggestions on slide 16).
- If you wish, use the learning objectives to check progress and understanding (slide 17).
Extension / homework
- Students can add to their learning log and/or working wall if using.
- They could use the pomodoro technique and report back on if it helped their concentration/and or amount of exercise they did.
- Students could write pseudocode or flowchart algorithms to solve other everyday problems they encounter (e.g. getting out of bed, doing homework, deciding what film to watch, feeding a pet).
- Consider groupings carefully to ensure all students are able to participate.
- Encourage students to focus on writing a clear, simple algorithm and supply them with a print and cut out version of the basic algorithm to sequence into place.
Stretch & challenge:
Students can be challenged to include additional detail and elements in their algorithms. For example, can they include a countdown timer to show how long is left before the next exercise session?
Opportunities for assessment:
Informal assessment of team algorithms (pseudocode and flowcharts) and use questioning to assess understanding and progress throughout and in lesson wrap up.