move lessons out of web site

will move select lessons back to "educators" section
This commit is contained in:
Tom Ball
2016-06-14 11:49:58 -04:00
parent a6e6dd8287
commit f4eca66648
184 changed files with 8 additions and 8 deletions

View File

@ -0,0 +1,63 @@
# snowflake fall blocks activity
design a blinking rectangle animation.
### ~avatar avatar
Welcome! This tutorial will teach how design a **snowfall animation**. Let's get started!
### ~
Let's start by creating a `forever` loop that will allow us to repeat the show LEDs code. Any code in the `forever` loop will repeat in the background... forever.
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
basic.showLeds(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`)
})
```
The next step is to add two `show LEDs` blocks inside the `forever` loop to repeat an animation.
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
basic.showLeds(`
. . # . .
. # . # .
# . . . #
. # . # .
. . # . .
`)
})
```
Run your code in the simulator or download it to your BBC micro:bit to see what happens!
### ~avatar avatar
Excellent, you're ready to continue with the [challenges](/lessons/snowflake-fall/challenges)!
### ~

View File

@ -0,0 +1,68 @@
# snowflake fall blocks challenges
Coding challenges for snowflake fall.
## Before we get started
Complete the [snowflake fall](/lessons/snowflake-fall/activity) activity and your code will look like this:
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
basic.showLeds(`
. . # . .
. # . # .
# . . . #
. # . # .
. . # . .
`)
})
```
### Challenge 1
To finalize our snowflake fall, let's add a different snowflake pattern.
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
basic.showLeds(`
. . # . .
. # . # .
# . . . #
. # . # .
. . # . .
`)
basic.showLeds(`
. # . # .
# # # # #
. # . # .
# # # # #
. # . # .
`)
})
```
* Run your program and see if it works.
### Challenge 3
Add a fourth frame to the current animation... or make it your own!

View File

@ -0,0 +1,73 @@
# snowflake fall blocks quiz answers
Create a snowflake fall animation.
This is the answer key for the [snowflake fall quiz](/lessons/snowflake-fall/quiz).
## 1. What is a forever loop?
Run code in the background forever (answers may vary).
## 2. Draw the picture that will be produced with this code
```blocks
basic.forever(() => {
basic.showLeds(`
. # . # .
# # # # #
# # # # #
. # # # .
. . # . .`);
});
```
![](/static/mb/lessons/flashing-heart-0.png)
## 3.Write the code for a forever loop and show LEDS for these images!
![](/static/mb/lessons/snowflake-fall-0.png)
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`);
basic.showLeds(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`)
});
```
## 4. Write the code for a forever loop and show LEDS for these images!
![](/static/mb/lessons/snowflake-fall-1.png)
![](/static/mb/lessons/snowflake-fall-2.png)
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`);
basic.showLeds(`
# # # # #
# # . # #
# . # . #
# # . # #
# # # # #
`)
});
```

View File

@ -0,0 +1,46 @@
# snowflake fall blocks quiz
Create a snowflake fall animation
## Name
## Directions
Use the hints in the [snowflake fall activity](/lessons/snowflake-fall/activity) to answer this quiz!
## 1. What is a forever loop?
## 2. Draw the picture that will be produced with this code
```blocks
basic.forever(() => {
basic.showLeds(`
. # . # .
# # # # #
# # # # #
. # # # .
. . # . .`);
});
```
![](/static/mb/empty-microbit.png)
## 3. Write the code for a forever loop and show LEDS for these images!
![](/static/mb/lessons/snowflake-fall-0.png)
## 4. Write the code for a forever loop and show LEDS for these images!
![](/static/mb/lessons/snowflake-fall-1.png)
![](/static/mb/lessons/snowflake-fall-2.png)