Final edits and image sizing for csintro.

This commit is contained in:
ganicke
2017-08-09 17:28:43 -07:00
parent b73a5e59e0
commit b2d7682998
62 changed files with 132 additions and 52 deletions

View File

@ -148,7 +148,26 @@ Remember, MakeCode automatically compiles and runs your program, so all you need
* Feel free to play around with turning LEDs on or off in the show leds blocks until you get the images you want.
* Remember to save your code.
>![Face on micro:bit screen](/static/courses/csintro/algorithms/happy-sad.gif)
```sim
basic.forever(() => {
basic.showLeds(`
. . . . .
. # . # .
. . . . .
# . . . #
. # # # .
`)
basic.pause(800)
basic.showLeds(`
. . . . .
. # . # .
. . . . .
. # # # .
# . . . #
`)
basic.pause(800)
})
```
## Commenting your code
It is good practice to add comments to your code. Comments can be useful in a number of ways. Comments can help you remember what a certain block of code does and/or why you chose to program something the way you did. Comments also help others reading your code to understand these same things.