Skip to content

Commit

Permalink
Translates song explanation to En
Browse files Browse the repository at this point in the history
Also fixes yaml schema
  • Loading branch information
Felienne committed Apr 30, 2021
1 parent 8d9a53b commit a1fec99
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion coursedata/adventures/adventures.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"properties": {
"intro_text": { "type": "string" },
"story_text": { "type": "string" },
"start_code": { "type": "string" },
"start_code": { "type": "string" }
},
"required": ["start_code"],
"additionalProperties": false
Expand Down
51 changes: 50 additions & 1 deletion coursedata/adventures/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,56 @@ adventures:
```
start_code: "repeat 5 times print 'Help!'"

songs:
name: "Sing a song!"
image: "songs.png"
description: "Print a song"
levels:
5:
story_text: |
## Songs in Level 5
Songs often contain a lot of repetition. For example... Baby Shark! If you sing it, you keep singing the same thing:
Baby Shark tututudutudu <br>
Baby Shark tututudutudu <br>
Baby Shark tututudutudu <br>
Baby Shark
You can make this song much shorter with a `repeat`! Can you finish the code?
## Example Hedy code
``
repeat ... ... print 'Baby Shark tututudutudu'
print 'Baby Shark'
``
After Baby Shark you can of course also program other songs. There are many songs with repetition.
start_code: "print 'Baby Shark'"
6:
story_text: |
## Songs in Level 6
Songs often contain a lot of repetition. Sometimes the repetition is also based counting.
For example in the well-known song 'bottles of beer'. You can program that song with a little math.
## Example Hedy code
```
verse is 99
print verse ' bottles of beer on the wall'
print verse ' bottles of beer'
print 'Take one down, pass it around'
verse is verse - 1
print verse ' bottles of beer on the wall'
```
You can now repeat lines 2 to 9 as many times as you want by copying the lines.
# Looking ahead
In Level 5 we learned to repeat 1 line with `repeat`, like this:
* repeat 3 times print 'Baby Shark Tutududududu'
But as you will see in this lesson, sometimes you want to repeat several lines together. This can be done with cutting and pasting, but that is a lot of work. In level 7 you will learn how to do that more easily.
start_code: "print 'Baby shark'"
rock:
name: "Rock, paper, scissors"
description: "Develop your version of the classic game"
Expand Down
2 changes: 1 addition & 1 deletion coursedata/adventures/nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ adventures:
```
Na Baby Shark kun je natuurlijk ook nog andere liedjes programmeren. Er zijn veel liedjes met herhaling erin.
start_code: "print Wie doet de afwas?"
start_code: "print 'Baby Shark'"
6:
story_text: |
## Liedjes in Level 6
Expand Down

0 comments on commit a1fec99

Please sign in to comment.