pxt-calliope/docs/lessons/magic-8.md
Michael Elliot Braun 40405b7e7b updated lessons
2016-03-29 15:59:00 -07:00

42 lines
1.6 KiB
Markdown

# magic 8 lesson
a fortune teller game with the BBC micro:bit #string #shake #clear-screen #if #string #number #var #docs
## Topic
If (Conditionals)
## Quick Links
* [activity](/microbit/lessons/magic-8/activity)
* [challenges](/microbit/lessons/magic-8/challenges)
## Prior learning/place of lesson in scheme of work
Learn how to creating **conditionals**, `if condition do` to conditionally run code depending on whether a condition is true or not. We will be learning how to create a fortune telling app using local variable and conditionals (If), input on shake as well as simple commands, such as show string, show number, and clear screen.
## Documentation
* **show string** : [read more...](/microbit/reference/basic/show-string)
* **show number** : [read more...](/microbit/reference/basic/show-number)
* **on shake** : [read more...](/microbit/reference/input/on-gesture)
* **clear screen** : [read more...](/microbit/reference/basic/clear-screen)
* **variable** : [read more...](/microbit/reference/variables/var)
* **pick number** : [read more...](/microbit/blocks/math)
* **if** : [read more...](/microbit/reference/logic/if)
```docs
```
## Objectives
* learn how to show a string on the LED screen
* learn how to show a number on the LED screen
* learn how to learn how to turn off all the LED lights on the LED screen
* learn how to use the input on shake
* learn how to learn how to create a local variable to store data so that you can use it later in your code
* learn how to learn how to return a random number
* learn how to learn how to conditionally run code depending on whether a condition is true or not