pxt-calliope/docs/reference/js/lessons/rock-paper-scissors.md
2016-03-25 16:47:20 -07:00

3.5 KiB

rock paper scissors lesson

a game against the BBC micro:bit #var #image #button #string #number #docs

@video td/videos/rock-paper-scissors-0

Topic

Local Variables

Class

Year 7

Prior learning/place of lesson in scheme of work

Learn how to create a local variable, var t :=time where you can store data, so that you can use it in your code. We will be learning how to create a classic rock paper scissors game using global variables, input on shake, local variables, math random as well as simple commands such as create image, show image, show string, and show number.

Documentation

Objectives

  • learn how to create a condition so the micro:bit will run code when it is shaken
  • learn how to create a local variable for a place where you can store data
  • learn how to create an image to show on the micro:bit's LED screen
  • learn how to return a random number
  • learn how to show an image on the micro:bit's LED screen
  • learn how to run code when an input button is pressed
  • learn how to show a string on the LED screen
  • learn how to show a number on the LED screen

Progression Pathways / Computational Thinking Framework

Algorithms

  • Uses diagrams to express solutions.(AB)
  • 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)
  • Selects the appropriate data types(AL) (AB

Data & Data Representation

  • Uses filters or can perform single criteria searches for information.(AL)
  • Defines data types: real numbers and Boolean (AB)

Hardware & Processing

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

Communication Networks

  • Demonstrates responsible use of technologies and online services, and knows a range of ways to report concerns Understands how search engines rank search results (AL)

Information Technology

  • Collects, organizes, and presents data and information in digital content (AB)
  • Makes appropriate improvements to solutions based on feedback received, and can comment on the success of the solution (EV)
  • Recognises ethical issues surrounding the application of information technology beyond school.

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

Activity

Extended Activity

Homework