diff --git a/content/adventures/ar.yaml b/content/adventures/ar.yaml index 1c72df22579..a7605c5bf7e 100644 --- a/content/adventures/ar.yaml +++ b/content/adventures/ar.yaml @@ -156,9 +156,9 @@ adventures: 11: story_text: |2- - `{print}` لا زال يعمل بالطريقة نفسها، ولكن أضفنا شكلاً جديداً من الأمر `{for}`. بامكاننا الان أن نكتب `{for} دورة {in} {range} ١ {to} ٥` وأن نستخدم بعدها المتغير `دورة` في البرنامج. + `{print}` لا زال يعمل بالطريقة نفسها، ولكن أضفنا شكلاً جديداً من الأمر `{for}`. بامكاننا الان أن نكتب `{for} دورة {in} {range} ١ {to} ٥` وأن نستخدم بعدها المتغير `دورة` في البرنامج. - فلنجرب الان ونرى ما سيحدث! تذكر أن تضع الإزاحة بعد استخدام الأوامر `{for}` و `{if}`(هذا يعني وضع اربع فراغات قبل بداية السطر الذي يكون ضمن هذه الأوامر) + فلنجرب الان ونرى ما سيحدث! تذكر أن تضع الإزاحة بعد استخدام الأوامر `{for}` و `{if}`(هذا يعني وضع اربع فراغات قبل بداية السطر الذي يكون ضمن هذه الأوامر) start_code: | {for} دورة {in} {range} ١ {to} ٥ {print} دورة @@ -1029,6 +1029,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" sleep_command: name: "{sleep}" description: introducing sleep command @@ -1055,6 +1059,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/bg.yaml b/content/adventures/bg.yaml index 6870be65d38..39c7814b567 100644 --- a/content/adventures/bg.yaml +++ b/content/adventures/bg.yaml @@ -173,12 +173,12 @@ adventures: If the correct answer is never given, the loop never ends! example_code: |2 - ``` - answer = 0 - {while} answer != 25 - answer = {ask} 'What is 5 times 5?' - {print} 'A correct answer has been given' - ``` + ``` + answer = 0 + {while} answer != 25 + answer = {ask} 'What is 5 times 5?' + {print} 'A correct answer has been given' + ``` 16: start_code: |- fruit = ['apple', 'banana', 'cherry'] @@ -188,13 +188,13 @@ adventures: You can use the square brackets as well to point out a place in the lists. example_code: |2 - ``` - friends = ['Ahmed', 'Ben', 'Cayden'] - lucky_numbers = [15, 18, 6] - {for} i {in} {range} 1 {to} 3 - {print} 'the lucky number of ' friends[i] - {print} 'is ' lucky_numbers[i] - ``` + ``` + friends = ['Ahmed', 'Ben', 'Cayden'] + lucky_numbers = [15, 18, 6] + {for} i {in} {range} 1 {to} 3 + {print} 'the lucky number of ' friends[i] + {print} 'is ' lucky_numbers[i] + ``` 17: start_code: |- {for} i {in} {range} 1 {to} 10: @@ -248,13 +248,13 @@ adventures: example_code: |2 - ``` - name is ask Как се нарича главаната героиня? - print name сега навлиза в гората. - print Тя е малко разтревожена. - print Наоколо се долавят странни шумове и звуци. - print name се опасява че гората може би е омагьосана. - ``` + ``` + name is ask Как се нарича главаната героиня? + print name сега навлиза в гората. + print Тя е малко разтревожена. + print Наоколо се долавят странни шумове и звуци. + print name се опасява че гората може би е омагьосана. + ``` start_code: "print Твоята история" story_text_2: "### Exercise\nNow it's time to add variables to your own story that you've made in the previous level.\nGo to 'My programs', look for your level 1 story adventure and copy the code. Paste the code in your input screen in this level.\n\nThis code won't work in this level, because you have not used variables yet.\nChange the `{ask}` commands and `{echo}` commands in your code to the correct form that you've learned in this level.\n\n**Extra** Add a sleep command to your code to build up tension in your story.\n" 7: @@ -273,20 +273,20 @@ adventures: 5: story_text: |2 - В четвърто ниво ще направиш историята си дори по-цветиста и забавна! - Тук ще прибавиш различни възможни завършеци, за да има изненадващ край. + В четвърто ниво ще направиш историята си дори по-цветиста и забавна! + Тук ще прибавиш различни възможни завършеци, за да има изненадващ край. - Представи си, че историята започва така: + Представи си, че историята започва така: - 1. Принцесата се разхожда в гората. - 2. Внезапно насреща й изскача свирепо чудовище. + 1. Принцесата се разхожда в гората. + 2. Внезапно насреща й изскача свирепо чудовище. - 3. **щастлив край**: Тя изважда острата си сабя и чудовището се оттегля от пътя й. - 3. **тъжен край**: Чудовището отваря голямата си паст и поглъща принцесата цяла. + 3. **щастлив край**: Тя изважда острата си сабя и чудовището се оттегля от пътя й. + 3. **тъжен край**: Чудовището отваря голямата си паст и поглъща принцесата цяла. - Сега ще ползваме променливата "име" по-гъвкаво, също както в трето ниво. - Виж как ползваме командите `if` (ако) и `else` (тогава), за да програмираме избирането - на един от двата края на историята. + Сега ще ползваме променливата "име" по-гъвкаво, също както в трето ниво. + Виж как ползваме командите `if` (ако) и `else` (тогава), за да програмираме избирането + на един от двата края на историята. example_code: | ``` @@ -320,7 +320,7 @@ adventures: 3: story_text: |2 - Към историята, която пишеш можеш да добавиш нещо произволно и неочаквано, примерно чудовище, животно или някаква пречка. + Към историята, която пишеш можеш да добавиш нещо произволно и неочаквано, примерно чудовище, животно или някаква пречка. start_code: "print Твоята история" story_text_2: | @@ -338,13 +338,13 @@ adventures: example_code_3: |2 - ``` - {print} His backpack got way too heavy. - {print} Inside were a bottle of water, a flashlight and a brick. - bag {is} water, flashlight, brick - dump {is} {ask} Which item should he dump? - {remove} dump {from} bag - ``` + ``` + {print} His backpack got way too heavy. + {print} Inside were a bottle of water, a flashlight and a brick. + bag {is} water, flashlight, brick + dump {is} {ask} Which item should he dump? + {remove} dump {from} bag + ``` example_code: |- Ето как изглежда: ``` @@ -393,16 +393,16 @@ adventures: example_code: |2 - ``` - verse = 99 - {print} verse ' bottles of beer on the wall' - {print} verse ' bottles of beer' - {print} 'Take one down, pass it around' - verse = verse - 1 - {print} verse ' bottles of beer on the wall' - ``` + ``` + verse = 99 + {print} verse ' bottles of beer on the wall' + {print} verse ' bottles of beer' + {print} 'Take one down, pass it around' + verse = 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. + You can now repeat lines 2 to 9 as many times as you want by copying the lines. start_code: "{print} 'Baby shark'" story_text_2: "This children's song counts down from 5 little monkeys to 1 monkey.\nIf you copy line 2 - 7 and paste it under the the code, you can sing the whole song!\n" example_code_2: "```\nnumber = 6\nnumber = number - 1\nprint number ' little monkeys jumping on the bed'\nprint 'One fell off and bumped his head'\nprint 'Mama called the doctor and the doctor said'\nprint 'NO MORE MONKEYS JUMPING ON THE BED!'\nsleep\n```\n" @@ -419,12 +419,12 @@ adventures: example_code: |2 - ``` - {repeat} _ _ {print} 'Baby Shark tututudutudu' - {print} 'Baby Shark' - ``` + ``` + {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. + After Baby Shark you can of course also program other songs. There are many songs with repetition. start_code: "{print} 'Baby Shark'" 8: story_text: | @@ -432,15 +432,15 @@ adventures: example_code: |2 - ``` - verse = 99 - {repeat} 99 {times} - {print} verse ' bottles of beer on the wall' - {print} verse ' bottles of beer' - {print} 'Take one down, pass it around' - verse = verse - 1 - {print} verse ' bottles of beer on the wall' - ``` + ``` + verse = 99 + {repeat} 99 {times} + {print} verse ' bottles of beer on the wall' + {print} verse ' bottles of beer' + {print} 'Take one down, pass it around' + verse = verse - 1 + {print} verse ' bottles of beer on the wall' + ``` start_code: "# place your code here" 10: story_text: | @@ -508,16 +508,16 @@ adventures: example_code: |2 - ``` - actions = 'clap your hands', 'stomp your feet', 'shout Hurray!' - {for} action {in} actions - {for} i {in} {range} 1 {to} 2 - {print} 'if youre happy and you know it' - {print} action - {print} 'if youre happy and you know it and you really want to show it' - {print} 'if youre happy and you know it' - {print} action - ``` + ``` + actions = 'clap your hands', 'stomp your feet', 'shout Hurray!' + {for} action {in} actions + {for} i {in} {range} 1 {to} 2 + {print} 'if youre happy and you know it' + {print} action + {print} 'if youre happy and you know it and you really want to show it' + {print} 'if youre happy and you know it' + {print} action + ``` start_code: "# place your code here" 16: story_text: | @@ -593,14 +593,14 @@ adventures: example_code: |2 - ``` - print "Рисуване на фигура" - angle is 90 - turn angle - forward 50 - turn angle - forward 50 - ``` + ``` + print "Рисуване на фигура" + angle is 90 + turn angle + forward 50 + turn angle + forward 50 + ``` start_code: | print Състезание с костенурки! @@ -687,17 +687,17 @@ adventures: story_text: |2 - Докато рисуваш костенурката можеш да добавиш и командата `random`. С нея костенурката ще поеме в произволна посока всеки път. - Ползвай `at random` в комбинация с променлива с повече стойности, не само една. - Ползвай примера отдолу и увеличи листа с още стойности, освен 10, 50, 90, 150, 250. + Докато рисуваш костенурката можеш да добавиш и командата `random`. С нея костенурката ще поеме в произволна посока всеки път. + Ползвай `at random` в комбинация с променлива с повече стойности, не само една. + Ползвай примера отдолу и увеличи листа с още стойности, освен 10, 50, 90, 150, 250. example_code: |2 - ``` - ъгли is 10, 50, 90, 150, 250 - turn ъгли at random - forward 25 - ``` + ``` + ъгли is 10, 50, 90, 150, 250 + turn ъгли at random + forward 25 + ``` start_code: | print Състезание с костенурки! @@ -755,11 +755,11 @@ adventures: 5: story_text: |2 - С командата `if` ще създадем възможност за повече избор в програмата ни. - Можеш да програмираш реакция на системата по определен избор. + С командата `if` ще създадем възможност за повече избор в програмата ни. + Можеш да програмираш реакция на системата по определен избор. - Можеш ли да довършиш примерния код по-долу с думите 'Какъв лош късмет..' когато ти си наред да миеш? - И не забравяй да ползваш кавички около текста! + Можеш ли да довършиш примерния код по-долу с думите 'Какъв лош късмет..' когато ти си наред да миеш? + И не забравяй да ползваш кавички около текста! example_code: | ``` @@ -773,12 +773,12 @@ adventures: 4: story_text: |2 - Сега ползвай кавички, за да подобриш графика на миячите на чинии. - Този път в кода има пропуски, отбелязани с черта за подчертаване '_'. + Сега ползвай кавички, за да подобриш графика на миячите на чинии. + Този път в кода има пропуски, отбелязани с черта за подчертаване '_'. - Можеш ли да замениш 'празните места' с подходящ код - дума или символ? + Можеш ли да замениш 'празните места' с подходящ код - дума или символ? - Съвет: не забравяй да ползваш кавички около текста! + Съвет: не забравяй да ползваш кавички около текста! example_code: | ``` @@ -1129,27 +1129,27 @@ adventures: example_code: |2 - ``` - {print} 'Welcome to Hedys restaurant!' - people = {ask} 'How many people will be joining us today?' - {print} 'Great!' - price = 0 - {repeat} people {times} - food = {ask} 'What would you like to order?' - {print} food - {if} food {is} fries - price = price + 3 - sauce = {ask} 'What kind of sauce would you like with your fries?' - {if} sauce {is} no - {print} 'no sauce' - {else} - price = price + 1 - {print} 'with ' sauce - {if} food {is} pizza - price = price + 4 - {print} 'That will be ' price ' dollar' - {print} 'Enjoy your meal!' - ``` + ``` + {print} 'Welcome to Hedys restaurant!' + people = {ask} 'How many people will be joining us today?' + {print} 'Great!' + price = 0 + {repeat} people {times} + food = {ask} 'What would you like to order?' + {print} food + {if} food {is} fries + price = price + 3 + sauce = {ask} 'What kind of sauce would you like with your fries?' + {if} sauce {is} no + {print} 'no sauce' + {else} + price = price + 1 + {print} 'with ' sauce + {if} food {is} pizza + price = price + 4 + {print} 'That will be ' price ' dollar' + {print} 'Enjoy your meal!' + ``` start_code: "# place your code here" 10: story_text: | @@ -1157,16 +1157,16 @@ adventures: example_code: |2 - ``` - courses = appetizer, main course, dessert - {for} course {in} courses - food = {ask} 'What would you like to eat as your ' course '?' - {print} food ' will be your ' course - ``` + ``` + courses = appetizer, main course, dessert + {for} course {in} courses + food = {ask} 'What would you like to eat as your ' course '?' + {print} food ' will be your ' course + ``` story_text_2: |2 - Of course, you could also order for multiple people! + Of course, you could also order for multiple people! example_code_2: | ``` courses = appetizer, main course, dessert @@ -1183,21 +1183,21 @@ adventures: example_code: |2 - ``` - {print} 'Welcome to Restaurant Hedy!' - people = {ask} 'For how many people would you like to order?' - {for} i {in} {range} 1 {to} people - {print} 'Order number ' i - food = {ask} 'What would you like to eat?' - {print} food - {if} food {is} fries - sauce = {ask} 'What kind of sauce would you like with that?' - {print} sauce - drinks = {ask} 'What would you like to drink?' - {print} drinks - price = 4 * people - {print} 'That will be ' price ' dollars, please!' - ``` + ``` + {print} 'Welcome to Restaurant Hedy!' + people = {ask} 'For how many people would you like to order?' + {for} i {in} {range} 1 {to} people + {print} 'Order number ' i + food = {ask} 'What would you like to eat?' + {print} food + {if} food {is} fries + sauce = {ask} 'What kind of sauce would you like with that?' + {print} sauce + drinks = {ask} 'What would you like to drink?' + {print} drinks + price = 4 * people + {print} 'That will be ' price ' dollars, please!' + ``` start_code: "# place your code here" 12: story_text: | @@ -1205,20 +1205,20 @@ adventures: example_code: |2 - ``` - price = 0 - food = {ask} 'What would you like to order?' - drink = {ask} 'What would you like to drink?' - {if} food {is} 'hamburger' - price = price + 6.50 - {if} food {is} 'pizza' - price = price + 5.75 - {if} drink {is} 'water' - price = price + 1.20 - {if} drink {is} 'soda' - price = price + 2.35 - {print} 'That will be ' price ' dollar, please' - ``` + ``` + price = 0 + food = {ask} 'What would you like to order?' + drink = {ask} 'What would you like to drink?' + {if} food {is} 'hamburger' + price = price + 6.50 + {if} food {is} 'pizza' + price = price + 5.75 + {if} drink {is} 'water' + price = price + 1.20 + {if} drink {is} 'soda' + price = price + 2.35 + {print} 'That will be ' price ' dollar, please' + ``` start_code: "# place your code here" 13: story_text: | @@ -1227,15 +1227,15 @@ adventures: example_code: |2 - ``` - price = 10 - food = {ask} 'What would you like to eat?' - drinks = {ask} 'What would you like to drink?' - {if} food {is} 'sandwich' {and} drinks {is} 'juice' - {print} 'Thats our discount menu' - price = price - 3 - {print} 'That will be ' price ' dollars' - ``` + ``` + price = 10 + food = {ask} 'What would you like to eat?' + drinks = {ask} 'What would you like to drink?' + {if} food {is} 'sandwich' {and} drinks {is} 'juice' + {print} 'Thats our discount menu' + price = price - 3 + {print} 'That will be ' price ' dollars' + ``` start_code: "# place your code here" 15: story_text: | @@ -1244,15 +1244,15 @@ adventures: example_code: |2 - ``` - {print} 'Welcome at McHedy' - more = 'yes' - {while} more == 'yes' - order = {ask} 'What would you like to order?' - {print} order - more = {ask} 'Would you like to order anything {else}?' - {print} 'Thank you!' - ``` + ``` + {print} 'Welcome at McHedy' + more = 'yes' + {while} more == 'yes' + order = {ask} 'What would you like to order?' + {print} order + more = {ask} 'Would you like to order anything {else}?' + {print} 'Thank you!' + ``` start_code: "# place your code here" fortune: name: Fortune teller @@ -1312,20 +1312,20 @@ adventures: - ``` - {print} How did I get here? - {print} I remember my friend telling me to go into the old mansion... - {print} and suddenly everything went black. - {print} But how did I end up on the floor...? - {print} My head hurts like Ive been hit by a baseball bat! - {print} What's that sound? - {print} Oh no! I feel like Im not alone in this house! - {print} I need to get out of here! - {print} There are 3 doors in front of me.. - {ask} Which door should i pick? - {echo} I choose door - {print} ...? - ``` + ``` + {print} How did I get here? + {print} I remember my friend telling me to go into the old mansion... + {print} and suddenly everything went black. + {print} But how did I end up on the floor...? + {print} My head hurts like Ive been hit by a baseball bat! + {print} What's that sound? + {print} Oh no! I feel like Im not alone in this house! + {print} I need to get out of here! + {print} There are 3 doors in front of me.. + {ask} Which door should i pick? + {echo} I choose door + {print} ...? + ``` story_text_2: | Can you finish the scary story? Or make up your own haunted house story? start_code: "{print} How did I get here?" @@ -1334,16 +1334,16 @@ adventures: In this haunted house you can choose your monsters with emojis. Of course you could also use words. example_code: |2 - ``` - monster_1 {is} 👻 - monster_2 {is} 🤡 - monster_3 {is} 👶 - {print} You enter the haunted house. - {print} Suddenly you see a monster_1 - {print} You run into the other room, but a monster_2 is waiting there for you! - {print} Oh no! Quickly get to the kitchen. - {print} But as you enter monster_3 attacks you! - ``` + ``` + monster_1 {is} 👻 + monster_2 {is} 🤡 + monster_3 {is} 👶 + {print} You enter the haunted house. + {print} Suddenly you see a monster_1 + {print} You run into the other room, but a monster_2 is waiting there for you! + {print} Oh no! Quickly get to the kitchen. + {print} But as you enter monster_3 attacks you! + ``` start_code: "monster1 {is} _" story_text_2: "### Exercise\nIn the example above the monsters are predetermined. So each time you run your code, the output is the same.\nCan you add `{ask}` commands to make the haunted house interactive and have the players choose the monsters they come across?\n" example_code_2: "```\nmonster_1 {is} _\nmonster_2 {is} _\nmonster_3 {is} _\n{print} You enter the haunted house.\n{print} Suddenly you see a monster_1\n{print} You run into the other room, but a monster_2 is waiting there for you!\n{print} Oh no! Quickly get to the kitchen.\n{print} But as you enter monster_3 attacks you!\n```\n" @@ -1379,18 +1379,18 @@ adventures: example_code: |2 - ``` - {print} 'Escape from the haunted house!' - {print} 'There are 3 doors in front of you...' - doors {is} 1, 2, 3 - monsters {is} werewolf, mummy, vampire, zombie - chosen_door {is} {ask} 'Which door do you choose?' - {print} 'You chose door...' chosen_door - {sleep} - correct_door {is} doors {at} {random} - {if} chosen_door {is} correct_door {print} 'Great! Youve escaped!' - {else} {print} 'Oh no! You are being eaten by a...' monsters {at} {random} - ``` + ``` + {print} 'Escape from the haunted house!' + {print} 'There are 3 doors in front of you...' + doors {is} 1, 2, 3 + monsters {is} werewolf, mummy, vampire, zombie + chosen_door {is} {ask} 'Which door do you choose?' + {print} 'You chose door...' chosen_door + {sleep} + correct_door {is} doors {at} {random} + {if} chosen_door {is} correct_door {print} 'Great! Youve escaped!' + {else} {print} 'Oh no! You are being eaten by a...' monsters {at} {random} + ``` start_code: "# place your code here" 9: @@ -1402,26 +1402,26 @@ adventures: example_code: |2 - ``` - {print} 'Escape from the Haunted House!' - player = alive - doors = 1, 2, 3 - monsters = zombie, vampire, giant spider - {repeat} 3 {times} - {if} player {is} alive - correct_door {is} doors {at} {random} - {print} 'There are 3 doors in front of you...' - chosen_door = {ask} 'Which door do you choose?' - {if} chosen_door {is} correct_door - {print} 'No monsters here!' - {else} - {print} 'You are eaten by a ' monsters {at} {random} - player = dead - {else} - {print} 'GAME OVER' - {if} player {is} alive - {print} 'Great! You survived!' - ``` + ``` + {print} 'Escape from the Haunted House!' + player = alive + doors = 1, 2, 3 + monsters = zombie, vampire, giant spider + {repeat} 3 {times} + {if} player {is} alive + correct_door {is} doors {at} {random} + {print} 'There are 3 doors in front of you...' + chosen_door = {ask} 'Which door do you choose?' + {if} chosen_door {is} correct_door + {print} 'No monsters here!' + {else} + {print} 'You are eaten by a ' monsters {at} {random} + player = dead + {else} + {print} 'GAME OVER' + {if} player {is} alive + {print} 'Great! You survived!' + ``` start_code: "{print} 'Escape from the haunted house!'" 11: story_text: | @@ -1429,27 +1429,27 @@ adventures: example_code: |2 - ``` - {print} 'Escape from the Haunted House!' - player {is} alive - doors = 1, 2, 3 - monsters = zombie, vampire, giant spider - {for} i {in} {range} 1 {to} 3 - {if} player {is} alive - correct_door = doors {at} {random} - {print} 'Room ' i - {print} 'There are 3 doors in front of you...' - chosendoor = {ask} 'Which door do you choose?' - {if} chosendoor {is} correct_door - {print} 'No monsters here!' - {else} - {print} 'You are eaten by a ' monsters {at} {random} - player = dead - {else} - {print} 'GAME OVER' - {if} player {is} alive - {print} 'Great! You survived!' - ``` + ``` + {print} 'Escape from the Haunted House!' + player {is} alive + doors = 1, 2, 3 + monsters = zombie, vampire, giant spider + {for} i {in} {range} 1 {to} 3 + {if} player {is} alive + correct_door = doors {at} {random} + {print} 'Room ' i + {print} 'There are 3 doors in front of you...' + chosendoor = {ask} 'Which door do you choose?' + {if} chosendoor {is} correct_door + {print} 'No monsters here!' + {else} + {print} 'You are eaten by a ' monsters {at} {random} + player = dead + {else} + {print} 'GAME OVER' + {if} player {is} alive + {print} 'Great! You survived!' + ``` start_code: "{print} 'Escape from the haunted house!'" 14: story_text: | @@ -1457,28 +1457,28 @@ adventures: example_code: |2 - ``` - {print} 'Escape from the haunted house' - lives = 3 - doors = 1, 2, 3 - monsters = 'the wicked witch', 'a zombie', 'a sleeping 3 headed dog' - {for} i {in} {range} 1 {to} 10 - {if} lives > 0 - good_door = doors {at} {random} - monster = monsters {at} {random} - chosen_door = {ask} 'Which door do you choose?' - {if} good_door == chosen_door - {print} 'You have chosen the correct door' - {else} - {print} 'You see...' monster - {if} monster == 'a sleeping 3 headed dog' - {print} 'Pffieuw.... Its asleep' - {else} - {print} 'You lose one life' - lives = lives -1 - {else} - {print} 'GAME OVER' - ``` + ``` + {print} 'Escape from the haunted house' + lives = 3 + doors = 1, 2, 3 + monsters = 'the wicked witch', 'a zombie', 'a sleeping 3 headed dog' + {for} i {in} {range} 1 {to} 10 + {if} lives > 0 + good_door = doors {at} {random} + monster = monsters {at} {random} + chosen_door = {ask} 'Which door do you choose?' + {if} good_door == chosen_door + {print} 'You have chosen the correct door' + {else} + {print} 'You see...' monster + {if} monster == 'a sleeping 3 headed dog' + {print} 'Pffieuw.... Its asleep' + {else} + {print} 'You lose one life' + lives = lives -1 + {else} + {print} 'GAME OVER' + ``` start_code: "# place your code here" 16: story_text: | @@ -1488,32 +1488,32 @@ adventures: example_code: |2 - ``` - numbers = [1, 2, 3] - i = numbers[{random}] - hint = ['growling', 'a cackling laugh', 'fluttering batwings'] - monsters = ['zombie', 'witch', 'vampire'] - bad_fate = ['Your brain is eaten', 'You are forever cursed', 'You are bitten'] - good_fate = ['You throw the ham. The zombie is distracted and starts eating it.', 'You set the curtains on fire. The witch flees out of fear for the fire', 'The vampire hates garlic and flees'] - weapons = ['ham', 'lighter', 'garlic'] - {print} 'You are standing in front of an old mansion' - {print} 'Something is not right here' - {print} 'You hear ' hint[i] - {print} 'You are going to explore it' - {print} 'You enter the kitchen and see a lighter, a raw ham and a garlic.' - your_weapon = {ask} 'What do you bring with you?' - {print} 'With your ' your_weapon ' you enter the living room' - {print} 'There you find a ' monsters[i] - needed_weapon = weapons[i] - {if} your_weapon == needed_weapon - {print} 'You use your ' your_weapon - {print} good_fate[i] - {print} 'YOU WIN!' - {else} - {print} 'You have chosen the wrong weapon...' - {print} bad_fate[i] - {print} 'GAME OVER' - ``` + ``` + numbers = [1, 2, 3] + i = numbers[{random}] + hint = ['growling', 'a cackling laugh', 'fluttering batwings'] + monsters = ['zombie', 'witch', 'vampire'] + bad_fate = ['Your brain is eaten', 'You are forever cursed', 'You are bitten'] + good_fate = ['You throw the ham. The zombie is distracted and starts eating it.', 'You set the curtains on fire. The witch flees out of fear for the fire', 'The vampire hates garlic and flees'] + weapons = ['ham', 'lighter', 'garlic'] + {print} 'You are standing in front of an old mansion' + {print} 'Something is not right here' + {print} 'You hear ' hint[i] + {print} 'You are going to explore it' + {print} 'You enter the kitchen and see a lighter, a raw ham and a garlic.' + your_weapon = {ask} 'What do you bring with you?' + {print} 'With your ' your_weapon ' you enter the living room' + {print} 'There you find a ' monsters[i] + needed_weapon = weapons[i] + {if} your_weapon == needed_weapon + {print} 'You use your ' your_weapon + {print} good_fate[i] + {print} 'YOU WIN!' + {else} + {print} 'You have chosen the wrong weapon...' + {print} bad_fate[i] + {print} 'GAME OVER' + ``` start_code: "# place your code here" piggybank: default_save_name: Piggy Bank @@ -1547,15 +1547,15 @@ adventures: Make your own program to practice your vocabulary in a new language. example_code: |2 - ``` - {print} 'Learn French!' - cat {is} {ask} '🐱' - {if} cat {is} chat {print} 'Terrific!' - {else} {print} 'No, cat is chat' - frog {is} {ask} '🐸' - {if} frog {is} grenouille {print} 'Super!' - {else} {print} 'No, frog is grenouille' - ``` + ``` + {print} 'Learn French!' + cat {is} {ask} '🐱' + {if} cat {is} chat {print} 'Terrific!' + {else} {print} 'No, cat is chat' + frog {is} {ask} '🐸' + {if} frog {is} grenouille {print} 'Super!' + {else} {print} 'No, frog is grenouille' + ``` start_code: "# place your code here" 16: story_text: | @@ -1563,20 +1563,20 @@ adventures: example_code: |2 - ``` - french_words = ['bonjour', 'ordinateur', 'pomme de terre'] - translation = ['hello', 'computer', 'potato'] - score = 0 - {for} i {in} {range} 1 {to} 3 - answer = {ask} 'What does ' french_words[i] ' mean?' - correct = translation[i] - {if} answer == correct - {print} 'Correct!' - score = score + 1 - {else} - {print} 'Wrong, ' french_words[i] ' means ' translation[i] - {print} 'You gave ' score ' correct answers.' - ``` + ``` + french_words = ['bonjour', 'ordinateur', 'pomme de terre'] + translation = ['hello', 'computer', 'potato'] + score = 0 + {for} i {in} {range} 1 {to} 3 + answer = {ask} 'What does ' french_words[i] ' mean?' + correct = translation[i] + {if} answer == correct + {print} 'Correct!' + score = score + 1 + {else} + {print} 'Wrong, ' french_words[i] ' means ' translation[i] + {print} 'You gave ' score ' correct answers.' + ``` start_code: "# place your code here" secret: name: SuperSpy @@ -1699,6 +1699,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" name: "{if} & {else}" description: Introducing the if command default_save_name: if_command @@ -1793,6 +1797,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" add_remove_command: name: "{add} {to} & {remove} {from}" description: introducing add to and remove from diff --git a/content/adventures/bn.yaml b/content/adventures/bn.yaml index 4f7b9197fa9..d32cccfcb69 100644 --- a/content/adventures/bn.yaml +++ b/content/adventures/bn.yaml @@ -949,7 +949,7 @@ adventures: Can you make the code so that you get the total score for 8 dice? To do that, you have to cut and paste some lines of the code. example_code_2: |2 - Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7! + Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7! start_code: "{print} 'What will the die indicate this time?'" 7: story_text: | @@ -1024,9 +1024,9 @@ adventures: 3: story_text: |2 - In this level we can enter lists and choose things from them. - You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`. - For example, you can let the computer pick from rock, paper and scissors. + In this level we can enter lists and choose things from them. + You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`. + For example, you can let the computer pick from rock, paper and scissors. example_code: | ``` @@ -1383,20 +1383,20 @@ adventures: example_code: |2 - You can make a simple restaurant code, like this: - ``` - {print} 'Welcome to Hedys restaurant' - {print} 'Here is our menu:' - {print} 'Our main courses are pizza, lasagne, or spaghetti' - main = {ask} 'Which main course would you like?' - price = 0 - {if} main {is} pizza price = 10 - {if} main {is} lasagne price = 12 - {if} main {is} spaghetti price = 8 - {print} 'You have ordered ' main - {print} 'That will be ' price ' dollars, please' - {print} 'Thank you, enjoy your meal!' - ``` + You can make a simple restaurant code, like this: + ``` + {print} 'Welcome to Hedys restaurant' + {print} 'Here is our menu:' + {print} 'Our main courses are pizza, lasagne, or spaghetti' + main = {ask} 'Which main course would you like?' + price = 0 + {if} main {is} pizza price = 10 + {if} main {is} lasagne price = 12 + {if} main {is} spaghetti price = 8 + {print} 'You have ordered ' main + {print} 'That will be ' price ' dollars, please' + {print} 'Thank you, enjoy your meal!' + ``` start_code: "# place your code here" 7: story_text: | @@ -1467,7 +1467,7 @@ adventures: ``` story_text_2: |2 - Of course, you could also order for multiple people! + Of course, you could also order for multiple people! example_code_2: | ``` courses = appetizer, main course, dessert @@ -1580,16 +1580,16 @@ adventures: In this level you can use a variable and the `{at} {random}` command to really let Hedy choose an answer for you. Check out this code for instance: example_code: |2 - In this example the player can {ask} Hedy a yes-no question and Hedy will pick a random answer for you. - ``` - {print} I’m Hedy the fortune teller! - question {is} {ask} What do you want to know? - {print} This is what you want to know: question - answers {is} yes, no, maybe - {print} My crystal ball says... - {sleep} 2 - {print} answers {at} {random} - ``` + In this example the player can {ask} Hedy a yes-no question and Hedy will pick a random answer for you. + ``` + {print} I’m Hedy the fortune teller! + question {is} {ask} What do you want to know? + {print} This is what you want to know: question + answers {is} yes, no, maybe + {print} My crystal ball says... + {sleep} 2 + {print} answers {at} {random} + ``` story_text_2: | Now, Hedy can only answer yes, no or maybe. Can you give Hedy more answer options, like 'definitely' or '{ask} again'. start_code: "# place your code here" @@ -2509,6 +2509,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command @@ -2565,6 +2569,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" name: "{if} & {else}" description: Introducing the if command default_save_name: if_command diff --git a/content/adventures/ca.yaml b/content/adventures/ca.yaml index 2778ca0be28..2cae3fec7ed 100644 --- a/content/adventures/ca.yaml +++ b/content/adventures/ca.yaml @@ -790,6 +790,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -857,6 +861,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" quotation_marks: name: "'quotation marks'" description: Introduction quotation marks diff --git a/content/adventures/cs.yaml b/content/adventures/cs.yaml index 03a925431d5..f1689fc6b43 100644 --- a/content/adventures/cs.yaml +++ b/content/adventures/cs.yaml @@ -915,6 +915,10 @@ adventures: story_text: "We are going to learn more new items. You might know them already from mathematics, the `<` and `>`.\nThe `<` checks if the first number is smaller than the second, for example age `<` 12 checks if age is smaller than 12.\nIf you want to check if the first number is smaller or equal to the second, you can use `<=`, for example age `<=` 11.\nThe `>` checks if the first number is bigger than the second, for example points `>` 10 checks if points is larger than 10.\nIf you want to check if the first number is bigger or equal to the second, you can use `>=`, for example points `>=` 11.\nYou use these comparisons in an `{if}`, like this:\n" example_code: "```\nage = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'\n```\n" story_text_2: "From this level on, if you want to compare exactly, you can use two equal signs. This is what most programming languages do:\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" ask_command: levels: @@ -1051,6 +1055,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" quotation_marks: levels: 4: diff --git a/content/adventures/cy.yaml b/content/adventures/cy.yaml index 273a8ca5ea7..e0b63de1eac 100644 --- a/content/adventures/cy.yaml +++ b/content/adventures/cy.yaml @@ -765,6 +765,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -812,6 +816,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/da.yaml b/content/adventures/da.yaml index 211beaeb448..5382e4cee82 100644 --- a/content/adventures/da.yaml +++ b/content/adventures/da.yaml @@ -717,6 +717,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command @@ -880,6 +884,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" repeat_command_2: name: "{repeat} 2" description: repeat command 2 diff --git a/content/adventures/de.yaml b/content/adventures/de.yaml index ba7d2a17236..8517ac6bb3b 100644 --- a/content/adventures/de.yaml +++ b/content/adventures/de.yaml @@ -2419,6 +2419,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: levels: 16: @@ -2529,6 +2533,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/el.yaml b/content/adventures/el.yaml index a252d9af9a5..42cba8f40a4 100644 --- a/content/adventures/el.yaml +++ b/content/adventures/el.yaml @@ -292,8 +292,8 @@ adventures: 7: story_text: |2 - Σε μια ιστορία, κάποιος μπορεί να αναφέρει διάφορες λέξεις πολλές φορές. Για παράδειγμα, όταν κάποιος φωνάζει βοήθεια ή τραγουδά ένα τραγούδι. - Μπορείς να βάλεις μια τέτοια επανάληψη στην ιστορία σου στο επίπεδο 5 με την `repeat`. + Σε μια ιστορία, κάποιος μπορεί να αναφέρει διάφορες λέξεις πολλές φορές. Για παράδειγμα, όταν κάποιος φωνάζει βοήθεια ή τραγουδά ένα τραγούδι. + Μπορείς να βάλεις μια τέτοια επανάληψη στην ιστορία σου στο επίπεδο 5 με την `repeat`. example_code: | ``` @@ -329,13 +329,13 @@ adventures: 4: story_text: |2 - Θα παρατήρησες πως υπάρχει ακόμα ένα σφάλμα στο επίπεδο 2. + Θα παρατήρησες πως υπάρχει ακόμα ένα σφάλμα στο επίπεδο 2. - Δοκίμασες να κάνεις μια πρόταση χρησιμοποιώντας τη λέξη name; Δηλαδή, `print το name μου είναι name`. + Δοκίμασες να κάνεις μια πρόταση χρησιμοποιώντας τη λέξη name; Δηλαδή, `print το name μου είναι name`. - Αυτό δε δούλεψε σωστά! Τότε θα έχεις σαν αποτέλεσμα: το Γιάννης μου είναι Γιάννης. Αυτό μπορεί να λυθεί στο επίπεδο 3. + Αυτό δε δούλεψε σωστά! Τότε θα έχεις σαν αποτέλεσμα: το Γιάννης μου είναι Γιάννης. Αυτό μπορεί να λυθεί στο επίπεδο 3. - Θα πρέπει να χρησιμοποιήσεις εισαγωγικά για οτιδήποτε θα εμφανίσεις. + Θα πρέπει να χρησιμοποιήσεις εισαγωγικά για οτιδήποτε θα εμφανίσεις. example_code: | ``` @@ -351,9 +351,9 @@ adventures: 3: story_text: |2 - Μπορείς επίσης να προσθέσεις κάτι τυχαίο στην ιστορία σου. Οποιοδήποτε τέρας, ζώο ή άλλο εμπόδιο. + Μπορείς επίσης να προσθέσεις κάτι τυχαίο στην ιστορία σου. Οποιοδήποτε τέρας, ζώο ή άλλο εμπόδιο. - Αυτό πάει κάπως έτσι. + Αυτό πάει κάπως έτσι. start_code: "print Η ιστορία σου" example_code: | ``` @@ -731,11 +731,11 @@ adventures: 3: story_text: |2 - Στο επίπεδο 2 μπορούμε να εισάγουμε λίστες και να επιλέξουμε πράγματα από αυτές. + Στο επίπεδο 2 μπορούμε να εισάγουμε λίστες και να επιλέξουμε πράγματα από αυτές. - Αρχικά θα φτιάξεις μια λίστα με την `is`. Ύστερα μπορείς να αφήσεις τον υπολογιστή να επιλέξει κάτι από τη λίστα με την `at random` (τυχαία). + Αρχικά θα φτιάξεις μια λίστα με την `is`. Ύστερα μπορείς να αφήσεις τον υπολογιστή να επιλέξει κάτι από τη λίστα με την `at random` (τυχαία). - Για παράδειγμα, μπορείς να αφήσεις τον υπολογιστή να επιλέξει ανάμεσα σε πέτρα, ψαλίδι και χαρτί. + Για παράδειγμα, μπορείς να αφήσεις τον υπολογιστή να επιλέξει ανάμεσα σε πέτρα, ψαλίδι και χαρτί. example_code: | ``` @@ -862,17 +862,17 @@ adventures: start_code: "# place your code here" example_code: |2- - ``` - print Καλωσήλθατε στο εστιατόριο της Hedy! - print Σήμερα σερβίρουμε πίτσα ή λαζάνια. - food is ask Τί θα θέλατε να φάτε; - print Καλή επιλογή! Αυτό το φαγητό είναι το αγαπημένο μου! - topping is ask Θα θέλατε κρέας ή λαχανικά μαζί με αυτό; - print food with topping ετοιμάζεται! - drinks is ask Τί θα θέλατε να πιείς με αυτό; - print Σας ευχαριστώ για την παραγγελία. - print Το φαγητό και τα ποτά σας θα είναι έτοιμα αμέσως! - ``` + ``` + print Καλωσήλθατε στο εστιατόριο της Hedy! + print Σήμερα σερβίρουμε πίτσα ή λαζάνια. + food is ask Τί θα θέλατε να φάτε; + print Καλή επιλογή! Αυτό το φαγητό είναι το αγαπημένο μου! + topping is ask Θα θέλατε κρέας ή λαχανικά μαζί με αυτό; + print food with topping ετοιμάζεται! + drinks is ask Τί θα θέλατε να πιείς με αυτό; + print Σας ευχαριστώ για την παραγγελία. + print Το φαγητό και τα ποτά σας θα είναι έτοιμα αμέσως! + ``` story_text_2: "### Exercise\nCan you make this code more elaborate? For example by adding drinks to the order? Or...?\n" 3: story_text: | @@ -1437,6 +1437,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: default_save_name: random_command name: "{random}" @@ -1471,6 +1475,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" repeat_command: default_save_name: repeat_command levels: diff --git a/content/adventures/eo.yaml b/content/adventures/eo.yaml index 4d68de91740..16d351a6742 100644 --- a/content/adventures/eo.yaml +++ b/content/adventures/eo.yaml @@ -776,6 +776,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" description: introducing is command default_save_name: is_command add_remove_command: @@ -959,6 +963,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" default_save_name: in_command diff --git a/content/adventures/es.yaml b/content/adventures/es.yaml index 6d1e4a0d9f0..59704ccde82 100644 --- a/content/adventures/es.yaml +++ b/content/adventures/es.yaml @@ -1409,6 +1409,10 @@ adventures: example_code_2: "```\nnombre = {ask} '¿Cómo te llamas?'\n{if} nombre == 'Hedy'\n {print} '¡Cómo molas!'\n```\n" story_text_3: "También puedes comparar si algo *no* es igual a otra cosa usando `!=` tal que así:\n" example_code_3: "```\nnombre = {ask} '¿Cómo te llamas?'\n{if} nombre != 'Hedy'\n {print} 'Tu no eres Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" add_remove_command: levels: 3: @@ -1448,6 +1452,10 @@ adventures: start_code: "nombre {is} {ask} '¿Cómo te llamas?'\n{if} nombre {is} Hedy\n {print} 'Bienvenido Hedy'\n {print} '¡Puedes jugar en tu ordenador!'\n" example_code: "```\nnombre {is} {ask} '¿Cómo te llamas?'\n{if} nombre {is} Hedy\n {print} 'Bienvenido Hedy'\n {print} '¡Puedes jugar en tu ordenador!'\n```\n" story_text: "## Si… Sino…\nHas aprendido a repetir un bloque de líneas de código tras un comando `{repeat}`.\nAhora puedes usar la sangría para hacer bloques tras un comando {if} o {else}.\nComprueba el código de ejemplo.\n\n### Ejercicio\nAñade un comando {else} al código de ejemplo. Haz un bloque de línea usando sangría. Haz esto empezando cada línea con 4 espacios.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" repeat_command: name: "{repeat}" description: comando repetir diff --git a/content/adventures/et.yaml b/content/adventures/et.yaml index 49ba999b178..be3d30025ef 100644 --- a/content/adventures/et.yaml +++ b/content/adventures/et.yaml @@ -719,6 +719,10 @@ adventures: story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" story_text: "We are going to learn more new items. You might know them already from mathematics, the `<` and `>`.\nThe `<` checks if the first number is smaller than the second, for example age `<` 12 checks if age is smaller than 12.\nIf you want to check if the first number is smaller or equal to the second, you can use `<=`, for example age `<=` 11.\nThe `>` checks if the first number is bigger than the second, for example points `>` 10 checks if points is larger than 10.\nIf you want to check if the first number is bigger or equal to the second, you can use `>=`, for example points `>=` 11.\nYou use these comparisons in an `{if}`, like this:\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command add_remove_command: @@ -842,6 +846,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/fa.yaml b/content/adventures/fa.yaml index ba81c619809..ce73c06c974 100644 --- a/content/adventures/fa.yaml +++ b/content/adventures/fa.yaml @@ -854,6 +854,10 @@ adventures: story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -898,6 +902,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" name: "{if} & {else}" description: Introducing the if command default_save_name: if_command diff --git a/content/adventures/fi.yaml b/content/adventures/fi.yaml index 02fbf658391..723ced204a7 100644 --- a/content/adventures/fi.yaml +++ b/content/adventures/fi.yaml @@ -721,6 +721,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" quotation_marks: levels: 12: @@ -917,6 +921,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/fr.yaml b/content/adventures/fr.yaml index 6ea91a167ec..b72597a1821 100644 --- a/content/adventures/fr.yaml +++ b/content/adventures/fr.yaml @@ -2524,6 +2524,10 @@ adventures: example_code_2: "```\nnom = {ask} \"Quel est ton nom ?\"\n{if} nom == \"Hedy\"\n {print} \"Tu es cool !\"\n```\n" story_text_3: "Tu peux aussi comparer si une chose n'est *pas* égale à une autre chose en utilisant `!=` comme ceci :\n" example_code_3: "```\nnom = {ask} \"Quel est ton nom ?\"\n{if} nom != \"Hedy\"\n {print} \"Tu n'es pas Hedy\"\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: Introduction de la commande `{at} {random}` @@ -2555,6 +2559,10 @@ adventures: start_code: "nom {is} {ask} \"Quel est ton nom ?\"\n{if} nom {is} Hedy\n {print} \"Bienvenue Hedy\"\n {print} \"Tu peux jouer sur ton ordinateur !\"\n" example_code: "```\nnom {is} {ask} \"Quel est ton nom ?\"\n{if} nom {is} Hedy\n {print} \"Bienvenue Hedy\"\n {print} \"Tu peux jouer sur ton ordinateur !\"\n```\n" story_text: "## Si… Sinon…\nTu as appris à répéter un bloc de ligne de code après une commande `{repeat}`.\nMaintenant, tu peux aussi utiliser l'indentation pour faire un bloc après une commande `{if}` ou `{else}`.\nRegarde l'exemple de code.\n\n### Exercice\nAjoute une commande `{else}` à l'exemple de code. Fait un bloc de lignes en utilisant l'indentation. Tu le fais en commençant chaque ligne avec 4 espaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" name: "{if} & {else}" description: Introduction à la commande `{if}` default_save_name: if_command diff --git a/content/adventures/fy.yaml b/content/adventures/fy.yaml index 15c153044ac..3e8907f6ee0 100644 --- a/content/adventures/fy.yaml +++ b/content/adventures/fy.yaml @@ -348,12 +348,12 @@ adventures: example_code_2: |2 - {print} He hears a sound - animals {is} 🐿, 🦔, 🦇, 🦉 - animal {is} {ask} What do you think it is? - {add} animal {to_list} animals - {print} it was a animals {at} {random} - ``` + {print} He hears a sound + animals {is} 🐿, 🦔, 🦇, 🦉 + animal {is} {ask} What do you think it is? + {add} animal {to_list} animals + {print} it was a animals {at} {random} + ``` story_text_3: | This is an example of the `{remove}` command in your story example_code_3: | @@ -995,6 +995,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" levels: @@ -1048,6 +1052,10 @@ adventures: example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" name: "{if} & {else}" description: Introducing the if command default_save_name: if_command diff --git a/content/adventures/he.yaml b/content/adventures/he.yaml index 0f660011fd9..ec632843d0d 100644 --- a/content/adventures/he.yaml +++ b/content/adventures/he.yaml @@ -685,6 +685,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command @@ -828,6 +832,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/hi.yaml b/content/adventures/hi.yaml index 11a01169dcc..fcc2f67d15f 100644 --- a/content/adventures/hi.yaml +++ b/content/adventures/hi.yaml @@ -828,7 +828,7 @@ adventures: Can you make the code so that you get the total score for 8 dice? To do that, you have to cut and paste some lines of the code. example_code_2: |2 - Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7! + Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7! start_code: "{print} 'What will the die indicate this time?'" 15: story_text: | @@ -925,9 +925,9 @@ adventures: 3: story_text: |2 - In this level we can enter lists and choose things from them. - You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`. - For example, you can let the computer pick from rock, paper and scissors. + In this level we can enter lists and choose things from them. + You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`. + For example, you can let the computer pick from rock, paper and scissors. start_code: '{print} Welcome to your own rock scissors paper!' example_code: | ``` @@ -1230,20 +1230,20 @@ adventures: example_code: |2 - You can make a simple restaurant code, like this: - ``` - {print} 'Welcome to Hedys restaurant' - {print} 'Here is our menu:' - {print} 'Our main courses are pizza, lasagne, or spaghetti' - main = {ask} 'Which main course would you like?' - price = 0 - {if} main {is} pizza price = 10 - {if} main {is} lasagne price = 12 - {if} main {is} spaghetti price = 8 - {print} 'You have ordered ' main - {print} 'That will be ' price ' dollars, please' - {print} 'Thank you, enjoy your meal!' - ``` + You can make a simple restaurant code, like this: + ``` + {print} 'Welcome to Hedys restaurant' + {print} 'Here is our menu:' + {print} 'Our main courses are pizza, lasagne, or spaghetti' + main = {ask} 'Which main course would you like?' + price = 0 + {if} main {is} pizza price = 10 + {if} main {is} lasagne price = 12 + {if} main {is} spaghetti price = 8 + {print} 'You have ordered ' main + {print} 'That will be ' price ' dollars, please' + {print} 'Thank you, enjoy your meal!' + ``` start_code: "# place your code here" 7: story_text: | @@ -1314,7 +1314,7 @@ adventures: ``` story_text_2: |2 - Of course, you could also order for multiple people! + Of course, you could also order for multiple people! example_code_2: | ``` courses = appetizer, main course, dessert @@ -2245,6 +2245,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: description: introducing at random command default_save_name: random_command @@ -2301,6 +2305,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/hu.yaml b/content/adventures/hu.yaml index ecf264783e7..a0335954c64 100644 --- a/content/adventures/hu.yaml +++ b/content/adventures/hu.yaml @@ -269,8 +269,8 @@ adventures: start_code: print A te történeted story_text: |2 - Hozzáadhatsz valami véletlenszerűt is a történetéhez. Bármilyen szörnyet, állatot vagy - más akadályt. + Hozzáadhatsz valami véletlenszerűt is a történetéhez. Bármilyen szörnyet, állatot vagy + más akadályt. example_code: | ``` @@ -282,12 +282,12 @@ adventures: example_code_2: |2 - {print} He hears a sound - animals {is} 🐿, 🦔, 🦇, 🦉 - animal {is} {ask} What do you think it is? - {add} animal {to_list} animals - {print} it was a animals {at} {random} - ``` + {print} He hears a sound + animals {is} 🐿, 🦔, 🦇, 🦉 + animal {is} {ask} What do you think it is? + {add} animal {to_list} animals + {print} it was a animals {at} {random} + ``` story_text_3: | This is an example of the `{remove}` command in your story example_code_3: | @@ -497,12 +497,12 @@ adventures: start_code: print 'Ki mosogat?' story_text: |2- - Az idézőjelek segítségével szebbé teheted a mosogatás tervezését. - Ezúttal a minta kód nem egészen teljes. - Ki tudod egészíteni a kódot a helyes parancsok vagy karakterek pontokra történő - beírásával? - Minden üres helyet egy paranccsal kell kicserélni. - Tipp: Ne felejtsd el az idézőjeleket. + Az idézőjelek segítségével szebbé teheted a mosogatás tervezését. + Ezúttal a minta kód nem egészen teljes. + Ki tudod egészíteni a kódot a helyes parancsok vagy karakterek pontokra történő + beírásával? + Minden üres helyet egy paranccsal kell kicserélni. + Tipp: Ne felejtsd el az idézőjeleket. example_code: |- ``` emberek is anya, apa, Edit, Gizi @@ -983,21 +983,21 @@ adventures: example_code: |2- - ``` - print Üdvözöljük a Hedy's Random étteremben! - print Az egyetlen étterem amely véletlenszerűen kiválasztja az étkezést és annak árát az Ön számára! - eloetelek is saláta, leves, sajt - foetel is pizza, kelbimbó, spagetti - desszertek is brownie, fagylalt, francia sajtok - ital is kóla, sör, víz - arak is 1000 forint, 2000 forint, 3000 forint - print A következővel indul: eloetelek at random - print Ezután kiszolgáljuk: foetel at random - print És desszertként: desszertek at random - print Igyon egy italt - print Ez lesz: arak at random - print Köszönöm és élvezze az étkezést! - ``` + ``` + print Üdvözöljük a Hedy's Random étteremben! + print Az egyetlen étterem amely véletlenszerűen kiválasztja az étkezést és annak árát az Ön számára! + eloetelek is saláta, leves, sajt + foetel is pizza, kelbimbó, spagetti + desszertek is brownie, fagylalt, francia sajtok + ital is kóla, sör, víz + arak is 1000 forint, 2000 forint, 3000 forint + print A következővel indul: eloetelek at random + print Ezután kiszolgáljuk: foetel at random + print És desszertként: desszertek at random + print Igyon egy italt + print Ez lesz: arak at random + print Köszönöm és élvezze az étkezést! + ``` story_text_2: "Does your costumer have any allergies or do they dislike certain dishes? Then you can use the `{remove}`command to remove it from your menu.\n" example_code_2: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nallergies {is} {ask} Are you allergic to any falvors?\n{remove} allergies {from} flavors\n{print} You get a flavors {at} {random} milkshake\n```\n" 15: @@ -1228,15 +1228,15 @@ adventures: example_code: |2- - ``` - print 'Hedy a jósnő vagyok!' - print 'Feltehetsz 3 kérdést.' - valasz is igen, nem, talán - repeat 3 times - kerdes is ask 'Mit akarsz tudni?' - print kerdes - print 'A kristálygömböm azt mondja...' valasz at random - ``` + ``` + print 'Hedy a jósnő vagyok!' + print 'Feltehetsz 3 kérdést.' + valasz is igen, nem, talán + repeat 3 times + kerdes is ask 'Mit akarsz tudni?' + print kerdes + print 'A kristálygömböm azt mondja...' valasz at random + ``` 7: story_text: |- Az 6. szinten a `repeat` paranccsal beállíthatod, hogy a gép egyszerre több jóslatot mondjon. @@ -1255,13 +1255,13 @@ adventures: print 'Feltehetsz 3 kérdést!' example_code: |2- - ``` - print 'Hedy, a jósnő vagyok!' - print 'Feltehetsz 3 kérdést!' - repeat 3 times kerdes is ask 'Mit akarsz tudni?' - valasz is igen, nem, talan - repeat 3 times print 'A kristálygömböm azt mondja... ' valasz at random - ``` + ``` + print 'Hedy, a jósnő vagyok!' + print 'Feltehetsz 3 kérdést!' + repeat 3 times kerdes is ask 'Mit akarsz tudni?' + valasz is igen, nem, talan + repeat 3 times print 'A kristálygömböm azt mondja... ' valasz at random + ``` 6: story_text: |- A 5. szinten jövendőmondóként használhatod a matematikát előrejelzéseidben. Ez lehetővé teszi (buta) képletek kitalálását a jövő kiszámításához. @@ -1272,30 +1272,30 @@ adventures: print 'Meg tudom jósolni, hány gyermeked lesz, ha felnősz!' example_code: |2- - ``` - print 'Hedy, a jósnő vagyok!' - print 'Meg tudom jósolni, hány gyermeked lesz, ha felnősz!' - kor is ask 'Hány éves vagy?' - testver is ask 'Hány testvéred van?' - magassag is ask 'Hány cm magas vagy?' - gyerekek is magassag / kor - gyerekek is gyerekek - testver - print 'Neked ...' - print gyerekek ' gyereked lesz!' - ``` - - Ha az előző példa nem volt elég buta a számodra, akkor nézd meg ezt! - - ``` - print 'Hedy vagyok a buta jósnő!' - print 'Meg tudom jósolni, milyen okos vagy!' - foci is ask '1-10-es skálás mennyire szereted a focit?' - banan is ask 'Hány banánt ettél a héten?' - higienia is ask 'Hányszor mostad meg a kezed ma?' - eredmeny is banan + higienia - eredmeny is eredmeny * foci - print 'Te ' eredmeny ' százalék okos vagy.' - ``` + ``` + print 'Hedy, a jósnő vagyok!' + print 'Meg tudom jósolni, hány gyermeked lesz, ha felnősz!' + kor is ask 'Hány éves vagy?' + testver is ask 'Hány testvéred van?' + magassag is ask 'Hány cm magas vagy?' + gyerekek is magassag / kor + gyerekek is gyerekek - testver + print 'Neked ...' + print gyerekek ' gyereked lesz!' + ``` + + Ha az előző példa nem volt elég buta a számodra, akkor nézd meg ezt! + + ``` + print 'Hedy vagyok a buta jósnő!' + print 'Meg tudom jósolni, milyen okos vagy!' + foci is ask '1-10-es skálás mennyire szereted a focit?' + banan is ask 'Hány banánt ettél a héten?' + higienia is ask 'Hányszor mostad meg a kezed ma?' + eredmeny is banan + higienia + eredmeny is eredmeny * foci + print 'Te ' eredmeny ' százalék okos vagy.' + ``` 5: story_text: |- A 4. szinten megtanulod (titokban) az esélyeket a magad javára billenteni a jósnő használata során! @@ -1313,12 +1313,12 @@ adventures: start_code: print 'Szia, Hedy, a jósnő vagyok!' example_code: |2- - ``` - print 'Szia, Hedy, a jósnő vagyok' - print 'Meg tudom jósolni, nyersz-e a lottón holnap!' - szemely is ask 'Ki vagy te?' - if szemely is Hedy print 'Bizonyosan nyerni fogsz!' else print 'Balszerencse! Valaki más nyer!' - ``` + ``` + print 'Szia, Hedy, a jósnő vagyok' + print 'Meg tudom jósolni, nyersz-e a lottón holnap!' + szemely is ask 'Ki vagy te?' + if szemely is Hedy print 'Bizonyosan nyerni fogsz!' else print 'Balszerencse! Valaki más nyer!' + ``` 4: start_code: print 'Szia, Hedy, a jósnő vagyok!' story_text: |- @@ -1332,13 +1332,13 @@ adventures: example_code: |2- - ``` - print 'Szia, Hedy, a jósnő vagyok!' - kerdes is ask 'Mit akarsz tudni?' - print 'Ez az amit tudni akarsz: ' kerdes - valasz is igen, nem, talan - print 'A kristálygömböm azt mondja... ' valasz at random - ``` + ``` + print 'Szia, Hedy, a jósnő vagyok!' + kerdes is ask 'Mit akarsz tudni?' + print 'Ez az amit tudni akarsz: ' kerdes + valasz is igen, nem, talan + print 'A kristálygömböm azt mondja... ' valasz at random + ``` 3: start_code: print Szia Hedy a jósnő vagyok! story_text: |- @@ -1402,26 +1402,26 @@ adventures: start_code: print 'Szabadulj ki a kísértetházból' example_code: |2- - ``` - print 'Szabadulj ki a kísértetházból' - jatekos is elo - ajtok is 1, 2, 3 - szornyek is vampir, zombi, oriaspok - for i in range 1 to 3 - if jatekos is elo - helyesajto is ajtok at random - print 'Három ajtó van előtted...' - valasztottajto is ask 'Melyik ajtót választod?' - if valasztottajto is helyesajto - print 'Itt nincs szörny!' - else - print 'Megevett a(z) ' szornyek at random - jatekos is halott - else - print 'GAME OVER' - if jatekos is elo - print 'Nagyszerű! Túlélted!' - ``` + ``` + print 'Szabadulj ki a kísértetházból' + jatekos is elo + ajtok is 1, 2, 3 + szornyek is vampir, zombi, oriaspok + for i in range 1 to 3 + if jatekos is elo + helyesajto is ajtok at random + print 'Három ajtó van előtted...' + valasztottajto is ask 'Melyik ajtót választod?' + if valasztottajto is helyesajto + print 'Itt nincs szörny!' + else + print 'Megevett a(z) ' szornyek at random + jatekos is halott + else + print 'GAME OVER' + if jatekos is elo + print 'Nagyszerű! Túlélted!' + ``` 5: story_text: |- Eddig a szintig a kísértetjárta ház játék mindig arra kérte a játékost, hogy válasszon egy ajtót, de ahogy észrevettétek, nem igazán kellett helyesen válaszolniuk. @@ -1709,6 +1709,10 @@ adventures: example_code_3: "```\nanswer {is} {ask} '2 + 2 = ?'\n_ _ _ 4 _ 'Great job!'\n_ _ 'No 2 + 2 = 4'\n```\n" example_code: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'\n```\n" start_code: "name {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" default_save_name: if_command name: "{if} & {else}" description: Introducing the if command @@ -1880,6 +1884,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" add_remove_command: name: "{add} {to} & {remove} {from}" description: introducing add to and remove from diff --git a/content/adventures/id.yaml b/content/adventures/id.yaml index 15b0ad4788b..247cd95d169 100644 --- a/content/adventures/id.yaml +++ b/content/adventures/id.yaml @@ -1675,6 +1675,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" description: Introducing the if command quotation_marks: levels: @@ -1800,6 +1804,10 @@ adventures: story_text_2: "From this level on, if you want to compare exactly, you can use two equal signs. This is what most programming languages do:\n" example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command diff --git a/content/adventures/it.yaml b/content/adventures/it.yaml index 409ea8e2497..5f2c70272c7 100644 --- a/content/adventures/it.yaml +++ b/content/adventures/it.yaml @@ -1064,7 +1064,7 @@ adventures: Can you make the code so that you get the total score for 8 dice? To do that, you have to cut and paste some lines of the code. example_code_2: |2 - Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7! + Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7! start_code: "{print} 'What will the die indicate this time?'" 7: story_text: | @@ -1139,9 +1139,9 @@ adventures: 3: story_text: |2 - In this level we can enter lists and choose things from them. - You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`. - For example, you can let the computer pick from rock, paper and scissors. + In this level we can enter lists and choose things from them. + You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`. + For example, you can let the computer pick from rock, paper and scissors. example_code: | ``` @@ -1498,20 +1498,20 @@ adventures: example_code: |2 - You can make a simple restaurant code, like this: - ``` - {print} 'Welcome to Hedys restaurant' - {print} 'Here is our menu:' - {print} 'Our main courses are pizza, lasagne, or spaghetti' - main = {ask} 'Which main course would you like?' - price = 0 - {if} main {is} pizza price = 10 - {if} main {is} lasagne price = 12 - {if} main {is} spaghetti price = 8 - {print} 'You have ordered ' main - {print} 'That will be ' price ' dollars, please' - {print} 'Thank you, enjoy your meal!' - ``` + You can make a simple restaurant code, like this: + ``` + {print} 'Welcome to Hedys restaurant' + {print} 'Here is our menu:' + {print} 'Our main courses are pizza, lasagne, or spaghetti' + main = {ask} 'Which main course would you like?' + price = 0 + {if} main {is} pizza price = 10 + {if} main {is} lasagne price = 12 + {if} main {is} spaghetti price = 8 + {print} 'You have ordered ' main + {print} 'That will be ' price ' dollars, please' + {print} 'Thank you, enjoy your meal!' + ``` start_code: "# scrivi il tuo codice qui" 7: story_text: | @@ -1582,7 +1582,7 @@ adventures: ``` story_text_2: |2 - Of course, you could also order for multiple people! + Of course, you could also order for multiple people! example_code_2: | ``` courses = appetizer, main course, dessert @@ -1695,16 +1695,16 @@ adventures: In this level you can use a variable and the `{at} {random}` command to really let Hedy choose an answer for you. Check out this code for instance: example_code: |2 - In this example the player can {ask} Hedy a yes-no question and Hedy will pick a random answer for you. - ``` - {print} I’m Hedy the fortune teller! - question {is} {ask} What do you want to know? - {print} This is what you want to know: question - answers {is} yes, no, maybe - {print} My crystal ball says... - {sleep} 2 - {print} answers {at} {random} - ``` + In this example the player can {ask} Hedy a yes-no question and Hedy will pick a random answer for you. + ``` + {print} I’m Hedy the fortune teller! + question {is} {ask} What do you want to know? + {print} This is what you want to know: question + answers {is} yes, no, maybe + {print} My crystal ball says... + {sleep} 2 + {print} answers {at} {random} + ``` story_text_2: | Now, Hedy can only answer yes, no or maybe. Can you give Hedy more answer options, like 'definitely' or '{ask} again'. start_code: "# scrivi il tuo codice qui" @@ -2661,6 +2661,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command @@ -2775,6 +2779,10 @@ adventures: story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animals`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command.\nFirstly, finish our example by filling in your favorite animal in the blanks. Then make at least 3 of these codes yourself. Pick a variable, and set the variable with the {is} command. Then use it with a {print} command, just like we did.\n" example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n" start_code: "name {is} Hedy\nage {is} 15\n{print} name is age years old" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command diff --git a/content/adventures/ja.yaml b/content/adventures/ja.yaml index 9e35142265d..16e987654ac 100644 --- a/content/adventures/ja.yaml +++ b/content/adventures/ja.yaml @@ -699,6 +699,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command @@ -808,6 +812,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/kmr.yaml b/content/adventures/kmr.yaml index 03ca2fba302..2b5175a9165 100644 --- a/content/adventures/kmr.yaml +++ b/content/adventures/kmr.yaml @@ -699,6 +699,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command @@ -840,6 +844,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/ko.yaml b/content/adventures/ko.yaml index b758fc1b345..d5a0141ae89 100644 --- a/content/adventures/ko.yaml +++ b/content/adventures/ko.yaml @@ -733,6 +733,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "다음과 같이 `!=`을 사용하여 어떤 것이 다른 것과 *not* 같은지 비교할 수도 있습니다:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: levels: 3: @@ -789,6 +793,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\n`{repeat}` 명령 후 코드 행 블록을 반복하는 법을 배웠습니다.\n이제 들여쓰기를 사용하여 {if} 또는 {else} 명령 뒤에 블록을 만들 수도 있습니다.\n예제 코드를 확인해 보세요.\n\n### 연습 문제\n예제 코드에 {else} 명령어를 추가합니다. 들여쓰기를 사용하여 선 블록을 만듭니다. 이것은 각 선을 4개의 공백으로 시작하여 수행합니다.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: levels: 5: diff --git a/content/adventures/nb_NO.yaml b/content/adventures/nb_NO.yaml index e6e37b0fcc9..ea897c1136c 100644 --- a/content/adventures/nb_NO.yaml +++ b/content/adventures/nb_NO.yaml @@ -728,6 +728,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: description: introducing at random command default_save_name: random_command @@ -784,6 +788,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/nl.yaml b/content/adventures/nl.yaml index f823012338a..f5cf17e5942 100644 --- a/content/adventures/nl.yaml +++ b/content/adventures/nl.yaml @@ -1640,13 +1640,13 @@ adventures: 13: story_text: |2 - ### Opdracht 1 - Maak het sommenoefenprogramma nu extra moeilijk. De speler moet twee sommen achter elkaar goed hebben. Maak de codes op de streepjes af. + ### Opdracht 1 + Maak het sommenoefenprogramma nu extra moeilijk. De speler moet twee sommen achter elkaar goed hebben. Maak de codes op de streepjes af. - ### Opdracht 2 (extra) - Sommen hebben soms meerdere goede antwoorden. Je kan 10 bijvoorbeeld delen door 5, maar ook door 2. Dus de som 'Door welk getal kan je 10 delen?' heeft twee goede antwoorden. - Verzin zelf een som met meerdere antwoorden, vraag de speler om een antwoord en reken ze beide goed met `{or}`. - Begin opnieuw met een leeg programmeerveld en programmeer het helemaal zelf. + ### Opdracht 2 (extra) + Sommen hebben soms meerdere goede antwoorden. Je kan 10 bijvoorbeeld delen door 5, maar ook door 2. Dus de som 'Door welk getal kan je 10 delen?' heeft twee goede antwoorden. + Verzin zelf een som met meerdere antwoorden, vraag de speler om een antwoord en reken ze beide goed met `{or}`. + Begin opnieuw met een leeg programmeerveld en programmeer het helemaal zelf. example_code: | ``` @@ -2915,6 +2915,7 @@ adventures: start_code: | naam = Hedy antwoord = 20 + 4 + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" 14: start_code: |- leeftijd = {ask} 'Hoe oud ben jij?' diff --git a/content/adventures/pa_PK.yaml b/content/adventures/pa_PK.yaml index ec024f03bc0..a13c556d52e 100644 --- a/content/adventures/pa_PK.yaml +++ b/content/adventures/pa_PK.yaml @@ -702,6 +702,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -823,6 +827,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" quotation_marks: name: "'quotation marks'" description: Introduction quotation marks diff --git a/content/adventures/pl.yaml b/content/adventures/pl.yaml index b21f75d6adc..a038f836588 100644 --- a/content/adventures/pl.yaml +++ b/content/adventures/pl.yaml @@ -792,6 +792,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" in_command: name: "{in}" description: Introducing the in command @@ -914,6 +918,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" quotation_marks: name: "'quotation marks'" description: Introduction quotation marks diff --git a/content/adventures/pt_BR.yaml b/content/adventures/pt_BR.yaml index a48395739da..ebf8807d968 100644 --- a/content/adventures/pt_BR.yaml +++ b/content/adventures/pt_BR.yaml @@ -919,6 +919,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -975,6 +979,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/pt_PT.yaml b/content/adventures/pt_PT.yaml index fd901bbf6f2..51af0371307 100644 --- a/content/adventures/pt_PT.yaml +++ b/content/adventures/pt_PT.yaml @@ -271,32 +271,32 @@ adventures: example_code: |2 - ``` - animais is coruja, cobra, raposa - print Agora consegue ouvir o barulho de uma animais at random - ``` + ``` + animais is coruja, cobra, raposa + print Agora consegue ouvir o barulho de uma animais at random + ``` story_text_2: | The command `{add}` can also come in handy in your story. For example example_code_2: |2 - {print} He hears a sound - animals {is} 🐿, 🦔, 🦇, 🦉 - animal {is} {ask} What do you think it is? - {add} animal {to_list} animals - {print} it was a animals {at} {random} - ``` + {print} He hears a sound + animals {is} 🐿, 🦔, 🦇, 🦉 + animal {is} {ask} What do you think it is? + {add} animal {to_list} animals + {print} it was a animals {at} {random} + ``` story_text_3: | This is an example of the `{remove}` command in your story example_code_3: |2 - ``` - {print} His backpack got way too heavy. - {print} Inside were a bottle of water, a flashlight and a brick. - bag {is} water, flashlight, brick - dump {is} {ask} Which item should he dump? - {remove} dump {from} bag - ``` + ``` + {print} His backpack got way too heavy. + {print} Inside were a bottle of water, a flashlight and a brick. + bag {is} water, flashlight, brick + dump {is} {ask} Which item should he dump? + {remove} dump {from} bag + ``` start_code: "print 'A tua história será escrita aqui!'" 12: story_text: "In this level you can use the quotation marks to save multiple words in a variable.\n" @@ -750,20 +750,20 @@ adventures: example_code: |2 - You can make a simple restaurant code, like this: - ``` - {print} 'Welcome to Hedys restaurant' - {print} 'Here is our menu:' - {print} 'Our main courses are pizza, lasagne, or spaghetti' - main = {ask} 'Which main course would you like?' - price = 0 - {if} main {is} pizza price = 10 - {if} main {is} lasagne price = 12 - {if} main {is} spaghetti price = 8 - {print} 'You have ordered ' main - {print} 'That will be ' price ' dollars, please' - {print} 'Thank you, enjoy your meal!' - ``` + You can make a simple restaurant code, like this: + ``` + {print} 'Welcome to Hedys restaurant' + {print} 'Here is our menu:' + {print} 'Our main courses are pizza, lasagne, or spaghetti' + main = {ask} 'Which main course would you like?' + price = 0 + {if} main {is} pizza price = 10 + {if} main {is} lasagne price = 12 + {if} main {is} spaghetti price = 8 + {print} 'You have ordered ' main + {print} 'That will be ' price ' dollars, please' + {print} 'Thank you, enjoy your meal!' + ``` start_code: "# place your code here" 7: story_text: | @@ -834,7 +834,7 @@ adventures: ``` story_text_2: |2 - Of course, you could also order for multiple people! + Of course, you could also order for multiple people! example_code_2: | ``` courses = appetizer, main course, dessert @@ -1332,6 +1332,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" ask_command: name: "{ask}" description: Introduction ask command @@ -1490,6 +1494,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" name: "{if} & {else}" description: Introducing the if command in_command: diff --git a/content/adventures/ro.yaml b/content/adventures/ro.yaml index 246c0b3ad13..9bb69a0e834 100644 --- a/content/adventures/ro.yaml +++ b/content/adventures/ro.yaml @@ -852,6 +852,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -899,6 +903,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/ru.yaml b/content/adventures/ru.yaml index 70a3f968e89..3fe60c8c058 100644 --- a/content/adventures/ru.yaml +++ b/content/adventures/ru.yaml @@ -921,6 +921,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -964,6 +968,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" repeat_command: name: "{repeat}" description: repeat command diff --git a/content/adventures/sq.yaml b/content/adventures/sq.yaml index a4411e45565..b2955c16775 100644 --- a/content/adventures/sq.yaml +++ b/content/adventures/sq.yaml @@ -795,6 +795,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -842,6 +846,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/sr.yaml b/content/adventures/sr.yaml index 8bc93f3e774..6803691381e 100644 --- a/content/adventures/sr.yaml +++ b/content/adventures/sr.yaml @@ -707,6 +707,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" for_command: name: "{for}" description: for command @@ -810,6 +814,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" add_remove_command: name: "{add} {to} & {remove} {from}" description: introducing add to and remove from diff --git a/content/adventures/sv.yaml b/content/adventures/sv.yaml index e11a3ced661..dda66333b42 100644 --- a/content/adventures/sv.yaml +++ b/content/adventures/sv.yaml @@ -738,6 +738,10 @@ adventures: start_code: "namn {is} {ask} 'Vad heter du?'\n{if} namn {is} Hedy\n {print} 'Välkommen Hedy'\n {print} 'Du kan spela på din dator!'\n" example_code: "```\nnamn {is} {ask} 'Vad heter du?'\n{if} namn {is} Hedy\n {print} 'Välkommen Hedy'\n {print} 'Du kan spela på din dator!'\n```\n" story_text: "## Om … Annars …\nDu har lärt dig att upprepa ett block med kodrader efter ett `{repeat}`-kommando.\nNu kan du också använda indrag för att skapa block efter ett {if}- eller {else}-kommando.\nKolla in exempelkoden.\n\n### Övning\nLägg till ett {else}-kommando till exempelkoden. Gör ett kodblock med indrag. Det gör du genom att börja varje rad med fyra mellanslag.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" quotation_marks: levels: 12: @@ -852,6 +856,10 @@ adventures: example_code_2: "```\nnamn = {ask} 'Vad heter du?'\n{if} namn == 'Hedy'\n {print} 'Du är cool!'\n```\n" story_text_3: "Du kan också jämföra om något *inte* är lika med något annat med hjälp av `!=` så här:\n" example_code_3: "```\nnamn = {ask} 'Vad heter du?'\n{if} namn != 'Hedy'\n {print} 'Du är inte Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" add_remove_command: name: "{add} {to} & {remove} {from}" description: introduktion till lägg till och ta bort diff --git a/content/adventures/sw.yaml b/content/adventures/sw.yaml index f7ebd030ce0..6763142765d 100644 --- a/content/adventures/sw.yaml +++ b/content/adventures/sw.yaml @@ -165,12 +165,12 @@ adventures: example_code_2: |2 - {print} He hears a sound - animals {is} 🐿, 🦔, 🦇, 🦉 - animal {is} {ask} What do you think it is? - {add} animal {to_list} animals - {print} it was a animals {at} {random} - ``` + {print} He hears a sound + animals {is} 🐿, 🦔, 🦇, 🦉 + animal {is} {ask} What do you think it is? + {add} animal {to_list} animals + {print} it was a animals {at} {random} + ``` story_text_3: | This is an example of the `{remove}` command in your story example_code_3: | @@ -783,6 +783,10 @@ adventures: story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animals`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command.\nFirstly, finish our example by filling in your favorite animal in the blanks. Then make at least 3 of these codes yourself. Pick a variable, and set the variable with the {is} command. Then use it with a {print} command, just like we did.\n" example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n" start_code: "name {is} Hedy\nage {is} 15\n{print} name is age years old" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" description: introducing is command default_save_name: is_command sleep_command: @@ -893,6 +897,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/te.yaml b/content/adventures/te.yaml index 5494fe15123..1e7e6bcf066 100644 --- a/content/adventures/te.yaml +++ b/content/adventures/te.yaml @@ -700,6 +700,10 @@ adventures: story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animals`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command.\nFirstly, finish our example by filling in your favorite animal in the blanks. Then make at least 3 of these codes yourself. Pick a variable, and set the variable with the {is} command. Then use it with a {print} command, just like we did.\n" example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n" start_code: "name {is} Hedy\nage {is} 15\n{print} name is age years old" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" description: introducing is command default_save_name: is_command sleep_command: @@ -832,6 +836,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/th.yaml b/content/adventures/th.yaml index cbfcb9527b1..388c06cf9d6 100644 --- a/content/adventures/th.yaml +++ b/content/adventures/th.yaml @@ -718,6 +718,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command @@ -828,6 +832,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" quotation_marks: name: "'quotation marks'" description: Introduction quotation marks diff --git a/content/adventures/tl.yaml b/content/adventures/tl.yaml index bfc3aafb38d..e9ef709d30a 100644 --- a/content/adventures/tl.yaml +++ b/content/adventures/tl.yaml @@ -809,6 +809,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" add_remove_command: name: "{add} {to} & {remove} {from}" description: introducing add to and remove from @@ -848,6 +852,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" repeat_command_2: name: "{repeat} 2" description: repeat command 2 diff --git a/content/adventures/tn.yaml b/content/adventures/tn.yaml index be9a888560c..01a2f349735 100644 --- a/content/adventures/tn.yaml +++ b/content/adventures/tn.yaml @@ -678,6 +678,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" name: "{if} & {else}" description: Introducing the if command default_save_name: if_command @@ -784,6 +788,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command diff --git a/content/adventures/tr.yaml b/content/adventures/tr.yaml index 5c28c899cc4..18b4ae1005c 100644 --- a/content/adventures/tr.yaml +++ b/content/adventures/tr.yaml @@ -2803,6 +2803,10 @@ adventures: example_code_2: "```\nisim = {ask} 'Senin adın ne?'\n{if} isim == 'Hedy'\n {print} 'Çok havalısın!'\n```\n" story_text_3: "Bir şeyin başka bir şeye eşit *olmadığını* `!=` kullanarak karşılaştırabilirsiniz:\n" example_code_3: "```\nisim = {ask} 'Senin adın ne?'\n{if} isim != 'Hedy'\n {print} 'Sen Hedy değilsin.'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: şurada rastgele komutuna giriş @@ -2859,6 +2863,10 @@ adventures: start_code: "isim {is} {ask} 'Senin adın ne?'\n{if} isim {is} Hedy\n {print} 'Hoşgeldin Hedy'\n {print} 'Bilgisayarında oynayabilirsin!'\n" example_code: "```\nisim {is} {ask} 'Senin adın ne?'\n{if} isim {is} Hedy\n {print} 'Hoşgeldin Hedy'\n {print} 'Bilgisayarında oynayabilirsin!'\n```\n" story_text: "## eğer... değilse...\nBir `{repeat}` komutundan sonra bir kod satır bloğunu tekrarlamayı öğrendiniz.\nŞimdi artık bir {if} veya {else} komutundan sonra bloklar oluşturmak için girinti de kullanabilirsiniz.\nÖrnek koda göz atın.\n\n### Alıştırma\nÖrnek koda bir {else} komutu ekleyin. Girinti kullanarak bir satır bloğu oluşturun. Bunu her satırı 4 boşlukla başlatarak yaparsınız.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: içinde komutuna giriş diff --git a/content/adventures/uk.yaml b/content/adventures/uk.yaml index 982e05b02bf..187367dd3d4 100644 --- a/content/adventures/uk.yaml +++ b/content/adventures/uk.yaml @@ -840,6 +840,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -883,6 +887,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/ur.yaml b/content/adventures/ur.yaml index 6f02454c67a..6f1f168e670 100644 --- a/content/adventures/ur.yaml +++ b/content/adventures/ur.yaml @@ -754,6 +754,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -797,6 +801,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" quotation_marks: name: "'quotation marks'" description: Introduction quotation marks diff --git a/content/adventures/vi.yaml b/content/adventures/vi.yaml index 803d44d108a..47f69255ba6 100644 --- a/content/adventures/vi.yaml +++ b/content/adventures/vi.yaml @@ -786,6 +786,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" random_command: name: "{random}" description: introducing at random command @@ -833,6 +837,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/zh_Hans.yaml b/content/adventures/zh_Hans.yaml index 88d3d14867c..cd5e1880a28 100644 --- a/content/adventures/zh_Hans.yaml +++ b/content/adventures/zh_Hans.yaml @@ -604,20 +604,20 @@ adventures: example_code: |2 - 你可以写一段简单的餐厅代码,像这样: - ``` - {print} '欢迎来到海蒂餐厅' - {print} '这是我们的菜单:' - {print} '我们的主菜有披萨、千层面、意面' - 主菜 = {ask} '您想要哪道主菜?' - 价格 = 0 - {if} 主菜 {is} 披萨 价格 = 10 - {if} 主菜 {is} 千层面 价格 = 12 - {if} 主菜 {is} 意面 价格 = 8 - {print} '您点了' 主菜 - {print} '请付' 价格 '元' - {print} '谢谢,祝您用餐愉快!' - ``` + 你可以写一段简单的餐厅代码,像这样: + ``` + {print} '欢迎来到海蒂餐厅' + {print} '这是我们的菜单:' + {print} '我们的主菜有披萨、千层面、意面' + 主菜 = {ask} '您想要哪道主菜?' + 价格 = 0 + {if} 主菜 {is} 披萨 价格 = 10 + {if} 主菜 {is} 千层面 价格 = 12 + {if} 主菜 {is} 意面 价格 = 8 + {print} '您点了' 主菜 + {print} '请付' 价格 '元' + {print} '谢谢,祝您用餐愉快!' + ``` start_code: "# 在这里写你的代码" 7: story_text: | @@ -823,16 +823,16 @@ adventures: 在这一级,你可以用变量和`{at} {random}`命令来真正让海蒂为你选择一个答案。比如看看这段代码: example_code: |2 - 在这个例子里,玩家可以向海蒂{ask}一个是非题,然后海蒂会任意选择一个答案。 - ``` - {print} 我是海蒂半仙! - 问题 {is} {ask} 你想算什么? - {print} 你想算:问题 - 回答 {is} 是, 否, 有可能 - {print} 让我算一卦…… - {sleep} 2 - {print} 回答 {at} {random} - ``` + 在这个例子里,玩家可以向海蒂{ask}一个是非题,然后海蒂会任意选择一个答案。 + ``` + {print} 我是海蒂半仙! + 问题 {is} {ask} 你想算什么? + {print} 你想算:问题 + 回答 {is} 是, 否, 有可能 + {print} 让我算一卦…… + {sleep} 2 + {print} 回答 {at} {random} + ``` story_text_2: | ### 练习 现在海蒂只能回答是、否和有可能。你能否给海蒂更多回答选项,比如“肯定”或者“换个问题”。 @@ -1480,6 +1480,10 @@ adventures: example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n" story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" add_remove_command: name: "{add} {to} & {remove} {from}" description: introducing add to and remove from @@ -1519,6 +1523,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" in_command: name: "{in}" description: Introducing the in command diff --git a/content/adventures/zh_Hant.yaml b/content/adventures/zh_Hant.yaml index 31fa2a43115..5f9c54fc748 100644 --- a/content/adventures/zh_Hant.yaml +++ b/content/adventures/zh_Hant.yaml @@ -718,6 +718,10 @@ adventures: story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animals`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command.\nFirstly, finish our example by filling in your favorite animal in the blanks. Then make at least 3 of these codes yourself. Pick a variable, and set the variable with the {is} command. Then use it with a {print} command, just like we did.\n" example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n" start_code: "name {is} Hedy\nage {is} 15\n{print} name is age years old" + 6: + story_text: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n" + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + start_code: "name = Hedy\nanswer = 20 + 4\n" name: "{is}" description: introducing is command default_save_name: is_command @@ -744,6 +748,10 @@ adventures: start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n" example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n" + 9: + start_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" + story_text: "In this level you can also put an {if} command inside another {if} command.\n" + example_code: "continue = ask 'Do you want to continue?'\nif continue = yes\n sure = ask 'Are you sure?'\n if sure is yes\n print 'We will continue'\n else\n print 'You are not sure'\nelse\n print 'You do not want to continue'\n" name: "{if} & {else}" description: Introducing the if command default_save_name: if_command diff --git a/content/slides/tr.yaml b/content/slides/tr.yaml index f690fab0e5d..7fc25c12ae6 100644 --- a/content/slides/tr.yaml +++ b/content/slides/tr.yaml @@ -119,6 +119,9 @@ levels: header: İçinden kaldırmak text: "`{add}` `{to}` komutunun tersi `{remove}` `{from}` komutudur.\nBu komut listeden bir öğeyi kaldırır.\n" editor: "\n" + 9: + text: "Enjoy the adventures in level 3!\n" + header: Let's get to work! 4: 1: header: 4. seviyeye hoş geldiniz