LESSON 1 (Variables)

Learning Objectives

LO: Understand what variables are and why and when to use them in a program

LO: Understand the importance giving variables logical names


Click here to open the code window!


1.Create a program like the one shown below. What does it do?


2.Create a new variable, name it “adjustment“, set it to 3 and put it in the on start block


3.Instead of setting “count+/- 1, set count to +/- adjustment


4.Use the A+B buttons pressed event handler to reset the counter to 0 and display it


Now grab a Microbit from your teacher!

5.Create your own pedometer using the Microbit. Use the “On Shake” event to help you do this! You also need to be able to reset your pedometer. Your challenge is to code this up and then get your program onto the Microbit and test if it actually works.


Knowledge Check

Click on this link to check your learning