pxt-calliope/docs/reference/js/lessons/bop-it.md
2016-04-01 16:22:47 -07:00

4.3 KiB

bop it lesson

a game where you have to keep up with the commands.

Topic

Game Library

Class

Year 7

Prior learning/place of lesson in scheme of work

Learn how to create a minesweeper game with if, if condition do , global variables to keep track of the action that the player is asked to perform. We will be learning how to create a bop it game using functions, global variables, if (conditionals), input on button pressed, math random, logo down, add score, as well as simple commands such as show string.

Documentation

Objectives

  • learn how the game library supports single-player, time-based games: a game library supports setting a number of lives, score, countdown clock, and levels.
  • learn how to create a global variable as a place where you can store data so that you can use it later in your code, accessible across functions and in nested code blocks
  • learn how the assignment operator is used to declare a new variable or update the value of a variable
  • learn how to create a function as a unit of code that performs a specific task and returns a result to make the code easier to read, debug, and update
  • learn how to call an existing function in the script
  • learn how to return a random number
  • learn how to run code when an input button is pressed
  • learn how to run code when the BBC micro:bit is oriented perpendicularly to the floor with the logo down
  • learn how to run code when the BBC micro:bit is shaken; when running code in the web browser, moving the mouse quickly simulates shaking
  • learn how to conditionally run code depending on whether a condition is true or not
  • learn how to show a string of the LED screen one character at a time (scrolling left to right)
  • learn how to show a number on the LED screen one digit at a time (scrolling left to right)

Progression Pathways / Computational Thinking Framework

Algorithms

  • Designs solutions (algorithms) that use repetition and two-way selection, ie if, then and else.(AL)
  • Uses logical reasoning to predict outputs, showing an awareness of inputs (AL)
  • Represents solutions using a structured notation (AL) (AB)

Programming & Development

  • Creates programs that implement algorithms to achieve given goals (AL)
  • Declares and assigns variables(AB)
  • Understands the difference between, and appropriately uses if and if, then and else statements(AL)
  • Uses a range of operators and expressions e.g. Boolean, and applies them in the context of program control. (AL)
  • Selects the appropriate data types(AL) (AB

Data & Data Representation

  • Understands the difference between data and information(AB)
  • Performs more complex searches for information e.g. using Boolean and relational operators(AL) (GE) (EV)

Hardware & Processing

  • Knows that computers collect data from various input devices, including sensors and application software (AB)

Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algorithmic Thinking; EV = Evaluation; GE = Generalisation

Activity

Extended Activity

Homework