Migrate docs from the other repo
This commit is contained in:
63
docs/lessons/snowflake-fall/activity.md
Normal file
63
docs/lessons/snowflake-fall/activity.md
Normal file
@ -0,0 +1,63 @@
|
||||
# snowflake fall blocks activity
|
||||
|
||||
design a blinking rectangle animation. #docs #tutorials #stepByStep
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
### @video td/videos/snowflake-fall-0
|
||||
|
||||
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(`
|
||||
. . # . .
|
||||
. # . # .
|
||||
# . . . #
|
||||
. # . # .
|
||||
. . # . .
|
||||
`)
|
||||
})
|
||||
```blocks
|
||||
|
||||
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](/microbit/lessons/snowflake-fall/challenges)!
|
||||
|
||||
### ~
|
||||
|
34
docs/lessons/snowflake-fall/challenges.md
Normal file
34
docs/lessons/snowflake-fall/challenges.md
Normal file
@ -0,0 +1,34 @@
|
||||
# snowflake fall blocks challenges
|
||||
|
||||
Coding challenges for snowflake fall.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [snowflake fall](/microbit/lessons/snowflake-fall/activity) activity and your code will look like this:
|
||||
|
||||

|
||||
|
||||
### Challenge 1
|
||||
|
||||
### @video td/videos/snowflake-fall-1
|
||||
|
||||
Let's begin creating our falling effect by adding another snowflake with `show LEDs` that displays a different snowflake pattern after the first one. We need 2 frames in the new animation that display both the first and the second snowflake images.
|
||||
|
||||

|
||||
|
||||
* Run your program to see the cool animation.
|
||||
|
||||
### Challenge 2
|
||||
|
||||
### @video td/videos/snowflake-fall-2
|
||||
|
||||
To finalize our snowflake fall, let's add a different snowflake pattern.
|
||||
|
||||

|
||||
|
||||
* Run your program and see if it works.
|
||||
|
||||
### Challenge 3
|
||||
|
||||
Add a fourth frame to the current animation... or make it your own!
|
||||
|
30
docs/lessons/snowflake-fall/quiz-answers.md
Normal file
30
docs/lessons/snowflake-fall/quiz-answers.md
Normal file
@ -0,0 +1,30 @@
|
||||
# snowflake fall blocks quiz answers
|
||||
|
||||
Create a snowflake fall animation.
|
||||
|
||||
This is the answer key for the [snowflake fall quiz](/microbit/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
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 3.Write the code for a forever loop and show LEDS for these images!
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 4. Write the code for a forever loop and show LEDS for these images!
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
36
docs/lessons/snowflake-fall/quiz.md
Normal file
36
docs/lessons/snowflake-fall/quiz.md
Normal file
@ -0,0 +1,36 @@
|
||||
# snowflake fall blocks quiz
|
||||
|
||||
Create a snowflake fall animation
|
||||
|
||||
## Name
|
||||
|
||||
## Directions
|
||||
|
||||
Use the hints in the [snowflake fall activity](/microbit/lessons/snowflake-fall/activity) to answer this quiz!
|
||||
|
||||
## 1. What is a forever loop?
|
||||
|
||||
<br />
|
||||
|
||||
## 2. Draw the picture that will be produced with this code
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
<br/>
|
||||
|
||||
## 3. Write the code for a forever loop and show LEDS for these images!
|
||||
|
||||

|
||||
|
||||
<br/>
|
||||
|
||||
## 4. Write the code for a forever loop and show LEDS for these images!
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
<br/>
|
||||
|
Reference in New Issue
Block a user