Lessons fixes (#1609)

* fixing a bunch of lessons

* more fixes

* more fixes

* more cleanup

* Additional fixes
This commit is contained in:
Peli de Halleux
2018-11-09 15:36:46 -08:00
committed by GitHub
parent 2aa8d0cec6
commit 50367217f3
20 changed files with 75 additions and 91 deletions

View File

@ -19,7 +19,7 @@ while (count < 10) {
## Challenge 1
How about we create a counter that counts backwards from 10 to 1? Let's add a while loop that executes only when `count` is greater than 0.
How about we create a counter that counts backwards from `10` to `1`? Let's add a while loop that executes only when ``||variables:count||`` is greater than `0`.
```blocks
@ -33,19 +33,15 @@ while (count < 10) {
while (count > 0) {
}
```
## Challenge 2
Inside of the while loop, let's add `pause->(1000)` so that we have a pause between each number as it's counting down. Also, let's show `count`!
Inside of the while loop, let's add a ``||basic:pause||`` that waits for one seccond so that we have a pause between each number as it's counting down. Also, let's show ``||variables:count||``!
```blocks
let count = 0;
let count = 0;
while (count < 10) {
basic.pause(100);
basic.showNumber(count);
@ -62,12 +58,11 @@ while (count > 0) {
## Challenge 3
Now, we need `count` to decrease by one after the @boardname@ has displayed the value of `count`.
Now, we need ``||variables:count||`` to decrease by one after the @boardname@ has displayed the value of ``||variables:count||``.
We can do this by adding this line:
```blocks
let count = 0;
count = count + (count - 1);
```