Unit #2-02

Learning Outcome

At the end of this lesson, you will be able to:

  • start to understand what a variable is used for


  • go over what is programming
    • just a set of instructions
  • go over Micro:bit javascript programming


  • a variable is just a place to store information, that can change, hence the name
    • we use them in math all the time
    • in programming, we do not use a single letter to represent a variable, we use a word( or several words) to describe it
      • ex: counter, numberOfStudents, totalCost, ...
    • notice how we spell variable names


Daily Assignment

  • write a program that adds 1 each time you click the "A" button, and then shows the total
    • when you click the "B" button it adds 5 to your total
    • when you shake the Micro:bit, it returns the variable to 0
  • upload a screen shot showing your code and the program running


    • if you finish early, work on Tynker