From c43088c0996f653558658946a2e0be79497c7f0c Mon Sep 17 00:00:00 2001 From: Michael Elliot Braun Date: Tue, 29 Mar 2016 11:57:50 -0700 Subject: [PATCH] quiz update --- docs/lessons/blink/quiz-answers.md | 15 +++++++-- docs/lessons/blink/quiz.md | 19 +++++++++--- docs/lessons/flashing-heart/quiz-answers.md | 10 +++--- docs/lessons/flashing-heart/quiz.md | 7 +---- docs/lessons/love-meter/quiz-answers.md | 6 +++- docs/lessons/love-meter/quiz.md | 6 +--- docs/lessons/screen-wipe/quiz-answers.md | 24 +++++++++++++-- docs/lessons/screen-wipe/quiz.md | 7 ++--- docs/lessons/smiley/quiz-answers.md | 27 ++++++++++++++-- docs/lessons/smiley/quiz.md | 34 ++++++++++++++++----- docs/lessons/snowflake-fall/quiz-answers.md | 12 +++++++- docs/lessons/snowflake-fall/quiz.md | 20 +++++++++--- 12 files changed, 141 insertions(+), 46 deletions(-) diff --git a/docs/lessons/blink/quiz-answers.md b/docs/lessons/blink/quiz-answers.md index b10b9f9b..f4dd204c 100644 --- a/docs/lessons/blink/quiz-answers.md +++ b/docs/lessons/blink/quiz-answers.md @@ -10,7 +10,10 @@ Answers will vary. In general, plot refers to the code that turns on a specific ## 2. Draw which LED is ON after running this code -![](/static/mb/blocks/lessons/blink-6.png) +```blocks +led.plot(2, 2) + +``` ![](/static/mb/lessons/blink-0.png) @@ -18,7 +21,10 @@ By default, the position of an LED on *Blink Tutorial* is set to the centre of t ## 3. Draw which LED is ON after running this code -![](/static/mb/blocks/lessons/blink-7.png) +```blocks +led.plot(0, 0) + +``` ![](/static/mb/lessons/blink-1.png) @@ -29,7 +35,10 @@ This code turns on specific LED. Plot turns on the specified LED on the LED scre ## 4. Draw which LED is ON after running this code -![](/static/mb/blocks/lessons/blink-8.png) +```blocks +led.plot(4, 4) + +``` ![](/static/mb/lessons/blink-2.png) diff --git a/docs/lessons/blink/quiz.md b/docs/lessons/blink/quiz.md index 3081d163..e91fdccb 100644 --- a/docs/lessons/blink/quiz.md +++ b/docs/lessons/blink/quiz.md @@ -12,23 +12,34 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu ## 1. Describe what `plot` does? -
+ ## 2. Draw which LED is ON after running this code -![](/static/mb/blocks/lessons/blink-6.png) +```blocks +led.plot(2, 2) + +``` ![](/static/mb/empty-microbit.png) ## 3. Draw which LED is ON after running this code -![](/static/mb/blocks/lessons/blink-7.png) +```blocks +led.plot(0, 0) + +``` ![](/static/mb/empty-microbit.png) ## 4. Draw which LED is ON after running this code -![](/static/mb/blocks/lessons/blink-8.png) + +```blocks +led.plot(4, 4) + +``` + ![](/static/mb/empty-microbit.png) diff --git a/docs/lessons/flashing-heart/quiz-answers.md b/docs/lessons/flashing-heart/quiz-answers.md index da284d64..99ea40de 100644 --- a/docs/lessons/flashing-heart/quiz-answers.md +++ b/docs/lessons/flashing-heart/quiz-answers.md @@ -10,13 +10,15 @@ Pause program execution for the specified number of milliseconds. ## 2. Write the code that leaves an image on the screen for 1 second (1000 milliseconds) -
-![](/static/mb/blocks/lessons/flashing-heart-5.jpg) +```blocks +basic.pause(1000) +``` ## 3. Write the code that leaves an image on the screen for 1.5 seconds (1500 milliseconds) -![](/static/mb/blocks/lessons/flashing-heart-6.jpg) +```blocks +basic.pause(1500) +``` -
diff --git a/docs/lessons/flashing-heart/quiz.md b/docs/lessons/flashing-heart/quiz.md index fe502c44..50386b96 100644 --- a/docs/lessons/flashing-heart/quiz.md +++ b/docs/lessons/flashing-heart/quiz.md @@ -12,19 +12,14 @@ Answer the questions while completing the activity. Pay attention to the dialogu ## 1. Describe what `pause` does? -
-
## 2. Write the code that leaves an image on the screen for 1 second (1000 milliseconds) -
-
+ ## 3. Write the code that leaves an image on the screen for 1.5 seconds (1500 milliseconds) -
-
diff --git a/docs/lessons/love-meter/quiz-answers.md b/docs/lessons/love-meter/quiz-answers.md index ce7e033d..9e2ee85a 100644 --- a/docs/lessons/love-meter/quiz-answers.md +++ b/docs/lessons/love-meter/quiz-answers.md @@ -14,7 +14,11 @@ It's a method that runs code when the user holds the GND pin with a finger of on Create a condition for `on pin pressed (P0)`. -![](/static/mb/blocks/lessons/love-meter-0.jpg) +```blocks +input.onPinPressed(TouchPin.P0, () => { + +}) +``` ## 3. What does this line of code doing? diff --git a/docs/lessons/love-meter/quiz.md b/docs/lessons/love-meter/quiz.md index 744d1edd..7e6af5d9 100644 --- a/docs/lessons/love-meter/quiz.md +++ b/docs/lessons/love-meter/quiz.md @@ -12,25 +12,21 @@ Answer the questions below while completing the activity. Pay attention to the d ## 1. Describe what `on pin pressed` does? -
## 2. Create a condition for on pin pressed (P0). -
## 3. Describe what this line of code does? ![](/static/mb/blocks/lessons/love-meter-6.png) -
+ ## 4. Describe what adding 1 to variable x does? ![](/static/mb/blocks/lessons/love-meter-7.png) -
## 5. Describe why you must hold ground (GND) before pressing (P0) to run a program using `on pin pressed(P0)` on the micro:bit -
diff --git a/docs/lessons/screen-wipe/quiz-answers.md b/docs/lessons/screen-wipe/quiz-answers.md index f6000dab..cdc56e24 100644 --- a/docs/lessons/screen-wipe/quiz-answers.md +++ b/docs/lessons/screen-wipe/quiz-answers.md @@ -12,13 +12,31 @@ This function turns off all the LED lights on the LED screen. ![](/static/mb/blocks/lessons/screen-wipe-4.png) -![](/static/mb/blocks/lessons/screen-wipe-5.png) +```blocks +basic.showLeds(` + . # . # . + . # . # . + . . # . . + # . . . # + . # # # . + `) +``` ## 3. Write the condition that will detect on button A pressed -![](/static/mb/blocks/lessons/screen-wipe-6.png) +```blocks + +input.onButtonPressed(Button.A, () => { + +}) + +``` ## 4. Write the code that will clear show LEDS from the screen after pressing button A -![](/static/mb/blocks/lessons/screen-wipe-7.png) +```blocks +input.onButtonPressed(Button.A, () => { + basic.clearScreen() +}) +``` diff --git a/docs/lessons/screen-wipe/quiz.md b/docs/lessons/screen-wipe/quiz.md index ab4e9904..31c9d0f4 100644 --- a/docs/lessons/screen-wipe/quiz.md +++ b/docs/lessons/screen-wipe/quiz.md @@ -12,19 +12,18 @@ Answer the questions while completing the tutorial. Pay attention to the dialogu ## 1. Describe what "clear screen" does? -
+ ## 2. Write the code that clears an image from the screen ![](/static/mb/blocks/lessons/screen-wipe-4.png) -
## 3. Write the condition that will detect on button A pressed -
+ ## 4. Write the code that will clear show LEDS from the screen after pressing button A -
+ diff --git a/docs/lessons/smiley/quiz-answers.md b/docs/lessons/smiley/quiz-answers.md index 64211b3d..5df15ec5 100644 --- a/docs/lessons/smiley/quiz-answers.md +++ b/docs/lessons/smiley/quiz-answers.md @@ -16,13 +16,36 @@ The extra empty image with show LED creates a blinking smiley, allowing the micr ## 3. Draw the image created with this code -![](/static/mb/blocks/lessons/smiley-3.png) +```blocks +basic.showLeds(` + . # . # . + . # . # . + . . . . . + # . . . # + . # # # . + `) +``` ![](/static/mb/blocks/lessons/smiley-4.png) ## 4. Write the code to make this image -![](/static/mb/blocks/lessons/smiley-5.png) +```blocks +basic.showLeds(` + . # . # . + . # . # . + . . . . . + # . . . # + . # # # . + `) +basic.showLeds(` + . . . . . + . . . . . + . . . . . + . . . . . + . . . . . + `) +``` ![](/static/mb/blocks/lessons/smiley-6.png) diff --git a/docs/lessons/smiley/quiz.md b/docs/lessons/smiley/quiz.md index a1ce64d8..75c095ed 100644 --- a/docs/lessons/smiley/quiz.md +++ b/docs/lessons/smiley/quiz.md @@ -10,27 +10,45 @@ Use the hints in the [Smiley](/microbit/lessons/smiley/activity) activity to ans ## 1. Describe what `show LEDs` does -
- -
## 2. Why is there an extra empty frame after the smiley face? ![](/static/mb/lessons/smiley-0.png) -
+ ## 3. Draw the image created with this code -![](/static/mb/blocks/lessons/smiley-3.png) +```blocks +basic.showLeds(` + . # . # . + . # . # . + . . . . . + # . . . # + . # # # . + `) +``` ![](/static/mb/empty-microbit.png) -
- ## 4. Draw the images created with this code -![](/static/mb/blocks/lessons/smiley-5.png) +```blocks +basic.showLeds(` + . # . # . + . # . # . + . . . . . + # . . . # + . # # # . + `) +basic.showLeds(` + . . . . . + . . . . . + . . . . . + . . . . . + . . . . . + `) +``` ![](/static/mb/lessons/looper-3.png) diff --git a/docs/lessons/snowflake-fall/quiz-answers.md b/docs/lessons/snowflake-fall/quiz-answers.md index 4d11b2e5..3cb3855e 100644 --- a/docs/lessons/snowflake-fall/quiz-answers.md +++ b/docs/lessons/snowflake-fall/quiz-answers.md @@ -10,7 +10,17 @@ Run code in the background forever (answers may vary). ## 2. Draw the picture that will be produced with this code -![](/static/mb/blocks/lessons/snowflake-fall-4.png) +```blocks +basic.forever(() => { + basic.showLeds(` +. # . # . +# # # # # +# # # # # +. # # # . +. . # . .`); +}); + +``` ![](/static/mb/lessons/flashing-heart-0.png) diff --git a/docs/lessons/snowflake-fall/quiz.md b/docs/lessons/snowflake-fall/quiz.md index cbd997c5..66978700 100644 --- a/docs/lessons/snowflake-fall/quiz.md +++ b/docs/lessons/snowflake-fall/quiz.md @@ -10,21 +10,31 @@ Use the hints in the [snowflake fall activity](/microbit/lessons/snowflake-fall/ ## 1. What is a forever loop? -
+ ## 2. Draw the picture that will be produced with this code -![](/static/mb/blocks/lessons/snowflake-fall-4.png) +```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! @@ -32,5 +42,5 @@ Use the hints in the [snowflake fall activity](/microbit/lessons/snowflake-fall/ ![](/static/mb/lessons/snowflake-fall-2.png) -
+