diff --git a/coursedata/adventures/adventures.schema.json b/coursedata/adventures/adventures.schema.json index a80fb79c7e9..80279ef15c7 100644 --- a/coursedata/adventures/adventures.schema.json +++ b/coursedata/adventures/adventures.schema.json @@ -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 diff --git a/coursedata/adventures/en.yaml b/coursedata/adventures/en.yaml index 33bcc9a01a2..f6227e2b7e5 100644 --- a/coursedata/adventures/en.yaml +++ b/coursedata/adventures/en.yaml @@ -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
+ Baby Shark tututudutudu
+ Baby Shark tututudutudu
+ 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" diff --git a/coursedata/adventures/nl.yaml b/coursedata/adventures/nl.yaml index 2cffe39d15e..6f551b6ba9a 100644 --- a/coursedata/adventures/nl.yaml +++ b/coursedata/adventures/nl.yaml @@ -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