Download presentation
Presentation is loading. Please wait.
Published byΕυρυδίκη Αυγερινός Modified over 5 years ago
1
Global Challenge Walking for Water Lesson 2
2
Recap questions What are some benefits of walking?
How many steps does the NHS recommend we walk everyday? Why do we walk less than we used to? What are the advantages and disadvantages of us walking less? How far does Aysha walk every day? What is the ‘Water Burden’? How does having to walk for water impact on Aysha’s life? What is your challenge?
3
Walk as many steps as Aysha does in 1 day over 4 days.
Your challenge Walk as many steps as Aysha does in 1 day over 4 days.
4
Learning objectives: to use decomposition and abstraction effectively to solve a problem to write, test and debug accurate algorithms and programs to use iteration, loops and variables to write efficient algorithms and code
5
The first part of the challenge
create a step counter using micro:bit
6
Think: what do we need to do to complete this part of the challenge?
what tasks? in what order?
7
Decomposition Algorithm Abstraction
breaking down a complex problem into smaller, component parts. Algorithm a sequence of instructions or rules to solve a problem written for a person to follow to write code Abstraction focussing only on the important parts filtering out unnecessary detail
8
Programming Testing & debugging Iteration Variables
using an algorithm to write code a computer can understand Testing & debugging regularly checking for, finding and correcting errors Iteration The repetition of a sequence. Loops are a form of iteration (repeat until a certain condition is met) Variables used to store information, e.g. number of steps
9
Pseudocode A simple way of describing an algorithm
No specific syntax (programming language)
10
Step tracker example algorithm
On START Set ‘steps’ to 0 OUTPUT ‘steps’ on visual display REPEAT forever When sense movement add 1 to ‘steps’
11
Paired programming 2 programmers working together to code
One types the code (driver) One watched the driver, checks the code, makes suggestions (navigator) work collaboratively, talking through problems Why might this be helpful? more accurate code written in shorter time can collaboratively work through problems
12
Sample step tracker example code
13
Learning objectives: to use decomposition and abstraction effectively to solve a problem to write, test and debug accurate algorithms and programs to use iteration, loops and variables to write efficient algorithms and code
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.