diff --git a/.github/workflows/deploy-to-alpha-manually.yml b/.github/workflows/deploy-to-alpha-manually.yml new file mode 100644 index 00000000000..c26612fe86f --- /dev/null +++ b/.github/workflows/deploy-to-alpha-manually.yml @@ -0,0 +1,13 @@ +name: Manually deploy to Alpha +on: + workflow_dispatch: {} +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: akhileshns/heroku-deploy@v3.13.15 # This is the action + with: + heroku_api_key: ${{secrets.HEROKU_API_KEY}} + heroku_app_name: hedy-alpha + heroku_email: felienne@gmail.com diff --git a/.github/workflows/deploy-to-alpha.yml b/.github/workflows/deploy-to-alpha.yml index e2fec069a6c..86b1c22c4fd 100644 --- a/.github/workflows/deploy-to-alpha.yml +++ b/.github/workflows/deploy-to-alpha.yml @@ -1,5 +1,6 @@ name: Automatically deploy to Alpha on: + # Run this AFTER the unit test job finishes workflow_run: # Must be the same as in unittests.yml, cypresstests.yml diff --git a/.github/workflows/deploy-to-prod.yml b/.github/workflows/deploy-to-prod.yml index 0bb076c8c51..feda7b28525 100644 --- a/.github/workflows/deploy-to-prod.yml +++ b/.github/workflows/deploy-to-prod.yml @@ -17,3 +17,9 @@ jobs: heroku_api_key: ${{secrets.HEROKU_API_KEY}} heroku_app_name: hedy-beta heroku_email: felienne@gmail.com + - name: "Send message on Discord" + if: success() + uses: discord-actions/message@v2 + with: + webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} + message: "Deployed to hedy.org" diff --git a/.mergify.yml b/.mergify.yml index 17396206d2b..9bd74703153 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -8,6 +8,11 @@ queue_rules: commit_message_template: |- {{ title }} (#{{number}}) {{ body }} + {# Add co-author information at the end of the squash merge commit message #} + {% for co_author in co_authors | unique -%} + Co-Authored-By: {{ co_author.name }} <{{ co_author.email }}> + {% endfor -%} + {# `Co-Authored-By` lines must the be last ones for GitHub to recognize them #} pull_request_rules: - name: Automatic squash merge on approval @@ -21,4 +26,4 @@ pull_request_rules: comment: message: Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)). queue: - name: default_queue \ No newline at end of file + name: default_queue diff --git a/app.py b/app.py index ac9f26d4f11..5349d57dffa 100644 --- a/app.py +++ b/app.py @@ -1940,12 +1940,15 @@ def view_program(user, id, language="en"): result['username']) else None code = result['code'] - if result.get("lang") != "en" and result.get("lang") in ALL_KEYWORD_LANGUAGES.keys(): + # if the snippet has blanks, it'll fail in the translation process + # so we just dont translate it if it has any + has_blanks = hedy.location_of_first_blank(code) > 0 + if not has_blanks and result.get("lang") != "en" and result.get("lang") in ALL_KEYWORD_LANGUAGES.keys(): code = hedy_translation.translate_keywords(code, from_lang=result.get( 'lang'), to_lang="en", level=int(result.get('level', 1))) # If the keyword language is non-English -> parse again to guarantee # completely localized keywords - if g.keyword_lang != "en": + if not has_blanks and g.keyword_lang != "en": code = hedy_translation.translate_keywords( code, from_lang="en", @@ -1977,9 +1980,40 @@ def view_program(user, id, language="en"): arguments_dict['program_timestamp'] = utils.localized_date_format(result['date']) else: arguments_dict['show_edit_button'] = True - - arguments_dict['show_checkbox'] = is_teacher(user)\ + is_students_teacher = is_teacher(user)\ and result['username'] in DATABASE.get_teacher_students(user['username']) + arguments_dict['is_students_teacher'] = is_students_teacher + + classes = DATABASE.get_student_classes_ids(result['username']) + next_classmate_adventure_id = None + if classes: + class_id = classes[0] + class_ = DATABASE.get_class(class_id) or {} + students = sorted(class_.get('students', [])) + index = students.index(result['username']) + for student in students[index + 1:]: + id = f"{student}-{result['adventure_name']}-{result['level']}" + next_classmate_adventure = DATABASE.student_adventure_by_id(id) or {} + next_classmate_adventure_id = next_classmate_adventure.get('program_id') + if next_classmate_adventure_id: + break + + student_customizations = DATABASE.get_student_class_customizations(result['username']) + adventure_index = 0 + adventures_for_this_level = student_customizations.get('sorted_adventures', {}).get(str(result['level']), []) + for index, adventure in enumerate(adventures_for_this_level): + if adventure['name'] == result['adventure_name']: + adventure_index = index + break + + next_program_id = None + for i in range(adventure_index + 1, len(adventures_for_this_level)): + next_adventure = adventures_for_this_level[i] + next_adventure_id = f"{result['username']}-{next_adventure['name']}-{result['level']}" + next_student_adventure = DATABASE.student_adventure_by_id(next_adventure_id) or {} + next_program_id = next_student_adventure.get('program_id') + if next_program_id: + break return render_template("view-program-page.html", blur_button_available=True, @@ -1989,6 +2023,9 @@ def view_program(user, id, language="en"): level=int(result['level']), code=code), is_teacher=user['is_teacher'], + class_id=student_customizations['id'], + next_program_id=next_program_id, + next_classmate_program_id=next_classmate_adventure_id, **arguments_dict) diff --git a/content/adventures/ca.yaml b/content/adventures/ca.yaml index a8fcc4960ef..389ed4a2541 100644 --- a/content/adventures/ca.yaml +++ b/content/adventures/ca.yaml @@ -794,7 +794,7 @@ adventures: ``` clear_command: name: '{clear}' - default_save_name: clear_command + default_save_name: comanda_netejar description: comanda {clear} levels: 4: @@ -1711,26 +1711,26 @@ adventures: Check it out! example_code: | ``` - prices = ['1 million dollars', 'an apple pie', 'nothing'] - your_price = prices[{random}] - {print} 'You win ' your_price - {if} your_price == '1 million dollars' : + prizes = ['1 million dollars', 'an apple pie', 'nothing'] + your_prize = prizes[{random}] + {print} 'You win ' your_prize + {if} your_prize == '1 million dollars' : {print} 'Yeah! You are rich!' - {elif} your_price == 'an apple pie' : + {elif} your_prize == 'an apple pie' : {print} 'Lovely, an apple pie!' {else}: {print} 'Better luck next time..' ``` for_command: name: '{for}' - default_save_name: for - description: for command + default_save_name: per + description: comanda {for} levels: 10: story_text: |- - ## For - In this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements. - `{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces. + ## Per + En aquest nivell aprendrem una nova comanda anomenada `{for}`. Amb `{for}` pots fer una llista i utilitzar-ne tots els elements. + `{for}` crea un bloc, com `{repeat}` i `{if}`, de manera que totes les línies del bloc han de començar amb 4 espais. example_code: | ``` animals = dog, cat, blobfish @@ -1780,9 +1780,9 @@ adventures: {print} (i) ``` fortune: - name: Fortune teller - default_save_name: Fortune Teller - description: Let Hedy predict the future + name: L'endeví + default_save_name: L'endeví + description: Deixa que Hedy predigui el futur levels: 1: story_text: | @@ -1794,17 +1794,16 @@ adventures: Like this: example_code: | ``` - {print} Hello, I'm Hedy the fortune teller! - {ask} Who are you? - {print} Let me take a look in my crystal ball - {print} I see... I see... - {echo} Your name is + _ Hola, soc Hedy l'endevina + _ Qui ets tu? + _ Deixa'm donar una ullada a la meva bola de cristall + _ Veig... Veig... + _ El teu nom és ``` story_text_2: | - ### Exercise - Hedy now only tells you your name. Can you expand the code so that Hedy can predict more things about you? - Obviously, Hedy isn't a very good fortune teller yet, as she can only repeat the answers that were given by the players! - Take a look in level 2 to improve your fortune teller. + ### Exercici + Copia el codi d'exemple a la teva pantalla d'entrada i omple els espais en blanc per fer funcionar el teu codi. + **Extra** Canvia el codi i deixa que l'endevina no només predigui el teu nom, sinó també la teva edat, el teu esport preferit o alguna altra cosa sobre tu mateix. 3: story_text: | In the previous levels you've created your first fortune telling machine, but Hedy couldn't really predict anything, only {echo}. @@ -1831,26 +1830,37 @@ adventures: Go back to the previous level and copy your fortune teller code. Make the code work in this level by adding quotation marks in the right spots. example_code: | ``` - _ Add the quotation marks to this code _ - {print} Im Hedy the fortune teller! - question {is} {ask} What do you want to know? - {print} This is your question: question - answers {is} yes, no, maybe - {print} My crystal ball says... + _ Agrega les cometes a aquest codi _ + {print} Sóc Hedy l'endevina! + pregunta {is} {ask} Què vols saber? + {print} Aquesta és la teva pregunta: · · pregunta + resposta {is} si, no, potser + {print} La meva bola de cristall diu... {sleep} 2 - {print} answers {at} {random} + {print} resposta {at} {random} ``` 5: story_text: | - In this level you'll learn to (secretly) tip the odds in your favor, when using the fortune teller! - By using `{if}` and `{else}` you can make sure that you will always get a good fotune, while other people might not. - Check out this example to find out how. + ### Exercici + En aquest codi d'exemple veuràs com fer un programa endeví que et permeti inclinar les possibilitats a favor teu. Aquest programa que fa trames sempre et diu que guanyaràs la loteria, però els teus amics mai guanyaran. + + Usa això per fer el teu propi programa, sigues creatiu! Per exemple, pots crear un codi que predigui que: + * el teu equip esportiu preferit guanyarà a tots els seus contrincants! + * s'elegirà la teva pel·lícula preferida com a pel·lícula de la nit! + * guanyaràs entrades pel teu espectacle preferit! + * ets el més bonic/a de tots/es, com el mirall màgic de la Blancaneu. + Deixa que la teva imaginació faci el treball! + + El teu programa ha de tenir almenys 10 línies de codi i ha de contenir com a mínim una comanda '{if}' i '{else}'. example_code: | ``` - {print} 'Im Hedy the fortune teller!' - {print} 'I can predict if youll win the lottery tomorrow!' + friends {is} Jordan, Lucy, Dave + {print} 'I can predict if you will win the lottery tomorrow!' person {is} {ask} 'Who are you?' - {if} person {is} Hedy {print} 'You will definitely win!🤩' {else} {print} 'Bad luck! Someone else will win!😭' + good_answer {is} Hurray! You win!, You will definitely win!, We have a winner! + bad_answer {is} Bad luck! Try again!, Another person will win, You lose! + {if} person {in} friends {print} good_answer {at} {random} + {else} {print} bad_answer {at} {random} ``` 6: story_text: | @@ -1888,23 +1898,22 @@ adventures: ``` 7: story_text: | - In this level you can use the `{repeat}` command to make your machine tell multiple fortunes at once. + ### Exercici + Finalitza aquest programa que et diu si el teu enamorat t'estima o no. example_code: | ``` - {print} 'Im Hedy the fortune teller!' - {print} 'You can ask 3 questions!' - {repeat} 3 {times} question = {ask} 'What do you want to know?' - answer = yes, no, maybe - {repeat} 3 {times} {print} 'My crystal ball says... ' answer {at} {random} + {print} 'Tinc una flor amb pètals màgics' + {print} "Si agafes els pètals de la flor, et dirà si el teu amor també t'estima" + quantitat = {ask} 'Quants pètals vols agafar?' + options = t'estima, no t'estima + _ _ _ _ options {at} {random} ``` 8: story_text: | - In the previous levels you've learned how to use `{repeat}` to make the fortune teller answer 3 questions in a row, but we had a problem with printing the questions. - Now that problem is solved, because of the new way of using the `{repeat}` command. - In the next example you can have your fortune teller ask 3 questions and also print them! + En el pròxim exemple pots fre que l'endeví et faci diverses preguntes i també que les imprimeixi! - ### Exercise - Can you fill in the `{repeat}` command correctly on the blanks? + ### Exercici + Pots posar les comandes correctes als forats en blanc? example_code: | ``` {print} 'I am Hedy the fortune teller!' diff --git a/content/adventures/da.yaml b/content/adventures/da.yaml index 273226e1075..f700f5f9dbd 100644 --- a/content/adventures/da.yaml +++ b/content/adventures/da.yaml @@ -162,7 +162,17 @@ adventures: ``` 9: story_text: | - In this level you can use nesting to put `{if}`, `{repeat}` or `{for}` commands inside other `{if}`, `{repeat}` or `{for}` commands. This gives you many options and really helps you to make your story interactive. + In this level you can use `{if}` and `{repeat}` commands inside other `{if}` and `{repeat}` commands. + This gives you many options and really helps you to make your story interactive. + + ### Exercise 1 + Finish the code so the `{if}` works correctly. + + ### Exercise 2 + Add an `{if}` and `{else}` for the part of the story where Robin goes home too. + + ### Exercise 3 + Go back to your level 8 story and use at least two `{if}`s inside another `{if}`. example_code: | ``` {print} 'Robin is walking downtown' @@ -180,7 +190,11 @@ adventures: ``` 10: story_text: | - In this level you can use the {for} command in your story. In this way you could easily program the children's book 'brown bear, brown bear, what do you see'. + In this level you can use the {for} command in your story. In this way you could easily program the children's book 'Brown bear, Brown bear, what do you see'. + + ### Exercise + + Look at the story if you do not know it, and make sure it is printed as in the book. example_code: | ``` animals = red bird, black sheep, green frog, yellow duck, little child @@ -195,7 +209,7 @@ adventures: {print} 'I see all the animals looking at me!' ``` 12: - story_text: In this level you can use the quotation marks to save multiple words in a variable. + story_text: "In this level quotation marks will be needed to save multiple words in a variable.\n\n### Exercise\n\nFind a story from a previous level, any level is ok. Now make sure quotation marks are added in the right places." example_code: | ``` name = 'The Queen of England' @@ -203,10 +217,13 @@ adventures: ``` 13: story_text: | - By using the `{and}` and `{or}` commands, you can shorten your stories. For example, check out the dragon story. + By using the `{and}` and `{or}` commands, you can make your stories more versatile. You can ask two questions and respond to the combination of answers. - ### Exercise - Can you make your own adventure minigame like this? + ### Exercise 1 + Look at the example code and finish it. Then add at least 2 more `{if}` codes with `{and}` or `{or}`. + + ### Exercise 2 + Find a story from a previous level, and add one `{and}` or `{or}`. example_code: | ``` sword = 'lost' @@ -283,7 +300,7 @@ adventures: 3: story_text: | ## Add to - You can add items to the list with the `{add} {to_list}` command. To add an item to a list you can simply type: `{add} penguin {to} animals` or you can use the `{ask}` command like in the example code. + You can add items to the list with the `{add} {to_list}` command. To add an item to a list you can simply type: `{add} penguin {to_list} animals` or you can use the `{ask}` command like in the example code. example_code: | ``` animals {is} dog, cat, kangaroo @@ -387,8 +404,8 @@ adventures: Copy your code from the previous tab and make the variables interactive by using `{ask}` commands. example_code_2: | ``` - favorite_animal {is} {ask} What is your favorite animal? - {print} I like favorite_animal + yndlingsdyr {is} {ask} Hvad er dit yndlingsdyr? + {print} Jeg elsker yndlingsdyr ``` 18: story_text: The final change we will need to make to get Python code is changing `{ask}` into `{input}`. @@ -451,7 +468,7 @@ adventures: blackjack_2: name: Blackjack 2 default_save_name: Blackjack_2 - description: Blackjack part 2 + description: Blackjack del 2 levels: 17: story_text: | @@ -508,7 +525,7 @@ adventures: blackjack_3: name: Blackjack 3 default_save_name: Blackjack_3 - description: Blackjack part 3 + description: Blackjack del 3 levels: 17: story_text: | @@ -553,7 +570,7 @@ adventures: blackjack_4: name: Blackjack 4 default_save_name: Blackjack_4 - description: Blackjack part 4 + description: Blackjack del 4 levels: 17: story_text: | @@ -626,13 +643,13 @@ adventures: {else} _ 9: story_text: | - In a previous level you've created a calculator, in this level you can expand that code so it asks multiple questions. + In a previous level, you've created a calculator. In this level, you can expand that code so it asks multiple questions. ### Exercise 1 Can you finish line 10 to get the code to work? ### Exercise 2 - Give the player feedback when the enter an answer, like `{print} 'Correct!'` or `{print} 'Wrong! The correct answer is ' correct_answer`. + Give the player feedback when they enter an answer, like `{print} 'Correct!'` or `{print} 'Wrong! The correct answer is ' correct_answer`. example_code: | ``` score = 0 @@ -737,17 +754,11 @@ adventures: {for} i {in} {range} 1 {to} 4 grade = {ask} _ total = total + _ - return _ / 4 + {return} _ / 4 mean_grade = {call} _ {print} 'Your mean grade is ' mean_grade ``` - - total = total + _ - return _ / 4 - - mean_grade = {call} _ - {print} 'Your mean grade is ' mean_grade 15: story_text: | You can add the `{while}` loop to the calculator game you've learned to make in a previous level. @@ -775,9 +786,9 @@ adventures: {print} 'You win!' ``` calculator_2: - name: Calculator 2 - default_save_name: Calculator 2 - description: Calculator 2 + name: Lommeregner 2 + default_save_name: Lommeregner 2 + description: Lommeregner 2 levels: 14: story_text: | @@ -956,7 +967,7 @@ adventures: story_text: |- ### Exercise Debug this code. Good luck! - example_code: | + example_code: |- **Warning! This code needs to be debugged!** ``` {print} 'Welcome to Manicures and Pedicures by Hedy' @@ -1265,18 +1276,18 @@ adventures: ``` animals = ['pig', 'dog', 'cow'] sounds = ['oink', 'woof', 'moo'] - for i in range 1 to 3 + {for} i {in} {range} 1 {to} 3 animal = animals[i] sound = sounds[i] - print 'Old MacDonald had a farm' - print 'E I E I O!' - print 'and on that farm he had a ' animal - print 'E I E I O!' - print 'with a ' sound sound ' here' - print 'and a ' sound sound ' there' - print 'here a ' sound - print 'there a ' sound - print 'everywhere a ' sound sound + {print} 'Old MacDonald had a farm' + {print} 'E I E I O!' + {print} 'and on that farm he had a ' animal + {print} 'E I E I O!' + {print} 'with a ' sound sound ' here' + {print} 'and a ' sound sound ' there' + {print} 'here a ' sound + {print} 'there a ' sound + {print} 'everywhere a ' sound sound ``` default: name: Introduktion @@ -1594,7 +1605,7 @@ adventures: dishes: name: Opvask? default_save_name: Opvask - description: Brug computeren til at se hvem der tager opvasken + description: Brug computeren til at bestemme hvem der tager opvasken levels: 3: story_text: | @@ -1738,6 +1749,7 @@ adventures: story_text: |- In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers. We do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at. + Try the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements. example_code: | ``` @@ -1773,7 +1785,7 @@ adventures: Then you probably know that they can't really predict your future, but it's still fun to play! In the upcoming levels you can learn how to create your own fortune telling machine! - In level 1 you can start off easy by letting Hedy introduce herself as a fortune teller and let her {echo} the players' answers. + In level 1 you can start off easy by letting Hedy introduce herself as a fortune teller and let her `{echo}` the players' answers. Like this: example_code: | ``` @@ -1790,7 +1802,7 @@ adventures: Take a look in level 2 to improve your fortune teller. 3: story_text: | - In the previous levels you've created your first fortune telling machine, but Hedy couldn't really predict anything, only {echo}. + In the previous levels you've created your first fortune telling machine, but Hedy couldn't really predict anything, only `{echo}`. 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: | ``` @@ -1915,8 +1927,11 @@ adventures: {sleep} ``` 12: - story_text: | - In this level you can make your fortunes multiple words. Can you add more different fortunes to the list? + story_text: |- + From level 12 on, you will also have to use quotation marks in lists, before and after each item. + + ### Exercise + Add two predictions to the list example_code: | ``` fortunes = 'you will slip on a banana peel', _ @@ -1926,9 +1941,9 @@ adventures: {print} fortunes {at} {random} ``` functions: - name: functions - default_save_name: functions - description: functions + name: funktioner + default_save_name: funktioner + description: funktioner levels: 12: story_text: | @@ -1970,17 +1985,19 @@ adventures: An **argument** is a variable that is used within a function. It is not used outside the function. For example in this code we've programmed the first verse of the song 'My Bonnie is over the ocean'. - In this example code the argument `place` is used. Place is a variable that is only used in the function, so an argument. - To use `place` we have programmed the line `define song with place`. - When the function is called, computer will replace the argument `place`, with the piece of text after `call song with`. + In this example code the argument 'place' is used. Place is a variable that is only used in the function, so an argument. + To use 'place' we have placed `{with} place` after `{define} song`. + When the function is called, the computer will replace the argument 'place', with the piece of text after `{call} song {with}`. ### Exercise The next verse of this song goes: + ```not_hedy_code Last night as I lay on my pillow Last night as I lay on my bed Last night as I lay on my pillow I dreamed that my Bonnie is dead + ``` Can you program this verse in the same way as the example? example_code: | @@ -2256,7 +2273,9 @@ adventures: ``` story_text_2: | ### Exercise - Can you finish the scary story? Or make up your own haunted house story? + Copy the example code to your input screen by clicking the yellow button. + Now finish the story by adding at least 5 lines of code. + Remember to start each line of codes with a `{print}` command. 2: story_text: | In this haunted house you can choose your monsters with emojis. Of course you could also use words. @@ -2305,7 +2324,12 @@ adventures: 4: story_text: | In this level you learn how to use quotation marks in your games. + + ### Exercise Can you make your Haunted House level 4 proof? + + ### Exercise 2 + Go back to the previous level and copy your haunted house code. Make the code work in this level by adding quotation marks in the right spots. example_code: | ``` {print} _ Escape from the haunted house! _ @@ -2344,7 +2368,9 @@ adventures: ### Exercise Now it's very hard to win this game, can you make it easier to win? - For example by only having 1 wrong door and 2 correct doors instead of 1 correct door and 2 wrong ones? + Change your code so it only has one wrong door and two correct doors instead of one correct door and two wrong ones? + Tip: This means changing the variable correct_door into wrong_door, and switching the `{if}` and `{else}` code. + And of course you may also change the story and make it your own. Change the monsters or make it a happy game show where you get a gift! example_code: | ``` {print} 'Escape from the Haunted House!' @@ -2601,20 +2627,20 @@ adventures: story_text_2: | ### Exercise Time to make your own variables! - In the example code we made an example of the variable `favorite_animal`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command. - Firstly, finish our example by filling in your favorite animal on the blank. 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. + In the example code we made an example of the variable `favorite_animal`. In line 1 the variable is set, and in line 2 we used the variable in a `{print}` command. + Firstly, finish our example by filling in your favorite animal on the blank. 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. example_code_2: | ``` - favorite_animal {is} _ - {print} I like favorite_animal + yndlingsdyr {is} _ + {print} Jeg kan godt lide yndlingsdyr ``` 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: example_code: | ``` - name = Hedy - answer = 20 + 4 + navn = Hedy + svar = 20 + 4 ``` 14: story_text: | @@ -2661,7 +2687,8 @@ adventures: Make your own program to practice your vocabulary in a new language. ### Exercise - Can you make this program for a different language? Or can you add more words to the French one? + Make the code longer by adding at least 3 more words for the player to learn. + **Extra** Of course, you can choose to use a different language than French. You can change to code to any language you'd like to learn. example_code: | ``` {print} 'Learn French!' @@ -2847,7 +2874,7 @@ adventures: _ ``` 6: - story_text: "Instead of playing notes, you can also play numbers now. Simply type `{play} 1` for the lowest note, `{play} 70` for the highest note, or anything in between.\n\n### Exercise\n This calls for musical maths! Try out the example code a couple of times with different starting numbers. \nThen, see if you can compose a song using the numbers.\n" + story_text: "Instead of playing notes, you can also play numbers now. Simply type `{play} 1` for the lowest note, `{play} 70` for the highest note, or anything in between.\n\n### Exercise\nThis calls for musical maths! Try out the example code a couple of times with different starting numbers.\nThen, see if you can compose a song using the numbers.\n" example_code: | ``` number = {ask} 'Say a starting number between 1 and 67' @@ -3133,7 +3160,9 @@ adventures: ``` story_text_2: | ### Exercise - Can you make the parrot ask a different question? Fill in the blanks in the example! + Copy the example code to your input screen by clicking on the yellow button. + Make the parrot ask a different question. Fill in the blanks in the example! + **Extra** You can also let the parrot ask multiple questions. Type in some more lines of code beneath your own code. example_code_2: | ``` {print} Im Hedy the parrot @@ -3173,7 +3202,8 @@ adventures: 4: story_text: | In this level we have to use quotation marks with the commands `{ask}` and `{print}`. - Can you complete the code by adding quotation marks? + ### Exercise + Complete the code by filling in quotation marks on the blanks. example_code: | ``` words {is} squawk, Hedy @@ -3186,6 +3216,8 @@ adventures: 5: story_text: | Reward your parrot if it says the correct word! + + ### Exercise Finish the code by filling in the 4 missing commands. example_code: | ``` @@ -3226,7 +3258,7 @@ adventures: Finish this code by filling in the blanks! example_code: | ``` - _ calculate_budget with wish, money, allowance + _ calculate_budget {with} wish, money, allowance to_save = wish - money weeks = to_save / allowance {if} wish _ money @@ -3240,7 +3272,7 @@ adventures: wish = {ask} 'How much money do you need?' allowance = {ask} 'How much pocket money do you get each week?' - {call} calculate_budget with _, _, _ + {call} _ ``` pressit: name: Key presses @@ -3303,7 +3335,7 @@ adventures: ``` print_command: name: '{print}' - default_save_name: print + default_save_name: skriv description: Introduction print command levels: 1: @@ -3473,7 +3505,8 @@ adventures: 16: story_text: |- We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels. - We use square brackets to point out a place in a list. For example: `friends[1]` is the first name on the list of friends, as you can see in the first part of the example code. The second part of the example code shows you that we can also match 2 lists using the variable i. + We use square brackets to point out a place in a list. For example: `friends[1]` is the first name on the list of friends, as you can see in the first part of the example code. + The second part of the example code shows you that we can also match 2 lists using the variable i. example_code: | ``` friends = ['Ahmed', 'Ben', 'Cayden'] @@ -3588,18 +3621,22 @@ adventures: In level 1 you can make your own virtual restaurant and take your guests' orders. story_text_2: | ### Exercise - Can you think of more lines to add to your restaurant code? For example, can you {ask} the guests what they'd like to drink, tell them the price, or wish them a pleasant meal? + Copy the example code into your input screen by clicking the yellow button. + Firstly, fill in the correct command on the blanks to make to code work properly. + Then add at least 4 more lines of code to the restaurant program. + Ask the costumer what they would like to drink and ask if they want to pay with cash or card. + Lastly, think of a nice way to say goodbye to your costumer. example_code_2: | ``` {print} Welcome to Hedy's restaurant 🍟 - {ask} What would you like to order? + _ What would you like to order? {echo} So you would like to order - {print} Thanks you for your order! + {print} Thank you for your order! {print} It's on its way! ``` 2: story_text: | - In level 2 you could expand your restaurant by using variables. In level 1 Hedy could only {echo} the order once and only remember the last thing that was ordered. + In level 2 you could expand your restaurant by using variables. In level 1 Hedy could only `{echo}` the order once and only remember the last thing that was ordered. Now you can use variables and Hedy can remember both the food and the toppings! example_code: | ``` @@ -3612,14 +3649,20 @@ adventures: ``` story_text_2: | ### Exercise - Can you make this code more elaborate? For example by adding drinks to the order? Or...? + Copy your own restaurant code from to previous level to the input screen below. + Fix the code by replacing the `{ask}` and `{echo}` commands and using variables, like you've learned in this level. + + Now that your code is working again, it's time to add something more. + Look at the last line of the example code: `{print} food with topping is on its way!` + In this single line 2 variables have been used to create a summary of the order. + Now add your own summary of the food and drinks ordered by the customer. + + **Extra** Now that you've learned how to use variables, you can use as many variables in one line as you'd like. Can you add more variables to your code, like eat in or take-away, cash or card, with or without a straw etc.? 3: story_text: | Having trouble to decide what you wanna have for dinner? You can let Hedy choose for you! Simply add lists of your favorite (or least favorite) meals and Hedy can randomly choose your dinner. You can also have a bit of fun, by letting Hedy choose the price for your dinner as well! What will you get? - ### Exercise - Can you make your own version of the random restaurant? example_code: | ``` {print} Welcome to Hedy's Random Restaurant! @@ -3637,7 +3680,10 @@ adventures: {print} Thank you and enjoy your meal! ``` 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. + ### Exercise + Now make your own version of the random restaurant. + Make a list of starts, mains, desserts, drinks and prices yourself. + Then use `{print}` and `{at} {random}` commands to tell the costumer what will be on their menu tonight. example_code_2: | ``` {print} Mystery milkshake @@ -3653,7 +3699,7 @@ adventures: example_code: | ``` _ Add the quotation marks to this code _ - {print} Welcome to Hedys restaurant! + {print} Welcome to Restaurant Chez Hedy! {print} Today we are serving pizza or lasagna. food {is} {ask} What would you like to eat? {print} Great choice! The food is my favorite! @@ -3766,7 +3812,10 @@ adventures: ``` 10: story_text: | - In this level you'll learn how to easily {ask} your guests' orders in a short code. + In this level you'll learn how to easily ask orders for different courses. + + ### Exercise 1 + Finish the code with an `{ask}` on the blanks such that the customer is asked what they want to eat for each course. example_code: | ``` courses = appetizer, main course, dessert @@ -3778,7 +3827,7 @@ adventures: ### Exercise Of course, you could also order for multiple people! Can you add the correct amount of indentation before each line to make the code work properly? - TIP: some lines don't need any indentation at all. + Tip: some lines don't need any indentation at all. example_code_2: | ``` _ courses = appetizer, main course, dessert @@ -3833,8 +3882,15 @@ adventures: ``` 13: story_text: | - In this level we can use the new commands to upgrade our restaurant. - We use `{and}` to see {if} two things are both the case. + In this level you will learn new commands to extend your code even further. + + ### Exercise 1 + Place a `{and}` and a `{or}` in the logical place in the program. + + ### Exercise 2 + Expand your restaurant with at least one more `{and}` and one `{or}`. + For example, create a special discount coupon that only applies to pizza, or give your customer a free drink + with fries and pancakes. Or something completely different of course! example_code: | ``` price = 10 @@ -3890,6 +3946,9 @@ adventures: 2: story_text: | In this level you can practise using the variables, so that you can make the rock, paper, scissors game in the next level! + ### Exercise + Finish the code by filling in the **variable** on the blank. + This game is not very interactive, but no worries! In the next tab you'll learn how to use variables with the `{ask}` command to make your game interactive! example_code: | ``` _ {is} {ask} rock, paper, or scissors? @@ -3951,9 +4010,9 @@ adventures: example_code: | ``` choices = rock, paper, scissors - your_choice = {ask} 'What do you choose?' + your_choice {is} {ask} 'What do you choose?' {print} 'You choose ' your_choice - computer_choice = choices {at} {random} + computer_choice {is} choices {at} {random} {print} 'The computer chooses ' computer_choice {if} computer_choice {is} your_choice {print} 'Tie' @@ -3977,7 +4036,10 @@ adventures: ``` 13: story_text: | - With the `{and}` command you can shorten your rock, paper, scissors code! Check out the example code below and try to finish it. + With the `{and}` command you can shorten your rock, paper, scissors code! Check out the example code. + + ### Exercise + Finish the code such that a winner is always decided on. Run your code a few times to verify there is always a winner printed. example_code: | ``` options = 'rock', 'paper', 'scissors' @@ -4041,8 +4103,11 @@ adventures: In this adventure you can create your own super spy code. Encode a message that only the right agent can decipher. If the enemy tries to crack the code, they will get some false info to waste their time. - ### Exercise - Make your own secret code for your superspy. Can you make it consist of even more variables? + ### Exercise 1 + Make your own secret code for your superspy and return both parts only to the real spy. + + ### Exercise 2 + Add a third component to the code, like a piece of clothing or an object. example_code: | ``` name = {ask} 'What is your name?' @@ -4271,8 +4336,11 @@ adventures: ``` 8: story_text: | - In a previous level you've programmed the song 'Bottles of beer'. You made one verse and then had to copy the verses 99 times. In this level you can repeat the song 99 times, just by adding one simple line! - Do you know which line of code to add on the blanks? + In a previous level you've programmed the song 'Bottles of beer'. But without the `{repeat}` command, you had to copy the verses many times. + In this level you can repeat the song 99 times, just by adding one simple line! + + ### Exercise + Add the right command on the blanks and indent the code correctly. example_code: | ``` verse = 99 @@ -4285,54 +4353,15 @@ adventures: ``` 10: story_text: | - In this level you can easily make the childrens' song 'Five little monkeys'. Can you make the last chorus? - You can also make the whole baby shark song (including all the other sharks in the family) in only 6 lines, using `{for}`! - Or you can make Old MacDonald with all the different animals. - + With `{for}` you can print make the whole baby shark song (including all the other sharks in the family) in only 6 lines! - - ### Exercises - Can you add the last verse of the monkeys on the bed, when there is only one monkey left? - - Can you make the baby shark code even shorter by using a `{repeat}` command? - - Can you add new animals to Old MacDonald's farm? + ### Exercise 1 + Can you make the baby shark code even shorter by using a `{for}` command? Finish the example code. example_code: | ``` - monkeys = 5, 4, 3, 2 - {for} monkey {in} monkeys - {print} monkey ' little monkeys jumping on the bed' - {print} 'One fell off and bumped his head' - {print} 'Mama called the doctor and the doctor said' - {print} 'NO MORE MONKEYS JUMPING ON THE BED!' - ``` - - ``` - sharks = baby, mommy, daddy, grandma, grandpa - {for} shark {in} sharks - {print} shark ' shark tututututudu' - {print} shark ' shark tututututudu' - {print} shark ' shark tututututudu' - {print} shark ' shark' - ``` - ``` - animals = pig, dog, cow - {for} animal {in} animals - {if} animal {is} pig - sound = oink - {if} animal {is} dog - sound = woof - {if} animal {is} cow - sound = moo - {print} 'Old MacDonald had a farm' - {print} 'E I E I O!' - {print} 'and on that farm he had a ' animal - {print} 'E I E I O!' - {print} 'with a ' sound sound ' here' - {print} 'and a ' sound sound ' there' - {print} 'here a ' sound - {print} 'there a ' sound - {print} 'everywhere a ' sound sound + family = baby, mammy, daddy, grandma, grandpa + _ _ _ _ + {print} _ ``` story_text_2: | ### Exercise 2 @@ -4345,20 +4374,18 @@ adventures: ``` 11: story_text: | - In this level you can use the `{for} i {in} {range}` command to make songs that use counting, like the 5 little monkeys. + In this level you can use the `{for}` with `{range}` to make songs that use counting, like the 5 little monkeys. - ### Exercise - Fill in the blanks and make the code work! + ### Exercise 1 + Fill in the blanks and make the code work! If you don't remember the song text, look it up yourself. + + ### Exercise 2 + The final line of the song is different from the others. Print this line inside the `{for}`, and use an `{if}` to make it work correctly. example_code: | ``` - _ _ _ _ 5 _ 1 - {print} i ' little monkeys jumping on the bed' - {print} 'One fell off and bumped his head' - {print} 'Mama called the doctor and the doctor said' - {if} i {is} 1 - {print} 'PUT THOSE MONKEYS RIGHT TO BED!' - {else} - {print} 'NO MORE MONKEYS JUMPING ON THE BED!' + _ monkeys _ _ 5 _ 1 + {print} monkeys ' little monkeys jumping on the bed' + _ ``` 12: story_text: | @@ -4400,7 +4427,6 @@ adventures: The Drunken Sailor is also quickly made in this level. You only need 8 lines for the entire song, check it out! ### Exercise - Complete the Old MacDonald song by setting the variable `animal` to `animals[i]` and `sound` to `sounds[i]`. example_code: "```\nalle_dyr = ['gris', 'hund', 'ko']\nlyde = ['øh', 'vuf', 'muh']\n{for} i {in} {range} 1 {to} 3\n dyr = alle_dyr[i]\n lyd = lyde[i]\n {print} 'Jens Hansen havde en bondegård'\n {print} 'ih ah ih ah oh!'\n {print} 'og på den gård der var en ' dyr\n {print} 'ih ah ih ah oh!'\n {print} 'Der var ' lyd lyd' her'\n {print} 'og ' lyd lyd' der'\n {print} lyde ' her'\n {print} lyde ' der'\n {print} 'alle steder ' lyde lyde\n```\n\n```\nlinjer = ['Hvad skal vi gøre med den fulde sømand', 'Smid ham i brummen til han vågner', 'Han skal klynges op i masten']\n{for} linje {in} linjer\n {for} i {in} {range} 1 {to} 3\n {print} linje \n {print} 'Tidligt om morgnen.'\n {for} i {in} {range} 1 {to} 3\n {print} 'Hu hej, se hun sejler'\n {print} 'Tidligt om morgnen.'\n```\n" 18: @@ -4473,7 +4499,7 @@ adventures: movement = [ 'round and round', 'open and shut', _] ``` tic: - name: Tic-Tac-Toe + name: Kryds og Bolle default_save_name: Tic description: Play a game of Tic Tac Toe! levels: @@ -4544,8 +4570,8 @@ adventures: {return} _ ``` tic_2: - name: Tic-Tac-Toe 2 - default_save_name: Tic + name: Kryds og Bolle 2 + default_save_name: KrydsBolle description: Play a game of Tic Tac Toe! levels: 16: @@ -4586,8 +4612,8 @@ adventures: sign = _ ``` tic_3: - name: Tic-Tac-Toe 3 - default_save_name: Tic + name: Kryds og Bolle 3 + default_save_name: KrydsBolle description: Play a game of Tic Tac Toe! levels: 16: @@ -4808,7 +4834,7 @@ adventures: ### Exercise 1 Add a 90 degree turn in the loop, so that a spiral is drawn. Add at least 5 numbers to the list, so the spiral grows larger. - **(extra)** can you change the spiral into another shape? Experiment with numbers for the turn! + **(extra)** can you change the spiral into another shape? Experiment with numbers for the turn! ### Exercise 2 The spiral is drawn outwards, make it go inwards? example_code: | @@ -4972,13 +4998,13 @@ adventures: ``` colors = red, blue, orange, yellow, pink, purple, green, brown, black distance = 120 - repeat 5 times + {repeat} 5 {times} _ ``` Hint for the flags: ``` - country = ask 'which country would you like to see the flag of?' - if country is 'the Netherlands' + country = {ask} 'which country would you like to see the flag of?' + {if} country {is} 'the Netherlands' color_1 = red color_2 = white color_3 = blue @@ -5201,7 +5227,7 @@ adventures: levels: 11: story_text: | - In this level you can use the `{for} i {in} {range}` command to countdown to the New Year. + In this level you can use the `{for}` number `{in}` `{range}` command to countdown to the New Year. ### Exercise Fill in the blanks and make the code work! diff --git a/content/adventures/de.yaml b/content/adventures/de.yaml index 38b824f0f9e..961fd08277e 100644 --- a/content/adventures/de.yaml +++ b/content/adventures/de.yaml @@ -321,9 +321,9 @@ adventures: levels: 13: story_text: |- - We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`. + Jetzt lernen wir `{and}` und `{or}`! Wenn du zwei Aussagen prüfen willst, musst du nicht zwei `{if}`s verwenden, sondern `{and}` und `{or}`. - If you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct. + Wenn du `{and}` verwendest, müssen beide Aussage links und rechts von `{and}` wahr sein. Wir können auch `{or}` verwenden. Dann muss nur eine Aussage wahr sein. example_code: | ``` name = {ask} 'Wie heißt du?' @@ -419,7 +419,7 @@ adventures: ***Schreibe eine Funktion, um die Punkte zu berechnen*** Schreibe eine Funktion, die berechnet, wie viele Punkte eine Karte zählt. - All Bildkarten zählen 10 Punkte, ein Ass 11 und alle anderen Karten zählen ihren Zahlenwert + Alle Bildkarten zählen 10 Punkte, ein Ass 11 und alle anderen Karten zählen ihren Zahlenwert Die die Variable `punkte` am Ende der Funktion zurück. ***Teste die Funktion*** @@ -456,23 +456,23 @@ adventures: 17: story_text: | ### Übung - In diesem Abenteuer programmieren wir den zweiten Teil unseres Blackjack Spiels. + In diesem Abenteuer programmieren wir den zweiten Teil unseres Blackjack-Spiels. ***Füge das Programm aus dem vorherigen Abenteuer hier ein*** - Im vorherigen Abenteuer hast zu mit einer Liste von Variablen begonnen und eine Funktion geschrieben, die berechnet, wie viele Punkte eine Karte zählt. Kopiere dein Program und füge ihn hier ein. Beachte, dass du den Testteil nicht benötigst. Wenn du ihn noch nicht gelöscht hast, mache e jetzt. + Im vorherigen Abenteuer hast du mit einer Liste von Variablen begonnen und eine Funktion geschrieben, die berechnet, wie viele Punkte eine Karte zählt. Kopiere dein Program und füge es hier ein. Beachte, dass du den Testteil nicht benötigst. Wenn du ihn noch nicht gelöscht hast, mache es jetzt. ***Ergänze weitere Variablen*** Du hast schon die Listen `karten` und `bildkarten` und die Variable `karte_1` gesetzt. Erzeuge nach diesen Variablen noch 3 weitere: `karte_2`, `geber_karte_1` und `geber_karte_2`. Diese Variablen sind auf eine zufällige Karte aus der Liste der Karten gesetzt. ***Zähle die Punkte zusammen*** - Um zu berechnen, wie viele Punkte du erreicht hast, rufen wir die Funktion mit `karte_1` und `karte_2` auf. Dann addieren wir die beiden Punktzahlen zusammen, um deine Gesamtpunkte zu bestimmen. + Um zu berechnen, wie viele Punkte du erreicht hast, rufen wir die Funktion mit `karte_1` und `karte_2` auf. Dann addieren wir die beiden Punktzahlen, um deine Gesamtpunkte zu bestimmen. Mache dasselbe für die Punkte des Gebers, aber stelle sicher, dass du die Karten des Gebers und nicht deine benutzt. ***2 Asse*** Großartig! Fast alle Punkte können jetzt berechnet werden. Bis auf eine Ausnahme: 2 Asse. Wenn du 2 Asse bekommst, gibt es dafür 12 Punkte und nicht 22 (weil du mit 22 Punkten schon verloren hättest). Das gilt natürlich auch für den Geber. ***Zeige den Punktestand*** - Zuletzt soll das Program noch ausgeben, welchen Karte du gezogen hast und wieviele Punkte es dafür gibt. Dann zeige, welche Karten der Geber hat und wie viele Punkte die zählen. + Zuletzt soll das Program noch ausgeben, welchen Karte du gezogen hast und wieviele Punkte es dafür gibt. Dann zeige, welche Karten der Geber hat und wie viele Punkte sie zählen. ***Weiter geht es mit dem nächsten Tab*** Ausgezeichnet! Du hast diesen Teil des Spiels beendet! Kopiere dein Programm und gehe zum nächsten Tab um zu lernen, wie du nach einer extra Karte fragen und den Gewinner bestimmen kannst. @@ -512,21 +512,21 @@ adventures: levels: 17: story_text: | - Beim den vorherigen Tabs hast du gelernt, wie du 2 zufällige Karten für dich und den Geber ziehen kannst und zu berechnen, wie viele Punkte ihr beiden habt. + In den vorherigen Tabs hast du gelernt, wie du 2 zufällige Karten für dich und den Geber ziehen kannst und zu berechnen, wie viele Punkte ihr beiden habt. In diesem Abenteuer fügen wir für dich und den Geber die Möglichkeit hinzu, nach einer weiteren Karte zu fragen. ### Übung - ***Füge dein Programm aus dem vorherigen Abenteuer ein*** Zunächst, kopiere das Programm aus dem vorherigen Tab und füge es hier ein. + ***Füge dein Programm aus dem vorherigen Abenteuer ein*** Kopiere zunächst das Programm aus dem vorherigen Tab und füge es hier ein. ***Extra Karte für dich*** Wenn du willst, kannst du eine weitere Karte bekommen, um mit deinen Gesamtpunkten so nah wie möglich an 21 zu kommen. Frage zuerst den Spieler, ob er noch eine Karte will. Falls ja, wähle eine zufällige Karte und drucke, was gezogen wurde. Falls die Karte kein Ass ist, kannst du die Funktion aufrufen und die Punkte zu deinen Gesamtpunkten hinzuzählen. Falls die Karte ein Ass ist, kannst du die Funktion nicht verwenden, weil ein Ass entweder 1 Punkt oder 11 Punkte zählen kann, abhängig davon, wie viele Punkte du bereits hast. - Falls deine Gesamtpunkte weniger als 11 sind, sollte das Ass 11 Punkte zählen (weil das am nächsten an 21 ist). Also zählst du 11 Punkte zu deinen Gesamtpunkte hinzu. + Falls deine Gesamtpunkte weniger als 11 sind, sollte das Ass 11 Punkte zählen (weil das am nächsten an 21 ist). Also zählst du 11 Punkte zu deinen Gesamtpunkten hinzu. Falls du mehr als oder genau 11 Gesamtpunkte hast, sollte dein Ass 1 Punkt zählen (weil du nicht mehr als 21 Punkte haben solltest). Also zählst du 1 Punkt zu den Gesamtpunkten hinzu. Zuletzt, drucke deine neue Gesamtpunktzahl. ***Extra Karte für den Geber*** Der Geber kann auch eine extra Karte bekommen. Der Geber muss nicht gefragt werden, weil er immer eine extra Karte bekommt, wenn er weniger als 17 Gesamtpunkte hat. - Kopiere den 'Extra Karte für dich' Code und füge ihn in den Geber Abschnitt ein. Dann ändere ihn, dass es für den Geber passt, eine extra Karte zu nehmen und die Punkte zu seinen Gesamtpunkten hinzugefügt zu bekommen + Kopiere den 'Extra Karte für dich' Code und füge ihn in den Geber-Abschnitt ein. Dann ändere ihn, dass es für den Geber passt, eine extra Karte zu nehmen und die Punkte zu seinen Gesamtpunkten hinzugefügt zu bekommen example_code: | ``` # Füge dein Programm aus dem vorherigen Abenteuer hier ein @@ -614,14 +614,16 @@ adventures: ``` story_text_3: | **Zusätzlich** Du kannst den Computer auch alleine zufällige Summen rechnen lassen, indem du zufällig benutzt. - example_code_3: | - numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 - number_1 = _ - number_2 = _ - correct_answer = number_1 * number_2 - given_answer = 'What is ' number_1 ' times ' number_2 '?' + example_code_3: |- + ``` + zahlen = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + zahl_1 = _ + zahl_2 = _ + richtige_antwort = zahl_1 * zahl_2 + gegebene_antwort = 'Was ist ' zahl_1 ' mal ' zahl_2 '?' {if} _ {else} _ + ``` 9: story_text: | In Level 6 hast du einen Taschenrechner erstellt. In diesem Level kannst du den Code erweitern, so dass er mehrere Fragen stellt. @@ -648,32 +650,32 @@ adventures: ``` 10: story_text: | - This calculator game helps you practise your tables of multiplication! - ### Exercise - Fill in the blanks. We want this program to ask the player these questions: - ``` - How much is 1 times 1? - How much is 1 times 2? - How much is 1 times 3? - How much is 2 times 1? - How much is 2 times 2? - How much is 2 times 3? - How much is 3 times 1? - How much is 3 times 2? - How much is 3 times 3? + Dieses Taschenrechner-Spiel hilft die dabei, das Ein-mal-Eins zu üben! + ### Übung + Fülle die Lücken. Wir wollen, dass das Programm den Spielern diese Fragen stellt: + ``` + Was ist 1 mal 1? + Was ist 1 mal 2? + Was ist 1 mal 3? + Was ist 2 mal 1? + Was ist 2 mal 2? + Was ist 2 mal 3? + Was ist 3 mal 1? + Was ist 3 mal 2? + Was ist 3 mal 3? _ ``` example_code: | ``` - numbers = 1, 2, 3 + zahlen = 1, 2, 3 {for} _ {for} _ - answer = {ask} _ - correct = number_1 * number_2 - {if} answer {is} correct - {print} 'Great job!' + antwort = {ask} _ + richtig = zahl_1 * zahl_2 + {if} antwort {is} richtig + {print} 'Gut gemacht!' {else} - {print} 'That is wrong. The right answer is ' correct + {print} 'Das ist falsch. Die richtige Antwort ist ' richtig ``` 11: story_text: | @@ -726,34 +728,28 @@ adventures: ``` 14: story_text: | - In this adventure you will build a calculator that calculates your mean grade for you. If you get your calculator to work, you can move on to the next adventure, which allows you to add two extra features. + In diesem Abenteuer wirst du einen Taschenrechner bauen, der einen Notendurchschnitt für dich berechnet. Wenn du in funktionsfähig gemacht hast, kannst du zum nächsten Abenteuer weiter gehen, in dem du zwei extra Features ergänzen kannst. - ### Exercise 1 - Fill in the blanks to get the calculator to work. - * Start with the fourth line, add a question to figure out what grade the student got. - * In the fifth line you'll want to calculate the total of all grades, so the total = total + grade. - * Then we get to set the return value. We want to return the mean, so the total devided by the amount of tests (4). - * Lastly we finish the code by calling the function in line 8. + ### Übung 1 + Fülle die Leerstellen, um den Taschenrechner funktionsfähig zu machen. + * Beginne mit der vierten Zeile, ergänze eine Frage, um herauszufinden, welche Note die Schüler:in bekommen hat. + * In der fünften Zeile solltest du die Gesamtzahl aller Noten berechnen, also gesamt = gesamt + note + * Dann setzen wir den Rückgabewert. Wir wollen den Durchschnitt zurückgeben, also gesamt geteilt durch die Anzahl Tests (4). + * Zuletzt vervollständigen wir den Code indem wir die Funktion in Zeile 8 aufrufen. - Did you get it? Awesome! Would you like to add even more to your calculator? **This adventure continues in the next tab!** + Hast du es hingekriegt? Wirklich toll! Willst du noch andere Sachen mit deinem Taschenrechner machen? **Dieses Abenteuer geht auf dem nächsten Tab weiter!** example_code: | ``` - {define} calculate_mean_grade - total = 0 + {define} berechne_notendurchschnitt + gesamt = 0 {for} i {in} {range} 1 {to} 4 - grade = {ask} _ - total = total + _ + note = {ask} _ + gesamt = gesamt + _ return _ / 4 - mean_grade = {call} _ - {print} 'Your mean grade is ' mean_grade + notendurchschnitt = {call} _ + {print} 'Dein Notendurchschnitt ist ' notendurchschnitt ``` - - total = total + _ - return _ / 4 - - mean_grade = {call} _ - {print} 'Your mean grade is ' mean_grade 15: story_text: | Du kannst die `{while}` Schleife zum Taschenrechnerspiel, was du im vorigen Level gelernt hast, hinzufügen. @@ -787,22 +783,22 @@ adventures: levels: 14: story_text: | - ### Exercise 2 - **This is the second part of this adventure.** The adventure starts in the previous tab. - Of course, you don't always want to calculate the mean of 4 tests. You might want to calculate the mean of 10 tests or only 2... - We can fix this problem by adding the argument and variable 'amount_of_tests'. - * Start a new line on line 3. Set the amount_of_tests argument by asking the student how many tests they have made. - * Change the 4 in line 4 to the new argument amount_of_tests. - * Lastly, change the 4 in line 6 to amount_of_tests + ### Übung 2 + **Das ist der zweite Teil dieses Abenteuers.** Das Abenteuer startet im vorherigen Tab. + Natürlich willst du nicht immer nur den Durchschnitt von 4 Tests berechnen. Vielleicht willst du den Mittelwert von 10 Tests oder nur 2 berechnen? + Du kannst das Problem beheben, indem du ein Argument und die Variable 'anzahl_von_tests' ergänzt. + * Beginne eine neue Zeile in der Zeile 3. Setze die anzahl_von_tests indem du die Schüler:in danach fragst, wie viele Tests geschrieben wurden. + * Ändere die 4 in der Zeile 4 in das neue Argument anzahl_von_tests. + * Zuletzt ändere noch die 4 in der Zeile 6 in anzahl_von_tests. - Try out your new program. Does it work? + Versuche dein neues Programm. Funktioniert es? - ### Exercise 3 - Did you want to make your program even better? Great! In the previous program you could only calculate the mean grade of 1 subject, but it would be better if you could calculate the mean grade for all subjects you want! - We won't tell you how to do it, but we will give you one tip: Start your code in line 1 with: define calculate_mean_grade with subject. + ### Übung 3 + Willst du dein Programm weiter verbessern? Großartig! Das letzte Programm konnte nur den Durchschnitt von einer Schüler:in berechnen. Es wäre aber besser, die Durchschnitt von allen Schüler:innen zu berechnen, die du willst. + Wie sagen dir nicht, wie du es machen sollst, geben dir aber einen Hinweis: Beginne deinen Code in Zeile 1 mit {define} berechne_notendurchschnitt {with} schüler_in. example_code: | ``` - # Use your own code from the previous adventure. + # Benutze deinen eigenen Code aus dem letzten Abenteuer. ``` clear_command: name: '{clear}' @@ -960,329 +956,309 @@ adventures: ``` 8: story_text: |- - ### Exercise - Debug this code. Good luck! - example_code: | - **Warning! This code needs to be debugged!** + ### Übung + Debugge diesen Code. Viel Glück! + example_code: |- + **Warnung! Dieser Code muss debugged werden!** ``` - {print} 'Welcome to Manicures and Pedicures by Hedy' - bodypart = {ask} 'Are you getting your fingernails or toenails done today? Or both?' - {if} bodyparts {is} both - {print} That will be $25' - price = 25 + {print} 'Willkommen zur Maniküre und Pediküre durch Hedy' + körperteil = {ask} 'Lässt du dir heute die Fingernägel oder Zehennägel richten? Oder beides?' + {if} körperteile {is} beides + {print} Das macht 24 €' + preis = 25 {else} - {print} That will be $18' - price = 18 - color = {ask} What color would you like? - sparkles = {ask} 'Would you like some sparkles with that?' - {if} sparkles {is} yes - {print} 'We charge $3 extra for that' - price = price + 3 - {else} {print} 'No sparkles' {print} 'So no extra charge' + {print} Das mach 18 €' + preis = 18 + farbe = {ask} Welche Farbe hättest du gerne? + glitzer = {ask} 'Möchtest du Glitzer dazu?' + {if} glitzer {is} ja + {print} 'Das mach 3 € extra' + preis = preis + 3 + {else} {print} 'Kein Glitzer' {print} 'Nichts extra' {sleep} 5 - {print} 'All done! That will be $' price ' please!' - {print} 'Thank you! Byebye!' + {print} 'Fertig! Das macht ' preis ' € bitte!' + {print} 'Danke! Ciao!' ``` 9: story_text: |- - ### Exercise - Debug this code. Good luck! + ### Übung + Debugge diesen Code. Viel Glück! example_code: | - **Warning! This code needs to be debugged!** + **Warnung! Dieser Code muss debugged werden!** ``` - {print} 'Welcome to our sandwich shop' - amount 'How many sandwiches would you like to buy?' - {repeat} amount {times} - {ask} {is} {ask} 'What kind or bread would you like your sandwich to be?' - types_of_bread {is} white, wheat, rye, garlic, gluten free - {if} chosen_bread in types_of_bread - {print} 'Lovely!' + {print} 'Willkommen in unserem Sandwich Laden' + menge 'Wie viele Sandwiches möchtest Du gerne kaufen?' + {repeat} menge {times} + {ask} {is} {ask} 'Welches Brot hättest du gerne?' + brotarten {is} weiss, weizen, roggen, knoblauch, gluten frei + {if} gewähltes_brot in Brotarten + {print} 'Großartig!' {else} - 'I'm sorry we don't sell that' - topping {is} {ask} 'What kind of topping would you like?' - sauce {is} {ask} 'What kind of sauce would you like?' - {print} One chosen_bread with topping and sauce. - price = amount * 6 - {print} 'That will be 'price dollar' please' + 'Leider haben wir das nicht' + belag {is} {ask} 'Welchen Belag hättest du gerne?' + soße {is} {ask} 'Welche Soße hättest du gerne?' + {print} Ein gewähltes_brot mit belag und soße. + preis = menge * 6 + {print} 'Das kostet 'preis euro' bitte' ``` - price = amount * 6 - {print} 'That will be 'price dollar' please' + preis = menge * 6 + {print} 'Das kostet 'preis euro' bitte' 10: story_text: |- - ### Exercise - Debug this code. Good luck! + ### Übung + Debugge diesen Code. Viel Glück! example_code: | - **Warning! This code needs to be debugged!** + **Warnung! Dieser Code muss debugged werden!** ``` - names = Muad Hasan Samira Noura - activities = fly a kite, go swimming, go hiking, catch tan in the sun - {for} name {is} names - {print} At the beach name loves to activity at random + namen = Muad Hasan Samira Nora + aktivitäten = Drachen steigen lassen, schwimmen gehen, wandern gehen, sonnenbaden + {for} name {is} namen + {print} Am Strand mag name aktivität {at} {random} ``` 11: story_text: |- - ### Exercise - Debug this calender program. The output of this program is supposed to look like a list of dates. - For example: + ### Übung + Debugge dieses Kalender-Programm. Die Ausgabe des Programms soll aussehen wie eine Liste mit Datumsangaben. + Zum Beispiel: ``` - Hedy calender - Here are all the days of November + Hedy Kalender + Hier sind alle Tage im November November 1 November 2 November 3 ``` - And so on. - - Mind that you have to test your code extra carefully for the month February, because the amount of days in this month changes in leap years. - example_code: | - **Warning! This code needs to be debugged!** - ``` - print 'Hedy calender' - months_with_31 days = January, March, May, July, September, October, December - months_with_30_days = April, June, August, November - month = ask 'Which month would you like to see?' - if month in months_with_31_days - days = 31 - if month in months_with30_days - days = 30 - if month = February - leap_years = 2020, 2024, 2028, 2036, 2040, 2044, 2028 - year = ask 'What year is it?' - if year in leap_years - days = 29 - else - days = 28 + Und so weiter. + + Beachte, dass du den Code besonders sorgfältig für den Februar testen muss, weil die Anzahl der Tage sich in Schaltjahren ändert. + example_code: | + **Warnung! Dieser Code muss debugged werden!** + ``` + {print} 'Hedy Kalender' + monate_mit_31 tagen = Januar, März, Mai, Juli, September, Oktober, Dezember + monate_mit_30_tage = April, Juni, August, November + monat = {ask} 'Welchen Monat möchtest du sehen?' + {if} monat {in} monate_mit_31_tagen + tage = 31 + {if} monat {in} monate_mit30_tagen + tage = 30 + {if} monat = Februar + schaltjahre = 2020, 2024, 2028, 2036, 2040, 2044, 2028 + jahr = ask 'Welches Jahr haben wir?' + {if} jahr {in} schaltjahre + tage = 29 + {else} + tage = 28 - print 'Here are all the days of ' moth - for i in range 1 to days - print month i + {print} 'Hier sind alle Tage im ' mont + {for} i {in} {range} 1 {to} tage + {print} monat i ``` 12: story_text: |- - ### Exercise - Debug this code. Good luck! - example_code: | - **Warning! This code needs to be debugged!** - ``` - define greet - greetings = 'Hello', 'Hi there', 'Goodevening' - print greetings at random - - define take_order - food = ask 'What would you like to eat?' - print 'One food' - drink = 'What would you like to drink?' - print 'One ' drink - more = ask 'Would you like anything else?' - if more is 'no' - print 'Alright' - else - print 'And ' more - print 'Thank you' - - print 'Welcome to our restaurant' - people = ask 'How many people are in your party tonight?' - for i in range 0 to people - call greet_costumer + ### Übung + Debugge diesen Code. Viel Glück! + example_code: | + **Warnung! Dieser Code muss debugged werden!** + ``` + {define} grüße + grußworte = 'Hallo', 'Willkommen', 'Guten Abend' + {print} grußworte {at} {random} + + {define} bestellung_aufnehmen + essen = {ask} 'Was willst du essen?' + {print} 'Ein Essen' + getränk = 'Was willst du trinken?' + {print} 'Ein ' getränk + mehr = {ask} 'Möchtest du noch etwas?' + {if} mehr {is} 'nein' + {print} 'OK' + {else} + {print} 'Und ' mehr + {print} 'Danke' + + {print} 'Willkommen in unserem Restaurant' + personen = {ask} 'Wie viele Personen seid ihr heute Abend?' + {for} i {in} {range} 0 {to} personen + {call} grüße_kunde ``` 13: story_text: |- - ### Exercise - Debug this code. Good luck! - example_code: | - **Warning! This code needs to be debugged!** - ``` - defin movie_recommendation with name - action_movies == 'Die Hard', 'Fast and Furious', 'Inglorious Bastards' - romance_movies = 'Love Actually', 'The Notebook', 'Titanic' - comedy_movies = 'Mr Bean' 'Barbie''Deadpool' - kids_movies = 'Minions', 'Paddington', 'Encanto' - if name is 'Camila' or name is 'Manuel' - recommended_movie = kids_movie at random - if name is 'Pedro' or 'Gabriella' - mood = ask 'What you in the mood for?' - if mood is 'action' - recommended_movie = comedy_movies at random - if mood is 'romance' - recommended_movie = romance_movies - if mood is 'comedy' - recommended_movie = comedy_movies at random - - print 'I would recommend ' recommended_movie ' for ' name - - name = ask 'Who is watching?' - recommendation = ask 'Would you like a recommendation?' - if recommendaion is 'yes' - print movie_recommendation with name - else - print 'No problem!' + ### Übung + Debugge diesen Code. Viel Glück! + example_code: | + **Warnung! Dieser Code muss debugged werden!** + ``` + {define} filmempfehlung {with} name + action_filme == 'Die Hard', 'Fast and Furious', 'Inglorious Bastards' + romatische_filme = 'Tatsächlich... Liebe', 'Wie ein einziger Tag', 'Titanic' + komödien = 'Mr Bean' 'Barbie''Deadpool' + kinderfilme = 'Minions', 'Paddington', 'Encanto' + {if} name {is} 'Camilla' {or} name {is} 'Manuel' + empfohlener_film = kinderfilm {at} {random} + {if} name {is} 'Peter' {or} 'Gabriela' + stimmung = {ask} 'Wonach bist du in Stimmung?' + {if} stimmung {is} 'action' + empfohlener_file = komödien {at} {random} + {if} stimmung {is} 'romantisch' + empfohlener_file = romantische_filme + {if} stimmung is 'komödie' + empfohlener_film = komödien {at} {random} + + {print} 'Ich würde dir ' empfohlener_file ' für ' name ' empfehlen.' + + {name} = {ask} 'Wer will den Film sehen?' + empfehlung = {ask} 'Möchtest du gerne eine Empfehlung?' + {if} empfehlung {is} 'ja' + {print} filmempfehlung {with} name + {else} + {print} 'Kein Problem!' ``` 14: story_text: |- - ### Exercise - Debug this code. Good luck! - example_code: | - **Warning! This code needs to be debugged!** - ``` - define calculate_heartbeat - print 'Press your fingertips gently against the side of your neck' - print '(just under your jawline)' - print 'Count the number of beats you feel for 15 seconds' - beats == ask 'How many beats do you feel in 15 seconds?' - heartbeat = beats*4 - print 'Your heartbeat is ' heartbeat - if heartbeat >= 60 or heartbeat <= 100 - print 'Your heartbeat seems fine' - else - if heartbeat > 60 - print 'Your heartbeat seems to be too low' - if heartbeat < 100 - print 'Your heartbeat seems to be too high' - print 'You might want to contact a medical professional' - - measure_heartbeat = ask 'Would you like to measure your heartbeat?' - if measure_heartbeat = 'yes' - call measure_heartbeat - else - 'no problem' - ``` - - print '(just under your jawline)' - print 'Count the number of beats you feel for 15 seconds' - beats == ask 'How many beats do you feel in 15 seconds?' - heartbeat = beats*4 - print 'Your heartbeat is ' heartbeat - if heartbeat >= 60 or heartbeat <= 100 - print 'Your heartbeat seems fine' - else - if heartbeat > 60 - print 'Your heartbeat seems to be too low' - if heartbeat < 100 - print 'Your heartbeat seems to be too high' - print 'You might want to contact a medical professional' - - measure_heartbeat = ask 'Would you like to measure your heartbeat?' - if measure_heartbeat = 'yes' - call measure_heartbeat - else - 'no problem' + ### Übung + Debugge diesen Code. Viel Glück! + example_code: | + **Warnung! Dieser Code muss debugged werden!** + ``` + {define} berechne_puls + {print} 'Drücke deine Fingerspitzknochenen sanft gegen die Seite deines Halses' + {print} '(gerade unter dem Kiefer)' + {print} 'Zähle die Anzahl der Schläge die du fühlst für 15 Sekunden' + schläge == {ask} 'Wie viele Schläge hast du in 15 Sekunden gefühlt?' + puls = schläge*4 + {print} 'Dein Puls ist ' puls + {if} puls >= 60 {or} puls <= 100 + {print} 'Dein Puls scheint in Ordnung zu sein' + {else} + {if} puls > 60 + {print} 'Dein Puls scheint zu niedrig zu sein' + {if} puls < 100 + {print} 'Dein Puls scheint zu hoch zu sein' + {print} 'Vielleicht willst du einen Arzt aufsuchen' + + messe_puls = {ask} 'Willst du deinen Puls messen?' + {if} messe_puls = 'ja' + {call} messe_puls + {else} + 'Kein Problem' + ``` 15: story_text: |- - ### Exercise - Debug this random children's story. Good luck! - example_code: | - **Warning! This code needs to be debugged!** - ``` - names = 'Tanya', 'Romy', 'Kayla', 'Aldrin', 'Ali' - verbs='walking', 'skipping', 'cycling', 'driving', 'running' - locations = 'on a mountaintop', 'in the supermarket', 'to the swimming pool' - hiding_spots = 'behind a tree', under a table', in a box' - sounds = 'a trumpet', 'a car crash', 'thunder' - causes_of_noise = 'a television', 'a kid with firecrackers', 'a magic elephant', 'a dream' - - chosen_ name = names at random - chosen_verb = verbs at random - chosen_location = 'locations at random' - chosen_sounds = noises at random - chosen_spot = hiding_spots random - chosen_causes = causes_of_noise at random - - print chosen_name ' was ' chosen_verb ' ' chosen_location - print 'when they suddenly heard a sound like ' sounds at random - print chosen_name ' looked around, but they couldn't discover where the noise came from' - print chosen_name ' hid ' chosen_spot' - print 'They tried to look around, but couldn't see anything from there' - hidden = 'yes' - while hidden = 'yes' - print chosen_name 'still didn't see anything' - answer = ask 'does ' chosen_name ' move from their hiding spot?' - if answer = 'yes' - hidden == 'no' - print 'chosen_name moved from' chosen_spot - print 'And then they saw it was just' chosen_cause - print chosen_name 'laughed and went on with their day' - print The End + ### Übung + Debugge diese zufällige Kindergeschichte. Viel Glück! + example_code: | + **Warnung! Dieser Code muss debugged werden!** + ``` + namen = 'Tanja', 'Romy', 'Katja', 'Axel', 'Ali' + verben='gehen', 'springen', 'Rad fahren', 'fahren', 'rennen' + orte = 'auf einen Gipfel', 'in den Supermarkt', 'zum Freibad' + verstecke = 'hinter einem Baum', unter einem Tisch', in einer Kiste' + geräusche = 'eine Trompete', 'ein Autounfall', 'Donner' + geräuschquelle = 'ein Fernseher', 'ein Kind mit Böllern', 'ein magischer Elefant', 'ein Traum' + + gewählter_ name = namen {at} {random} + gewähltes_verb = verben {at} {random} + gewählter_ort = 'orte {at} {random}' + gewähltes_geräusch = geräusche {at} {random} + gewähltes_versteck = verstecke {random} + gewählte_quelle = geräuschquellen {at} {random} + + {print} gewählter_name ' war ' gewähltes_verb ' ' gewählter_ort + {print} 'als sie plötzlich ein Geräusch wie ' geräusche {at} {random} + {print} gewählter_name ' sah sich um, aber sie konnten nicht herausfinden, woher das Geräusch kam.' + {print} gewählter_name ' versteckte sich ' gewähltes_versteck' + {print} 'Sie sahen sich von dort aus um, aber konnten auch von dort nichts sehen.' + versteckt = 'ja' + {while} versteckt = 'ja' + {print} gewählter_name 'sah immer noch nichts.' + antwort = {ask} 'bewegt sich ' gewählter_name ' aus dem Versteck?' + {if} antwort = 'ja' + versteckt == 'nein' + {print} 'gewählter_name ist aus dem ' gewählten_versteck ' gekommen.' + {print} 'Und dann sahen sie, es war nur ein' gewählte_quelle + {print} gewählter_name 'lachte und der Tag ging weiter.' + {print} Ende ``` 16: story_text: |- - ### Exercise - Debug this code. Good luck! - Tip: Make sure that you only see your score once in the end. - example_code: | - **Warning! This code needs to be debugged!** - ``` - country = ['The Netherlands', 'Poland', 'Turkey', 'Zimbabwe', 'Thailand', 'Brasil', 'Peru', 'Australia', 'India', 'Romania' ] - capitals = 'Amsterdam', 'Warshaw' 'Istanbul', 'Harare', 'Bangkok', 'Brasilia', 'Lima', 'Canberra', 'New Delhi', 'Bucharest' - score = 0 - for i in range 0 to 10 - answer = ask 'What's the capital of ' countries[i] - correct = capital[i] - if answer = correct - print 'Correct!' - score = score + 1 - else - print 'Wrong,' capitals[i] 'in the capital of' countries[i] - print 'You scored ' score ' out of 10' + ### Übung + Debugge diesen Code. Viel Glück! + Tip: Stelle sicher, dass du deinen Punktestand am Ende nur einmal siehst. + example_code: | + **Warnung! Dieser Code muss debugged werden!** + ``` + land = ['den Niederlanden', 'Polen', 'der Türkei', 'Zimbabwe', 'Thailand', 'Brasilien', 'Peru', 'Australien', 'Indien', 'Romänien' ] + hauptstädte = 'Amsterdam', 'Warschau' 'Istanbul', 'Harare', 'Bangkok', 'Brasilia', 'Lima', 'Canberra', 'Neu Delhi', 'Bucharest' + punkte = 0 + {for} i {in} {range} 0 {to} 10 + antwort = {ask} 'Wie heisst die Hauptstadt von ' länder[i] + richtig = hauptstadt[i] + {if} antwort = richtig + {print} 'Richtig!' + punkte = punkte + 1 + {else} + {print} 'Falsch,' hauptstädte[i] 'in der Hauptstadt von ' countries[i] + {print} 'Du hast ' Punkte ' punkte von 10' ``` 17: story_text: |- ### Exercise - Debug this code. Good luck! + Debugge diesen Code. Viel Glück! example_code: | - **Warning! This code needs to be debugged!** + **Warnung! Dieser Code muss debugged werden!** ``` - define food_order - toppings = ask 'pepperoni, tuna, veggie or cheese?' - size = ask 'big, medium or small?' - number_of_pizza = ask 'How many these pizzas would you like?' + {define} essens_bestellung + belag = {ask} 'Pepperoni, Tunfisch, vegetarisch oder Käse?' + größe = {ask} 'groß, mittel oder klein?' + anzahl_von_pizzen = {ask} 'Wie viele von diesen Pizzen möchtest du gerne?' - print 'YOU ORDERED' - print number_of_pizzas ' size ' topping ' pizza' + {print} 'DU HAST BESTELLT' + {print} anzahl_von_pizzen ' große ' belag ' Pizza' - define drinks_order - drink = ask 'water, coke, icetea, lemonade or coffee?' - number_of_drinks = ask 'How many of these drinks would you like?' + {define} getränke_bestellung + getränk = {ask} 'Wasser, Cola, Tee, Limonade or Kaffee?' + anzahl_getränke = {ask} 'Wie viele von diesen Getränken möchtest du gerne?' - print 'YOU ORDERED' - print number_of_drinks ' ' drink + {print} 'DU HAST BESTELLT' + {print} anzahl_getränke ' ' getränk - 'Welcome to Hedy pizza' - more_food = ask 'Would you like to order a pizza?' - while more_food = 'yes' - return food_order - more_food = ask 'Would you like to order a pizza?' - more_drinks = ask 'Would you like to order some drinks?' - while more_drinks == 'yes' - call drink_order - more_drinks == ask 'Would you like to order more drinks?' + 'Willkommen bei Hedy Pizza' + mehr_essen = {ask} 'Möchtest du eine Pizza bestellen?' + {while} mehr_essen = 'ja' + {return} essens_bestellung + mehr_essen = {ask} 'Möchtest du gerne eine Pizza bestellen?' + mehr_getränke = {ask} 'Möchtest du etwas zu trinken bestellen?' + {while} mehr_getränke == 'ja' + {call} getränk_bestellung + mehr_getränke == {ask} 'Möchtest du weitere Getränke bestellen?' - print 'Thanks for ordering!' + {print} 'Danke für die Bestellung!' ``` 18: story_text: |- - ### Exercise - Debug this Old MacDonald program from level 16. Good luck! - example_code: | - **Warning! This code needs to be debugged!** - ``` - animals = ['pig', 'dog', 'cow'] - sounds = ['oink', 'woof', 'moo'] - for i in range 1 to 3 - animal = animals[i] - sound = sounds[i] - print 'Old MacDonald had a farm' - print 'E I E I O!' - print 'and on that farm he had a ' animal - print 'E I E I O!' - print 'with a ' sound sound ' here' - print 'and a ' sound sound ' there' - print 'here a ' sound - print 'there a ' sound - print 'everywhere a ' sound sound + ### Übung + Debugge dieses alte Old MacDonald Programm aus Level 16. Viel Glück! + example_code: | + **Warnung! Dieser Code muss debugged werden!** + ``` + tiere = ['Schweine', 'Hunde', 'Kühe'] + geräusche = ['grunz', 'wuff', 'muh'] + {for} i {in} {range} 1 {to} 3 + tier = tiere[i] + geräusch = geräusche[i] + {print} 'Old MacDonald hat ne Farm' + {print} 'I A I A O!' + {print} 'und auf der Farm da gibt's ' tier + {print} 'I A I A O!' + {print} 'mit nem ' geräusch geräusch ' hier' + {print} 'und nem ' geräusch geräusch ' da' + {print} 'hier ein ' geräusch + {print} 'dort ein ' geräusch + {print} 'überall ein ' geräusch geräusch ``` default: name: Einführung @@ -1349,7 +1325,8 @@ adventures: `{ask}` und `{print}` funktionieren immer noch wie in Level 4. example_code: | ``` - passwort {is} {ask} 'Was ist das richtige Passwort?``` + passwort {is} {ask} 'Was ist das richtige Passwort?' + ``` 6: story_text: | In diesem Level lernst du etwas Neues: Du kannst jetzt auch rechnen. @@ -1420,40 +1397,44 @@ adventures: ``` 11: story_text: | - You have reached level 11, you're doing great! In the higher levels, Hedy is focussing more and more on teaching you the programming language Python. - In Python there is no `{repeat}` command, but there is a command that works like {repeat}. Are you curious to find out how to say `{repeat}` in Python language? Quickly go on to find out! + Du hast Level 11 erreicht, du machst das großartig! In den höheren Level konzentiert sich Hedy mehr und mehr darauf, dir die Programmiersprache Python beizubringen. + In Python gibt es keinen `{repeat}` Befehl, aber es gibt einen Befehl, der wie {repeat} funktioniert. Bist du neugierig darauf, herauszufinden, wie du `{repeat}` in der Python sagen kannst? Gehe rasch weiter, und finde es heraus! 12: - story_text: |- - **Dezimalzahlen** - Bis jetzt konntest du mit Hedy keine Dezimalzahlen (das sind Kommazahlen) wie 1,5 verwenden, aber jetzt geht das. Denke jedoch daran, dass Hedy (wie viele andere Programmiersprachen auch) anstatt des Kommas einen Punkt (`.`) verwendet. + story_text: | + Vielleicht hast du versucht Dezimalzahlen bei deinem Restaurant Abenteuer zu verwenden. Falls ja, hast du wahrscheinlich bemerkt, dass Hedy die noch nicht verstand und immer abgerundet hat. + Ab diesem Level kannst du Dezimalzahlen verwenden. example_code: | ``` burger = 5 getraenk = 2 gesamt = burger + getraenk - print 'Du hast einen Burger und ein Getränk bestellt' - print 'Das macht zusammen 'total' Euro, bitte' + drucke 'Du hast einen Burger und ein Getränk bestellt' + drucke 'Das macht zusammen 'gesamt' Euro, bitte' ``` 13: - story_text: |- - Wir werden jetzt `{and}` und `{or}` lernen! Wenn du zwei Angaben überprüfen willst, musst du nicht zwei Mal `{if}` verwenden, sondern kannst `{and}` und `{or}` benutzen. + story_text: | + In den vorherigen Leveln hast du gelernt, zwei `{if}`Befehle zu verschachteln. Das funktioniert, führt aber zu sehr langem und unhandlichen Code wie diesem: - Wenn du `{and}` verwendest, müssen beide Angaben, also links und rechts vom `{and}`, wahr sein. Du kannst auch `{or}` verwenden. Dann muss nur eine der beiden Aussage wahr sein. + Für dieses System musst du sowohl Benutzername als auch Passwort richtig eingeben. + In diesem Level wirst du den `{and}` Befehl lernen, der diesen Code viel kürzer und verständlicher macht! + Probier es aus! example_code: | ``` - name = {ask} 'Wie heißt du?' - alter = {ask} 'Wie alt bist du?' - {if} name {is} 'Hedy' {and} alter {is} 2 - {print} 'Du bist die echte Hedy!' + benutzername = {ask} 'Was ist dein Benutzername?' + passwort = {ask} 'Was ist dein Passwort?' + {if} benutzername {is} 'Hedy' + {if} passwort {is} 'geheim' + {print} 'Willkommen Hedy!' + {else} + {print} 'Zugang verwehrt' + {else} + {print} 'Zugang verwehrt!' ``` 14: story_text: | - Wir lernen weitere neue Elemente kennen! Du kennst sie vielleicht schon aus der Mathematik, das `<` und das `>` Zeichen. - Das `<` prüft, ob die erste Zahl kleiner ist als die zweite, so überprüft Alter `<` 12 zum Beispiel, ob Alter kleiner als 12 ist. - Wenn du überprüfen willst, ob die erste Zahl kleiner oder gleich der zweiten ist, kannst du `<=` verwenden, zum Beispiel Alter `<=` 11. - Das `>` prüft, ob die erste Zahl größer als die zweite ist, so überprüft Punkte `>` 10 zum Beispiel ob Punkte größer als 10 ist. - Wenn du überprüfen willst, ob die erste Zahl größer oder gleich der zweiten ist, kannst du `>=` verwenden, also zum Beispiel Punkte `>=` 11. - All diese Vergleiche kannst du mit einem `{if}` verwenden, das geht so: + Mit dem Beispielcode kannst du berechnen, ob du in einem Fach bestanden hast (also eine 4 oder besser). + Wie du siehst, ist dieser Code extrem ineffizient, wegen des langen Codes in Zeile 5. + Die Noten 1 bis 4 wurden getrennt programmiert. Aber - Glück für dich, in diesem Level wirst du lernen, wie du ohne diesen extrem langen Code zurecht kommst. example_code: | ``` alter = {ask} 'Wie alt bist du?' @@ -1744,32 +1725,33 @@ adventures: ``` for_command: name: '{for}' - default_save_name: for - description: for command + default_save_name: für + description: '{for} Befehl' levels: 10: story_text: |- - ## For - In this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements. - `{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces. + ## Für + In diesem Level lernen wir einen neuen Befehl: `{for}`. Mit `{for}` kannst du eine Liste erzeugen und alle Elemente verwenden. + `{for}` erzeugt einen Block, so wie `{repeat}` und `{if}`. Alle Linien im Block müssen mit 4 Leerzeichen beginnen. example_code: | ``` - animals = dog, cat, blobfish - {for} animal {in} animals - {print} 'I love ' animal + tierarten = Hunde, Katzen, Blobfische + {for} art {in} tierarten + {print} 'Ich mag ' art + ``` story_text_2: | - ### Exercise - Finish this code by adding `{for} action {in} actions` to line 2. + ### Übung + Vervollständige den Code, indem du `{for} aktion {in} aktionen` in Zeile 2 ergänzt. example_code_2: | ``` - actions = clap your hands, stomp your feet, shout Hurray! + aktionen = dann klatsch mit, stampfe mit dem Fuß, ruf Hurra! _ {repeat} 2 {times} - {print} 'If youre happy and you know it, ' action + {print} 'Bist du glücklich und du weißt es, ' aktion {sleep} 2 - {print} 'If youre happy and you know it, and you really want to show it' - {print} 'If youre happy and you know it, ' action + {print} 'Bist du glücklich und du weißt es und willst es wirklich zeigen' + {print} 'Bist du glücklich und du weißt es, ' aktion {sleep} 3 ``` 11: @@ -1780,22 +1762,22 @@ adventures: Probiere das Beispiel aus, um zu sehen was passiert! In diesem Level musst du wieder Einrückung in den Zeilen unter dem `{for}` anwenden. example_code: | ``` - {for} counter {in} {range} 1 {to} 10 - {print} counter - {print} 'Ready or not. Here I come!' + {for} zähler {in} {range} 1 {to} 10 + {print} zähler + {print} 'Eckstein, Speckstein, alles muss versteckt sein!' ``` 17: story_text: | - Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation. + Jetzt ändern wir die Einrückung ein wenig. Jedes Mal, wenn wir eine Einrückung benötigen, brauchen wir `:` in der Zeile vor der Einrückung. example_code: | ``` {for} i {in} {range} 1 {to} 10: {print} i - {print} 'Ready or not, here I come!' + {print} 'Eckstein, Speckstein, alles muss versteckt sein!' ``` 18: story_text: | - Lastly, we'll turn `{for} i {in} {range} 1 to 5` into real Python code, like this: + Zuletzt, machen wir aus `{for} i {in} {range} 1 to 5` so richtigen Python Code: example_code: | ``` {for} i {in} {range}(1,5): @@ -1876,13 +1858,13 @@ adventures: Dein Programm muss aus mindestens 10 Zeilen Code bestehen und du musst mindestens einen `{if}` und `{else}` Befehl verwenden. example_code: | ``` - friends {is} Jordan, Lucy, Dave - {print} 'I can predict if you will win the lottery tomorrow!' - person {is} {ask} 'Who are you?' - good_answer {is} Hurray! You win!, You will definitely win!, We have a winner! - bad_answer {is} Bad luck! Try again!, Another person will win, You lose! - {if} person {in} friends {print} good_answer {at} {random} - {else} {print} bad_answer {at} {random} + freunde {is} Johannes, Luzie, David + {print} 'Ich kann vorhersage, ob du morgen in der Lotterie gewinnen wirst!' + person {is} {ask} 'Wer bist du?' + gute_antwort {is} Hurra! Du gewinnst!, Du wirst sicher gewinnen!, Wir haben einen Gewinner! + schlechte_antwort {is} Pech gehabt! Versuch nochmal!, Eine andere Person wird gewinnen, Du verlierst! + {if} person {in} freunde {print} gute_antwort {at} {random} + {else} {print} schlechte_antwort {at} {random} ``` 6: story_text: | @@ -1969,62 +1951,62 @@ adventures: ``` functions: name: Funktionen - default_save_name: functions - description: functions + default_save_name: Funktionen + description: Funktionen levels: 12: story_text: | - In this level you'll learn how to use **functions**. A function is a block of code you can easily use multiple times. Using functions helps us organize pieces of code that we can use again and again. - To create a function, use `{define}` and give the function a name. Then put all the lines you want in the function in a indented block under the `{define}` line. - Leave one empty line in your code to make it look nice and neat. Great job! You have created a function! + In diesem Level lernst du, wie du **Funktionen** verwenden kannst. Eine Funktion ist ein Block code, der einfach öfter ausgeführt werden kann. Funktionen helfen uns dabei, Code zu organisieren, der immer wiederverwendet werden kann. + Um eine Funktion zu erzeugen, benutze `{define}`und gib der Funktion einen Namen. Dann schreibe alle Zeilen, die in der Funktion sein sollen, in einen eingerückten Block unter der `{define}`Zeile. + Lass eine Leerzeile in deinem Code, Damita alles Hübsch aussieht. Großartig! Du hast eine Funktion erzeugt. - Now, whenever we need that block of code, we just use {call} with the function's name to call it up! We don't have to type that block of code again. + Jetzt können wir jedes mal, wenn wir diesen Block Code benötigen, einfach {call} mit dem Namen der Funktion verwenden, um sie aufzurufen. Diesen Block Code müssen wir nicht immer wieder schreiben. - Check out this example code of a game of Twister. The function 'turn' contains a block of code that chooses which limb should go where. + Schau dir diesen Beispiel Code von einem Spiel Twister an. Die Funktion 'zug' enthält einen Block Code, der bestimmt, wohin welches Körperteil gehen soll. - ### Exercise - Finish this code by setting the 2 variables chosen_limb and chosen_color. - Then, choose how many times you want to call the function to give the twister spinner a spin. + ### Übung + Vervollständige den Code, indem du die beiden Variablen gewähltes_körperteil und gewählte_farbe setzt. + Wähle dann, wie oft du die Funktion aufrufen willst, dem Twister den richtige Dreh mit zu eben. - ### Exercise 2 - Improve your code by adding a variable called 'people'. Use the variable to give all the players their own command in the game. - For example: 'Ahmed, right hand on green' or 'Jessica, left foot on yellow'. + ### Übung 2 + Verbessere deinen Code, indem du eine Variable 'personen" ergänzt. Benutzte die Variable, um allen Spielern ihre eigenen Befehle im Spiel zu geben. + Zum Beispiel: 'Achmed, rechte Hand auf grün' oder 'Jessica, linker Fuß auf gelb'. example_code: | ``` - sides = 'left', 'right' - limbs = 'hand', 'foot' - colors = 'red', 'blue', 'green', 'yellow' + seiten = 'links', 'rechts' + körperteile = 'hand', 'fuß' + farben = 'rot', 'blau', 'grün', 'gelb' - {define} turn - chosen_side = sides {at} {random} - chosen_limb = limbs _ - chosen_color = colors _ - {print} chosen_side ' ' chosen_limb ' on ' chosen_color + {define} zum + gewählte_seite = seiten {at} {random} + gewähltes_körperteil = körperteile _ + gewählte_farbe = farben _ + {print} gewählte_seite ' ' gewähltes_körperteil ' auf ' gewählte_farbe - {print} 'Lets play a game of Twister!' - {for} i {in} {range} 1 to _ - {call} turn + {print} 'Lass uns eine Runde Twister spielen!' + {for} i {in} {range} 1 {to} _ + {call} zug {sleep} 2 ``` 13: story_text: | - Now that you've learned how to use functions, you'll learn how to use a function with an argument. - An **argument** is a variable that is used within a function. It is not used outside the function. + Nun, da du gelernt hast, wie Funktionen verwendet werden, wirst du lernen, wie du eine Funktion mit einem Argument verwenden kannst. + EIn **Argument** ist eine Variable, die in einer Funktion verwendet wird. Ausserhalb der Funktion wird sie nicht verwendet. - For example in this code we've programmed the first verse of the song 'My Bonnie is over the ocean'. - In this example code the argument `place` is used. Place is a variable that is only used in the function, so an argument. - To use `place` we have programmed the line `define song with place`. - When the function is called, computer will replace the argument `place`, with the piece of text after `call song with`. + In diesem Code haben wir die beispielsweise die erste Strophe des Liedes 'My Bonnie is over the ocean' programmiert. + Im Beispielcode wird das Argument `ort`verwendet. Ort ist eine Variable, die nur in der Funktion genutzt wird, also ein Argument. + Um `ort`zu verwenden haben wir `{with}`nach `{define}`geschrieben. + Wenn die Funktion aufgerufen wird, wird der Computer das Argument 'ort' mit dem Text nach `{call} lied {with}`ersetzen. - ### Exercise - The next verse of this song goes: + ### Übung + Die nächste Strophe des Liedes geht so: Last night as I lay on my pillow Last night as I lay on my bed Last night as I lay on my pillow I dreamed that my Bonnie is dead - Can you program this verse in the same way as the example? + Kannst Du diese Strophe so programmieren wie das Beispiel? example_code: | ``` {define} song {with} place @@ -2036,55 +2018,55 @@ adventures: ``` 14: story_text: | - In the previous levels you have learned to create functions and use arguments with them. Another great use of a function is to let it calculate something for you. - You can give the function a calculation and it will give you the answer of the calculation. This answer is called a **return value**. + Im letzten Level hast du gelernt, Funktionen zu erzeugen und mit Argumenten zu verwenden. Ein anderer wichtiger Nutzen einer Funktion ist, sie etwas für dich berechnen zu lassen. + Du kannst die Funktion eine Berechnung anstellen lassen und dir das Ergebnis der Berechnung geben lassen. Das Ergebnis wird **rückgabe wert** genannt. - For example, in this code the function calculate_new_price will calculate the new price of any item. It will give you the new price as a return value. + In diesem Code beispielsweise wird die Funktion berechne_neuen_preis den neuen Preis eines Artikel berechnen. Sie gibt dir den neuen Preis des Artikels als Rückgabewert - ### Exercise - Finish this code. We have already made the variable new_price for you, you only need to set it. - You should finish the line of code by calling the function that calculates the new price. + ### Übung + Vervollständige diesen Code. Wir haben schon die schon die Variable neuer_preis definiert, du musst sie nur noch richtig setzen. + Du solltest die Codezeile fertigstellen, indem du die Funktion aufrufst, die den neuen Preis berechnet. example_code: | ``` - {define} calculate_new_price {with} amount, percentage - percentage = percentage / 100 - discount_amount = amount * percentage - return amount - discount_amount + {define} berechne_neuen_preis {with} menge, prozent + prozent = prozent / 100 + rabbat = menge * prozent + {return} menge - rabatt - old_price = {ask} 'How much is on the price tag?' - discount = {ask} 'What percentage is the discount?' + alter_preis = {ask} 'Wie ist der Listenpreis?' + nachlass = {ask} 'Gibt es Prozente?' - new_price = _ calculate_new_price {with} old_price, _ - {print} 'The new price is ' new_price ' dollar' + neuer_preis = _ berechne_neuen_preis {with} alter_preis, _ + {print} 'Der neue Preis ist ' neuer_preis ' Euro' ``` 18: story_text: | - Let's make functions the Pythons way! To define a function, we no longer use: + Lass uns Funktionen verwenden, wie es in Python geht! Um eine Funktion zu definieren, benutzen wir nicht länger: - `{define} name_function {with} argument_1, argument_2:` + `{define} name_funktion {with} argument_1, argument_2:` - but we use: + sondern: - `{def} name_function(argument_1, argument_2):`. + `{def} name_funktion(argument_1, argument_2):`. - If you don't want to use arguments, you just leave the space between the parantheses empty. - To call a function, we don't need the `{call}` command anymore. You just type the name of the function. + Wenn du keine Argumente verwenden willst, lässt du den Platz zwischen den Klammern einfach leer. + Um eine Funktion aufzurufen, müssen wir den `{call}` Befehl nicht mehr verwenden. Schreib einfach den Namen der Funktion. example_code: | ``` - {def} calculate_score(answer, correct_answer): - {if} answer == correct_answer: - score = 1 - {elif} answer == '?': - score = 0 + {def} berechne_punkte(antwort, richtige_antwort): + {if} antwort == richtige_antwort: + punkte = 1 + {elif} antwort == '?': + punkte = 0 {else}: - score = -1 - {return} score + punkte = -1 + {return} punkte - answer = {input} ('Where can you find the Eiffel Tower?') - correct_answer = 'Paris' - score = calculate_score(answer, correct_answer) - {print} ('Your score is... ', score) + antwort = {input} ('Wo findest du den Eiffelturm?') + richtige_antwort = 'Paris' + punkte = berechne_punkte(antwort, richtige_antwort) + {print} ('Dein Punktestand ist... ', punkte) ``` guess_my_number: name: Guess my number @@ -2093,26 +2075,26 @@ adventures: levels: 14: story_text: | - In this level you can program the game 'Guess my number' + In diesem Level kannst du das Spiel 'Errate meine Zahl' programmiere. - ### Exercise - Fill in the correct symbols on the blanks to get the game to work. + ### Übung + Ergänze die richtigen Zeichen in den Leerstellen, so dass das Spiel funktioniert example_code: | ``` - {print} 'Guess my number' - numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 - number = numbers {at} {random} - game = 'on' + {print} 'Errate meine Zahl' + zahlen = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + zahl = zahlen {at} {random} + spiel = 'läuft' {for} i {in} {range} 1 {to} 10 - {if} game == 'on' - guess = {ask} 'Which number do you think it is?' - {if} guess _ number - {print} 'Lower!' - {if} guess _ number - {print} 'Higher!' - {if} guess _ number - {print} 'You win!' - game = 'over' + {if} spiel == 'läuft' + vermutung = {ask} 'Welche Zahl meinst du ist es?' + {if} vermutung _ zahl + {print} 'Kleiner!' + {if} vermutung _ zahl + {print} 'Größer!' + {if} vermutung _ zahl + {print} 'Gewonnen!' + spiel = 'vorbei' ``` hangman: name: Galgenmännchen @@ -2252,23 +2234,23 @@ adventures: harry_potter: name: Harry Potter default_save_name: Harry Potter - description: Harry Potter adventures + description: Harry Potter Abenteuer levels: 10: story_text: | - ### Exercise - We can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed. - **Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show. + ### Übung + Wir können auch ein Orakel im Harry Potter Stil machen. Fülle die Leerstellen aus, so dass 9 Zeilen ausgegeben werden. + **Extra** Ändere die Sil des Orakels in dein Lieblingsbuch, -film oder -serie. example_code: | ``` - houses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw - subjects = potions, defence against the dark arts, charms, transfiguration - fears = Voldemort, spiders, failing your OWL test - names = Harry, Ron, Hermione + häuser = Gryffindor, Slytherin, Hufflepuff, Ravenclaw + fächer = Zaubertränke, Verteidigung gegen die dunklen Künste, Zauberkunst, Verwandlung + ängste = Voldemort, Spinnen, Durchfallen beim OWL Test + namen = Harry, Ron, Hermione _ - _ {print} name ' is placed in ' houses {at} {random} - _ {print} name ' is great at ' subjects {at} {random} - _ {print} name 's greatest fear is ' fears {at} {random} + _ {print} name ' is placed in ' häuser {at} {random} + _ {print} name ' is great at ' fächer {at} {random} + _ {print} name 's hat am meisten Angst vor ' ängste {at} {random} ``` haunted: name: Spukhaus @@ -2335,6 +2317,12 @@ adventures: In den vorherigen Leveln hast du eine Einleitung ins Spukhaus-Spiel gemacht, aber wie du vielleicht gemerkt hast war das Ender der Geschichte immer schrecklich. In diesem Level kannst du die Geschichte interaktiver machen, indem du den Ausgang des Spiels änderst. Manchmal wirst du gefressen, manchmal kannst du entkommen! Lass Hedy zufällig entscheiden! + + ### Übung + Kopiere den Beispielcode und fülle die Leerstellen, so dass er funktioniert! + + **Extra** Die Geschichte ist ziemlich einfach. Vielleicht kannst du sie noch grusliger machen, indem du dir eine aufregendere Geschichte ausdenkst. + Es gibt bisher auch nur sehr wenige verschiedene Enden, es gib ja nur drei Möglichkeiten, was hinter der Tür sein kann. Vielleicht fallen dir noch mehr Monster für die Liste ein! example_code: | ``` _ Entfliehe dem Spukhaus! @@ -2377,7 +2365,7 @@ adventures: Kannst du die 4 fehlenden Wörter finden, um den Code zu vervollständigen? example_code: | ``` - {print} 'Entkomme aus dem Spukhaus!' + {print} 'Entkomme dem Spukhaus!' {print} 'Es sind 3 Türen vor dir...' Türen {is} 1, 2, 3 Monster {is} Werwolf, Mumie, Vampir, Zombie @@ -2443,28 +2431,28 @@ adventures: ``` 14: story_text: | - ### Exercise - In this level you can use the `<` and `>` symbol to introduce lives to your game. - Make sure the player loses a life when they come across the wrong monster and that the game stops if you have no lives left. + ### Übung + In diesem Level kannst du das `<` und `>` Symbol verwenden, um Leben in deinem Spiel zu verwenden. + Stelle sicher, dass die Spieler:in ein Leben verliert, wenn sie auf das falsche Monster trifft und das Spiel vorbei ist, wenn keine Leben mehr übrig sind. example_code: | ``` - {print} 'Escape from the haunted house' - lives = 3 - doors = 1, 2, 3 - monsters = 'the wicked witch', 'a zombie', 'a sleeping 3 headed dog' + {print} 'Entkomme dem Spukhaus' + leben = 3 + türen = 1, 2, 3 + monsters = 'die böse Hexe', 'ein Zombie', 'einen schlafenden 3-köpfiger Hund' {for} i {in} {range} 1 {to} 10 - {if} lives _ - good_door = doors {at} {random} + {if} leben _ + richtige_tür = türen {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' + gewählte_tür = {ask} 'Welche Tür nimmst du?' + {if}richtige_tür == gewählte_tür + {print} 'Du hast die richtige Tür gewählt' {else} - {print} 'You see...' monster - {if} monster == 'a sleeping 3 headed dog' - {print} 'Pffieuw.... Its asleep' + {print} 'Du siehst...' monster + {if} monster == 'einen schlafenden 3-köpfigen Hund' + {print} 'Ahh.... Er schläft' {else} - {print} 'You lose one life' + {print} 'Du verlierst ein Leben' lives = _ {else} {print} 'GAME OVER' @@ -2509,10 +2497,10 @@ adventures: levels: 13: story_text: | - In the previous adventure you have learned how to use an argument in a function, and you've learned how to combine it with an {ask}. - You might have wondered why you would use functions, because the functions in the example were only one line of code. - Now we will show you what a bigger function looks like and we will use multiple agruments now as well. You'll see how much better it is to use a function once the function gets bigger. - Here is an example of a function with arguments combined with {ask} commands. + Im letzten Abenteuer hast du gelernt, ein Argument in einer Funktion zu verwenden. Du hast auch glen, wie du das mit einem {ask} kombinieren kannst. + Du hast dich vielleicht gefragt, warum du eine Funktion verwenden solltest, weil die Funktionen im Beispiel nur eine Zeile lange sind. + Jetzt werden wir dir zeigen, wie größere Funktionen aussehen. Wir werden jetzt auch mehrere Argumente verwenden. Du wirst sehen, wie viel besser es ist, eine Funktion zu verwenden, wenn die Funktion größer wird. + Hier ist ein Beispiel einer Funktion mit Argumenten, kombiniert mit dem {ask} Befehl. example_code: | ``` {define} welcome_message {with} title, last_name, country, room_number @@ -2545,7 +2533,7 @@ adventures: levels: 5: story_text: | - ## If... else.... + ## Falls... sonst.... Im Level 5 gib's was Neues, das `{if}`! Mit dem `{if}` kannst zu zwischen zwei verschiedenen Möglichkeiten wählen. Dieses Programm druckt Wunderbar, falls du Hedy als Name eingibst und Buh, bei anderen Eingaben. `{ask}` und `{print}` funktionieren noch so wie in Level 4. @@ -2604,31 +2592,31 @@ adventures: ``` in_command: name: '{in}' - default_save_name: in_command - description: Introducing the in command + default_save_name: in_Befehl + description: Einführung des {in} Befehls levels: 5: story_text: | - ## Lists - When we want to check if something is in a list, we can now use the `{in}` command. - This code prints pretty! if you choose green or yellow, and meh otherwise. + ## Listen + Wenn wir prüfen wollen, ob etwas in einer Liste enthalten ist, können wir den `{in}` Befehl. + Dieser Code druckt Hübsch! falls du grün oder gelb auswählst und sonst bäh. example_code: | ``` - pretty_colors {is} green, yellow - favorite_color {is} {ask} 'What is your favorite color?' - {if} favorite_color {in} pretty_colors {print} 'pretty!' - {else} {print} 'meh' + hübsche_farben {is} grün, gelb + lieblingsfarbe {is} {ask} 'Was ist deine Lieblingsfarbe?' + {if} lieblingsfarbe {in} hübsche_farben {print} 'Hübsch!' + {else} {print} 'bäh' ``` story_text_2: | - ### Exercise - Finish the example code by filling in the blanks with commands that you've learned. - When you've finished the code, try to create a code of your own and use a question that you've thought of yourself. + ### Übung + Vervollständige den Beispielcode indem du die Leerstellen mit Befehlen füllst, die du gelernt hast. + Wenn du den Code fertig hast, versuche selbst Code mit Frage zu entwickeln, die du dir selbst ausgedacht hast.. example_code_2: | ``` - animals is dog, cow, sheep - answer is ask 'What is your favorite animal?' - _ answer _ animals _ 'Mine too!' - _ _ 'My favorite animals are dogs, cows and sheep' + tiere {is} Hund, Kuh, Schaf + antwort {is} {ask} 'Was is dein Lieblingstier?' + _ antwort _ tiere _ 'Meines auch!' + _ _ 'Meine Lieblingstiere sind Hunde, Kühe und Schafe' ``` is_command: name: '{is}' @@ -2688,12 +2676,12 @@ adventures: Ab diesem Level kannst du zwei Gleichheitszeichen verwenden, um etwas zu vergleichen. Das ist in den meisten Programmiersprachen so: example_code_2: | ``` - name = {ask} 'Wie heisst du?' + name = {ask} 'Wie heißt du?' {if} name == 'Hedy' {print} 'Du bist cool!' ``` story_text_3: | - Du kannst auch vergleichen, ob etwas *nicht* gleich wie etwas anderes ist. Dazu benutzt du so `!=`: + Du kannst auch vergleichen, ob etwas *nicht* gleich wie etwas anderes ist. Dazu benutzt du `!=` so: example_code_3: | ``` name = {ask} 'Wie heisst du?' @@ -2744,8 +2732,8 @@ adventures: ``` maths: name: Mathe - default_save_name: maths - description: Introducing maths + default_save_name: Mathe + description: Mathe einführen levels: 6: story_text: | @@ -2757,26 +2745,26 @@ adventures: Darum multiplizieren wir mit dem Sternchen über der 8: `5 * 5`. Lies das als "5 mal 5", so kannst du es dir am Besten merken. example_code: | ``` - {print} '5 plus 5 is ' 5 + 5 - {print} '5 minus 5 is ' 5 - 5 - {print} '5 times 5 is ' 5 * 5 + {print} '5 plus 5 ist ' 5 + 5 + {print} '5 minus 5 ist ' 5 - 5 + {print} '5 mal 5 ist ' 5 * 5 ``` 12: story_text: |- - **Decimal numbers** - So far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers. + **Dezimalzahlen** + Bis jetzt hat Hedy Dezimalzahlen wie 1.5 nicht erlaubt, aber jetzt erlauben wir sie. Beachte, dass Computer `.` als Komma verwenden. example_code: | ``` - {print} 'Two and a half plus two and a half is...' + {print} 'Zweieinhalb plus Zweieinhalb ist...' {print} 2.5 + 2.5 ``` story_text_2: |- - **Maths with words** - In this level you can also do addition with words like this: + **Mathe mit Worten** + In diesem Level kannst du so Mathe mit Worten machen: example_code_2: | ``` - a = 'Hello ' - b = 'world!' + a = 'Hallo ' + b = 'Welt!' {print} a + b ``` @@ -3279,26 +3267,26 @@ adventures: ``` 14: story_text: | - ### Exercise - In this level you can let Hedy tell you if you have saved up enough money! - Finish this code by filling in the blanks! + ### Übung + In diesem Level kannst du dir von Hedy sagen lassen, ob du genug Geld gespart hast. + Vervollständige den Code, in dem du die Leerstellen füllst. example_code: | ``` - _ calculate_budget with wish, money, allowance - to_save = wish - money - weeks = to_save / allowance - {if} wish _ money - {print} 'You need to save up some more!' - {print} 'Youll need ' weeks ' more weeks.' + _ berechne_budget {with} wunsch, erspartes, taschengeld + zu_sparen = wunsch - erspartes + wochen = zu_sparen / taschengeld + {if} wunsch _ erspartes + {print} 'Du musst noch weiter sparen!' + {print} 'Du brauchst noch 'wochen ' Wochen.' {else} - {print} 'Great! You have enough' - {print} 'Lets go shopping!' + {print} 'Großartige! Du hast genug' + {print} 'Kommt, wir gehen einkaufen!' - money = {ask} 'How much money have you saved?' - wish = {ask} 'How much money do you need?' - allowance = {ask} 'How much pocket money do you get each week?' + erspartes = {ask} 'Wie viel Geld hast du gespart?' + wunsch = {ask} 'Wie viel Geld brauchst du?' + taschengeld = {ask} 'Wie viel Taschengeld bekommst du jede Woche?' - {call} calculate_budget with _, _, _ + {call} berechne_budget {with} _, _, _ ``` pressit: name: Tastengedrücke @@ -3350,11 +3338,11 @@ adventures: 1: story_text: | ## Der Drucken Befehl - Mit Hilfe des `{print}` Befehls kannst du den Text auf dem Bildschirm anzeigen. + Mit Hilfe des `{print}` Befehls kannst du den Text auf dem Bildschirm anzeigen. example_code: | ``` - {print} Hi there, programmer! - {print} Welcome to Hedy! + {print} Hallo, Programmierer! + {print} Willkommen bei Hedy! ``` story_text_2: | ### Übung @@ -3365,7 +3353,7 @@ adventures: Viel Spaß! example_code_2: | ``` - _ Hello! + _ Hallo! ``` 18: story_text: |- @@ -3392,6 +3380,7 @@ adventures: levels: 14: story_text: | + ### Übung In diesem Abenteuer kannst du dein eigenes Quiz machen! Füll alle Lücken aus, füge mehr Fragen hinzu und hab Spaß bei deinem eigenen Quiz! Du kannst das Quiz machen über was du möchtest: dein Hobby, dein Lieblingstier, dein Lieblingsbuch, eigentlich über alles! example_code: | @@ -3445,37 +3434,37 @@ adventures: ``` 12: story_text: | - **All texts need to be in quotation marks** - For this level on you will also have to use quotation marks when storing a text with `=`: + **Alle Texte müssen in Anführungszeichen stehen** + Ab diesem Level musst du auch Anführungszeichen verwenden, um Text mit `=` zu speichern: example_code: | ``` - name = 'Hedy the Robot' - {print} 'Hello ' name + name = 'Hedy der Roboter' + {print} 'Hallo ' name ``` story_text_2: | - **All items in lists need quotation marks too** - Lists are texts, so they need quotation marks too. Mind that each single item on the list has quotation marks. - This allows you to save two words as 1 item on the list, for example 'Black Widow'. + **Alle Helden in dieser Liste müssen auch in Anführungszeichen stehen** + In Listen müssen Texte auch in Anführungszeichen stehen. Beachte, dass jeder einzelne Held in der Liste Anführungszeichen hat. + Damit kann der Name auch aus zwei Wörtern bestehen, wie zum Beispiel 'Silver Surfer'. example_code_2: | ``` - superheroes = 'Spiderman', 'Batman', 'Black Widow' - {print} superheroes {at} {random} + superhelden = 'Spiderman', 'Batman', 'Siver Surfer' + {print} superhelden {at} {random} ``` story_text_3: | - **All text after `{if}` comparisons need quotation marks too** + **Alle Texte nach `{if}` Vergleichen brauchen auch Anführungszeichen** example_code_3: | ``` - name = {ask} 'What is your name?' - {if} name = 'Hedy the Robot' - {print} 'Hi there!' + name = {ask} 'Wie heißt du?' + {if} name = 'Hedy der Roboter' + {print} 'Hallo!!' ``` story_text_4: | - **Numbers don't need quotation marks** - For numbers, you do not use quotation marks in the `=`: + **Zahlen brauchen keine Anführungszeichen** + Für Zahlen benutzen wir keine Anführungszeichen bei `=`: example_code_4: | ``` - score = 25 - {print} 'You got ' score + punkte = 25 + {print} 'Du hast ' punkte ``` random_command: name: '{random}' @@ -3736,7 +3725,16 @@ adventures: ``` 6: story_text: | - In diesem Level kannst du Mathe verwenden um den Gesamtpreis einer Bestellung auszurechnen. Da macht dein virtuelles Restaurant realistischer. + In diesem Level kannst du Mathe verwenden um den Gesamtpreis einer Bestellung auszurechnen. Das macht dein virtuelles Restaurant realistischer. + Aber du kannst deinem virtuellen Restaurant noch viele weitere Dinge hinzufügen, zum Beispiel mehr Gerichte. + + ### Übung + Du kann viele weitere Dinge zu deinem virtuellen Restaurant ergänzen. Zum Beispiel kannst du... + - frage, wie viele Personen kommen und den Preis mit der Anzahl multiplizieren? + - ein weiteres Gericht hinzufügen? + - Gästen einen Rabatt geben, wenn sie einen (geheimen) Couponcode eingeben? + - ein Kinderessen hinzufügen? + - dir noch weitere lustige Dinge ausdenken und ergänzen? example_code: | Du kannst einen einfachen Restaurant Code erstellen. Das geht so: ``` @@ -3877,6 +3875,10 @@ adventures: mit Pommes und Pfannkuchen. Oder natürlich etwas ganz anderes! example_code: | ``` + preis = 10 + essen = {ask} 'Was willst du essen?' + getränk = {ask} 'Was willst du trinken?' + {if} essen {is} 'sandwich' _ getränk {is} 'saft' {print} 'Das ist unser Rabattmenü' preis = preis - 3 {if} getränk {is} 'Wasser' _ getränk {is} 'Saft' @@ -4009,19 +4011,11 @@ adventures: ``` 10: story_text: | - Bist du zu faul, um das Spiel selbst zu spielen? Lass Hedy es für dich spielen! - Du musst nur die Namen der Spieler ausfüllen und sie bekommen eine zufällige Auswahl. - - ### Übung 1 - Vervollständige das Programm, indem du eine Liste von Namen ausfüllst. - - ### Übung 2 - Füge einen Computerspieler hinzu, der mit jedem Spieler auswählt. - - **(extra)** Gehe zurück zu deinem Code und entscheide, wer in jeder Runde gewinnt: der Computer oder die benannte Person. + ### Übung + In den vorherigen Leveln hast du oft dein eigenes Schere-Stein-Papier Spiel gemacht. Kann du den Code vervollständigen, indem du den `{for}`Befehl so zu verwenden, dass das Spiel funktioniert? example_code: | ``` - Auswahl = rock, paper, scissors + Auswahl = Schere, Stein, Papier Personen = _ {for} Spieler {in} Personen {print} Spieler ' wählt ' Auswahl {at} {random} @@ -4082,8 +4076,8 @@ adventures: Mache den Stein, Schere, Papier Code interaktiv, in dem du den `{ask}` Befehl und eine Frage zu deinem Stein, Schere, Papier Code hinzufügst. example_code: | ``` - choice is _ - {print} I choose choice + wahl {is} _ + {print} Ich wähle wahl ``` secret: name: Superspion @@ -4377,7 +4371,7 @@ adventures: ### Übung Kannst du die richtige Anzahl Leerzeichen zum Einrücken hinzufügen, damit das Lied richtig spielt? - Tipp: Nicht jede Zeile braucht Einrückung. + Hinweis: Nicht jede Zeile braucht Einrückung. example_code: | ``` Aktionen = 'klatsche in die Hand', 'stampfe mit dem Fuß', 'ruf Hurra' @@ -4391,8 +4385,8 @@ adventures: ``` 13: story_text: | - In the previous adventure you have learned how to use an argument in a function, but did you know that you could combine them with {ask} commands as well? - In this example we have changed the 'My Bonnie' program and made it interactive. You are now asked where Bonnie is. + Im letzten Abenteuer hast du gelernt, wie du ein Argument in einer Funktion verwenden kannst. Aber wusstest du, dass du die Argumente auch mit dem {ask} Befehl kombinieren kannst? + In diesem Beispiel haben wir das 'My Bonnie' Programm verändert und interaktiv gemacht. Jetzt kannst du fragen, wo Bonnie ist. example_code: | ``` {define} song {with} place @@ -4465,19 +4459,23 @@ adventures: levels: 12: story_text: | - Songs contain a lot of repetition. We can capture it with a function! - ### Exercise - Look at the example code with the function. Fill out the two lines so the full song is printed. + In Liedern gibt es viele Wiederholungen. Das können wir mit Funktionen abbilden! + ### Übung + Schau die den Beispiel Code mit den Funktionen an. Füll die beiden Zeilen so, dass das ganze Lied gespielt wird. example_code: | ``` - {define} twinkle - {print} 'Twinkle' + {define} laterne + {print} 'Laterne' {print} '...' - {call} twinkle - {print} 'Up above the world so high' - {print} 'Like a diamond in the sky' + {define} brenne_auf + {print} 'Brenne auf mein Licht,' + + {call} laterne + {print} 'Sonne, Mond und Sterne' + {call} brenne_auf {call} _ + {print} 'Aber nur meine Liebe Laterne nicht' ``` 16: story_text: | @@ -4816,7 +4814,7 @@ adventures: {forward} 50 ``` story_text_2: | - **extra**Wir können auch das Programm verbessern, das verschiedene Formen zeichnet. Vervollständige den Code und du kannst jedes Vieleck zeichnen, das du möchtest! + **Extra** Wir können auch das Programm verbessern, das verschiedene Formen zeichnet. Vervollständige den Code und du kannst jedes Vieleck zeichnen, das du möchtest! example_code_2: | ``` Ecken = {ask} 'Wie viele Ecken soll die Form haben?' @@ -4868,7 +4866,7 @@ adventures: Fülle die Funktion, so dass drei Quadrate erzeugt werden. Wenn du willst, dass das Bild hübscher aussieht, kannst du die Linien zwischen den Quadraten weiss machen. ### Übung 2 - Der Code kann noch kürzer gemacht werden. Lege die letzten Zeilen in einen `{repeat}`Befehl, so dass die Figuren gleich bleiben. + Der Code kann noch kürzer gemacht werden. Lege die letzten Zeilen in einen `{repeat}` Befehl, so dass die Figuren gleich bleiben. ### Übung 3 Erzeuge deine eigene Zeichnung mit verschiedenen Figuren. @@ -4887,8 +4885,8 @@ adventures: ``` turtle_draw_it: name: Zeichne! - default_save_name: Draw it - description: Draw this picture with the turtle + default_save_name: Zeichne + description: Zeichne dieses Bild mit der Schildkröte levels: 1: story_text: | @@ -4998,17 +4996,17 @@ adventures: 9: story_text: | - ### Exercise - Recreate the drawings with the turtle! + ### Übung + Mache die Zeichnungen mit der Schildkröte nach! - **Extra** The number in brackets indicates in how many lines of code this figure can be drawn. Can you do it in the same amount of lines? + **Extra** Die Zahl der Klammern zeigt an, wie viele Zeilen Code notwendig sind, die Zeichnung zu malen. Kannst du es mit derselben Anzahl von Zeilen machen? - **Extra** Give the player a choice which country they would like to see the flag of. + **Extra** Gib dem Spieler die Wahl, von welchem Land er die Flagge sehen will.
- Cross (7) - Randomly colored nested squares (8) - Flags + Kreuz (7) + Verschachtelte Quadrate mit zufälliger Farbe (8) + Flaggen
example_code: | Hinweis für die verschachtelten Quadrate: @@ -5022,9 +5020,9 @@ adventures: ``` land = {ask} 'Von welchem Land willst Du die Flagge sehen?' {if} land {is} 'Deutschland' - color_1 = Rot - color_2 = Weiß - color_3 = Schwarz + farbe_1 = Rot + farbe_2 = Weiß + farbe_3 = Schwarz ``` 10: story_text: | @@ -5036,10 +5034,10 @@ adventures: Ampel example_code: | - Hinweis Verschachteltes Hexagon: + Hinweis verschachteltes Hexagon: ``` entfernungen = 100, 80, 60, 40, 20 - {for} Entfernung {in} entfernungen + {for} entfernung {in} entfernungen _ ``` @@ -5068,101 +5066,102 @@ adventures: ``` 11: story_text: | - ### Exercise - Recreate the drawings with the turtle! + ### Übung + Mache die Zeichnungen mit der Schildkröte nach!
- Beehive (6) - Fan (5) - Snowflake (13) + Bienenstock (6) + Fächer (5) + Schneeflocke (13)
example_code: | - Hint Beehive: + Hinweis Bienenkorb: ``` - {for} amount_of_combs {in} {range} 1 {to} _ - {for} walls_of_one_comb {in} {range} 1 {to} _ + {for} anzahl_von_waben {in} {range} 1 {to} _ + {for} wände_einer_wabe {in} {range} 1 {to} _ {forward} _ {turn} _ {forward} _ {turn} _ ``` - Hint Fan: - Start out like the fan you made in level 7. Or take a peak at the hint for the beehive, because the codes are very similar. + Hinweis Fächer: + Beginne mit dem Fächer, den du in Level 7 gemacht hast. Oder wirf einen Blick auf den Hinweis für den Bienenkorb, weil der Code sehr ähnlich ist. - Hint Snowflake: Start by making one 'leg' and repeat it 6 times. + Hinweis Schneeflocke: Beginne, indem du einen 'Ast' machst und wiederhole es 6 Mal. 12: story_text: | - ### Exercise - Recreate the drawings with the turtle! - Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this: + ### Übung + Mache die Zeichnung mit der Schildkröte nach! + Hinweis: Armband Design Programm. Definiere zunächst eine Funktion **für jede Form**. Dann füge die Form so zum Armband hinzu:: - Bracelet Designing program + Armband Design Programm example_code: | + Hinweis Armband Design Programm ``` - {define} draw_a_square + {define} zeichne_ein_quadrat _ - {color} white + {color} weiss {turn} -90 {forward} 300 {turn} 180 {for} i {in} {range} 1 {to} 5 - {color} gray + {color} grau {forward} 100 - shape = {ask} 'What kind of shape would you like next on the bracelet?' - chosen_color = {ask} 'In which color?' - {color} chosen_color - {if} shape = 'square' - {call} draw_a_square + form = {ask} 'Welche Form möchtest du als nächstes mit deinem Armband haben?' + gewählte_farbe = {ask} 'In welcher Farbe?' + {color} gewählte_farbe + {if} form = 'quadrat' + {call} zeichne_ein_quadrat ``` 13: story_text: | - ### Exercise - Recreate the drawings with the turtle! + ### Übung + Mache die Zeichnngen mit der Schildkröte nach! - Street in different sizes - Colored street - Snow Storm + Straße in verschiedenen Größen + Gefärbte Straße + Schneesturm example_code: | - Hint Street in different sizes + Hinweis Straße in verschiedenen Größen ``` - {define} draw_a_house {with} size + {define} zeichne_ein_haus {with} größe _ - {call} draw_a_house {with} 90 - {call} draw_a_house {with} 60 - {call} draw_a_house {with} 30 + {call} zeichne_ein_haus {with} 90 + {call} zeichne_ein_haus {with} 60 + {call} zeichne_ein_haus {with} 30 ``` - Hint Colored street + Hinweis Farbige Straße ``` - {define} draw_a_house {with} chosen_color + {define} zeichne_ein_haus {with} gewählte_farbe _ ``` - Hint Snow Storm + Hinweis Schneesturm ``` - {define} draw_snowflake {with} length, color + {define} zeichne_schneeflocke {with} länge, farbe _ - numbers = 10, 20, 30 - colors = _ + zahlen = 10, 20, 30 + färben = _ {for} i {in} {range} 1 {to} 5 - random_number = _ - random_color = _ - {call} draw_snowflake {with} random_number, random_color - {color} white - {turn} random_number * 5 + zufällige_zahl = _ + zufällige_farbe = _ + {call} zeichne_schneeflocke {with} zufällige_zahl, zufällige_farbe + {color} weiß + {turn} zufällige_zahl * 5 {forward} 80 ``` 14: story_text: | - ### Exercise - Create a program that asks the player how many corners their figure should have and then creates that figure. - The figure in the image is the output when the player fills in 10. + ### Übung + Schreibe ein Programm, das die Spieler fragt, wie viele Ecken ihre Figur haben soll und dann die Figur zeichnet. + Die Figur im Bild ist die Ausgabe, wenn der Spieler eine 10 eingibt.
@@ -5170,41 +5169,41 @@ adventures:
example_code: | ``` - {define} calculate_degrees {with} amount_of_corners - _ 360 / amount_of_corners + {define} berechne_winkel {with} anzahl_ecken + _ 360 / anzahl_ecken - {define} draw_figure {with} degrees + {define} zeichne_figur {with} winkel _ - {forward} 400/amount_of_corners + {forward} 400/anzahl_ecken {turn} _ - amount_of_corners = {ask} _ - degrees = {call} _ {with} _ + anzahl_ecken = {ask} _ + winkel = {call} _ {with} _ {call} _ {with} {call} _ {with} ``` 15: story_text: | - ### Exercise - Recreate the drawings with the turtle! + ### Übung + Mache die Zeichnungen mit der Schildkröte nach! - Spiral + Spirale example_code: | - Spiral + Spirale ``` - distance = 5 - {while} distance < 200 - distance = distance + 5 + entfernung = 5 + {while} entfernung < 200 + entfernung = entfernung + 5 _ ``` story_text_2: | - Fan + Fächer example_code_2: | - Fan + Fächer ``` - {define} draw_a_square {with} side + {define} zeichne_ein_quadrat {with} seitenlänge _ i = 100 @@ -5214,10 +5213,10 @@ adventures: i = i - 3 ``` story_text_3: | - Star + Stern example_code_3: | - Star - A star is usually drawn using 144-degree-turns. If you change this slightly to 143 degrees for example and repeat the pattern multiple times with a {while} loop you can make this figure. + Stern + Ein Star wird üblicherweise mit 144° Drehungen gezeichnet. Wenn du das zum Beispiel leicht in einen 143° Winkel abänderst und das Muster mehrfach mit einer {while} Schleife wiederholst, kannst du die gezeigte Figur zeichnen. while_command: name: '{while}' default_save_name: while_command diff --git a/content/adventures/es.yaml b/content/adventures/es.yaml index 52aa368cbb2..ad5fb5fbd87 100644 --- a/content/adventures/es.yaml +++ b/content/adventures/es.yaml @@ -2590,7 +2590,7 @@ adventures: story_text_2: | ### Ejercicio ¡Es hora de hacer tus propias variables! - En el código de ejemplo hemos hecho un ejemplo de la variable `favorite_animal`. En la línea 1 la variable está establecida, y en la línea 2 usamos la variable en un comando `{print}. + En el código de ejemplo hemos hecho un ejemplo de la variable `favorite_animal`. En la línea 1 la variable está establecida, y en la línea 2 usamos la variable en un comando `{print}`. En primer lugar, terminar nuestro ejemplo rellenando su animal favorito en el blanco. Luego haga al menos 3 de estos códigos usted mismo. Escoge una variable, y establece la variable con el comando `{is}`. Luego úsala con un comando `{print}`, tal como hicimos. example_code_2: | ``` diff --git a/content/adventures/fr.yaml b/content/adventures/fr.yaml index 1c459ac3798..aa09cadf354 100644 --- a/content/adventures/fr.yaml +++ b/content/adventures/fr.yaml @@ -741,15 +741,15 @@ adventures: Tu y arrives ? Génial ! Veux-tu ajouter davantage de fonctions à ta calculatrice ? **Cette aventure se poursuit dans l'onglet suivant !** example_code: | ``` - {define} calculate_mean_grade + {define} calculer_note_moyenne total = 0 {for} i {in} {range} 1 {to} 4 grade = {ask} _ total = total + _ return _ / 4 - mean_grade = {call} _ - {print} 'Your mean grade is ' mean_grade + note_moyenne = {call} _ + {print} 'Ta note moyenne est ' note_moyenne ``` 15: story_text: | @@ -907,9 +907,9 @@ adventures: **Attention ! Ce code doit être débuggé !** ``` {print} Bienvenue à la piscine Hedy ! - cours {is} {ask} "Es-tu ici pour un cours de natation ?" + cours {is} {ask} "Es-tu ici pour participer à un cours ?" {if} cours oui - {print} "Génial ! Tu as cours ! + {print} "Génial ! Tu participes à un cours ! {print} {else} "Tu n'as pas cours" réduction {is} {ask} "As-tu un code de réduction ?" {if} réduction {is} oui diff --git a/content/adventures/kab.yaml b/content/adventures/kab.yaml new file mode 100644 index 00000000000..4fac3dce84e --- /dev/null +++ b/content/adventures/kab.yaml @@ -0,0 +1,5284 @@ +adventures: + story: + name: Story + default_save_name: Story + description: Story + levels: + 1: + story_text: | + In level 1 you can make a story with a different main character that you enter yourself. + + In the first line, use `{ask}` and ask who the main character of the story will be. + + After that first line, start with `{print}` if the sentence needs to be printed. + You use `{echo}` if you want your main character to be at the end of the sentence. + example_code: | + ``` + {ask} The main character of this story is + {print} The main character is now going to walk in the forest + {echo} They're a bit scared, + {print} They hear crazy noises everywhere + {print} They're afraid this is a haunted forest + ``` + story_text_2: | + ### Exercise + Now create your own story of at least 6 lines of code. + This story cannot be the same as the example code. + Use at least one `{ask}` and one `{echo}` command. + You can make it about any topic you like. + If you can't think of a topic, use one of our choices: going to the movies, a sports match or a day at the zoo. + 2: + story_text: | + In level 2 you can make your story more fun. Your main character's name can now be anywhere in the sentence. + + You do have to program a little bit extra for that. You must now name your main character first. + + You can then put that name anywhere in a sentence. + example_code: |- + ``` + name {is} {ask} What is the name of the main character? + {print} name is now going to run in the woods + {print} name is a bit scared + {print} Suddenly she hears a crazy noise... + {sleep} + {print} name is afraid this is a haunted forest + ``` + story_text_2: | + ### Exercise + Now it's time to add variables to your own story that you've made in the previous level. + Go to 'My programs', look for your level 1 story adventure and copy the code. Paste the code in your input screen in this level. + + This code won't work in this level, because you have not used variables yet. + Change the `{ask}` commands and `{echo}` commands in your code to the correct form that you've learned in this level. + + **Extra** Add a `{sleep}` command to your code to build up tension in your story. + 3: + story_text: | + In level 3 you can make your story more fun. You can use randomness for any monster, animal or other obstacle, like this: + example_code: | + ``` + animals {is} 🦔, 🐿, 🦉, 🦇 + {print} They now hear the sound of an animals {at} {random} + ``` + story_text_2: | + The command `{add}` can also come in handy in your story. + example_code_2: | + ``` + {print} They hear a sound + animals {is} 🐿, 🦔, 🦇, 🦉 + animal {is} {ask} What do you think it is? + {add} animal {to_list} animals + {print} it was an animals {at} {random} + ``` + story_text_3: | + This is an example of the `{remove}` command in your story + + ### Exercise + Copy your story from the previous levels into this level. + In this level you've learned 3 new commands `{at} {random}` , `{add} {to_list}` and `{remove} {from}`. + Add new lines of code to your story, so that all of the new commands are featured at least once in your story. + example_code_3: | + ``` + {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 + ``` + 4: + story_text: | + ### Exercise + Copy the example code and finish it by adding quotation marks on the blanks in lines 1 and 2. + The blanks in line 3 and 4 should not be replaced by quotation marks, but a `{sleep}` and a `{clear}` command. Can you make it work? + + ### Exercise 2 + Go back to the previous level and copy your story code. Make the code work in this level by adding quotation marks in the right spots. + Mind: The variables in your own story should be outside of the quotation marks. Just like the second line of the example code. In that line the variable name is placed outside of the quotation marks. + example_code: | + ``` + name {is} {ask} _ What is your name? _ + {print} _ The main character is called _ name + _ + _ + {print} name _ is now going to walk in the woods _ + {print} name _ is a bit scared _ + animals {is} 🦔, 🐿, 🦉, 🦇 + {print} _ He hears the sound of a _ animals {at} {random} + {print} name _ is afraid this is a haunted forest _ + ``` + 5: + story_text: | + In this level you can program different endings, which will make your story even more fun. + In the example code you can see how to make 2 different endings. + + ### Exercise 1 + Write a new short story of at least 6 lines of code about a topic of your choosing. + No inspiration? Choose one of these topics: a superhero, a boring school day, stranded on a desert island. + + Now give the player a change to choose a happy or a bad end, just like in the example code. + Program both the endings. + + ### Exercise 2 + Copy the story you've created in your own story adventure in the previous levels. + Find a way to add at least 2 `{if}` and `{else}` commands to your story. + This can be with a happy or bad ending, but you can also try to find other ways to incoporate the commands. + example_code: | + ``` + name {is} {ask} 'Who is walking in the forest?' + {print} name ' walks through the forest' + {print} name ' encounters a monster' + end {is} {ask} 'Would you like a good or a bad ending?' + {if} end {is} good {print} name ' takes the sword and the monster quickly runs away' + {else} {print} 'The monster eats ' name + ``` + 7: + story_text: | + In a story, someone says words several times. For example, when someone calls for help or sings a song. + You can put such repetitions in your story, in this level with `{repeat}`. + + ### Exercise + Add repetition to your own story. Go back to your saved programs, choose your story program from a previous level and + find a line containing `{print}` and repeat it! + example_code: | + ``` + {print} 'The prince kept calling for help' + {repeat} 5 {times} {print} 'Help!' + {print} 'Why is nobody helping me?' + ``` + 8: + story_text: | + In this level you can use multiple lines in your `{if}` commands, this way you can upgrade your happy or sad ending! + + ### Exercise 1 + The example code shows two different endings; one where the characters jump in a time machine and one where they do not. + Complete the blanks with at least one sentence per ending. + **Extra** Make the story longer. What happens in the story? You can also add a second `{ask}` with different options. + + ### Exercise 2 + Go back to your saved programs, choose your story program from level 5. Now write a good and a bad ending of at least three lines long each! + example_code: | + ``` + {print} 'OH NO! The T-rex is closing in!' + end = {ask} 'Do you want a happy or a sad ending?' + {if} end {is} happy + {print} 'Just in time Richard jumps back into the time machine!' + {print} _ + {else} + {print} 'Oh no! Richard is too slow...' + {print} _ + ``` + 9: + story_text: "In this level you can use `{if}` and `{repeat}` commands inside other `{if}` and `{repeat}` commands. \nThis gives you many options and really helps you to make your story interactive.\n\n### Exercise 1\nFinish the code so the `{if}` works correctly.\n\n### Exercise 2\nAdd an `{if}` and `{else}` for the part of the story where Robin goes home too.\n\n### Exercise 3\nGo back to your level 8 story and use at least two `{if}`s inside another `{if}`.\n" + example_code: | + ``` + {print} 'Robin is walking downtown' + location = {ask} 'Is Robin going into a shop, or does she go home?' + {if} location {is} shop + {print} 'She enters the shop.' + {print} 'Robin sees an interesting looking book' + book = {ask} 'Does Robin buy the book?' + {if} book {is} yes + _ {print} 'Robin buys the book and goes home' + _ {else} + _ {print} 'Robin leaves the shop and goes home' + {else} + {print} 'Robin goes home' + ``` + 10: + story_text: | + In this level you can use the {for} command in your story. In this way you could easily program the children's book 'Brown bear, Brown bear, what do you see'. + + ### Exercise + + Look at the story if you do not know it, and make sure it is printed as in the book. + example_code: "```\nanimals = _ , _ , _ \n{print} 'Brown bear, Brown bear'\n{print} 'What do you see?'\n```\n" + 12: + story_text: |- + In this level quotation marks will be needed to save multiple words in a variable. + + ### Exercise + + Find a story from a previous level, any level is ok. Now make sure quotation marks are added in the right places. + example_code: | + ``` + name = 'The Queen of England' + {print} name ' was eating a piece of cake, when suddenly…' + ``` + 13: + story_text: | + By using the `{and}` and `{or}` commands, you can make your stories more versatile. You can ask two questions and respond to the combination of answers. + + ### Exercise 1 + Look at the example code and finish it. Then add at least 2 more `{if}` codes with `{and}` or `{or}`. + + ### Exercise 2 + Find a story from a previous level, and add one `{and}` or `{or}`. + example_code: | + ``` + {print} 'Our hero is walking through the forest' + {print} 'The path splits two ways' + path = {ask} 'Which path should she choose?' + weapon = {ask} 'What weapon does she draw?' + {if} path {is} 'left' {and} weapon {is} 'sword' + _ + ``` + 15: + story_text: | + Using the `{while}` loop can make your stories more interesting. For example, you can use `{while} game == 'on'` so you can play until the game is over. + Or you can use `{while} sword == 'lost'` so the player can't continue the game until they have found something. + + ### Exercise + The example code shows you how to use the `{while}` loop in a story. Now **think of your own scenario** in which the player has to find something before they can continue. + example_code: | + ``` + keys = 'lost' + {print} 'You are standing in your garden and you have lost your keys.' + {print} 'Where do you want to look for them?' + {print} 'You can choose: tree, flowerbed, rock, postbox' + {while} keys == 'lost' + location = {ask} 'Where do you want to look?' + {if} location == 'flowerbed' + {print} 'Here they are!' + keys = 'found' + {else} + {print} 'Nope they are not at the ' location + {print} 'Now you can enter the house!' + ``` + 18: + story_text: | + We are going to print another story, but now we have to use brackets with `{print}`. + + ### Exercise 1 + Create a story of at least 5 sentences. You don't have to use 'name' just yet. + example_code: | + ``` + {print}('Welcome to this story!') + ``` + story_text_2: | + ### Exercise 2 + We have already prepared an `{input}` for you. First, use the `name` variable in your story. + Then add a second `{ask}` and use that variable as well. + Tip: Remember the commas in a `{print}` between text and variables! + example_code_2: | + ``` + naam = {input}("What's your name?") + {print}('Welcome to this story!') + ``` + add_remove_command: + name: '{add} {to_list} & {remove} {from}' + default_save_name: add_remove_command + description: introducing {add} {to_list} and {remove} {from} + levels: + 3: + story_text: | + ## Add to + You can add items to the list with the `{add} {to_list}` command. To add an item to a list you can simply type: `{add} penguin {to_list} animals` or you can use the `{ask}` command like in the example code. + example_code: | + ``` + animals {is} dog, cat, kangaroo + like {is} {ask} What is your favorite animal? + {add} like {to_list} animals + {print} I choose animals {at} {random} + ``` + story_text_2: | + ## Remove from + If you can add items to a list, of course you can also take them off. This is done with the `{remove} {from}` command. + example_code_2: | + ``` + animals {is} dog, cat, kangaroo + dislike {is} {ask} What animal do you not like? + {remove} dislike {from} animals + {print} I choose animals {at} {random} + ``` + story_text_3: | + ### Exercise + Try out the new commands in this virtual restaurant. Add the flavor the player is hoping for to the list and remove the flavors they are allergic to. + example_code_3: | + ``` + {print} Mystery milkshake + flavors {is} strawberry, chocolate, vanilla + hope {is} {ask} What flavor are you hoping for? + _ + allergies {is} {ask} Are you allergic to any flavors? + _ + {print} You get a flavors {at} {random} milkshake + ``` + and_or_command: + name: '{and} & {or}' + default_save_name: and or + description: introducing {and} & {or} + levels: + 13: + story_text: |- + We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`. + + If you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct. + example_code: | + ``` + name = {ask} 'what is your name?' + age = {ask} 'what is your age?' + {if} name {is} 'Hedy' {and} age {is} 2 + {print} 'You are the real Hedy!' + ``` + ask_command: + name: '{ask}' + default_save_name: ask_command + description: Introduction {ask} command + levels: + 1: + story_text: | + ## The ask command + Now that you can use the `{print}` command, you are ready to learn the next command: `{ask}`. With the `{ask}` command, you can ask a question. Check it out: + example_code: | + ``` + {print} Hello! + {ask} What is your name? + ``` + story_text_2: | + ## The `{echo}` command + If you want the computer to repeat the answer back to you, you can use the `{echo}` command. The answer will be echoed back at the end of the sentence, so in this example after hello. + example_code_2: | + ``` + {print} Hello! + {ask} What is your name? + {echo} hello + ``` + story_text_3: | + ### Exercise + Try out the `{ask}` and `{echo}` commands. Firstly, fill in the blanks to make this program work. + Then ask 2 more questions using the `{ask}` command, after each `{ask}` use an `{echo}` to print the answer on the screen. + example_code_3: | + ``` + _ How are you doing? + _ + ``` + 2: + story_text: | + ## The ask command + Now that we can use **variables** in our codes, we no longer need the `{echo}` command. + We can use variables to store the answers to our questions and this way we can use the answer to multiple questions in our codes. + Check it out: + + This way your code is becoming interactive! + example_code: | + ``` + name {is} {ask} What is your name? + {print} Hello name + age {is} {ask} How old are you? + {print} name is age years old. + ``` + story_text_2: | + ### Exercise + In the previous tab you have practised with setting variables with the `{is}` command. + You have created at least 3 variables and used them with a print command. + Now, instead of setting the variables we want you to make the variables interactive, like we did in our example. + + Copy your code from the previous tab and make the variables interactive by using `{ask}` commands. + example_code_2: | + ``` + favorite_animal {is} {ask} What is your favorite animal? + {print} I like favorite_animal + ``` + 18: + story_text: The final change we will need to make to get Python code is changing `{ask}` into `{input}`. + example_code: | + ``` + {print}('My name is Hedy!') + name = {input}('What is your name?') + {print}('So your name is ', name) + ``` + blackjack: + name: Blackjack + default_save_name: Blackjack + description: Try to get as close to 21 as you can + levels: + 17: + story_text: | + Blackjack is a simple game of cards in which you have to get as close to 21 points as possible. You get two cards. Each card is worth their numeral value, and the face cards (Jack, Queen and King) are worth 10 points. + The Ace is worth either 1 or 11 points (you can choose). The dealer, your opponent, also gets two cards. + If you want, you can get another card, and its points will be added to your total. The dealer can also choose to take another card. + But be careful not to get more than 21 points, because if you do, you lose! + The player who gets closest to 21, without going over it, wins! + + ### Exercise + In this adventure we code the first part of our Blackjack game. We'll create a function to calculate how many points a card is worth. + + ***Set the variables*** + Start by making a list of all the cards, from 2 to Ace. Next make a list of the face cards, so Jack, Queen and King. Then pick a random card from the list of cards to be card_1. + + ***Create a function to calculate the points*** + Create a function that calculates how many points a card is worth. + All the face cards are worth 10 points, the Ace is worth 11 and all the other cards are worth their numeral. + Return the variable `points` at the end of the function. + + ***Test the function*** + Test if your function is working properly. Finish the first print command by filling in which card you've drawn. Then finish the second line by calling the function with card_1. + Run the code a couple of times. Are you happy with the results? Great! Then you can remove the testing part and move on the the next tab! + example_code: | + ``` + {print} 'BLACKJACK' + + # Set these variables + cards = _ + face_cards = _ + card_1 = + + # Create a function to calculate the points + {define} calculate_points {with} card: + {if} card {in} face_cards: + points = _ + {elif} _ + _ + {else}: + _ + _ points + + # Test your function + {print} 'Your card is a ' _ + {print} 'That is worth ' _ ' points'. + ``` + blackjack_2: + name: Blackjack 2 + default_save_name: Blackjack_2 + description: Blackjack part 2 + levels: + 17: + story_text: | + ### Exercise + In this adventure we code the second part of our Blackjack game. + + ***Paste your code from the previous adventure*** + In the previous adventure you've started a list of variables and created a function to calculate how many points a card is worth. Copy your code and paste it here. Mind that you don't need the testing part, so if you haven't removed that yet, please do so now. + + ***Add more variables*** + You have already set the lists `cards` and `face_cards` and the variable `card_1`. Underneath those variables create 3 more variables: `card_2`, dealer_card_1` and `dealer_card_2`. These variables are all set to a random card from the list of cards. + + ***Add up points*** + To calculate how many points you have scored we call the function with card 1 and we do it again for card 2. Then we add both these scores together to get your total. + Do the same thing for the dealers points, but be sure to use the dealer's cards and not your own! + + ***2 Aces*** + You're doing great! Almost all scores can be calculated now. There is only one exception: 2 Aces. If you get 2 Aces, your total is 12 points and not 22 (because 22 points would be losing!). This of course also goes for the dealer. + + ***Show the score*** + Lastly, you want to tell the program to tell you which cards you have drawn and how many points that is. Then show which cards the dealer has and how many points they have. + + ***Continue in the next tab*** + Great! You have finished this part of the game! Copy your code and go to the next tab to learn how to ask for an extra card and to declare a winner. + example_code: | + ``` + # Paste your code from the previous adventure here + + # Add these variables to the list of variables + card_2 = _ + dealer_card_1 = _ + dealer_card_2 = _ + + # Add up your points + your_points_1 = {call} _ {with} card_1 + your_points_2 = _ + your_total = _ + + # Add up the dealers points + dealer_points_1 = _ + _ + _ + + # 2 Aces + {if} card_1 == 'Ace' {and} _ + your_total = 12 + {if} dealer_card_1 _ + dealer_total = _ + + # Show the score + {print} 'You have drawn a ' _ ' and a ' _ '. That is ' _ ' points' + {print} 'The dealer has drawn a ' _ ' and a ' _ '. That is ' _ ' points' + ``` + blackjack_3: + name: Blackjack 3 + default_save_name: Blackjack_3 + description: Blackjack part 3 + levels: + 17: + story_text: | + In the previous tabs you have learned how to draw 2 random cards for yourself and for the dealer and to calculate how many points you both got. + In this adventure we add the option to ask for an extra card for both you and the dealer. + + ### Exercise + ***Paste your code from the previous adventure*** Firstly, copy your code from the previous tab and paste it here. + + ***Extra card for you*** If you want, you can get an extra card to get your total as close to 21 as possible. First ask the player if they want an extra card. + If they do, pick a random card and print what they have drawn. If the card is not an Ace, you can call the function and add the points to your total. + In case the card is an Ace, you can't use the function, because the Ace can be either 1 point or 11 points, depending on how many points you already have earned. + If your total is less than 11, you want the ace to be 11 points (because this is closest to 21). So you add 11 points to your total. + If the total is more than or equal to 11, you want the ace to be 1 point (because you don't want more than 21 points). So you add 1 point to your total. + Lastly, print your new total of points. + + ***Extra card for the dealer*** The dealer can also get an extra card. The dealer doesn't need to be asked, because they always get an extra card if their total is less than 17. + Copy the 'Extra card for you code' and paste it in the dealers section. Then change it to fit the dealer picking an extra card and getting points added to their total. + example_code: | + ``` + # Paste your code from the previous adventure here + + # Extra card for you + hit = {ask} _ + {if} hit == 'yes': + card_3 = _ + {print} _ + {if} card_3 _ 'Ace': + your_points_3 = _ + your_total = _ + {else}: + {if} your_total _ + _ + {else}: + _ + {print} _ + + # Extra card for the dealer + {if} dealer_total < 17 + _ + ``` + blackjack_4: + name: Blackjack 4 + default_save_name: Blackjack_4 + description: Blackjack part 4 + levels: + 17: + story_text: | + In the last 3 adventures you have alsmost created a working blackjack game! The only thing left to do is to decide a winner! + + ### Exercise + ***Paste your code from the previous adventure*** Start by pasting the code that you've made so far into your programming field. + + ***Decide a winner*** + Firstly, if you and the dealer have an equal amount of points, it's a draw. + Secondly, if the dealer has more than 21 points and you don't, you are the winner. + Thirdly, if both you and the dealer have less than 22 points, we have to see who came closest to 21. We do that by comparing who has the highest score. Is your total higher than the dealer's total, then you are the winner. If not, the dealer wins. + Lastly, in all other scenarios (e.g. you have more than 21 points and the dealer doesn't, or you both have more than 21 points) you are the loser. + + ***Enjoy the game!*** + Does your game work properly? Amazing! You have done a great job! Enjoy your game! + If it doesn't work right away, no worries, you might have made a mistake. Just keep calm and bebug your code using the ladybug button. + example_code: | + ``` + # Paste your code from the previous adventure here + + # Decide a winner + {if} _ + {print} 'Its a draw! Play again!' + {elif} _ + {print} 'You win!' + {elif} _ : + {if} _: + {print} _ + {else}: + {print} _ + {else}: + _ + ``` + calculator: + name: Calculator + default_save_name: Calculator + description: Create a calculator + levels: + 6: + story_text: | + Now that you can do maths, you can make a calculator yourself! + example_code: | + ``` + number_1 = {ask} 'Fill in the first number:' + number_2 = {ask} 'Fill in the second number:' + correct_answer = number_1 * number_2 + {print} number_1 ' times ' number_2 ' is ' correct_answer + ``` + story_text_2: | + ### Exercise + The calculator above will calculate the answer for you, but you can also make a program to test your own maths skills, like this: + Fill in the blanks to make it complete! + example_code_2: | + ``` + correct_answer = 11 * 27 + answer = {ask} 'How much is 11 times 27?' + {if} answer {is} _ {print} 'good job!' + {else} {print} 'Wrong! It was ' _ + ``` + story_text_3: | + **Extra** You can also let the computer do random products on its own using `{random}`. + example_code_3: |- + ``` + numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + number_1 = _ + number_2 = _ + correct_answer = number_1 * number_2 + given_answer = {ask} 'What is ' number_1 ' times ' number_2 '?' + {if} _ + {else} _ + ``` + 9: + story_text: | + In a previous level, you've created a calculator. In this level, you can expand that code so it asks multiple questions. + + ### Exercise 1 + Can you finish line 10 to get the code to work? + + ### Exercise 2 + Give the player feedback when they enter an answer, like `{print} 'Correct!'` or `{print} 'Wrong! The correct answer is ' correct_answer`. + example_code: | + ``` + score = 0 + {repeat} 10 {times} + numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + number_1 = numbers {at} {random} + number_2 = numbers {at} {random} + correct_answer = number_1 * number_2 + {print} 'What is ' number_1 ' times ' number_2 '?' + answer = {ask} 'Type your answer here...' + {print} 'Your answer is ' answer + {if} _ {is} _ + score = score + 1 + {print} 'Great job! Your score is... ' score ' out of 10!' + ``` + 10: + story_text: | + This calculator game helps you practise your tables of multiplication! + ### Exercise + Fill in the blanks. We want this program to ask the player these questions: + ``` + How much is 1 times 1? + How much is 1 times 2? + How much is 1 times 3? + How much is 2 times 1? + How much is 2 times 2? + How much is 2 times 3? + How much is 3 times 1? + How much is 3 times 2? + How much is 3 times 3? + _ + ``` + example_code: | + ``` + numbers = 1, 2, 3 + {for} _ + {for} _ + answer = {ask} _ + correct = number_1 * number_2 + {if} answer {is} correct + {print} 'Great job!' + {else} + {print} 'That is wrong. The right answer is ' correct + ``` + 11: + story_text: | + With a `{for}` you can simplify tables of multiplication practise program. + + ### Exercise 1 + Improve the example code such that it prints a nice multiplication table:
"1 times 10 is 10", "2 times 10 is 20", etc. + + ### Exercise 2 + Go back to your level 10 multiplication code, and modify it so that it uses a `{for}` and `{range}`. + example_code: | + ``` + number = 10 + {for} i {in} {range} 1 {to} 10 + {print} i * number + ``` + 12: + story_text: | + In this level, you can make a calculator that works for decimal numbers. + + ### Exercise 1 + Fill out the blanks to complete the calculator. Remember to use a period and not a comma for decimal numbers. + + ### Exercise 2 + Create a new mathematics practice program, but now use decimal numbers. + Create a list of numbers, choose two to multiple and let the player answer. + And of course you have to validate the answer! **Extra** Increase the difficulty by adding lives: A player loses a life for a wrong answer and after three wrong answers the game ends. + example_code: | + ``` + number1 = {ask} 'What is the first number?' + number2 = {ask} 'What is the second number?' + answer = _ + {print} number1 ' plus ' number2 ' is ' _ + ``` + 13: + story_text: | + ### Exercise 1 + Let's make the practice program a bit harder. The player now has to answers two questions correctly. Fill out the blanks to complete the program. + + ### Exercise 2 + Sometimes, calculations have multiple correct answers. For example, 10 can be divided by 5 and by 2. So the question 'What number divides 10?' can be answered by 2 and by 5. + Ask for a calculation that has multiple correct answers, ask the player to answer it, and determine if it is correct using `{or}`. + Empty the programming field and create your own solution. + example_code: | + ``` + answer1 = {ask} 'What is 10 times 7?' + answer2 = {ask} 'What is 6 times 7?' + {if} _ _ _ _ _ _ _ + {print} _ + ``` + 14: + story_text: | + In this adventure you will build a calculator that calculates your mean grade for you. If you get your calculator to work, you can move on to the next adventure, which allows you to add two extra features. + + ### Exercise 1 + Fill in the blanks to get the calculator to work. + * Start with the fourth line, add a question to figure out what grade the student got. + * In the fifth line you'll want to calculate the total of all grades, so the total = total + grade. + * Then we get to set the return value. We want to return the mean, so the total devided by the amount of tests (4). + * Lastly we finish the code by calling the function in line 8. + + Did you get it? Awesome! Would you like to add even more to your calculator? **This adventure continues in the next tab!** + example_code: | + ``` + {define} calculate_mean_grade + total = 0 + {for} i {in} {range} 1 {to} 4 + grade = {ask} _ + total = total + _ + {return} _ / 4 + + mean_grade = {call} _ + {print} 'Your mean grade is ' mean_grade + ``` + 15: + story_text: | + You can add the `{while}` loop to the calculator game you've learned to make in a previous level. + This makes sure the player can't continue to the next question if they answer incorrectly. + + ### Exercise + Add the `{while}` loop in the function, ask the player what number_1 times number_2 is and print their answer. + Then `{call}` the function. + example_code: | + ``` + {define} new_question + numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + number_1 = numbers {at} {random} + number_2 = numbers {at} {random} + correct = number_1 * number_2 + answer = 0 + _ + _ + _ + {print} 'Well done!' + + {print} 'Give 10 correct answers to win!' + {for} i {in} {range} 1 {to} 10 + _ + {print} 'You win!' + ``` + calculator_2: + name: Calculator 2 + default_save_name: Calculator 2 + description: Calculator 2 + levels: + 14: + story_text: | + ### Exercise 2 + **This is the second part of this adventure.** The adventure starts in the previous tab. + Of course, you don't always want to calculate the mean of 4 tests. You might want to calculate the mean of 10 tests or only 2... + We can fix this problem by adding the argument and variable 'amount_of_tests'. + * Start a new line on line 3. Set the amount_of_tests argument by asking the student how many tests they have made. + * Change the 4 in line 4 to the new argument amount_of_tests. + * Lastly, change the 4 in line 6 to amount_of_tests + + Try out your new program. Does it work? + + ### Exercise 3 + Did you want to make your program even better? Great! In the previous program you could only calculate the mean grade of 1 subject, but it would be better if you could calculate the mean grade for all subjects you want! + We won't tell you how to do it, but we will give you one tip: Start your code in line 1 with: define calculate_mean_grade with subject. + example_code: | + ``` + # Use your own code from the previous adventure. + ``` + clear_command: + name: '{clear}' + default_save_name: clear_command + description: '{clear} command' + levels: + 4: + story_text: | + Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text. + Beware! If you are using a `{clear}` command, you might need to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read as you can see in the example! + example_code: | + ``` + {print} '3' + {clear} + {print} '2' + {clear} + {print} '1' + {clear} + {print} 'wait for it...' + {sleep} 3 + {clear} + {print} 'SURPRISE!' + ``` + debugging: + name: debugging + default_save_name: debugging + description: debugging adventure + levels: + 1: + story_text: |- + Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code. + That means that in these debugging adventures, we will show you code that does not work yet. + You will have to figure out what's wrong and correct the mistakes. + + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {print} I love programming + Do you love programming too? + {echo} + {print} What are your hobbies? + {echo} Your hobbies are + ``` + 2: + story_text: |- + Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code. + That means that in these debugging adventures, we will give you a code that does not work yet. + You will have to figure out what's wrong and correct the mistakes. + + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + destination {ask} Where are you going on holidays? + {print} The flight to dstination leaves at 3 pm. + {ask} Did you check in your luggage yet? + {echo} + {print} Let me print your boarding pass for you. + {sleep} + Here you go! Have a nice trip! + ``` + 3: + story_text: |- + Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code. + That means that in these debugging adventures, we will give you a code that does not work yet. + You will have to figure out what's wrong and correct the mistakes. + + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + movie_choices {is} dracula, fast and furious, home alone, barbie + chosen_movie {is} movies {at} {random} + {print} Tonight we will watch chosen _movies + like {ask} Do you like that movie? + {print} Tomorrow we will watch something else. + {add} chosen_movie {to_list} movie_choices + {print} Tomorrow we will watch tomorrows_movie + tomorrows_movie {is} movie_choices {at} {random} + I'll go get the popcorn! {print} + ``` + 4: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {print} 'Welcome to the online library! + {ask} What genre of books do you like? + {print} You like genre + author {is} {ask} 'Who's your favorite author?' + {print} 'author is your favorite author' + {print} Hmmm... i think you should try... books {at} {random} + ``` + 5: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {print} Welcome to Swimming Pool Hedy! + class {is} {ask} 'Are you here to join a class today?' + {if} class yes + {print} 'Great! You're joining a class! + {print} {else} 'You will not be joining a class' + discount {is} 'Do you have a discount code?' + {if} discount {is} yes + discount_answer {is} {ask} 'What's your discount code?' + discount_codes = Senior4231, Student8786, NewMember6709 + {if} discount_answer {is} {in} discount_cods + {print} 'That will be $3,50' + 'That will be $5,50' + {print} 'Have a nice swim!' + ``` + 6: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {print} 'Vending machine' + chosen_product = {ask} 'Please select a product' + 1_dollar_products = coke orange juice water + 2_dollar_products = chocolate, cookie, museli bar + 3dollar_prodcuts = potato chips, beef jerky, banana bread + {if} chosen {is} {in} 1_dollar_products + price = 1 + {if} chosen_product {is} 2_dollar_products + price = 2 + {else} chosen_product {in} 3_dollar_products + price = 3 + amount_of_products = '{ask} How many of ' chosen_product would you like to have?' + total = price + amount_of_product + {print} 'That will be $' price 'please' + ``` + 7: + story_text: |- + ### Exercise + Surprise! This program looks more like an output than a code. And yet, we don't want you to just add `{print}` commands in front of each line. + Fix this program to turn it into the nursery rhyme 'Brother John (Frère Jacques)' by using the {repeat} command of course! + example_code: | + **Warning! This code needs to be debugged!** + ``` + Are you sleeping? + Brother John! + Morning bells are ringing! + Ding, dang, dong! + ``` + 8: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: |- + **Warning! This code needs to be debugged!** + ``` + {print} 'Welcome to Manicures and Pedicures by Hedy' + bodypart = {ask} 'Are you getting your fingernails or toenails done today? Or both?' + {if} bodyparts {is} both + {print} That will be $25' + price = 25 + {else} + {print} That will be $18' + price = 18 + color = {ask} What color would you like? + sparkles = {ask} 'Would you like some sparkles with that?' + {if} sparkles {is} yes + {print} 'We charge $3 extra for that' + price = price + 3 + {else} {print} 'No sparkles' {print} 'So no extra charge' + {sleep} 5 + {print} 'All done! That will be $' price ' please!' + {print} 'Thank you! Byebye!' + ``` + 9: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {print} 'Welcome to our sandwich shop' + amount 'How many sandwiches would you like to buy?' + {repeat} amount {times} + {ask} {is} {ask} 'What kind or bread would you like your sandwich to be?' + types_of_bread {is} white, wheat, rye, garlic, gluten free + {if} chosen_bread in types_of_bread + {print} 'Lovely!' + {else} + 'I'm sorry we don't sell that' + topping {is} {ask} 'What kind of topping would you like?' + sauce {is} {ask} 'What kind of sauce would you like?' + {print} One chosen_bread with topping and sauce. + price = amount * 6 + {print} 'That will be 'price dollar' please' + ``` + 10: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + names = Muad Hasan Samira Noura + activities = fly a kite, go swimming, go hiking, catch tan in the sun + {for} name {is} names + {print} At the beach name loves to activity {at} {random} + ``` + 11: + story_text: |- + ### Exercise + Debug this calendar program. The output of this program is supposed to look like a list of dates. + For example: + + ``` + Hedy calendar + Here are all the days of November + November 1 + November 2 + November 3 + ``` + And so on. + + Mind that you have to test your code extra carefully for the month February, because the amount of days in this month changes in leap years. + example_code: | + **Warning! This code needs to be debugged!** + ``` + {print} 'Hedy calendar' + months_with_31 days = January, March, May, July, September, October, December + months_with_30_days = April, June, August, November + month = {ask} 'Which month would you like to see?' + {if} month {in} months_with_31_days + days = 31 + {if} month {in} months_with30_days + days = 30 + {if} month = February + leap_years = 2020, 2024, 2028, 2036, 2040, 2044, 2028 + year = {ask} 'What year is it?' + {if} year {in} leap_years + days = 29 + {else} + days = 28 + + {print} 'Here are all the days of ' moth + {for} i {in} {range} 1 {to} days + {print} month i + ``` + 12: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {define} greet + greetings = 'Hello', 'Hi there', 'Goodevening' + {print} greetings {at} {random} + + {define} take_order + food = {ask} 'What would you like to eat?' + {print} 'One food' + drink = 'What would you like to drink?' + {print} 'One ' drink + more = {ask} 'Would you like anything else?' + {if} more {is} 'no' + {print} 'Alright' + {else} + {print} 'And ' more + {print} 'Thank you' + + {print} 'Welcome to our restaurant' + people = {ask} 'How many people are in your party tonight?' + {for} i {in} {range} 0 {to} people + {call} greet_costumer + ``` + 13: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {define}movie_recommendation {with} name + action_movies == 'Die Hard', 'Fast and Furious', 'Inglorious Bastards' + romance_movies = 'Love Actually', 'The Notebook', 'Titanic' + comedy_movies = 'Mr Bean' 'Barbie''Deadpool' + kids_movies = 'Minions', 'Paddington', 'Encanto' + {if} name {is} 'Camila' {or} name {is} 'Manuel' + recommended_movie = kids_movie {at} {random} + {if} name {is} 'Pedro' {or} 'Gabriella' + mood = {ask} 'What you in the mood for?' + {if} mood {is} 'action' + recommended_movie = comedy_movies {at} {random} + {if} mood {is} 'romance' + recommended_movie = romance_movies + {if} mood {is} 'comedy' + recommended_movie = comedy_movies {at} {random} + + {print} 'I would recommend ' recommended_movie ' for ' name + + name = {ask} 'Who is watching?' + recommendation = {ask} 'Would you like a recommendation?' + {if} recommendaion {is} 'yes' + {print} movie_recommendation {with} name + {else} + {print} 'No problem!' + ``` + 14: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {define} calculate_heartbeat + {print} 'Press your fingertips gently against the side of your neck' + {print} '(just under your jawline)' + {print} 'Count the number of beats you feel for 15 seconds' + beats == {ask} 'How many beats do you feel in 15 seconds?' + heartbeat = beats*4 + {print} 'Your heartbeat is ' heartbeat + {if} heartbeat >= 60 {or} heartbeat <= 100 + {print} 'Your heartbeat seems fine' + {else} + {if} heartbeat > 60 + {print} 'Your heartbeat seems to be too low' + {if} heartbeat < 100 + {print} 'Your heartbeat seems to be too high' + {print} 'You might want to contact a medical professional' + + measure_heartbeat = {ask} 'Would you like to measure your heartbeat?' + {if} measure_heartbeat = 'yes' + {call} measure_heartbeat + {else} + 'no problem' + ``` + 15: + story_text: |- + ### Exercise + Debug this random children's story. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + names = 'Tanya', 'Romy', 'Kayla', 'Aldrin', 'Ali' + verbs='walking', 'skipping', 'cycling', 'driving', 'running' + locations = 'on a mountaintop', 'in the supermarket', 'to the swimming pool' + hiding_spots = 'behind a tree', under a table', in a box' + sounds = 'a trumpet', 'a car crash', 'thunder' + causes_of_noise = 'a television', 'a kid with firecrackers', 'a magic elephant', 'a dream' + + chosen_ name = names {at} {random} + chosen_verb = verbs {at} {random} + chosen_location = 'locations {at} {random}' + chosen_sounds = noises {at} {random} + chosen_spot = hiding_spots {random} + chosen_causes = causes_of_noise {at} {random} + + {print} chosen_name ' was ' chosen_verb ' ' chosen_location + {print} 'when they suddenly heard a sound like ' sounds {at} {random} + {print} chosen_name ' looked around, but they couldn't discover where the noise came from' + {print} chosen_name ' hid ' chosen_spot' + {print} 'They tried to look around, but couldn't see anything from there' + hidden = 'yes' + {while} hidden = 'yes' + {print} chosen_name 'still didn't see anything' + answer = {ask} 'does ' chosen_name ' move from their hiding spot?' + {if} answer = 'yes' + hidden == 'no' + {print} 'chosen_name moved from' chosen_spot + {print} 'And then they saw it was just' chosen_cause + {print} chosen_name 'laughed and went on with their day' + {print} The End + ``` + 16: + story_text: |- + ### Exercise + Debug this code. Good luck! + Tip: Make sure that you only see your score once in the end. + example_code: | + **Warning! This code needs to be debugged!** + ``` + country = ['The Netherlands', 'Poland', 'Turkey', 'Zimbabwe', 'Thailand', 'Brasil', 'Peru', 'Australia', 'India', 'Romania' ] + capitals = 'Amsterdam', 'Warshaw' 'Istanbul', 'Harare', 'Bangkok', 'Brasilia', 'Lima', 'Canberra', 'New Delhi', 'Bucharest' + score = 0 + {for} i {in} {range} 0 {to} 10 + answer = {ask} 'What's the capital of ' countries[i] + correct = capital[i] + {if} answer = correct + {print} 'Correct!' + score = score + 1 + {else} + {print} 'Wrong,' capitals[i] 'in the capital of' countries[i] + {print} 'You scored ' score ' out of 10' + + ``` + 17: + story_text: |- + ### Exercise + Debug this code. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + {define} food_order + toppings = {ask} 'pepperoni, tuna, veggie or cheese?' + size = {ask} 'big, medium or small?' + number_of_pizza = {ask} 'How many these pizzas would you like?' + + {print} 'YOU ORDERED' + {print} number_of_pizzas ' size ' topping ' pizza' + + {define} drinks_order + drink = {ask} 'water, coke, icetea, lemonade or coffee?' + number_of_drinks = {ask} 'How many of these drinks would you like?' + + {print} 'YOU ORDERED' + {print} number_of_drinks ' ' drink + + 'Welcome to Hedy pizza' + more_food = {ask} 'Would you like to order a pizza?' + {while} more_food = 'yes' + {return} food_order + more_food = {ask} 'Would you like to order a pizza?' + more_drinks = {ask} 'Would you like to order some drinks?' + {while} more_drinks == 'yes' + {call} drink_order + more_drinks == {ask} 'Would you like to order more drinks?' + + + {print} 'Thanks for ordering!' + ``` + 18: + story_text: |- + ### Exercise + Debug this Old MacDonald program from level 16. Good luck! + example_code: | + **Warning! This code needs to be debugged!** + ``` + animals = ['pig', 'dog', 'cow'] + sounds = ['oink', 'woof', 'moo'] + {for} i {in} {range} 1 {to} 3 + animal = animals[i] + sound = sounds[i] + {print} 'Old MacDonald had a farm' + {print} 'E I E I O!' + {print} 'and on that farm he had a ' animal + {print} 'E I E I O!' + {print} 'with a ' sound sound ' here' + {print} 'and a ' sound sound ' there' + {print} 'here a ' sound + {print} 'there a ' sound + {print} 'everywhere a ' sound sound + ``` + default: + name: Introduction + default_save_name: intro + description: Level explanation + levels: + 1: + story_text: | + Welcome to Hedy! Here you can learn how to program step by step. + + Try the code yourself! The yellow button copies the example code to your programming field. + Then push the green 'Run code' button under the programming field to run the code. + + Ready? Then go to the next tab to learn how to make your own codes! + example_code: | + ``` + {print} Hello world! + ``` + 2: + story_text: | + Congratulations! You've reached level 2. Hopefully you've already made some awesome codes! + In the first level you might've notice that the `{echo}` command can only save one bit of information at a time. + For example in the restaurant adventure, you could echo what the costumer wanted to eat, or what they wanted to drink, but not both in one sentence. + + That changes in level 2. In level 2 you'll learn to work with variables, that allow you to save multiple pieces of information and print them in any place you want. + So let's go to the next tab! + example_code: | + **Warning! This code does not work!** + In Hedy commands will change sometimes. `{echo}` for example only works in level 1. In this level you'll learn a better way to echo answers back. + ``` + {print} Welcome at Hedy's + {ask} What would you like to eat? + {echo} So you want + {ask} what would you like to drink? + {echo} So you want + ``` + 3: + story_text: | + In the previous level you've learned what a variable is and how you can use it to make your adventures more interactive. + But... that's not the only thing you can do with variables! You can also use variables to make lists. + And you can even let Hedy pick a random word out of a list, which allows you to make real games! + Take a quick look at the next tab! + 4: + story_text: | + In the previous levels you've been practising with variables, but you may have come across this problem. + You might have tried to run a code like this: + + Of course you wanted to print + + `My name is Sophie` + + but Hedy prints + + `My Sophie is Sophie`. + + In this level this problem is fixed by using quotation marks. + example_code: | + ``` + name {is} Sophie + {print} My name is name + ``` + 5: + story_text: | + In the previous levels you've already learned to use `{at} {random}` which made your games different every time you ran the code. + But it's not really interactive, the player doesn't have any influence on what happens in the game. + + In this level you'll learn the `{if}` command, that allows you to give different responses in your program. This way you can program a secret password for your computer for example. + So let's go to next tab for the new command! + example_code: | + ``` + password {is} {ask} 'What is the correct password?' + ``` + 6: + story_text: | + In the previous level you have practiced with `{ask}` and `{if}`. For example you can ask guests what they would like to eat. + What you can't yet do though, is calculate the price for everyone's dinner. + + This level makes it possible to use addition, subtraction and multiplication in your programs. This way you can calculate the prices in your restaurant, but you could also add a secret code to give your friends and family a discount. + Another option in this level is programming your own maths game, for your little brother or sister to practice their multiplications. + Go see for yourself! + example_code: | + ``` + food_price {is} 0 + drink_price {is} 0 + total_price {is} 0 + {print} 'Welcome to McHedy' + order {is} {ask} 'What would you like to eat?' + {if} order {is} hamburger food_price {is} 5 + {if} order {is} fries food_price {is} 2 + drink {is} {ask} 'What would you like to drink?' + {if} drink {is} water drink_price {is} 0 + {else} drink_price {is} 3 + total_price {is} food_price + drink_price + {print} 'That will be ' total_price ' dollars, please' + ``` + 7: + story_text: | + Great job! You've reached the next level, which means you have practiced with `{if}` and `{else}`. You have probably noticed that your codes are getting longer and longer. + For example if you want to program 'Happy Birthday'. + + That's a lot of code for mainly the same words over and over again. Luckily in the next tab you'll learn a solution with the `{repeat}` command, that allows you to repeat a line of code multiple times. + example_code: | + ``` + {print} 'happy birthday to you' + {print} 'happy birthday to you' + {print} 'happy birthday dear Hedy' + {print} 'happy birthday to you' + ``` + 8: + story_text: | + Now you've learned how to repeat one single line of code. This comes in handy, but it's not always enough. Sometimes you want to repeat multiple lines at once. + This level allows you to group a couple of lines of code, and repeat that little group of lines all at once! + example_code: | + ``` + {repeat} 5 {times} {print} 'In the next tab you can repeat multiple lines of code at once!' + ``` + 9: + story_text: | + Great job! You've reached another new level! In the previous level you've learned to use multiple lines of code in an {if} or {repeat} command. But you can't yet combine the two... + Good news! In this level you will be allowed to put an {if} inside an {if}, or inside a {repeat} command. Putting a block of code inside another block of code is called nesting. ``` Putting a block of code inside another block of code is called nesting. + example_code: | + ``` + answer = {ask} 'Are you ready to learn something new?' + {if} answer {is} yes + {print} 'Great! You can learn to use the repeat command in the if command!' + {print} 'Hooray!' + {print} 'Hooray!' + {print} 'Hooray!' + {else} + {print} 'Maybe you should practice some more in the previous level' + 10: + story_text: | + You're doing great! In the previous levels we still faced a small problem. You have learned to repeat lines, but what if you'd want to slightly change the line. + For example if you want to sing the song 'if you're happy and you know it'. It would look like this: + + If you'd also want the next verse 'stomp your feet', and the next one, and the next one, you'd have to change the code completely. + In this level you'll learn the `{for}` command, which allows you to make a list of actions and repeat the code with another action each time! + Please take a look! + example_code: | + ``` + {repeat} 2 {times} + {print} 'if youre happy and you know it clap your hands' + {print} 'if youre happy and you know it and you really want to show it' + {print} 'if youre happy and you know it clap your hands' + ``` + 11: + story_text: | + You have reached level 11, you're doing great! In the higher levels, Hedy is focussing more and more on teaching you the programming language Python. + In Python there is no `{repeat}` command, but there is a command that works like {repeat}. Are you curious to find out how to say `{repeat}` in Python language? Quickly go on to find out! + 12: + story_text: | + Maybe you have tried using decimal numbers in your restaurant adventure. If you did, you probably noticed that Hedy didn't understand them yet and always rounded off. + From this level on you can use decimal numbers. + example_code: | + ``` + burger = 5 + drink = 2 + total = burger + drink + print 'You have ordered a burger and a drink' + print 'That costs ' total ' dollars please' + ``` + 13: + story_text: | + In the previous levels you've learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one: + + In this system you have to give both the correct username and the correct password. + In this level you will learn the `{and}` command that will make this code a lot shorter and more understandable! + Check it out! + example_code: | + ``` + username = {ask} 'What is your username?' + password = {ask} 'What is your password?' + {if} username {is} 'Hedy' + {if} password {is} 'secret' + {print} 'Welcome Hedy!' + {else} + {print} 'Access denied' + {else} + {print} 'Access denied!' + ``` + 14: + story_text: | + With the example code you can calculate if you've passed a subject at school (so, a grade of six or higher). + You can see this code is extremely inefficient, due to the very long code in line 5. + All the different grades from 1 to 5 had to be programmed separately. Lucky for you, in this level you'll learn how to do this without this extremely long code! + example_code: | + ``` + first_grade = {ask} 'What score did you get on your first test?' + second_grade = {ask} 'What score did you get on your second test?' + added = first_grade + second_grade + mean_grade = added / 2 + {if} mean_grade = 1 {or} mean_grade = 2 {or} mean_grade = 3 {or} mean_grade = 4 {or} mean_grade = 5 + {print} 'Oh no! You have failed the subject...' + {else} + {print} 'Great! You have passed the subject!' + ``` + 15: + story_text: | + In this game below a code has been made to make sure the player can play on as long as they want... + But the code is ineffective and way too long. Also, what if the player wants to play 101 games instead of 100? + You can't play to infinity? + In this level you will learn a command that makes all of this a lot easier! + example_code: | + ``` + game = 'on' + {for} i {in} {range} 1 {to} 100 + {if} game == 'on' + answer = {ask} 'Do you want to continue?' + {if} answer == 'no' + game = 'over' + {if} answer == 'yes' + {print} 'Ok we will continue' + ``` + 16: + story_text: | + In this level we will grow a bit more towards real Python code. You will also learn how to match two lists together. + This way you can program a code in which the correct animal is matched to the right sound. + Because the two codes below... Are obviously nonsense! + example_code: |- + ``` + animals = 'chicken', 'horse', 'cow' + sounds = 'cluck', 'neigh', 'moo' + {for} animal {in} animals + {print} 'A ' animal ' says ' sounds {at} {random} + ``` + You could also try to make it work this way, but.... + ``` + animals = 'chicken', 'horse', 'cow' + sounds = 'cluck', 'neigh', 'moo' + {for} animal {in} animals + {for} sound {in} sounds + {print} 'A ' animal ' says ' sound + ``` + Note: These codes will not work like this in this level. Head to the next tab to see which parts you need to correct. + 17: + story_text: | + Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation. + + In this level you can also use a new command: `{elif}`. `{elif}` is short for ``{else} {if}`` and you need it when you want to make 3 (or more!) options. + Check it out! + 18: + story_text: | + Congratulations! You have reached the last level of Hedy! The code you have created here can be copied to real Python environments like replit or PyCharm, and you can continue learning there! + Note however that Python can only read English commands, so if you have been using other languages, you will need to switch to English now. + dice: + name: Dice + default_save_name: Dice + description: Make your own dice + levels: + 3: + story_text: | + In this level we can choose from a list. With that we can let the computer choose one side of the die. + Take a look at the games you have in your closet at home. + Are there games with a (special) die? You can also copy it with this code. + For example, the dice of the game Earthworms with the numbers 1 to 5 and an earthworm on it. + + ![Die of earthworms with 1 to 5 and an earthworm on it](https://cdn.jsdelivr.net/gh/felienne/hedy@24f19e9ac16c981517e7243120bc714912407eb5/coursedata/img/dobbelsteen.jpeg) + example_code: | + ``` + choices {is} 1, 2, 3, 4, 5, earthworm + {print} You threw _ {at} {random} ! + ``` + story_text_2: | + ### Exercise + The dice in the example above are dice for a specific game. Can you make normal dice? + Or other special dice from a different game? + example_code_2: | + ``` + choices {is} _ + ``` + 4: + story_text: | + In this level you can also create dice. But this time you can try it yourself, without an example code! + + ### Exercise + Make your own dice in this level. + Tip: If you have no idea how to make dice. Take a peek at your dice from the previous level, but don't forget to add quotation marks. + 5: + story_text: | + We are going to add the `{if}` and `{else}` commands to our dice! + + ### Exercise + Complete the sample code so that the code says "You can stop throwing" once you have thrown an earthworm. It should say "You have to throw again" if you've thrown anything else. + **Extra** Maybe you want to recreate a die from a completely different game. That's fine too! Then make up your own reaction, e.g. 'yes' for 6 and 'pity' for something else. + example_code: | + ``` + choices {is} 1, 2, 3, 4, 5, earthworm + throw {is} choices {at} {random} + {print} 'you have thrown ' throw + _ throw {is} earthworm {print} 'You can stop throwing.' + _ {print} 'You have to throw it again!' + ``` + 6: + story_text: | + You can also make an Earthworm die again in this, but now you can also calculate how many points have been rolled. + You may know that the worm counts 5 points for Earthworms. Now after a roll you can immediately calculate how many points you have thrown. + This is the code to calculate points for one die: + + ### Exercise + Can you make the code so that you get the total score for 8 dice? To do that, you have to copy and paste some lines of the code. + example_code: | + ``` + choices = 1, 2, 3, 4, 5, earthworm + points = 0 + throw = choices {at} {random} + {print} 'you threw ' throw + {if} throw {is} earthworm points = points + 5 {else} points = points + throw + {print} 'those are ' points ' points' + ``` + example_code_2: | + Did you manage to calculate the score for 8 dice? That required a lot of copy and pasting, right? We are going to make that easier in level 7! + 7: + story_text: | + You can also make a dice again in this level. With the `{repeat}` code you can easily roll a whole hand of dice. + + ### Exercise + Try to finish the sample code! **Extra** Think of a game you know that involves a dice and program that using a `{repeat}`. + example_code: | + ``` + choices = 1, 2, 3, 4, 5, 6 + _ _ _ _ _ _ _ + ``` + 10: + story_text: | + ### Exercise + Is everybody taking too long throwing the dice? In this level you can let Hedy throw all the dice at once! + Change the names into names of your friends or family, and finish the code. + example_code: | + ``` + players = Ann, John, Jesse + choices = 1, 2, 3, 4, 5, 6 + _ _ _ _ + {print} player ' throws ' choices {at} {random} + {sleep} + ``` + 15: + story_text: | + ### Exercise + In this level you can create a little game in which you'll have to throw 6 as fast as possible. + We have started the code, it's up to you to get the game to work! + + Firstly, add a `{while}` loop that checks if 6 has been thrown or not. + As long as you haven't thrown 6 already, throw the dice on a random number. + Print what the player has thrown. + Add a try to the amount of tries + Wait a second before you throw again, or - in case you've thrown a 6 - before the game ends. + example_code: | + ``` + options = 1, 2, 3, 4, 5, 6 + {print} 'Throw 6 as fast as you can!' + thrown = 0 + tries = 0 + _ + _ + _ + _ + _ + {print} 'Yes! You have thrown 6 in ' tries ' tries.' + ``` + dishes: + name: Dishes? + default_save_name: Dishes + description: Use the computer to see who does the dishes + levels: + 3: + story_text: | + Do you always disagree at home about who should wash the dishes or change the litter box today? + Then you can let the computer choose very fairly. You can program that in this level! + example_code: | + ``` + people {is} mom, dad, Emma, Sophie + {print} people {at} {random} has to do the dishes + ``` + story_text_2: | + ### Exercise + Make your own version of the dishwasher program. Firstly make a list of your family members. + Then think of a task that needs to be done, and let the computer decide who has to do the task with the `{at} {random}` command. + + **Extra** Don't feel like doing the dishes yourself? Hack the program by removing your name from the list with the `{remove}` `{from}` command. + 4: + story_text: | + With quotation marks you can make your dishwashing program even better. + + ### Exercise + First, fill in right symbols or commands on the blanks to make this example program work. + Did you get it? Great! Now copy your own code from the previous level and make it work in this level by adding quotation marks in the right spots. + example_code: | + ``` + people {is} mom, dad, Emma, Sophie + {print} _ the dishes are done by _ + {sleep} + {print} people {at} _ + ``` + 5: + story_text: | + With the `{if}` you can now have more fun with choice in the program. You can have your program respond to the choice that the computer has made. + ### Exercise + Can you finish the code so that it prints 'too bad' when it is your turn and otherwise 'yes!'? + Don't forget the quotes! + example_code: | + ``` + people {is} mom, dad, Emma, Sophie + dishwasher {is} people {at} {random} + _ dishwasher {is} Sophie {print} _ too bad I have to do the dishes _ + _ {print} 'luckily no dishes because ' _ ' is already washing up' + ``` + 6: + story_text: | + How often is everyone going to do the dishes? Is that fair? You can count it in this level. + example_code: | + ``` + people = mom, dad, Emma, Sophie + emma_washes = 0 + dishwasher = people {at} {random} + {print} 'The dishwasher is' dishwasher + {if} dishwasher {is} Emma emma_washes = emma_washes + 1 + {print} 'Emma will do the dishes this week' emma_washes 'times' + ``` + + Now you can copy lines 3 to 5 a few times (e.g. 7 times for a whole week) to calculate for a whole week again. + Do you make the code for the whole week? + story_text_2: | + If you are extremely unlucky the previous program might choose you to do the dishes for the whole week! That's not fair! + To create a fairer system you can use the `{remove}` command to remove the chosen person from the list. This way you don't have to do the dishes again until everybody has had a turn. + + Monday and Tuesday are ready for you! Can you add the rest of the week? + And… can you come up with a solution for when your list is empty? + example_code_2: | + ``` + people = mom, dad, Emma, Sophie + dishwasher = people {at} {random} + {print} 'Monday the dishes are done by: ' dishwasher + {remove} dishwasher {from} people + dishwasher = people {at} {random} + {print} 'Tuesday the dishes are done by: ' dishwasher + {remove} dishwasher {from} people + ``` + 7: + story_text: | + With the `{repeat}` you can repeat pieces of code. You can use this to calculate who will be washing dishes for multiple days! + ### Exercise + Use the `{repeat}` command to decide on who needs to wash the dishes for an entire week. Each blank needs to be filled with one command or number! + **Extra** Can you think of other tasks in the house? Adapt the code so it decides on three household chores. Do not forget to print what tasks it concerns! + example_code: | + ``` + people = mom, dad, Emma, Sophie + {repeat} _ _ {print} 'Dishwashing will be done by ' _ _ _ + ``` + 10: + story_text: | + In this level you can make a schedule for the whole week in an easy way! + + ### Exercise + Add a second chore, such as vacuuming or tidying up, and make sure it is also divided for the whole week. +
**Extra** The program is not fair, you can be unlucky and wash up all week. How could you make the program more fair? + example_code: | + ``` + days = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday + names = mom, dad, Emma, Sophie + {for} day {in} days + {print} names {at} {random} ' does the dishes on ' day + ``` + elif_command: + name: '{elif}' + default_save_name: elif + description: '{elif}' + levels: + 17: + story_text: | + In this level you can also use a new command: `{elif}`. `{elif}` is a combination of the keywords `{else}` and `{if}` and you need it when you want to make 3 (or more!) options. + Check it out! + example_code: | + ``` + prizes = ['1 million dollars', 'an apple pie', 'nothing'] + your_prize = prizes[{random}] + {print} 'You win ' your_prize + {if} your_prize == '1 million dollars' : + {print} 'Yeah! You are rich!' + {elif} your_prize == 'an apple pie' : + {print} 'Lovely, an apple pie!' + {else}: + {print} 'Better luck next time..' + ``` + for_command: + name: '{for}' + default_save_name: for + description: '{for} command' + levels: + 10: + story_text: |- + ## For + In this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements. + `{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces. + example_code: | + ``` + animals = dog, cat, blobfish + {for} animal {in} animals + {print} 'I love ' animal + ``` + story_text_2: | + ### Exercise + Finish this code by adding `{for} action {in} actions` to line 2. + example_code_2: | + ``` + actions = clap your hands, stomp your feet, shout Hurray! + _ + {repeat} 2 {times} + {print} 'If youre happy and you know it, ' action + {sleep} 2 + {print} 'If youre happy and you know it, and you really want to show it' + {print} 'If youre happy and you know it, ' action + {sleep} 3 + ``` + 11: + story_text: |- + In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers. + We do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at. + + Try the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements. + example_code: | + ``` + {for} counter {in} {range} 1 {to} 10 + {print} counter + {print} 'Ready or not. Here I come!' + ``` + 17: + story_text: | + Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation. + example_code: | + ``` + {for} i {in} {range} 1 {to} 10: + {print} i + {print} 'Ready or not, here I come!' + ``` + 18: + story_text: | + Lastly, we'll turn `{for} i {in} {range} 1 to 5` into real Python code, like this: + example_code: | + ``` + {for} i {in} {range}(1,5): + {print} (i) + ``` + fortune: + name: Fortune teller + default_save_name: Fortune Teller + description: Let Hedy predict the future + levels: + 1: + story_text: | + Have you ever been to a carnival and had your future predicted by a fortune teller? Or have you ever played with a magic eight ball? + Then you probably know that they can't really predict your future, but it's still fun to play! + + In the upcoming levels you can learn how to create your own fortune telling machine! + In level 1 you can start off easy by letting Hedy introduce herself as a fortune teller and let her `{echo}` the players' answers. + Like this: + example_code: | + ``` + _ Hello, I'm Hedy the fortune teller! + _ Who are you? + _ Let me take a look in my crystal ball + _ I see... I see... + _ Your name is + ``` + story_text_2: | + ### Exercise + Copy the example code into your input screen and fill in the blanks to make the code work. + **Extra** Change the code and let the fortune teller not only predict your name, but also your age, your favorite sports team or something else about yourself. + 3: + story_text: | + In the previous levels you've created your first fortune telling machine, but Hedy couldn't really predict anything, only `{echo}`. + 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: | + ``` + {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: | + ### Exercise + Now, Hedy can only answer yes, no or maybe. Can you give Hedy more answer options, like 'definitely' or 'ask again'. + 4: + story_text: | + ### Exercise + We have removed all the quotation marks from this example code, can you add them in all the right places? + + ### Exercise 2 + Go back to the previous level and copy your fortune teller code. Make the code work in this level by adding quotation marks in the right spots. + example_code: | + ``` + _ Add the quotation marks to this code _ + {print} Im Hedy the fortune teller! + question {is} {ask} What do you want to know? + {print} This is your question: question + answers {is} yes, no, maybe + {print} My crystal ball says... + {sleep} 2 + {print} answers {at} {random} + ``` + 5: + story_text: | + ### Exercise + In the example code you see how to make a fortune teller program that allows you to tip the odds in your favor. This cheating program always tells you that you will win the lottery, but your friends will never win. + + Use this to make your own program, be creative! For example you could create a code that predicts that: + * your favorite sports team will beat all the competitors! + * your favorite movie will be chosen for movie night! + * you win tickets to your favorite show! + * you are the fairest of them all, like Snow White's magic mirror. + Let your imagination do the work! + + Your program has to exist of at least 10 lines of code and need to have at least one `{if}` and `{else}` command. + example_code: | + ``` + friends {is} Jordan, Lucy, Dave + {print} 'I can predict if you will win the lottery tomorrow!' + person {is} {ask} 'Who are you?' + good_answer {is} Hurray! You win!, You will definitely win!, We have a winner! + bad_answer {is} Bad luck! Try again!, Another person will win, You lose! + {if} person {in} friends {print} good_answer {at} {random} + {else} {print} bad_answer {at} {random} + ``` + 6: + story_text: | + In this level you can use math in your predictions as a fortune teller. This allows you to make up (silly) formulas to calculate the future. + For example you could calculate how rich you'll get or how many kids you will have when you grow up. + + + + ### Exercise + Can you think of your own (silly) fortune telling machine? + example_code: | + ``` + {print} 'I am Hedy the fortune teller!' + {print} 'I can predict how many kids youll get when you grow up!' + age = {ask} 'How old are you?' + siblings = {ask} 'How many siblings do you have?' + length = {ask} 'How tall are you in centimetres?' + kids = length / age + kids = kids - siblings + {print} 'You will get ...' + {sleep} + {print} kids ' kids!' + ``` + 7: + story_text: | + ### Exercise + Finish this program that tells you if your crush loves you back or not. + example_code: | + ``` + {print} 'I have a flower with magic petals' + {print} 'If you pick the petals the flower will tell you if your crush loves you back' + amount = {ask} 'How many petals do you want to pick?' + options = they love you, they love you not + _ _ _ _ options {at} {random} + ``` + 8: + story_text: | + In the next example you can have your fortune teller ask multiple questions and also print them! + + ### Exercise + Can you fill in right command on the blanks? + example_code: | + ``` + {print} 'I am Hedy the fortune teller!' + {print} 'You can ask me 3 questions.' + answers = yes, no, maybe + _ _ _ + question = {ask} 'What do you want to know?' + {print} question + {sleep} + {print} 'My crystal ball says... ' answers {at} {random} + ``` + 10: + story_text: | + In this level you'll learn how to program the game MASH (mansion, apartment, shack, house). In this game you can predict for all the players at once, what their future will look like. + + ### Exercise + Fil in the blanks by using the new command that you've learned this level. + example_code: | + ``` + houses = mansion, apartment, shack, house + loves = nobody, a royal, their neighbour, their true love + pets = dog, cat, elephant + names = Jenna, Ryan, Jim + _ + {print} name ' lives in a ' houses {at} {random} + {print} name ' will marry ' loves {at} {random} + {print} name ' will get a ' pets {at} {random} ' as their pet.' + {sleep} + ``` + 12: + story_text: |- + From level 12 on, you will also have to use quotation marks in lists, before and after each item. + + ### Exercise + Add two predictions to the list + example_code: | + ``` + fortunes = 'you will slip on a banana peel', _ + {print} 'I will take a look in my crystal ball for your future.' + {print} 'I see... I see...' + {sleep} + {print} fortunes {at} {random} + ``` + functions: + name: functions + default_save_name: functions + description: functions + levels: + 12: + story_text: | + In this level you'll learn how to use **functions**. A function is a block of code you can easily use multiple times. Using functions helps us organize pieces of code that we can use again and again. + To create a function, use `{define}` and give the function a name. Then put all the lines you want in the function in a indented block under the `{define}` line. + Leave one empty line in your code to make it look nice and neat. Great job! You have created a function! + + Now, whenever we need that block of code, we just use {call} with the function's name to call it up! We don't have to type that block of code again. + + Check out this example code of a game of Twister. The function 'turn' contains a block of code that chooses which limb should go where. + + ### Exercise + Finish this code by setting the 2 variables chosen_limb and chosen_color. + Then, choose how many times you want to call the function to give the twister spinner a spin. + + ### Exercise 2 + Improve your code by adding a variable called 'people'. Use the variable to give all the players their own command in the game. + For example: 'Ahmed, right hand on green' or 'Jessica, left foot on yellow'. + example_code: | + ``` + sides = 'left', 'right' + limbs = 'hand', 'foot' + colors = 'red', 'blue', 'green', 'yellow' + + {define} turn + chosen_side = sides {at} {random} + chosen_limb = limbs _ + chosen_color = colors _ + {print} chosen_side ' ' chosen_limb ' on ' chosen_color + + {print} 'Lets play a game of Twister!' + {for} i {in} {range} 1 {to} _ + {call} turn + {sleep} 2 + ``` + 13: + story_text: | + Now that you've learned how to use functions, you'll learn how to use a function with an argument. + An **argument** is a variable that is used within a function. It is not used outside the function. + + For example in this code we've programmed the first verse of the song 'My Bonnie is over the ocean'. + In this example code the argument 'place' is used. Place is a variable that is only used in the function, so an argument. + To use 'place' we have placed `{with} place` after `{define} song`. + When the function is called, the computer will replace the argument 'place', with the piece of text after `{call} song {with}`. + + ### Exercise + The next verse of this song goes: + + ```not_hedy_code + Last night as I lay on my pillow + Last night as I lay on my bed + Last night as I lay on my pillow + I dreamed that my Bonnie is dead + ``` + + Can you program this verse in the same way as the example? + example_code: | + ``` + {define} song {with} place + {print} 'My Bonnie is over the ' place + + {call} song {with} 'ocean' + {call} song {with} 'sea' + {call} song {with} 'ocean' + ``` + 14: + story_text: | + In the previous levels you have learned to create functions and use arguments with them. Another great use of a function is to let it calculate something for you. + You can give the function a calculation and it will give you the answer of the calculation. This answer is called a **return value**. + + For example, in this code the function calculate_new_price will calculate the new price of any item. It will give you the new price as a return value. + + ### Exercise + Finish this code. We have already made the variable new_price for you, you only need to set it. + You should finish the line of code by calling the function that calculates the new price. + example_code: | + ``` + {define} calculate_new_price {with} amount, percentage + percentage = percentage / 100 + discount_amount = amount * percentage + {return} amount - discount_amount + + old_price = {ask} 'How much is on the price tag?' + discount = {ask} 'What percentage is the discount?' + + new_price = _ calculate_new_price {with} old_price, _ + {print} 'The new price is ' new_price ' dollar' + ``` + 18: + story_text: | + Let's make functions the Pythons way! To define a function, we no longer use: + + `{define} name_function {with} argument_1, argument_2:` + + but we use: + + `{def} name_function(argument_1, argument_2):`. + + + If you don't want to use arguments, you just leave the space between the parantheses empty. + To call a function, we don't need the `{call}` command anymore. You just type the name of the function. + example_code: | + ``` + {def} calculate_score(answer, correct_answer): + {if} answer == correct_answer: + score = 1 + {elif} answer == '?': + score = 0 + {else}: + score = -1 + {return} score + + answer = {input} ('Where can you find the Eiffel Tower?') + correct_answer = 'Paris' + score = calculate_score(answer, correct_answer) + {print} ('Your score is... ', score) + ``` + guess_my_number: + name: Guess my number + default_save_name: guess my number + description: guess my number + levels: + 14: + story_text: | + In this level you can program the game 'Guess my number' + + ### Exercise + Fill in the correct symbols on the blanks to get the game to work. + example_code: | + ``` + {print} 'Guess my number' + numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + number = numbers {at} {random} + game = 'on' + {for} i {in} {range} 1 {to} 10 + {if} game == 'on' + guess = {ask} 'Which number do you think it is?' + {if} guess _ number + {print} 'Lower!' + {if} guess _ number + {print} 'Higher!' + {if} guess _ number + {print} 'You win!' + game = 'over' + ``` + hangman: + name: Hangman + default_save_name: Hangman + description: Guess the word + levels: + 17: + story_text: | + In this adventure we program a game of hangman. First we make some preparations, then we program the game and in the third part we add a drawing with the turtle. + + ### Exercise + ***Set the variables*** In this game of hangman, Player 1 chooses an answer and Player 2 has to guess the letters in this answer. + To let the computer know all the letters in the word, we will turn the answer into a list of letters. We also do this with the guesses Player 2 makes. + We will start the game with 2 empty lists. We have made an empty list for the variable answer for you. Now make an empty list for guessed_letters as well. + Then we fill in how many mistakes were made. At the start of the game, this should be 0. + The variable `amount_letters` tells us how many letters are in the answer. Ask Player 1 to tell us how many letters their word has. + Lastly we tell the computer if the game is over. We use the variable `game_over` and set it to `False`. + + ***Choosing the answer*** We want Player 1 to be able to choose the answer. We'll ask them, as many times as necessary, what the next letter is. + Then we add that letter to the answer. Lastly, we add an empty _ to the list of guessed letters, so we get as many _s as there are letters in the answer. + + ***Player 2's turn*** + Tell Player 2 its their turn. Then tell Player 2 how many letters there are in the answer. Finally, print the list of `guessed_letters`. + + ***Go to the next tab*** Now that all the starting variables are set, we can start programming the game itself. Check out the next tab to learn how! + example_code: | + ``` + print 'Hangman!' + + # Set the variables + answer = [] + guessed_letters = _ + mistakes_made = _ + amount_letters = {ask} _ + _ = 'False' + + # Choosing the answer + {for} _ + letter = {ask} 'Player 1, what is letter ' i '?' + _ + {add} '_' {to} _ + + # Player 2 turn + print _ + print _ + print guessed_letters + ``` + hangman_2: + name: Hangman 2 + default_save_name: Hangman_2 + description: Hangman 2 + levels: + 17: + story_text: | + Now it's time to program the hangman game. + + ### Exercise + + ***Paste your code*** Copy your code from the previous tab and paste the code in the programming field. + + ***The game*** This games continues playing until Player 2 is game over. Fill in the while command accordingly. Now, Player 2 is allowed to guess a letter, so ask Player 2 to guess a letter. + We need to check if their answer is correct, so check if their `guess` is (somewhere) in the (list) `answer`. Then we let the computer figure out which of the letter(s) is the guess. We have already programmed that part for you. + Next we want to compliment the player for finding a correct letter and we want to print the list `guessed_letters`, so the player can see their progress. + + The next part we're going to program is what happens when the player has guessed all of the letters. So if their list of `guessed_letters` is the same as our list `answer`. + If the lists are the same, congratulate Player 2 with their victory and set the variable `game_over` to `True`. + + Next we'll program what happens when Player 2 guesses wrong (so the `{else}` command). First, tell the player that their guess was wrong. Then increase the `mistakes_made` variable by 1. + + For the last part we'll program what happens when Player 2 has made 10 mistakes. We'll print that Player 1 has won the game. Then we'll print the correct answer. And finally, we'll set our `game_over` variable to `True`, so the game stops. + + ***Go to the next tab*** Amazing work! Your game is playable, but wouldn't it be fun if the hangman was actually drawn when Player 2 makes a mistake..? + example_code: | + ``` + # Paste your code here + + # The game + {while} game_over _ + guess = _ + {if} _ + {for} i {in} {range} 1 {to} amount_letters: + if answer[i] == guess: + guessed_letters[i] = guess + {print} _ + {if} guessed_letters == _: + {print} _ + game_over = _ + {else}: + {print} _ + mistakes_made _ + {if} _ == 10: + {print} _ + {print} _ + _ + ``` + hangman_3: + name: Hangman 3 + default_save_name: Hangman_3 + description: Hangman 3 + levels: + 17: + story_text: | + In a game of hangman the mistakes are shown by drawing a part of the hangman each time a mistake has been made. + We now add those drawings with our turtle! + + ### Exercise + ***Create a function that draws the hangman*** Create a function that draws the hangman in 10 steps. We have already made step 1 for you. + + ***Test the function*** Test the function by calling the function with 10. If you are happy with the function, remove the line that calls the function for now. We will call the function when the player makes a mistake. + + ***Paste your hangman game under your function*** Go back to the previous tab and copy your hangman game. Paste the game underneath your function. + + ***Call the function when the player makes a mistake*** Under the line `mistakes_made = mistakes_made + 1` we will call the function. We want the turtle to take the same amount of steps as the player has made mistakes, so we call the function with `mistakes_made` as argument. + + ***Enjoy your game!*** +
+ The hangman could look like this +
+ example_code: | + ``` + # Create a function that draws the hangman + {define} draw_hangman {with} step: + {if} step == 1: + {color} white + {forward} -100 + {turn} 90 + {forward} -50 + {color} black + {forward} 100 + {forward} -50 + + {if} step == 2: + _ + # Paste your hangman game here + + ``` + harry_potter: + name: Harry Potter + default_save_name: Harry Potter + description: Harry Potter adventures + levels: + 10: + story_text: | + ### Exercise + We can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed. + **Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show. + example_code: | + ``` + houses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw + subjects = potions, defence against the dark arts, charms, transfiguration + fears = Voldemort, spiders, failing your OWL test + names = Harry, Ron, Hermione + _ + _ {print} name ' is placed in ' houses {at} {random} + _ {print} name ' is great at ' subjects {at} {random} + _ {print} name 's greatest fear is ' fears {at} {random} + ``` + haunted: + name: Haunted House + default_save_name: Haunted House + description: Escape from the haunted house + levels: + 1: + story_text: | + In this adventure you are working towards making a game in which you have to escape from a haunted house by picking the correct door. + If you pick the right door you'll survive, but if not a terrible monster might... + + In level 1 we start our haunted house game by making up a scary story and ask the player what monster they'll see in the haunted house. + example_code: | + ``` + {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: | + ### Exercise + Copy the example code to your input screen by clicking the yellow button. + Now finish the story by adding at least 5 lines of code. + Remember to start each line of codes with a `{print}` command. + 2: + story_text: | + In this haunted house you can choose your monsters with emojis. Of course you could also use words. + example_code: | + ``` + 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... + {print} 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! + ``` + story_text_2: | + ### Exercise + In the example above the monsters are predetermined. So each time you run your code, the output is the same. + Can you add `{ask}` commands to make the haunted house interactive and have the players choose the monsters they come across? + 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... + {print} 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! + ``` + 3: + story_text: | + In the previous levels you've made an introduction to your haunted house game, but as you might have noticed the story would always have a dreadful end. + In this level you can make your story more interactive by changing the outcome of the game; sometimes you'll get eaten, sometimes you'll escape! + Let Hedy decide randomly! + + ### Exercise + Copy the example codes and fill in the blanks to make it work! + + **Extra** This story is pretty straight forward, maybe you can spook it up a bit by adding a more exciting story. + Also you have very limited outcomes right now, there are only 3 options of what's behind the doors. Maybe you can think of more monsters to add to the list! + example_code: | + ``` + _ Escape from the haunted house! + _ There are 3 doors in front of you... + _ _ _ Which door do you choose? + _ You picked door ... choice + monsters _ a zombie, a vampire, NOTHING YOUVE ESCAPED + _ You see... + {sleep} + _ _ _ _ + ``` + 4: + story_text: | + In this level you learn how to use quotation marks in your games. + + ### Exercise + Can you make your Haunted House level 4 proof? + + ### Exercise 2 + Go back to the previous level and copy your haunted house code. Make the code work in this level by adding quotation marks in the right spots. + example_code: | + ``` + _ Add quotation marks to this code _ + {print} Escape from the haunted house! + {print} There are 3 doors in front of you... + choice {is} {ask} Which door do you choose? + {print} You picked door ... choice + monsters {is} a zombie, a vampire, NOTHING YOUVE ESCAPED + {print} You see... + {sleep} + {print} monsters {at} {random} + ``` + 5: + story_text: | + Up until this level the haunted house game always asked the player to choose a door, but as you might have noticed, they didn't really have to answer correctly. + If the player filled in a completely random answer, the game would still work and the player might even win (despite not picking a door). + In this level you can only win the game by picking the same door Hedy picked randomly. + + ### Exercise + Can you find the 4 missing words to complete the code? + example_code: | + ``` + {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} + _ _ _ _ {print} 'Great! Youve escaped!' + {else} {print} 'Oh no! You are being eaten by a...' monsters {at} {random} + ``` + 9: + story_text: "In this level you can use nesting, which allows you to make the haunted house even more interactive!\n\n### Exercise\nNow it's very hard to win this game, can you make it easier to win?\nChange your code so it only has one wrong door and two correct doors instead of one correct door and two wrong ones? \nTip: This means changing the variable correct_door into wrong_door, and switching the `{if}` and `{else}` code.\nAnd of course you may also change the story and make it your own. Change the monsters or make it a happy game show where you get a gift!\n" + example_code: | + ``` + {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!' + ``` + 11: + story_text: "In this level we've changed the `{for}` command so we can tell the player where they are. \n\n### Exercise 1\nFinish the program so the player knows which room they are in.\n\n### Exercise 2\nMake the program into an adventure by following these steps:\n\n1. Make a list of choices (like: fight or flight)\n2. Make sure the player can choose an option with `{ask}`\n3. Is answer correct? Then they may proceed to the next monster. Do they give a wrong answer? Let the player know with a `{print}`. \n\n**Extra** If you make a wrong choice, a monster is still shown! How could you change that?\n" + example_code: | + ``` + {print} 'Escape from the Haunted House!' + monsters = zombie, vampire, giant spider + _ + {print} 'Room ' i + monster = monsters {at} {random} + ``` + 14: + story_text: | + ### Exercise + In this level you can use the `<` and `>` symbol to introduce lives to your game. + Make sure the player loses a life when they come across the wrong monster and that the game stops if you have no lives left. + example_code: | + ``` + {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 _ + 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 = _ + {else} + {print} 'GAME OVER' + ``` + 16: + story_text: | + ### Exercise + This haunted house game uses the connection between the lists you can use in this level. + For example: all the properties that belong to the zombie are first in all the lists, witch second and vampire third. + Check out the code and fill in `weapons[i]`, `monsters[i]` , `bad_fate[i]`, `good_fate[i]`, `hint[i]` on the correct blanks to get the code to work! + example_code: | + ``` + 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 ' _ + {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 ' _ + needed_weapon = _ + {if} your_weapon == needed_weapon + {print} 'You use your ' your_weapon + {print} _ + {print} 'YOU WIN!' + {else} + {print} 'You have chosen the wrong weapon...' + {print} _ + {print} 'GAME OVER' + ``` + hotel: + name: hotel + default_save_name: hotel + description: hotel + levels: + 13: + story_text: | + In the previous adventure you have learned how to use an argument in a function, and you've learned how to combine it with an {ask}. + You might have wondered why you would use functions, because the functions in the example were only one line of code. + Now we will show you what a bigger function looks like and we will use multiple agruments now as well. You'll see how much better it is to use a function once the function gets bigger. + Here is an example of a function with arguments combined with {ask} commands. + example_code: | + ``` + {define} welcome_message {with} title, last_name, country, room_number + {print} 'Welcome to Hotel Hedy, ' title ' ' last_name + nice_trip {is} {ask} 'Did you have a nice trip from, ' country '?' + {if} nice_trip {is} 'yes' + {print} 'Lovely!' + {else} + {print} 'Sorry to hear that.' + {print} 'Hopefully you can take a nice rest in you room.' + {print} 'Your room number is ' room_number + + {print} 'Hello. Please fill in your information to check in.' + title = {ask} 'What is your title (mr, mrs, ms, dr, etc.)?' + name = {ask} 'What is you last name?' + homecountry = {ask} 'What country do you come from?' + + {call} welcome_message {with} title, name, homecountry, 105 + ``` + + title = {ask} 'What is your title (mr, mrs, ms, dr, etc.)?' + name = {ask} 'What is you last name?' + homecountry = {ask} 'What country do you come from?' + + {call} welcome_message {with} title, name, homecountry, 105 + if_command: + name: '{if} & {else}' + default_save_name: if_command + description: Introducing the {if} command + levels: + 5: + story_text: | + ## If... else.... + In level 5 there is something new, the `{if}`! With the `{if}` you can choose between two different options. + This code prints nice if you enter Hedy as a name, and boo! if you enter something else. + `{ask}` and `{print}` still work like they did in level 4. + example_code: | + ``` + name {is} {ask} 'what is your name?' + {if} name {is} Hedy {print} 'nice' {else} {print} 'boo!' + ``` + story_text_2: | + Sometimes code with an `{if}` gets really long and does not fit on the line well.
You may also divide the code over two lines, starting the second line at the `{else}` like this: + example_code_2: | + ``` + name {is} {ask} 'what is your name?' + {if} name {is} Hedy {print} 'nice' + {else} {print} 'boo!' + ``` + story_text_3: | + ### Exercise + Try to create your own code with `{if}` and `{else}`. You can use the example code if you want. + example_code_3: | + ``` + answer {is} {ask} '2 + 2 = ?' + _ _ _ 4 _ 'Great job!' + _ _ 'No 2 + 2 = 4' + ``` + 8: + story_text: | + ## If... Else... + You have learned to repeat a block of lines of code after a `{repeat}` command. + Now you can also use indentation to make blocks after a {if} or {else} command. + Check out the example code. + + ### Exercise + Add an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces. + example_code: | + ``` + name = {ask} 'What is your name?' + {if} name {is} Hedy + {print} 'Welcome Hedy' + {print} 'You can play on your computer!' + ``` + 9: + story_text: | + In this level you can also put an `{if}` command inside another `{if}` command. + example_code: | + ``` + continue = {ask} 'Do you want to continue?' + {if} continue = yes + sure = {ask} 'Are you sure?' + {if} sure {is} yes + {print} 'We will continue' + {else} + {print} 'You are not sure' + {else} + {print} 'You do not want to continue' + ``` + in_command: + name: '{in}' + default_save_name: in_command + description: Introducing the {in} command + levels: + 5: + story_text: | + ## Lists + When we want to check if something is in a list, we can now use the `{in}` command. + This code prints pretty! if you choose green or yellow, and meh otherwise. + example_code: | + ``` + pretty_colors {is} green, yellow + favorite_color {is} {ask} 'What is your favorite color?' + {if} favorite_color {in} pretty_colors {print} 'pretty!' + {else} {print} 'meh' + ``` + story_text_2: | + ### Exercise + Finish the example code by filling in the blanks with commands that you've learned. + When you've finished the code, try to create a code of your own and use a question that you've thought of yourself. + example_code_2: | + ``` + animals {is} dog, cow, sheep + answer {is} {ask} 'What is your favorite animal?' + _ answer _ animals _ 'Mine too!' + _ _ 'My favorite animals are dogs, cows and sheep' + ``` + is_command: + name: '{is}' + default_save_name: is_command + description: introducing {is} command + levels: + 2: + story_text: | + ## Variables + You can name a word with `{is}`. This is called a **variable**. In this example we made a variable called name and a variable called age. You can use the word name anywhere in your code and it will be replaced by Hedy, like this: + example_code: | + ``` + name {is} Hedy + age {is} 15 + {print} name is age years old + ``` + story_text_2: | + ### Exercise + Time to make your own variables! + In the example code we made an example of the variable `favorite_animal`. In line 1 the variable is set, and in line 2 we used the variable in a `{print}` command. + Firstly, finish our example by filling in your favorite animal on the blank. 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. + example_code_2: | + ``` + favorite_animal {is} _ + {print} I like favorite_animal + ``` + 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: + example_code: | + ``` + name = Hedy + answer = 20 + 4 + ``` + 14: + story_text: | + We are going to learn more new items. You might know them already from mathematics, the `<` and `>`. + The `<` checks if the first number is smaller than the second, for example age `<` 12 checks if age is smaller than 12. + If you want to check if the first number is smaller or equal to the second, you can use `<=`, for example age `<=` 11. + The `>` checks if the first number is bigger than the second, for example points `>` 10 checks if points is larger than 10. + If you want to check if the first number is bigger or equal to the second, you can use `>=`, for example points `>=` 11. + You use these comparisons in an `{if}`, like this: + example_code: | + ``` + age = {ask} 'How old are you?' + {if} age > 12 + {print} 'You are older than I am!' + ``` + ``` + age = {ask} 'How old are you?' + {if} age < 12 + {print} 'You are younger than me!' + {else} + {print} 'You are older than me!' + ``` + 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: + example_code_2: | + ``` + name = {ask} 'What is your name?' + {if} name == 'Hedy' + {print} 'You are cool!' + ``` + story_text_3: | + You can also compare if something is *not* equal to something else using `!=` like this: + example_code_3: | + ``` + name = {ask} 'What is your name?' + {if} name != 'Hedy' + {print} 'You are not Hedy' + ``` + language: + name: Language + default_save_name: Language + description: Practice words in a foreign language + levels: + 5: + story_text: | + Make your own program to practice your vocabulary in a new language. + + ### Exercise + Make the code longer by adding at least 3 more words for the player to learn. + **Extra** Of course, you can choose to use a different language than French. You can change to code to any language you'd like to learn. + example_code: | + ``` + {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' + ``` + 16: + story_text: | + ### Exercise + Take a look at the example code. This is a program to practise French vocabulary. Now make your own program to practice your vocabulary in a new language. + If you don't know any other languages, you can use Google translate or you can use emojis and your native language. + example_code: | + ``` + 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.' + ``` + maths: + name: maths + default_save_name: maths + description: Introducing maths + levels: + 6: + story_text: | + In this level you learn something new: you can now also calculate. + + The plus is easy, you write it like with math: `5 + 5` for example. The minus also works fine, it is `5 - 5`. + + The times is a bit different, because there is no times symbol on your keyboard. Just search, there really isn't! + That is why we multiply with the asterisk above 8: `5 * 5`. Read that as "5 times 5" that helps you remember it best. + example_code: | + ``` + {print} '5 plus 5 is ' 5 + 5 + {print} '5 minus 5 is ' 5 - 5 + {print} '5 times 5 is ' 5 * 5 + {print} '5 divided by 5 is ' 5 / 5 + ``` + 12: + story_text: |- + **Decimal numbers** + So far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers. + example_code: | + ``` + {print} 'Two and a half plus two and a half is...' + {print} 2.5 + 2.5 + ``` + story_text_2: |- + **Maths with words** + In this level you can also do addition with words like this: + example_code_2: | + ``` + a = 'Hello ' + b = 'world!' + {print} a + b + ``` + music: + name: music + default_save_name: music + description: Play a tune! + levels: + 1: + story_text: |- + In this level you'll learn how to use the `{play}` command to play a tune! + + Type `{play}` followed by the note you want to play. The scale goes C-D-E-F-G-A-B. + As you can see there are 7 different letters, but we can play more than just 7 notes. + Type a number between 1 and 10 behind the letter to choose the scale, for example after B4 comes C5. + C1 is the lowest note you can play, C10 is the highest. + + ### Exercise + Try out the example code and then play around with it! Can you create your own melody? + In the next level you'll learn how to play some existing songs. + example_code: |- + ``` + {play} C4 + {play} D4 + {play} E4 + {play} F4 + {play} G4 + {play} A4 + {play} B4 + {play} C5 + ``` + 2: + story_text: | + ### Exercise + Finish the songs! We have started the codes for some melodies. + example_code: | + ``` + {print} Old Mac Donald had a farm + {play} C5 + {play} C5 + {play} C5 + {play} G4 + {play} A4 + {play} A4 + {play} G4 + ``` + story_text_2: As you can see, you can also use the `{sleep}` command to add a little pause in the song. + example_code_2: | + ``` + {print} Twinkle Twinkle Little Star + {play} C + {play} C + {play} G + {play} G + {play} A + {play} A + {play} G + {sleep} 1 + {play} F + {play} F + ``` + 3: + story_text: | + Create a random melody! + + ### Exercise + The example code creates a random melody, but it's very short and not many notes are used. + Add more notes to the list and create a longer melody by copying the last line a couple more times. + example_code: | + ``` + notes {is} A4, B4, C4 + {play} notes {at} {random} + {play} notes {at} {random} + {play} notes {at} {random} + ``` + 4: + story_text: | + Use the `{clear}` command to create a karaoke machine! + + ### Exercise + Finish the karaoke version of 'Mary had a little lamb'. + Then, create a karaoke version of any song you'd like! + example_code: | + ``` + {print} 'Mary had a little lamb' + {play} E + {play} D + {play} C + {play} D + {play} E + {play} E + {play} E + {clear} + {print} 'Little lamb, little lamb' + {play} D + {play} D + {play} D + {play} E + {play} E + {play} E + {clear} + {print} 'Mary had a little lamb' + {play} E + ``` + 5: + story_text: | + You don't always have to use the `{play}` command to play a whole song, sometimes you just want to play one note. + For example, if you want to make a quiz, you can play a happy high note if the answer is right and a sad low note if the answer is wrong. + + ### Exercise + Finish the first question by adding a line of code that plays a C3 note if the wrong answer is given. + Then think of 3 more questions to add to this quiz. + example_code: | + ``` + answer {is} {ask} 'What is the capital of Zimbabwe?' + {if} answer {is} Harare {play} C6 + _ + ``` + 6: + story_text: "Instead of playing notes, you can also play numbers now. Simply type `{play} 1` for the lowest note, `{play} 70` for the highest note, or anything in between.\n\n### Exercise\nThis calls for musical maths! Try out the example code a couple of times with different starting numbers.\nThen, see if you can compose a song using the numbers.\n" + example_code: | + ``` + number = {ask} 'Say a starting number between 1 and 67' + {print} number + {play} number + number = number + 1 + {print} number + {play} number + number = number + 1 + {print} number + {play} number + ``` + 7: + story_text: | + Using the `{repeat}` command can make your codes for melodies a lot shorter! + + ### Exercise + Finish the code for Twinkle Twinkle Little Star by using the `{repeat}`command. + Then go back to the songs you've made in the previous levels. Can you shorten those codes too? + example_code: | + ``` + {print} 'Twinkle Twinkle Little Star' + {repeat} 2 {times} {play} C4 + {repeat} 2 {times} {play} G4 + _ + ``` + 8: + story_text: | + Now that we can use the `{repeat}` command for multiple lines, we can make songs even more easily! + + ### Exercise + Finish the song of Brother John (Frère Jacques). Don't forget to use `{repeat}`! + example_code: | + ``` + {print} 'Brother John' + {repeat} 2 {times} + {play} C + {play} D + {play} E + {play} C + {repeat} 2 {times} + {play} E + {play} F + {play} G + {sleep} 1 + ``` + 9: + story_text: | + From this level on you can - among other things - use a {repeat} command inside a {repeat} command. + That makes songs like 'Happy birthday' even shorter! + + ### Exercise + Finish the song! + example_code: | + ``` + first_time = yes + {repeat} 2 {times} + {repeat} 2 {times} + {play} C + {play} D + {play} C + {if} first_time {is} yes + {play} F + {play} E + first_time {is} no + {else} + _ + ``` + 12: + story_text: | + Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in. + + ### Exercise + Finish the song of Twinkle Twinkle Little Star. + Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too? + example_code: | + ``` + {define} first_line + {play} C + {play} C + {play} G + {play} G + {play} A + {play} A + {play} G + {sleep} + + {define} second_line + {play} F + {play} F + {play} E + {play} E + {play} D + {play} D + {play} C + {sleep} + + {define} third_line + {play} G + {play} G + {play} F + {play} F + {play} E + {play} E + {play} D + {sleep} + + {call} _ + {call} _ + {call} _ + {call} _ + {call} _ + {call} _ + ``` + 13: + story_text: | + You can use a function with an argument for songs that have line that are almost the same, but slightly different each time. + One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, but each time they are followed by a different couple of notes. + + ### Exercise + Can you finish the song of Yankee Doodle? + Can you think of another song to program this way? + example_code: | + ``` + {print} 'Yankee Doodle' + {define} _ {with} note_1, note_2, note_3 + {play} C4 + {play} C4 + {play} D4 + {play} E4 + {play} _ + {play} _ + {play} _ + + {call} line_1 {with} 29, 31, 30 + {call} line_1 {with} 29, 28, 0 + {call} line_1 {with} 32, 31, 30 + + {play} C4 + {play} B3 + {play} G3 + {play} A3 + {play} B3 + {play} C4 + {play} C4 + ``` + 14: + story_text: | + You can program music for fun, but you can also use the musical notes to make something useful like a fire alarm! + + ### Exercise + Make sure the fire alarm rings when there is a fire! + example_code: | + ``` + {define} fire_alarm + {print} 'FIRE!' + note = 40 + {for} i {in} {range} 1 {to} 100 + {if} note _ 50 + note = note + 5 + {play} _ + {else} + note = 40 + + fire = {ask} 'Is there a fire?' + {if} fire _ 'yes' + {call} fire_alarm + ``` + 15: + story_text: | + **Warning** This adventure can become extremely annoying! + We can also use the {while} command to repeat a song forever. + + ### Exercise + Finish the never-ending song. + example_code: | + ``` + {define} song + {play} _ + + yes_or_no = {ask} 'Do you want to hear my never-ending song?' + {while} yes_or_no = 'yes' + {call} song + {print} '🥳' + ``` + 16: + story_text: | + Upgrade your Old MacDonald code! + + ### Exercise + Take your code from the 'Sing a Song' adventure and add musical notes to it! + You can make a function for each line in the song and call that function after the line is printed. + We defined the first line for you and called it in the code. Can you finish the whole song? + example_code: | + ``` + {define} line_1 + {for} i {in} {range} 1 {to} 3 + {play} G + {play} D + {for} i {in} {range} 1 {to} 2 + {play} E + {play} D + + animals = ['pig', 'dog', 'cow'] + sounds = ['oink', 'woof', 'moo'] + for i in range 1 to 3 + animal = animals[i] + sound = sounds[i] + print 'Old MacDonald had a farm' + call line_1 + print 'E I E I O!' + _ + ``` + 17: + story_text: | + You can use the {elif} to create different options. + + ### Exercise + Firstly, add colons to get the code to work. + Then finish this code by adding at least 2 other songs for other moods. For example a happy song and an angry song. + example_code: | + ``` + {define} scary_song + {for} i {in} {range} 1 {to} 3 + {play} G + {play} E + {sleep} 2 + {for} i {in} {range} 1 {to} 3 + {play} F + {play} D + + mood = {ask} 'Which emotion are you feeling?' + {if} mood {is} 'fear' + {call} scary_song + {elif} _ + ``` + 18: + story_text: | + ### Exercise + Even in this last level of Hedy we can make some music! Be careful of all the syntax that is needed now. + Take a good look at how the functions are defined and called upon in the example code. + Finish the song! + example_code: | + ``` + {def} line_1(): + {for} i {in} {range}(1, 5): + {play} A + {play} D + {play} F + {play} A + + {def} line_2(): + {for} i {in} {range}(1, 5): + {play} G + {play} C + {play} E + {play} G + + {def} line_3(): + _ + + {print} ('The drunken sailor') + {print} ('What shall we do with the drunken sailor?') + line_1() + line_2() + line_3() + {print} ('Early in the morning') + ``` + parrot: + name: Parrot + default_save_name: Parrot + description: Create your own online pet parrot that will copy you! + levels: + 1: + story_text: | + Create your own online pet parrot that will copy you! + example_code: | + ``` + {print} Im Hedy the parrot + {ask} whats your name? + {echo} + {echo} + ``` + story_text_2: | + ### Exercise + Copy the example code to your input screen by clicking on the yellow button. + Make the parrot ask a different question. Fill in the blanks in the example! + **Extra** You can also let the parrot ask multiple questions. Type in some more lines of code beneath your own code. + example_code_2: | + ``` + {print} Im Hedy the parrot + {ask} _ + {echo} + {echo} + 2: + story_text: | + In the previous level you've made a parrot that will repeat after you. In this level we'll make the parrot interactive using a variable and `{ask}` command. + We will also make the parrot more life-like by adding `{sleep}` commands after something is said. + example_code: | + ``` + {print} Im Hedy the parrot + name _ _ what is your name? + {print} name + _ + {print} squawk + _ + {print} name + ``` + story_text_2: | + ### Exercise + Firstly, finish line 2 with an `{is}` and an `{ask}` command. + Then fill in a `{sleep}` command on line 4 and 6 to let the parrot stay quiet for a little bit. + + **Extra** Can you make the parrot ask for more then only your name by adding more lines of code? + 3: + story_text: | + Teach your parrot a new word with `{add}`. + ### Exercise + Can you add the `{add} {to_list}` command to get the code to work? + example_code: | + ``` + words {is} squawk, Hedy + {print} Train your parrot! + new_word {is} {ask} Which word do you want to teach them? + _ new_word _ words + {print} 🧒 Say new_word, Hedy! + {print} 🦜 words {at} {random} + ``` + 4: + story_text: | + In this level we have to use quotation marks with the commands `{ask}` and `{print}`. + ### Exercise + Complete the code by filling in quotation marks on the blanks. + example_code: | + ``` + words {is} squawk, Hedy + {print} _ Train your parrot! _ + new_word {is} {ask} _ Which word do you want to teach them? _ + {add} new_word {to_list} words + {print} _ 🧒 Say _ new_word _, Hedy!_ + {print} _ 🦜 _ words {at} {random} + ``` + 5: + story_text: | + Reward your parrot if it says the correct word! + + ### Exercise + Finish the code by filling in the 4 missing commands. + example_code: | + ``` + words {is} squawk, Hedy + {print} 'Train your parrot!' + new_word {is} {ask} 'Which word do you want to teach them?' + {add} new_word {to_list} words + said_word {is} words {at} {random} + {print} '🧒 Say ' new_word ', Hedy!' + {print} '🦜 ' said_word + _ said_word {is} new_word _ '🧒 Great job, Hedy! 🍪' + _ _ '🧒 No, Hedy! Say ' new_word + ``` + piggybank: + name: Piggy Bank + default_save_name: Piggy Bank + description: Count your pocketmoney! + levels: + 12: + story_text: | + In this adventure you learn how to make a digital piggy bank. + + ### Exercise + Finish the code to calculate how much money you have and how long you need to save up to buy what you want! + **Extra** Maybe you have already saved some money? Deduct that from the amount you will have to save up. + example_code: | + ``` + {print} 'The digital piggy bank' + wish = {ask} 'What would you like to buy?' + price = {ask} 'How much does that cost?' + saved = {ask} 'How much money have you saved already?' + allowance = {ask} 'How much pocket money do you get per week?' + to_save = price - saved + weeks = to_save / allowance + {print} 'You can buy a ' _ ' in ' _ ' weeks.' + ``` + 14: + story_text: | + ### Exercise + In this level you can let Hedy tell you if you have saved up enough money! + Finish this code by filling in the blanks! + example_code: | + ``` + _ calculate_budget {with} wish, money, allowance + to_save = wish - money + weeks = to_save / allowance + {if} wish _ money + {print} 'You need to save up some more!' + {print} 'Youll need ' weeks ' more weeks.' + {else} + {print} 'Great! You have enough' + {print} 'Lets go shopping!' + + money = {ask} 'How much money have you saved?' + wish = {ask} 'How much money do you need?' + allowance = {ask} 'How much pocket money do you get each week?' + + {call} _ + ``` + pressit: + name: Key presses + default_save_name: Pressed + description: Try linking a keyboard key to a command! + levels: + 5: + story_text: | + In this level there is another new keyword: `{pressed}`! + With `{pressed}` you can use keys on your keyboard to control what lines are used. + + ### Exercise + Look at the example and add one more line of code that reacts to a key press. + example_code: | + ``` + {print} 'Do you want a good (g) or bad (b) ending?' + {if} g {is} {pressed} {print} 'They lived happily ever after ❤' + {else} {print} 'The prince was eaten by a hippopotamus 😭' + ``` + story_text_2: | + You can also link turtle commands to keys. + + ### Exercise + Copy the lines a few times so you can create a larger drawing. + example_code_2: | + ``` + {if} y {is} {pressed} {forward} 15 + {else} {turn} 90 + ``` + 7: + story_text: | + Now that you have learned about `{repeat}`, we can press keys multiple times. + You can use it to make the turtle walk forward and turn. + + ### Exercise + The code you have seen in level 5 only checks the key once. Copy the example code and add a `{repeat}` to it, so that you can press the keys many times. + Use this code to draw something nice. + example_code: | + ``` + {if} x {is} {pressed} {forward} 15 {else} {turn} 90 + ``` + 9: + story_text: | + Now that you know how to combine statements, you can create a touch type tool with `{pressed}`. + + ### Exercise + Finish the code. Each time a random letter should be chosen, which you have to press. You get a point for a correct press, and and two points deduction for a wrong press. + **Extra** Clear the screen after each letter, and show the user how many points they have scored. + example_code: | + ``` + points = 0 + letters = a, b, c, d, e + {repeat} 10 {times} + letter = _ _ _ + {print} 'Press the letter ' letter + {if} letter {is} {pressed} + _ + _ + _ + ``` + print_command: + name: '{print}' + default_save_name: print + description: Introduction print command + levels: + 1: + story_text: | + ## The print command + You can print text to the screen using the `{print}` command. + example_code: | + ``` + {print} Hi there, programmer! + {print} Welcome to Hedy! + ``` + story_text_2: | + ### Exercise + In Hedy you will find exercises in every adventure. An exercise allows you to practise the new commands and concepts, and lets you give your own twist to the example codes. + In this exercise you will see a pink blank space. You have to fill something in the place of the blank space before the code can be run. + + Fill in the `{print}` command in the blank space and then add five more lines of code. Each line has to start with a `{print}` command. + Have fun! + example_code_2: | + ``` + _ Hello! + ``` + 18: + story_text: |- + We arrived at real Python code! That means we need to use parentheses with `{print}` and `{range}` from now on. + It also means you can use Hedy code from this level in any Python environment as long as you use the English commands. If you haven't until now, you can switch the toggle in the commands menu to do so. + example_code: | + ``` + {print}('Hello!') + {for} i {in} {range}(1, 10): + {print}('This is line ', i) + ``` + story_text_2: If you want to print more than one item, you need to separate them by commas. + example_code_2: | + ``` + temperature = 25 + {print}('It is ', temperature, ' degrees outside') + ``` + ``` + name = 'Hedy' + {print}('My name is ', name) + ``` + quizmaster: + name: Quizmaster + default_save_name: Quizmaster + description: Make your own quiz! + levels: + 14: + story_text: | + ### Exercise + In this adventure you can make your own quiz! Fill in the blanks, add more questions and enjoy your own quiz! + You can make a quiz about anything you like: your hobby, your favorite animal, your favorite book or anything at all! + example_code: | + ``` + {print} 'Make your own quiz' + points_a = 0 + points_b = 0 + {print} 'Question' + {print} 'Answer option A' + {print} 'Answer option B' + answer = {ask} 'Which answer?' + {if} answer == 'A' + points_a = points_a + 1 + {if} answer == 'B' + points_b = points_b + 1 + {print} 'End of the quiz!' + {print} 'Lets see the results!' + {if} points_a > points_b + {print} 'You belong to the A club' + {if} points_b > points_a + {print} 'You belong to the B club' + ``` + quotation_marks: + name: '''quotation marks''' + default_save_name: quotation_marks + description: Introduction quotation marks + levels: + 4: + story_text: | + ## 'Quotation marks' + In level 4 `{ask}` and `{print}` have changed. + You must put text that you want to print between quotation marks. + This is useful, because now you can print all the words you want. Also the words you used to store something with `{is}`. + Most programming languages also use quotation marks when printing, so we are also getting a step closer to real programming! + example_code: | + ``` + {print} 'You need to use quotation marks from now on!' + answer {is} {ask} 'What do we need to use from now on?' + {print} 'We need to use ' answer + ``` + story_text_2: | + ## Contractions + Important! Mind that now that we're using quotation marks, Hedy will get confused when you use the apostrophe for contractions like I'm or What's. + Make sure to remove those apostrophes and change the spelling to I am or What is. + Check out the example code to see the wrong way of using apostrophes. + example_code_2: | + ``` + _ This is the wrong way of using apostrophes _ + {print} 'I'm babysitting my sister's kids' + {print} 'What's more fun than that?' + ``` + 12: + story_text: | + **All texts need to be in quotation marks** + For this level on you will also have to use quotation marks when storing a text with `=`: + example_code: | + ``` + name = 'Hedy the Robot' + {print} 'Hello ' name + ``` + story_text_2: | + **All items in lists need quotation marks too** + Lists are texts, so they need quotation marks too. Mind that each single item on the list has quotation marks. + This allows you to save two words as 1 item on the list, for example 'Black Widow'. + example_code_2: | + ``` + superheroes = 'Spiderman', 'Batman', 'Black Widow' + {print} superheroes {at} {random} + ``` + story_text_3: | + **All text after `{if}` comparisons need quotation marks too** + example_code_3: | + ``` + name = {ask} 'What is your name?' + {if} name = 'Hedy the Robot' + {print} 'Hi there!' + ``` + story_text_4: | + **Numbers don't need quotation marks** + For numbers, you do not use quotation marks in the `=`: + example_code_4: | + ``` + score = 25 + {print} 'You got ' score + ``` + random_command: + name: '{random}' + default_save_name: random_command + description: introducing at random command + levels: + 3: + story_text: | + ## At random + In this level you can make a list using the `{is}` command. You can let the computer choose a random item from that list. You do that with `{at} {random}`. + example_code: | + ``` + animals {is} dogs, cats, kangaroos + {print} animals {at} {random} + ``` + story_text_2: | + You can use the `{at} {random}` command in a sentence as well. + example_code_2: | + ``` + food {is} sandwich, slice of pizza, salad, burrito + {print} I am going to have a food {at} {random} for lunch. + ``` + story_text_3: | + ### Exercise + Try out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price! + Can you do it? We have already put the first lines into the example code. + example_code_3: | + ``` + {print} The big gameshow! + {print} There are 3 suitcases in front of you... + chosen {is} {ask} Which suitcase do you choose? + prices {is} _ + _ + ``` + 16: + story_text: |- + We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels. + We use square brackets to point out a place in a list. For example: `friends[1]` is the first name on the list of friends, as you can see in the first part of the example code. + The second part of the example code shows you that we can also match 2 lists using the variable i. + example_code: | + ``` + friends = ['Ahmed', 'Ben', 'Cayden'] + {print} friends[1] ' is the first friend on the list.' + {print} friends[2] ' is the second friend on the list.' + {print} friends[3] ' is the third friend on the list.' + #now we will match 2 lists using the variable i + lucky_numbers = [15, 18, 6] + {for} i {in} {range} 1 {to} 3 + {print} friends[i] 's lucky number is ' lucky_numbers[i] + ``` + story_text_2: |- + Now that you've learned to use the brackets in lists, you can also start using the {at} {random} command in the Python way! + You simply type the name of your list with `[random]` behind it! + example_code_2: |- + ``` + fruit = ['apple', 'banana', 'cherry'] + {print} fruit[random] + ``` + repeat_command: + name: '{repeat}' + default_save_name: repeat_command + description: '{repeat} command' + levels: + 7: + story_text: | + ## Repeat! Repeat! Repeat! + Level 7 adds the `{repeat}` command. `{repeat}` can be used to execute one line of code multiple times. Like this: + + ### Exercise + Play around with the `{repeat}` command. Can you make the happy birthday song in only 3 lines of code instead of 4 now? + example_code: | + ``` + {repeat} 3 {times} {print} 'Hedy is fun!' + ``` + 8: + story_text: | + ### Repeat commands and indentation + In this level you can repeat multiple lines of code with only 1 repeat command. + You do this by making a block of lines that you want to repeat. + The lines in this block will need **indentation** . + That means putting four spaces at the beginning of each line. You will also have to indent when you just want to create a block of one line. + example_code: | + ``` + {repeat} 5 {times} + {print} 'Hello everyone' + {print} 'This is all repeated 5 times' + ``` + 9: + story_text: | + Great job! You've reached another new level! In the previous level you've learned to use multiple lines of code in an `{if}` or `{repeat}` command. + But you can't yet combine the two... + + Good news! In this level you will be allowed to put an `{if}` inside an `{if}`, `{repeat}` inside a `{repeat}` command and in eachother. + Give it a try! + example_code: | + ``` + {repeat} 3 {times} + order = {ask} 'What would you like to order?' + {if} order {is} pizza + {print} 'Yammie' + {else} + {print} 'pizza is better!' + ``` + repeat_command_2: + name: '{repeat} 2' + default_save_name: repeat_command_2 + description: '{repeat} command 2' + levels: + 7: + story_text: | + ## Repeat with other commands and with variables + You have practiced the `{repeat}` command in combination with the `{print}` command now, but did you know you could also use other commands with `{repeat}` ? + In this example code you can see that `{repeat}` can also be used with an `{ask}`, `{if}` or `{else}` command. + example_code: | + ``` + {repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?' + {if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!' + {else} {repeat} 3 {times} {print} 'You have learned something new!' + ``` + story_text_2: | + Another interesting thing you can do with the `{repeat}` command is using variables to set the amount of times something should be repeated. In the example code you can see that we first ask the person how old they are. + Then, in line 3, the question is repeated 'age' times. So we have used the variable 'age' with the `{repeat}` command. + example_code_2: | + ``` + {print} 'Yay! It is your birthday!' + age = {ask} 'How old are you now?' + {repeat} age {times} {print} 'Hip Hip Hurray!' + ``` + 8: + story_text: | + ### In the block or not? + In this level you have to think carefully which lines of code should be in the block and which shouldn't. + For example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice. + This means the last line shouldn't start with indentation as it doesn't belong to the block. + If you do start the last line with indentation the song will turn out wrong. + + ### Exercise + Each line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song. + example_code: | + ``` + _ {print} 'Do you know the muffin man?' + _ {repeat} 2 {times} + _ {print} 'The muffin man' + _ {print} 'Do you know the muffin man, who lives on Drury Lane?' + ``` + restaurant: + name: Restaurant + default_save_name: Restaurant + description: Create your own virtual restaurant + levels: + 1: + story_text: | + In level 1 you can make your own virtual restaurant and take your guests' orders. + story_text_2: | + ### Exercise + Copy the example code into your input screen by clicking the yellow button. + Firstly, fill in the correct command on the blanks to make to code work properly. + Then add at least 4 more lines of code to the restaurant program. + Ask the costumer what they would like to drink and ask if they want to pay with cash or card. + Lastly, think of a nice way to say goodbye to your costumer. + example_code_2: | + ``` + {print} Welcome to Hedy's restaurant 🍟 + _ What would you like to order? + {echo} So you would like to order + {print} Thank you for your order! + {print} It's on its way! + ``` + 2: + story_text: | + In level 2 you could expand your restaurant by using variables. In level 1 Hedy could only `{echo}` the order once and only remember the last thing that was ordered. + Now you can use variables and Hedy can remember both the food and the toppings! + example_code: | + ``` + {print} Welcome to Hedy's restaurant! + {print} Today we're serving pizza or lasagna. + food {is} {ask} What would you like to eat? + {print} Great choice! The food is my favorite! + topping {is} {ask} Would you like meat or veggies on that? + {print} food with topping is on its way! + ``` + story_text_2: | + ### Exercise + Copy your own restaurant code from to previous level to the input screen below. + Fix the code by replacing the `{ask}` and `{echo}` commands and using variables, like you've learned in this level. + + Now that your code is working again, it's time to add something more. + Look at the last line of the example code: `{print} food with topping is on its way!` + In this single line 2 variables have been used to create a summary of the order. + Now add your own summary of the food and drinks ordered by the customer. + + **Extra** Now that you've learned how to use variables, you can use as many variables in one line as you'd like. Can you add more variables to your code, like eat in or take-away, cash or card, with or without a straw etc.? + 3: + story_text: | + Having trouble to decide what you wanna have for dinner? You can let Hedy choose for you! + Simply add lists of your favorite (or least favorite) meals and Hedy can randomly choose your dinner. + You can also have a bit of fun, by letting Hedy choose the price for your dinner as well! What will you get? + example_code: | + ``` + dishes {is} spaghetti, brussels sprouts, hamburgers + {print} You will have dishes {at} {random} tonight! + prices {is} 1 euro, 10 euros, 100 euros + {print} That will be prices {at} {random} please. + ``` + story_text_2: | + ### Exercise + Now make your own version of the random restaurant. + Make a list of starts, mains, desserts, drinks and prices yourself. + Then use `{print}` and `{at} {random}` commands to tell the costumer what will be on their menu tonight. + example_code_2: | + ``` + {print} Welcome to your own random restaurant! + starters {is} _ + mains {is} _ + desserts {is} _ + drinks {is} _ + prices {is} _ + _ + ``` + 4: + story_text: | + In the restaurant you have to use quotation marks too when using the `{print}` or `{ask}` command. + + ### Exercise + Add the quotation marks to this code to make it work! Be careful: variables should not be in quotation marks. + Then, use the `{clear}` command to only show one line at a time in your output screen. + + ### Exercise 2 + Go back to the previous level and copy your restaurant code. Make the code work in this level by adding quotation marks in the right spots and add some `{clear}` commands. + example_code: | + ``` + _ Add the quotation marks to this code _ + {print} Welcome to Restaurant Chez Hedy! + {print} Today we are serving pizza or lasagna. + food {is} {ask} What would you like to eat? + {print} Great choice! The food is my favorite! + topping {is} {ask} Would you like meat or veggies on that? + {print} food with topping is on its way! + drinks {is} {ask} What would you like to drink with that? + {print} Thank you for your order. + {print} Your food and drinks will be right there! + ``` + 5: + story_text: | + ### Exercise + The example code shows how you could program that you've run out of a menu item in your restaurant. + Copy your own restaurant code from the previous levels. Create a problem in your restaurant and code it, like the example code did. + For instance, you could also run out of a menu item, or you don't take credit cards, or the ice cream machine is broken. + + **Extra** Have you programmed the problem and programmed appropriate responses? Then try to add more `{if}` and `{else}` commands into your code. + Try to add an `{if}` after every `{ask}` command in your code to make the code as interactive as possible! + example_code: | + ``` + drinks_in_stock {is} water, lemonade, cola, orange juice + drink {is} {ask} 'What would you like to drink?' + {if} drink {in} drinks_in_stock {print} 'One ' drink 'coming up!' + {else} {print} 'Sorry, we do not sell that' + ``` + 6: + story_text: | + In this level you can use maths to calculate the total price of your customer's order, which can make your virtual restaurant more realistic. + But you can also add many more things to your virtual restaurant, for example more courses. + + ### Exercise + You can add many more things to your virtual restaurant. For example, can you... + - ask how many people are coming and multiply the price by that amount? + - add another course? + - give people a discount when they enter a (secret) couponcode? + - add a children's menu? + - think of other fun things to add? + example_code: | + You can make a simple restaurant code, like this: + ``` + {print} 'Welcome to Restaurant Chez Hedy' + {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!' + ``` + 7: + story_text: | + In this level you've learned how to use the `{repeat}` command to repeat a line of code a certain amount of times. + You can use that in your restaurant to `{ask}` multiple people what they'd like to eat. + + ### Exercise + Can you complete the code? Hedy needs to repeat this question as many times as there are people. So if there are 5 people, the question needs to be asked 5 times. + **Extra** Expand your code with more questions, for example about drinks or sauce. + example_code: | + ``` + {print} 'Welcome to Restaurant Chez Hedy' + people = {ask} 'How many people are joining us today?' + ``` + 8: + story_text: | + In this level you can make your virtual restaurant more elaborate by repeating multiple lines of code. Like this: + + ### Exercise + This code can be expanded with more items on the menu, for example offering drinks, and/or multiple courses or desserts. Add at least one more item. + **Extra** Add even more items, as many options as you like! + example_code: | + ``` + {print} 'Welcome to Restaurant Chez Hedy!' + people = {ask} 'How many people will be joining us today?' + {print} 'Great!' + {repeat} people {times} + food = {ask} 'What would you like to order?' + {print} food + {print} 'Thank you for ordering!' + {print} 'Enjoy your meal!' + ``` + 9: + story_text: "In this level you can use nesting to make your restaurant more realistic and more fun!\n\n### Exercise\nThe indentation was removed in the example code. \nCan you figure out how much indentation each line needs in order for the code to work properly?\nIf the customer orders pizza, Hedy shouldn't ask what sauce the costumer wants.\n\n**Extra** A restaurant does not stock all sauces. Make a list of available sauces and give a reply with each order whether you sell it.
\n**Extra** Pizzas have toppings. Ask customers what they want.
\n**Extra** Do customers want a drink? Ask them too!
\n" + example_code: | + ``` + {print} 'Welcome to Restaurant Chez Hedy!' + 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!' + ``` + 10: + story_text: | + In this level you'll learn how to easily ask orders for different courses. + + ### Exercise 1 + Finish the code with an `{ask}` on the blanks such that the customer is asked what they want to eat for each course. + example_code: "```\ncourses = appetizer, main course, dessert\n{for} course {in} courses\n {print} 'What is your order for ' course '?'\n _ \n _\n```\n" + story_text_2: | + ### Exercise + Of course, you could also order for multiple people! + Can you add the correct amount of indentation before each line to make the code work properly? + Tip: some lines don't need any indentation at all. + example_code_2: | + ``` + _ courses = appetizer, main course, dessert + _ names = Timon, Ono + _ {for} name {in} names + _ {for} course {in} courses + _ food = {ask} name ', what would you like to eat as your ' course '?' + _ {print} name ' orders ' food ' as their ' course + ``` + 11: + story_text: | + We can use the `{for}` with `{range}` to print the orders from multiple customers in an orderly manner. + + ### Exercise + Finish the restaurant code, so that you can ask for the order of multiple people. Print the order number each time: 'Order 1', 'Order 2', etc. + Are you not sure how to go about this? Have a peek at your level 8 code. + + **Extra** In level 9 the restaurant also used prices. You can add that here too! + example_code: | + ``` + {print} 'Welcome to Restaurant Hedy!' + people = {ask} 'For how many people would you like to order?' + {print} 'So you want to order for ' people ' people.' + {print} "Let's go!" + ``` + 12: + story_text: | + From this level on, you can use decimal numbers to make your menu more realistic. + + ### Exercise + Can you think of a code to give your friends and family a 15% discount? + example_code: | + ``` + price = 0.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' + ``` + 13: + story_text: | + In this level you will learn new commands to extend your code even further. + + ### Exercise 1 + Place a `{and}` and a `{or}` in the logical place in the program. + + ### Exercise 2 + Expand your restaurant with at least one more `{and}` and one `{or}`. + For example, create a special discount coupon that only applies to pizza, or give your customer a free drink + with fries and pancakes. Or something completely different of course! + example_code: | + ``` + price = 10 + food = {ask} 'What would you like to eat?' + drinks = {ask} 'What would you like to drink?' + {if} food {is} 'sandwich' _ drinks {is} 'juice' + {print} 'That is our discount menu' + price = price - 3 + {if} drinks {is} 'water' _ drinks {is} 'juice' + {print} 'That is a healthy choice' + {print} 'That will be ' price ' dollars' + ``` + 15: + story_text: | + With the `{while}` you can make sure your costumers can keep adding orders until they are done. + + ### Exercise + Correctly add the `{while}` command to this code. + example_code: | + ``` + {print} 'Welcome at McHedy' + more = 'yes' + _ + order = {ask} 'What would you like to order?' + {print} order + more = {ask} 'Would you like to order anything else?' + {print} 'Thank you!' + ``` + rock: + name: Rock, paper, scissors + default_save_name: Rock_2 + description: Make your own rock, paper, scissors game + levels: + 1: + story_text: | + In level 1 you can start with a rock, paper, scissors game. + + With `{ask}` you can make a choice, and with `{echo}` you can repeat that choice. + example_code: | + ``` + {print} what do you choose? + {ask} choose from rock, paper or scissors + {echo} so your choice was: + ``` + story_text_2: | + ### Exercise + Instead of using words, you could also use emojis: ✊✋✌ + Can you create a code using emojis? + example_code_2: | + ``` + {print} what do you choose? + {ask} choose from _ + {echo} so your choice was: + ``` + 2: + story_text: | + In this level you can practise using the variables, so that you can make the rock, paper, scissors game in the next level! + ### Exercise + Finish the code by filling in the **variable** on the blank. + This game is not very interactive, but no worries! In the next tab you'll learn how to use variables with the `{ask}` command to make your game interactive! + example_code: |- + ``` + choice {is} rock + {print} I choose _ + ``` + 3: + story_text: | + You can use the `{at} {random}` command to let the computer pick rock, paper or scissors! + + ### Exercise + Finish the code by using the `{at} {random}` command. + example_code: | + ``` + choices {is} rock, paper, scissors + {print} choices _ + ``` + story_text_2: | + **Extra** Make a two player game. Firstly ask the two players to fill in their names. Then let the computer randomly pick their choices. + example_code_2: | + ``` + choices {is} rock, paper, scissors + player_1 {is} {ask} Name of player 1: + _ + ``` + 4: + story_text: | + In this level we can further program rock, paper, scissors. But if you want to add text, you have to use quotation marks here too. + ### Exercise + Fill in quotation marks on the blanks. Mind that the variable `choices` should be outside the quotes. + example_code: | + ``` + choices {is} rock, paper, scissors + {print} _The computer chooses..._ choices {at} {random} + ``` + 5: + story_text: | + In this level we can determine whether it's a tie or not. For that you need the new `{if}` code. + + ### Exercise + Finish the code by filling in the blanks: + * Let the computer pick a random option + * Ask the player what they want to choose + * Fill in the correct variables in line 4 and 5 + * Finish line 6 so that Hedy can check whether it's a tie or not. + example_code: | + ``` + options {is} rock, paper, scissors + computer_choice {is} _ + choice {is} _ + {print} 'you chose ' _ + {print} 'computer chose ' _ + {if} _ {is} _ {print} 'tie!' {else} {print} 'no tie' + ``` + + Fill in the correct code on the blanks to see if it is a draw. + 9: + story_text: "In this level you can program the whole rock, paper, scissors game by nesting the `{if}` commands. \n\n### Exercise\nCan you finish the code? The program must tell who has won for every combination.\n\n**Extra** Want to play more than one game? Expand the code so that you can play multiple rounds. You can even use an `{ask}` to ask the user how many rounds they want to play.\n" + example_code: | + ``` + choices = rock, paper, scissors + your_choice {is} {ask} 'What do you choose?' + {print} 'You choose ' your_choice + computer_choice {is} choices {at} {random} + {print} 'The computer chooses ' computer_choice + {if} computer_choice {is} your_choice + {print} 'Tie' + {if} computer_choice {is} rock + {if} your_choice {is} paper + {print} 'You win!' + {if} your_choice {is} scissors + {print} 'You lose!' + # finish this code + ``` + 10: + story_text: | + ### Exercise + In the previous levels you have often made your own rock paper scissors game. Can you finish the code and use the `{for}` command properly to get the game to work? + example_code: | + ``` + choices = _ + players = _ + {for} _ + ``` + 13: + story_text: | + With the `{and}` command you can shorten your rock, paper, scissors code! Check out the example code. + + ### Exercise + Finish the code such that a winner is always decided on. Run your code a few times to verify there is always a winner printed. + example_code: | + ``` + options = 'rock', 'paper', 'scissors' + your_choice = {ask} 'What do you choose?' + computer_choice = options {at} {random} + {print} 'You choose ' your_choice + {print} 'The computer chooses ' computer_choice + {if} computer_choice {is} your_choice + {print} 'Tie' + {if} computer_choice {is} 'rock' {and} your_choice {is} 'paper' + {print} 'You win!' + {if} computer_choice {is} 'rock' {and} your_choice {is} 'scissors' + {print} 'The computer wins!' + _ + ``` + 15: + story_text: | + ### Exercise + Play until you beat the computer! But first, finish the example code... + example_code: | + ``` + won = 'no' + options = 'rock', 'paper', 'scissors' + {while} won == 'no' + your_choice = {ask} 'What do you choose?' + computer_choice = options {at} {random} + {print} 'you chose ' your_choice + {print} 'the computer chose ' computer_choice + {if} computer_choice == your_choice + {print} 'Tie!' + {if} computer_choice == 'rock' {and} your_choice == 'scissors' + {print} 'You lose!' + {if} computer_choice == 'rock' {and} your_choice == 'paper' + {print} 'You win!' + won = 'yes' + _ + ``` + rock_2: + name: Rock, paper, scissors 2 + default_save_name: rock_2 + description: Part 2 of rock, paper, scissors + levels: + 2: + story_text: | + Now that you have learned how to use the `{ask}` command, you can make your rock, paper, scissors code interactive too! + + ### Exercise + Make the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code. + example_code: | + ``` + choice {is} _ + {print} I choose choice + ``` + secret: + name: SuperSpy + default_save_name: SuperSpy + description: Make your own spy code + levels: + 12: + story_text: | + In this adventure you can create your own super spy code. Encode a message that only the right agent can decipher. + If the enemy tries to crack the code, they will get some false info to waste their time. + + ### Exercise 1 + Make your own secret code for your superspy and return both parts only to the real spy. + + ### Exercise 2 + Add a third component to the code, like a piece of clothing or an object. + example_code: | + ``` + name = {ask} 'What is your name?' + {if} name {is} _ + a = 'Go to the airport ' + {else} + a = 'Go to the trainstation ' + password = {ask} 'What is the password?' + {if} password {is} _ + b = 'tomorrow at 02.00' + {else} + b = 'today at 10.00' + {print} _ _ _ + ``` + 13: + story_text: | + We can simplify the superspy code with `{and}`, such that we only need one `{if}`. + + ### Exercise 1 + Complete the code by filling the right command on the blank. Tip: The superspy has to answer BOTH questions correctly, before they get the confidential information! + + ### Exercise 2 + We want to confuse the enemy even more! Create a list with fake answers and select one at random when a wrong answer is given. + example_code: | + ``` + name = {ask} 'What is your name?' + password = {ask} 'What is your password?' + {if} name {is} 'Agent007' _ password {is} 'TOPSECRET' + {print} 'Go to the airport at 02.00' + {else} + {print} 'Go to the trainstation at 10.00' + ``` + simon: + name: Simon Says + default_save_name: Simon + description: Make a game of Simon Says + levels: + 16: + story_text: | + Let's make a game of Simon Says! Simon Says is a memory game in which the player will be given a color. They have to repeat that color back. + If they get it right a color is added to the sequence, so they now have to remember 2 colors, then 3, then 4 etc. the game stops as soon as the player makes a mistake. + + ### Exercise + In this first part of the Simon Says adventure, we'll let the computer pick a random color and add it to a list. + + ***Make 2 lists*** First, make a list called `colors` and fill it with the colors red, yellow, green and blue. + Then make a list called `simon_sequence`. This list will be used as the answer. + At the start of the game this lists need to be empty. unfortunately, we can't create an empty list (yet), so we'll fill it with the words 'empty' and 'list' and we'll remove them from the list immediately. + + ***Create a function that adds a color to the sequence*** Now that we have an empty list called simon_sequence, we can start filling it with random colors. + We do that with a function, so we can call it everytime there's a new level in our game. Create a function called `add_random_color`. + Then create the variable random_color and set it to a random color. Next, add this random color to the simon_sequence. + + ***Create a function that shows the simon_sequence*** Start by naming the new function `show_simon_sequence` with `level` as an argument. Now we want to show as many colors as the level we are in (in level 1 you see 1 color, in level 2 you see 2 colors etc). + So we repeat `level` times, to print the `simon_sequence[i]`. Each time a color is shown, wait for 1 second and then clear the screen. + + ***Test your program*** Before you go to the next level, test if the functions are working by calling both of the functions. If they're working you should see a random color in your output screen. + Remove this testing part of your code, copy the code and continue to the next tab to learn more about the simon says game! + example_code: | + ``` + # Make 2 lists + colors = _ + _ = ['empty', 'list'] + {remove} _ {from} simon_sequence + {remove} _ + + # Create a function that adds a color + _ add_random_color + _ + {add} _ + + # Create a function that shows the simon_sequence + {define} _ + {for} i {in} {range} 1 {to} _ + {print} _ + _ + _ + + # Test your program + {call} _ + {call} show_simon_sequence {with} 1 + ``` + simon_2: + name: Simon Says 2 + default_save_name: Simon + description: Make a game of Simon Says + levels: + 16: + story_text: | + We'll continue with our Simon Says game! + + ### Exercise + ***Paste your code here*** Paste your code from the previous level here. Don't forget to remove the part that was just used for testing the functions. + + ***Create a function that creates the player_sequence*** The list `player_sequence` is used to capture the answers of the player. First we define the function with the argument level. + Next, we ask level times what the color is that they choose. We call that variable `answer`. Then we add the variable `answer` to the list player_sequence. + + ***Setting up the game*** Before we program the game in the next tab, we'll need some starting variables. First, we'll set the variable `level` to 1 and the variable `game_over` to False. + Then we make an introduction for the game. We'll print 'Welcome to Simon Says!' and clear the screen after 1 second. + + ***Continue to the next tab to finish the game!**** Don't forget to copy your code and take it with you to the next tab. + example_code: | + ``` + # Paste your code here + + + # Create a function that creates the player_sequence + {define} _ + {for} _ + _ 'What is color number ' i '?' + {add} answer {to} _ + + # Set up + level = _ + game_over = _ + {print} _ + _ 1 + _ + ``` + simon_3: + name: Simon Says 3 + default_save_name: Simon + description: Make a game of Simon Says + levels: + 16: + story_text: | + In this tab we'll program the game of Simon Says! + + ### Exercise + ***Paste your code*** Copy your code from the previous tab and paste it here. + + ***Program the game*** We start by making sure the game goes on while the game isn't over. Then we print what level the player is on, we use the variable level for that. We only show that for 1 second and then we clear the screen again. + Now, we have to create the empty list player_sequence. We've already programmed how to fill the list, with our function `player_sequence`, but we never made the list itself. To create the list we use the same trick as we did in the previous tab. + We'll make a list with the words 'empty' and 'list' on it, and then we remove both these words. Next, we'll call all of the 3 functions that we've created. + Lastly, we'll have to check if the player gave the correct answers (so if the player_sequence and the simon_sequence are the same). + If that's the case, we'll compliment the player. Wait for 1 second and increase the level with 1. + Did the player give the wrong answer, we'll tell them and end the game by setting game_over to 'True' + + ***Enjoy your game!*** Great job! Does your game not work? Use the ladybug button to debug your code! + example_code: | + ``` + # Paste your code here + + # The game + {while} game_over _ + {print} _ + _ + _ + _ = ['empty', 'list'] + {remove} _ + {remove} _ + {call} _ + {call} _ {with} _ + {call} _ {with} _ + {if} player_sequence == _ + _ + _ + _ + {else} + _ + game_over = _ + ``` + sleep_command: + name: '{sleep}' + default_save_name: sleep_command + description: introducing {sleep} command + levels: + 2: + story_text: | + Another new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds. + + ### Exercise + Practise this new command by making a code of your own in which you use the {sleep} command at least 3 times. With each {sleep} command the pausing time should differ. + example_code: | + ``` + {print} My favorite colour is... + {sleep} 2 + {print} green! + ``` + songs: + name: Sing a song! + default_save_name: Song + description: Print a song + levels: + 6: + story_text: | + Songs often contain a lot of repetition. Sometimes the repetition is also based on counting. + For example, in the well-known song 'Bottles of beer'. You can program that song with a little math. + + Tip: Use the read aloud function to let Hedy sing the song to you! + + ### Exercise + You can now repeat lines 2 to 7 as many times as you want by copying the lines. + example_code: | + ``` + 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' + {sleep} + ``` + story_text_2: | + This children's song counts down from 5 little monkeys to 1 monkey. + If you copy line 2 - 7 and paste it under the the code, you can sing the whole song! + example_code_2: | + ``` + number = 6 + number = number - 1 + {print} number ' little monkeys jumping on the bed' + {print} 'One fell off and bumped his head' + {print} 'Mama called the doctor and the doctor said' + {print} 'NO MORE MONKEYS JUMPING ON THE BED!' + {sleep} + ``` + 7: + story_text: | + Songs often contain a lot of repetition. For example... Baby Shark! If you sing it, you keep singing the same thing: + + Baby Shark tututudutudu
+ Baby Shark tututudutudu
+ Baby Shark tututudutudu
+ Baby Shark + + ### Exercise + You can print the song Baby Shark with a `{repeat}`? Finish the code by replacing the blanks? + **Extra** After Baby Shark you can of course also program other songs. There are many songs with repetition! + Can you think of one more song and print it? + example_code: | + ``` + {repeat} _ _ {print} 'Baby Shark tututudutudu' + {print} 'Baby Shark' + ``` + 8: + story_text: | + In a previous level you've programmed the song 'Bottles of beer'. But without the `{repeat}` command, you had to copy the verses many times. + In this level you can repeat the song 99 times, just by adding one simple line! + + ### Exercise + Add the right command on the blanks and indent the code correctly. + example_code: | + ``` + verse = 99 + _ 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' + ``` + 10: + story_text: | + With `{for}` you can print make the whole baby shark song (including all the other sharks in the family) in only 6 lines! + + ### Exercise 1 + Can you make the baby shark code even shorter by using a `{for}` command? Finish the example code. + example_code: "```\nfamily = baby, mammy, daddy, grandma, grandpa\n_ _ _ _ \n {print} _\n```\n" + story_text_2: | + ### Exercise 2 + Print the song Five little moneys jumping on the bed. Look up the text if you don't remember. + + **Extra** Print the song Old MacDonald had a farm, and make sure all animals make a different sound, using an `{if}`. + example_code_2: | + ``` + monkeys = 5, 4, 3, 2, 1 + ``` + 11: + story_text: | + In this level you can use the `{for}` with `{range}` to make songs that use counting, like the 5 little monkeys. + + ### Exercise 1 + Fill in the blanks and make the code work! If you don't remember the song text, look it up yourself. + + ### Exercise 2 + The final line of the song is different from the others. Print this line inside the `{for}`, and use an `{if}` to make it work correctly. + example_code: | + ``` + _ monkeys _ _ 5 _ 1 + {print} monkeys ' little monkeys jumping on the bed' + _ + ``` + 12: + story_text: | + In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out: + + ### Exercise + Can you add the right amount of indentation to each line to make the song play correctly? + Hint: Not all lines need indentation. + example_code: | + ``` + _ 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 + ``` + 13: + story_text: | + In the previous adventure you have learned how to use an argument in a function, but did you know that you could combine them with {ask} commands as well? + In this example we have changed the 'My Bonnie' program and made it interactive. You are now asked where Bonnie is. + example_code: | + ``` + {define} song {with} place + {print} 'My Bonnie is ' place + + chosen_place = {ask} 'Where do you want Bonnie to be?' + synonym = {ask} 'What is another word for that?' + + {call} song {with} chosen_place + {call} song {with} synonym + {call} song {with} chosen_place + ``` + 16: + story_text: | + In this level, you can program a song like OldMacDonald even more quickly. You can connect the right animal to the right sound by simply putting them in the same place in the list. + The Drunken Sailor is also quickly made in this level. You only need 8 lines for the entire song, check it out! + + ### Exercise + Complete the Old MacDonald song by setting the variable `animal` to `animals[i]` and `sound` to `sounds[i]`. + example_code: | + ``` + animals = ['pig', 'dog', 'cow'] + sounds = ['oink', 'woof', 'moo'] + {for} i {in} {range} 1 {to} 3 + animal = _ + sound = _ + {print} 'Old MacDonald had a farm' + {print} 'E I E I O!' + {print} 'and on that farm he had a ' animal + {print} 'E I E I O!' + {print} 'with a ' sound sound ' here' + {print} 'and a ' sound sound ' there' + {print} 'here a ' sound + {print} 'there a ' sound + {print} 'everywhere a ' sound sound + ``` + + ``` + lines = ['what shall we do with the drunken sailor', 'shave his belly with a rusty razor', 'put him in a long boat till hes sober'] + {for} line {in} lines + {for} i {in} {range} 1 {to} 3 + {print} line + {print} 'early in the morning' + {for} i {in} {range} 1 {to} 3 + {print} 'way hay and up she rises' + {print} 'early in the morning' + ``` + 18: + story_text: | + In level 16 we made songs using lists. These programs however are no longer working properly in this level. The colons from level 17 and the brackets from level 18 still need to be added. + + ### Exercise 1 + The Drunken sailor song is given as sample code, but not yet working. + Can you make sure everything works again? To help you, we've put _ in the places of _some_ errors. + + ### Exercise 2 + Now also look up your Old MacDonald song from level 16, and correct it. + example_code: | + ``` + lines = ['what shall we do with the drunken sailor', 'shave his belly with a rusty razor', 'put him in a long boat till hes sober'] + {for} line {in} lines _ + {for} i {in} {range} 1 {to} 3 _ + {print} _ line _ + {print} 'early in the morning' + {for} i {in} {range} 1 {to} 3 + {print} 'way hay and up she rises' + {print} 'early in the morning' + ``` + songs_2: + name: Sing a song! 2 + default_save_name: Song 2 + description: Sing a song 2 + levels: + 12: + story_text: | + Songs contain a lot of repetition. We can capture it with a function! + ### Exercise + Look at the example code with the function. Fill out the two lines so the full song is printed. + example_code: | + ``` + {define} twinkle + {print} 'Twinkle' + {print} _ + + {call} twinkle + {print} 'Up above the world so high' + {print} 'Like a diamond in the sky' + {call} _ + ``` + 16: + story_text: | + ### Exercise + Finish the nursery rhyme! + example_code: | + ``` + number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'] + object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again'] + + _ + {print} 'This old man' + {print} 'He played ' _ + {print} 'He played knick-knack ' _ + {print} 'With a knick-knack paddywhack' + {print} 'Give the dog a bone' + {print} 'This old man came rolling home' + {sleep} 8 + {clear} + ``` + story_text_2: | + ### Exersice 2 + Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way! + example_code_2: | + ``` + object = ['wheels', 'doors', _] + movement = [ 'round and round', 'open and shut', _] + ``` + tic: + name: Tic-Tac-Toe + default_save_name: Tic + description: Play a game of Tic Tac Toe! + levels: + 16: + story_text: | + Let's program a game of tic-tac-toe! + + ### Exercise + In this adventure we'll start with creating an empty field. + + ***Create a list called field*** This list will be our playing field. This list is filled with 9 dots, since there are no x's and o's yet at the start of our game. + + ***Create a function that prints the field*** Firstly, clear the screen so the old playing fields will be removed. Then we print the first line of our Tic Tac Toe field. This line constists of the first 3 spots in our list field. + We have already programmed this line for you. Now finish the field by printing spot 4, 5, and 6 on the second row and spot 7, 8 and 9 in the third row. + + ***Call the function that prints the field*** Now call the function. +
+ Run the code. Your output should look like this: +
+ + ***Continue in the next tab*** In the next tab you'll learn how to program the game itself. + example_code: | + ``` + # Create a list called field + _ = ['.', '.', '.', '.', '.', '.', '.', '.', '.'] + + # Create a function that prints the field + {define} print_field + _ + {print} 'TIC TAC TOE' + {print} field[1] field[2] field[3] + _ + _ + + # Call the function + ``` + 17: + story_text: | + In the previous level you've learned how to make a tic-tac-toe game. The game works, but is quite annoying as it keeps asking you if you've won yet. + Now that we have the {elif} command, we can let the game decide if someone has won and it can stop asking us! + + ### Exercise + ***Paste your code*** Paste your code from the previous level here and make it level 17 proof. In this level you've learned to use a colon everytime you create a block of code. Please add the colons in the correct spots. + + ***Create a function that detects if someone's won*** We have started the function for you, paste it under the function `print_field` and finish the function. You can see that this first piece of code checks to see if spot 1, 2 and 3 are the same, because if they are you have 3 in a row. + It also checks if they are not a dot, because if they are, the line might have the same symbols on them, but that's just because it's still empty. + If all these conditions are met, the game is over and the winner is printed. + Finish this function with all possible ways to win. This means you have to make this for the other 2 rows, 3 columns and 2 diagonals. + If you've finished all the other options, the function should return the variable `game_over` so we can use it in our game. + + ***Call the function in the game*** Go to the line `game_over = {ask} 'Did you win?'` and change it to `game_over = {call} detect_winner {with} field, sign`. Now the function will check if there's a winner and the game doesn't need to keep asking anymore! + + ***Enjoy your game!*** Great job! You have finished the game! Enjoy playing it! + + example_code: | + ``` + # Paste your code here and make it level 17 proof + + # Create a function that detects if someone has won + {define} detect_winner {with} field, sign: + {if} field[1] == field[2] {and} field[2] == field[3] {and} field[1] != '.': + game_over = 'yes' + {print} 'Player ' sign 'wins!' + {elif}: + _ + {else}: + game_over = 'no' + {return} _ + ``` + tic_2: + name: Tic-Tac-Toe 2 + default_save_name: Tic + description: Play a game of Tic Tac Toe! + levels: + 16: + story_text: | + In the previous adventure you've learned how to create a playing field. Now you'll learn how to create the game! + + ### Exercise + ***Paste your code*** Start by pasting your code from the previous adventure here. + + ***Add variables*** Underneath your list called `field` we'll add 2 more variables that we'll need to program the game. + The variable `game_over` tells us if the game is over, and should be 'no' at the start of the game. + The variable `sign` tells us if it's the turn of player x or player o. Set the variable to 'x'. + + ***The game*** First use a {while} command, to make sure the game keeps on playing the variable while game_over is set to no. + During the game, we first ask the player which spot they choose. Then we change the field with the number they chose into their sign. + Then we print the field again and we ask the player if they've won yet. Lastly we want to switch whose turn it is, so if the sign is 'x' it should be 'o' and the other way around. + + ***Test your game*** Does your game work? Great, have fun playing the game! If not, use the ladybug button to debug your code. + You might have noticed one mistake in the code though, you can steal the other player's spot! If the other person chose spot 1, you could simply enter 1 after them and steal their spot. + That's not fair! Go to the next tab to learn how to fix this problem. + example_code: | + ``` + # Paste your code from the previous adventure here + + # Add variables + game_over = _ + sign = _ + + # The game + {while} _ + choice = _ 'Player ' sign '_?' + field[choice] = _ + _ print_field + game_over = {ask} _ + {if} sign = 'o' + sign = _ + _ + sign = _ + ``` + tic_3: + name: Tic-Tac-Toe 3 + default_save_name: Tic + description: Play a game of Tic Tac Toe! + levels: + 16: + story_text: | + You might have noticed one mistake in the code you've made in the previous adventure. You can steal the other player's spot! If the other person chose spot 1, you could simply enter 1 after them and steal their spot. + That's not fair! In this tab we'll fix that mistake. + + ### Exercise + ***Paste your code here*** Paste your code from the previous adventure here. + + ***Fix the mistake*** To fix the mistake we replace the line that says `field[choice] = sign`. This turns any spot that the player has chosen into their sign. + Go to the header that says 'Use this to fix the mistake' and finish the code. We first want to check if the chosen spot is still empty, so `if field[choice] = '.'`. If that is the case, you are allowed to take it. + Then we make an else command and print 'Sorry, this spot is already taken' if the spot is not empty. Lastly, we add a {sleep} command, so the players can actually read the text before it gets cleared again. + Now copy this piece of code and replace the line `field[choice] = sign` with this new piece of code. + + ***Play your game!*** Now the game should work properly! Good job! + The only flaw is that you can get a bit annoyed that the game keeps asking you if you've won yet. Do you want to fix that? Go to level 17 and we'll fix it! + example_code: | + ``` + # Paste your code here + + # Use this to fix the mistake + {if} _ = '.' + field[choice] = sign + {else} + {print} _ + _ + ``` + turtle: + name: Turtle + default_save_name: Turtle + description: Make your own drawing + levels: + 1: + story_text: | + You can also use Hedy to draw. By combining turns and lines, you can make a square or stairs! + + Using `{forward}` you draw a line forwards. The number behind it determines how far the turtle will walk. `{turn} {right}` turns a quarter turn in clockwise direction, `{turn} {left}` turns counter clockwise. + + If you want to go backwards, you use the `{forward}` command but with a negative number. So for example `{forward} -100` + example_code: | + ``` + {forward} 100 + {turn} {left} + ``` + story_text_2: | + ### Exercise + This is the start of a little staircase. Can you make it have 5 steps? + example_code_2: | + ``` + {forward} 20 + {turn} {right} + {forward} 20 + {turn} {left} + {forward} 20 + ``` + 2: + story_text: | + In level 1 the turtle could only turn left or right. That is a bit boring! + In level 2 he can point his nose in all directions. + + Use 90 degrees to turn a quarter, 180 to turn half, and a full circle is 360 degrees. + + ### Exercise + This code now creates the letter T. Can you change it to make the letter B? + + **Extra** Change the letter into a different letter, like the first one of your name. + You can also make multiple letters, by setting the color to `{color}` `{white}` in between. + + example_code: | + ``` + {forward} 20 + {turn} 90 + {forward} 20 + {turn} 180 + {forward} 100 + ``` + story_text_2: | + You can use variables to in the turtle `turn`. + + ### Exercise + Change the code such that it creates a triangle. Hint: you only have to change the code in one place. + + example_code_2: | + ``` + {print} Drawing figures + angle {is} 90 + {turn} angle + {forward} 25 + {turn} angle + {forward} 25 + {turn} angle + {forward} 25 + ``` + 3: + story_text: | + In this level you can use `{at} {random}` with the drawing turtle. A random choice makes the turtle walk a different path each time. + Use `{at} {random}` to choose a value from a list. + ### Exercise + Can you copy and paste lines 2 and 3 to create a longer random path? + example_code: | + ``` + angles {is} 10, 50, 90, 150, 250 + {turn} angles {at} {random} + {forward} 25 + ``` + 4: + story_text: | + In level 4 you have to use quotation marks with `{print}` and `{ask}`. Also when drawing! + example_code: | + ``` + {print} _ Drawing figures _ + angle {is} 90 + {turn} angle + {forward} 25 + {turn} angle + {forward} 25 + ``` + story_text_2: | + You can also change the color of the lines with the command `{color}`. Check out the example. + You can also use the command `{color} {white}` to make 'invisible' lines. You could use these white lines to move the turtle anywhere in the screen before you start drawing. + example_code_2: | + ``` + {color} {white} + {forward} -80 + {color} {green} + {forward} 50 + {color} {yellow} + {forward} 50 + {color} {red} + {forward} 50 + ``` + 5: + story_text: | + In level 5 you can make a choice with `{if}`. For example between different types of figures. + example_code: | + ``` + {print} 'Drawing Figures' + figure {is} {ask} 'Do you want a square or a triangle?' + {if} figure {is} triangle angle {is} 120 + {else} angle {is} 90 + {turn} angle + {forward} 25 + {turn} angle + {forward} 25 + {turn} angle + {forward} 25 + {turn} angle + {forward} 25 + ``` + story_text_2: | + ### Exercise + Fill in the correct numbers in this code to get it to work. + After you've done that, you can try to add the option backwards. + + **Extra** Instead of using 'left' and 'right', remake the program with North, East, South and West. + This way you could add even more directions like Northeast and Southwest etc. + example_code_2: | + ``` + direction {is} {ask} 'Do you want to go left, right, or straight ahead?' + {if} direction {is} left {turn} _ + {if} direction {is} right {turn} _ + {forward} 100 + ``` + 6: + story_text: | + In this level you can use calculations to draw different figures. + You may have learned in school that turning a full circle is 360 degrees. If not, now you know! + That's why you also use 90 degrees for a square. 360 divided by 4 is 90. + Now that we can do math with Hedy, we can draw all the figures we want! + example_code: | + ``` + angles = {ask} 'How many angles do you want?' + angle = 360 / angles + {forward} 50 + {turn} angle + {forward} 50 + {turn} angle + {forward} 50 + {turn} angle + {forward} 50 + {turn} angle + {forward} 50 + {turn} angle + {forward} 50 + {turn} angle + ``` + 8: + story_text: "Now that we can repeat several lines, we can make figures more easily.\nWe only have to set the angle once and then use that variable in the `{repeat}`.\n\n### Exercise 1\nThe example code creates a square. Change the code so that it create another figure, such as a triangle or a hexagon. \nThis requires a change to two lines of code.\nTip: An entire circle is 360 degrees.\n\n### Exercise 2\nNow create a drawing consisting of at least two polygons.\n" + example_code: | + ``` + angle = 90 + {repeat} 4 {times} + {turn} angle + {forward} 50 + ``` + story_text_2: | + **Extra** We can now improve the program that draws different figures. Finish the code and you can draw any polygon you'd like! + example_code_2: | + ``` + figure = {ask} 'How many angles should I draw?' + angle = 360 / figure + {repeat} figure {times} + {turn} _ + {forward} _ + ``` + 9: + story_text: | + Now that we can use a `{repeat}` inside a `{repeat}`, we can create more complex figures. + + ### Exercise 1 + This code creates three black triangles, change that into five pink squares. + + **Extra** Create a figure of your own choosing consisting of at least two different shapes types. + example_code: | + ``` + {color} {black} + {repeat} 3 {times} + {repeat} 3 {times} + {forward} 10 + {turn} 120 + {color} {white} + {forward} 50 + {color} {black} + ``` + 10: + story_text: | + In this level you can make the turtle draw a figure. + The turtle will travel the distances in the list, one by one, making bigger and bigger steps. + ### Exercise 1 + Add a 90 degree turn in the loop, so that a spiral is drawn. + Add at least 5 numbers to the list, so the spiral grows larger. + **(extra)** can you change the spiral into another shape? Experiment with numbers for the turn! + ### Exercise 2 + The spiral is drawn outwards, make it go inwards? + example_code: | + ``` + {turn} 90 + distances = 10, 20, 30, 40, 50, 60 + {for} distance {in} distances + {forward} distance + ``` + 12: + story_text: | + We can use functions to draw more complex figures with less code. + ### Exercise 1 + Fill the function so that three squares are created. If you want the image to look nicer, you can make the lines between the squares white. + + ### Exercise 2 + The code can be made even shorter. Place the final lines into a `{repeat}` so the figure remains the same. + + ### Exercise 3 + Create your own drawing with different figures. + Change both the number of figures with the `{repeat}` and the shape of the figures in the `{define}` + example_code: | + ``` + {define} square + {repeat} 4 {times} + {turn} _ + {forward} _ + {call} square + {forward} 50 + {call} square + {forward} 50 + {call} square + ``` + turtle_draw_it: + name: Draw it! + default_save_name: Draw it + description: Draw this picture with the turtle + levels: + 1: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + +
+ Rectangle + Square + Stairs +
+ example_code: '' + 2: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + +
+ Triangle + Arrow + Boat +
+ example_code: '' + 3: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + +
+ Triangle + Star + Arrow +
+ example_code: '' + 4: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + +
+ Colored Star + Rainbow + Nested squares +
+ example_code: | + **Extra** Up for a real challenge? Make sure that the colors of these figures are selected randomly, so that each time you run your programs they'll look differently! + + ``` + colors {is} red, orange, yellow, green, blue, purple, pink, brown, gray, black + color _ + ``` + 5: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + + **Extra** Make only one code that lets the player decide which letter they'd like to see! And can you add even more letters? + +
+ F + E + L +
+ example_code: | + Hint: + ``` + chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?' + {if} _ + ``` + 6: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + + **Extra** Let the player decide which color the square should be. + + ***Extra*** Can you make the letter of your own first name and the flag of your own country too? + +
+ Square + Letters + Flag +
+ example_code: | + Hint for the square: + ``` + chosen_color = {ask} _ + ``` + 7: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + +
+ Hexagon + Triangle + Fan +
+ example_code: '' + 8: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + + **Extra** The number in brackets indicates in how many lines of code this figure can be drawn. Can you do it in the same amount of lines? + +
+ Square (3) + Randomly colored star (5) + Randomly colored spiral (7) +
+ example_code: '' + 9: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + + **Extra** The number in brackets indicates in how many lines of code this figure can be drawn. Can you do it in the same amount of lines? + + **Extra** Give the player a choice which country they would like to see the flag of. + +
+ Cross (7) + Randomly colored nested squares (8) + Flags +
+ example_code: | + Hint for the nested squares: + ``` + colors = red, blue, orange, yellow, pink, purple, green, brown, black + distance = 120 + {repeat} 5 {times} + _ + ``` + Hint for the flags: + ``` + country = {ask} 'which country would you like to see the flag of?' + {if} country {is} 'the Netherlands' + color_1 = red + color_2 = white + color_3 = blue + ``` + 10: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + +
+ Nested Hexagon + Traffic lights +
+ example_code: | + Hint Nested Hexagon: + ``` + distances = 100, 80, 60, 40, 20 + {for} distance {in} distances + _ + ``` + + Hint Traffic Lights: + ``` + colors = red, yellow, green + {for} chosen_color {in} colors + {color} _ + {repeat} _ + ``` + story_text_2: | + Christmas lights + example_code_2: | + Hint Christmas Lights: + + Start by moving to the left side of the screen with an invisible white line. Then hang up the Christmas lights! + ``` + {color} white + {turn} -90 + {forward} 300 + {turn} 90 + + colors = red, blue, yellow, purple, green, orange, pink + {for} chosen_color {in} colors + _ + ``` + 11: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + +
+ Beehive (6) + Fan (5) + Snowflake (13) +
+ example_code: | + Hint Beehive: + ``` + {for} amount_of_combs {in} {range} 1 {to} _ + {for} walls_of_one_comb {in} {range} 1 {to} _ + {forward} _ + {turn} _ + {forward} _ + {turn} _ + ``` + + Hint Fan: + Start out like the fan you made in level 7. Or take a peak at the hint for the beehive, because the codes are very similar. + + Hint Snowflake: Start by making one 'leg' and repeat it 6 times. + 12: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + + Firstly, define a function **for each shape** you want to use on the bracelet. Then, add the shapes to the bracelet like this: + + Bracelet Designing program + example_code: | + Hint Bracelet Designing program + ``` + {define} draw_a_square + _ + + {color} white + {turn} -90 + {forward} 300 + {turn} 180 + + {for} i {in} {range} 1 {to} 5 + {color} gray + {forward} 100 + shape = {ask} 'What kind of shape would you like next on the bracelet?' + chosen_color = {ask} 'In which color?' + {color} chosen_color + {if} shape = 'square' + {call} draw_a_square + ``` + 13: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + + Street in different sizes + Colored street + Snow Storm + example_code: | + Hint Street in different sizes + ``` + {define} draw_a_house {with} size + _ + + {call} draw_a_house {with} 90 + {call} draw_a_house {with} 60 + {call} draw_a_house {with} 30 + ``` + + Hint Colored street + ``` + {define} draw_a_house {with} chosen_color + _ + ``` + + Hint Snow Storm + ``` + {define} draw_snowflake {with} length, color + _ + + numbers = 10, 20, 30 + colors = _ + + {for} i {in} {range} 1 {to} 5 + random_number = _ + random_color = _ + {call} draw_snowflake {with} random_number, random_color + {color} white + {turn} random_number * 5 + {forward} 80 + ``` + 14: + story_text: | + ### Exercise + Create a program that asks the player how many corners their figure should have and then creates that figure. + The figure in the image is the output when the player fills in 10. + +
+ + +
+ example_code: | + ``` + {define} calculate_degrees {with} amount_of_corners + _ 360 / amount_of_corners + + + {define} draw_figure {with} degrees + _ + {forward} 400/amount_of_corners + {turn} _ + + amount_of_corners = {ask} _ + degrees = {call} _ {with} _ + + {call} _ {with} + {call} _ {with} + ``` + 15: + story_text: | + ### Exercise + Recreate the drawings with the turtle! + + Spiral + example_code: | + Spiral + ``` + distance = 5 + {while} distance < 200 + distance = distance + 5 + _ + ``` + story_text_2: | + Fan + example_code_2: | + Fan + ``` + {define} draw_a_square {with} side + _ + + i = 100 + {while} i > 1 + _ {with} i + _ + i = i - 3 + ``` + story_text_3: | + Star + example_code_3: | + Star + A star is usually drawn using 144-degree-turns. If you change this slightly to 143 degrees for example and repeat the pattern multiple times with a {while} loop you can make this figure. + while_command: + name: '{while}' + default_save_name: while_command + description: '{while}' + levels: + 15: + story_text: |- + We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true. + So don't forget to change the value in the loop. + + In the example code, we continue until a correct answer has been given. + If the correct answer is never given, the loop never ends! + example_code: | + ``` + answer = 0 + {while} answer != 25 + answer = {ask} 'What is 5 times 5?' + {print} 'A correct answer has been given' + ``` + years: + name: New Year's + default_save_name: New Year's Countdown + description: Countdown to the New Year! + levels: + 11: + story_text: | + In this level you can use the `{for}` number `{in}` `{range}` command to countdown to the New Year. + + ### Exercise + Fill in the blanks and make the code work! + example_code: | + ``` + {for} number {in} {range} _ {to} _ + {print} number + {sleep} + {print} 'Happy New Year!' + ``` diff --git a/content/adventures/ne.yaml b/content/adventures/ne.yaml new file mode 100644 index 00000000000..ab75268cbd9 --- /dev/null +++ b/content/adventures/ne.yaml @@ -0,0 +1,1094 @@ +adventures: + story: + levels: + 1: + story_text: "In स्तर 1 you can make a story with a different main character that you enter yourself.\n\nIn the first line, use `{सोध्नु}` and ask who the main character of the story will be.\n\nAfter that first line, start with `{छाप्नुहोस्}` if the sentence needs to be printed.\nYou use `{प्रतिध्वनि}` if you want your main character to be at the end of the sentence.\n" + example_code: "```\n{ask} The main character of this story is\n{print} The main character is now going to walk in the forest\n{echo} They're a bit scared,\n{print} They hear crazy noises everywhere\n{print} They're afraid this is a haunted forest\n```\n" + story_text_2: "### Exercise\nNow create your own story of at least 6 lines of code.\nThis story cannot be the same as the example code.\nUse at least one `{सोध्नु}` and one `{प्रतिध्वनि}` command.\nYou can make it about any topic you like.\nIf you can't think of a topic, use one of our choices: going to the movies, a sports match or a day at the zoo.\n" + 3: + example_code_3: "```\n{print} His backpack got way too heavy.\n{print} Inside were a bottle of water, a flashlight and a brick.\nbag {is} water, flashlight, brick\ndump {is} {ask} Which item should he dump?\n{remove} dump {from} bag\n```\n" + example_code: "```\nanimals {is} 🦔, 🐿, 🦉, 🦇\n{print} They now hear the sound of an animals {at} {random}\n```\n" + example_code_2: "```\n{print} They hear a sound\nanimals {is} 🐿, 🦔, 🦇, 🦉\nanimal {is} {ask} What do you think it is?\n{add} animal {to_list} animals\n{print} it was an animals {at} {random}\n```\n" + story_text: "In level 3 you can make your story more fun. You can use randomness for any monster, animal or other obstacle, like this:\n" + story_text_2: "The command `{add}` can also come in handy in your story.\n" + story_text_3: "This is an example of the `{remove}` command in your story\n\n### Exercise\nCopy your story from the previous levels into this level.\nIn this level you've learned 3 new commands `{at} {random}` , `{add} {to_list}` and `{remove} {from}`.\nAdd new lines of code to your story, so that all of the new commands are featured at least once in your story.\n" + 5: + story_text: "In this level you can program different endings, which will make your story even more fun.\nIn the example code you can see how to make 2 different endings.\n\n### Exercise 1\nWrite a new short story of at least 6 lines of code about a topic of your choosing.\nNo inspiration? Choose one of these topics: a superhero, a boring school day, stranded on a desert island.\n\nNow give the player a change to choose a happy or a bad end, just like in the example code.\nProgram both the endings.\n\n### Exercise 2\nCopy the story you've created in your own story adventure in the previous levels.\nFind a way to add at least 2 `{if}` and `{else}` commands to your story.\nThis can be with a happy or bad ending, but you can also try to find other ways to incoporate the commands.\n" + example_code: "```\nname {is} {ask} 'Who is walking in the forest?'\n{print} name ' walks through the forest'\n{print} name ' encounters a monster'\nend {is} {ask} 'Would you like a good or a bad ending?'\n{if} end {is} good {print} name ' takes the sword and the monster quickly runs away'\n{else} {print} 'The monster eats ' name\n```\n" + 7: + example_code: "```\n{print} 'The prince kept calling for help'\n{repeat} 5 {times} {print} 'Help!'\n{print} 'Why is nobody helping me?'\n```\n" + story_text: "In a story, someone says words several times. For example, when someone calls for help or sings a song.\nYou can put such repetitions in your story, in this level with `{repeat}`.\n\n### Exercise\nAdd repetition to your own story. Go back to your saved programs, choose your story program from a previous level and\nfind a line containing `{print}` and repeat it!\n" + 12: + example_code: "```\nname = 'The Queen of England'\n{print} name ' was eating a piece of cake, when suddenly…'\n```\n" + story_text: "In this level quotation marks will be needed to save multiple words in a variable.\n\n### Exercise\n\nFind a story from a previous level, any level is ok. Now make sure quotation marks are added in the right places." + 18: + story_text: "We are going to print another story, but now we have to use brackets with `{print}`.\n\n### Exercise 1\nCreate a story of at least 5 sentences. You don't have to use 'name' just yet.\n" + story_text_2: "### Exercise 2\nWe have already prepared an `{input}` for you. First, use the `name` variable in your story.\nThen add a second `{ask}` and use that variable as well.\nTip: Remember the commas in a `{print}` between text and variables!\n" + example_code: "```\n{print}('Welcome to this story!')\n```\n" + example_code_2: "```\nnaam = {input}(\"What's your name?\")\n{print}('Welcome to this story!')\n```\n" + 13: + example_code: "```\n{print} 'Our hero is walking through the forest'\n{print} 'The path splits two ways'\npath = {ask} 'Which path should she choose?'\nweapon = {ask} 'What weapon does she draw?'\n{if} path {is} 'left' {and} weapon {is} 'sword'\n _\n```\n" + story_text: "By using the `{and}` and `{or}` commands, you can make your stories more versatile. You can ask two questions and respond to the combination of answers.\n\n### Exercise 1\nLook at the example code and finish it. Then add at least 2 more `{if}` codes with `{and}` or `{or}`.\n\n### Exercise 2\nFind a story from a previous level, and add one `{and}` or `{or}`.\n" + 2: + story_text: "In स्तर 2 you can make your story more fun. Your main character's name can now be anywhere in the sentence.\n\nYou do have to program a little bit extra for that. You must now name your main character first.\n\nYou can then put that name anywhere in a sentence.\n" + 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" + example_code: "```\nname {is} {ask} What is the name of the main character?\n{print} name is now going to run in the woods\n{print} name is a bit scared\n{print} Suddenly she hears a crazy noise...\n{sleep}\n{print} name is afraid this is a haunted forest\n```" + 9: + story_text: "In this level you can use `{if}` and `{repeat}` commands inside other `{if}` and `{repeat}` commands. \nThis gives you many options and really helps you to make your story interactive.\n\n### Exercise 1\nFinish the code so the `{if}` works correctly.\n\n### Exercise 2\nAdd an `{if}` and `{else}` for the part of the story where Robin goes home too.\n\n### Exercise 3\nGo back to your level 8 story and use at least two `{if}`s inside another `{if}`.\n" + example_code: "```\n{print} 'Robin is walking downtown'\nlocation = {ask} 'Is Robin going into a shop, or does she go home?'\n{if} location {is} shop\n {print} 'She enters the shop.'\n {print} 'Robin sees an interesting looking book'\n book = {ask} 'Does Robin buy the book?'\n {if} book {is} yes\n _ {print} 'Robin buys the book and goes home'\n _ {else}\n _ {print} 'Robin leaves the shop and goes home'\n{else}\n {print} 'Robin goes home'\n```\n" + 8: + story_text: "In this level you can use multiple lines in your `{if}` commands, this way you can upgrade your happy or sad ending!\n\n### Exercise 1\nThe example code shows two different endings; one where the characters jump in a time machine and one where they do not.\nComplete the blanks with at least one sentence per ending.\n**Extra** Make the story longer. What happens in the story? You can also add a second `{ask}` with different options.\n\n### Exercise 2\nGo back to your saved programs, choose your story program from level 5. Now write a good and a bad ending of at least three lines long each!\n" + example_code: "```\n{print} 'OH NO! The T-rex is closing in!'\nend = {ask} 'Do you want a happy or a sad ending?'\n{if} end {is} happy\n {print} 'Just in time Richard jumps back into the time machine!'\n {print} _\n{else}\n {print} 'Oh no! Richard is too slow...'\n {print} _\n```\n" + 4: + example_code: "```\nname {is} {ask} _ What is your name? _\n{print} _ The main character is called _ name\n_\n_\n{print} name _ is now going to walk in the woods _\n{print} name _ is a bit scared _\nanimals {is} 🦔, 🐿, 🦉, 🦇\n{print} _ He hears the sound of a _ animals {at} {random}\n{print} name _ is afraid this is a haunted forest _\n```\n" + story_text: "### Exercise\nCopy the example code and finish it by adding quotation marks on the blanks in lines 1 and 2.\nThe blanks in line 3 and 4 should not be replaced by quotation marks, but a `{sleep}` and a `{clear}` command. Can you make it work?\n\n### Exercise 2\nGo back to the previous level and copy your story code. Make the code work in this level by adding quotation marks in the right spots.\nMind: The variables in your own story should be outside of the quotation marks. Just like the second line of the example code. In that line the variable name is placed outside of the quotation marks.\n" + 10: + example_code: "```\nanimals = _ , _ , _ \n{print} 'Brown bear, Brown bear'\n{print} 'What do you see?'\n```\n" + story_text: "In this level you can use the {for} command in your story. In this way you could easily program the children's book 'Brown bear, Brown bear, what do you see'.\n\n### Exercise\n\nLook at the story if you do not know it, and make sure it is printed as in the book.\n" + 15: + story_text: "Using the `{while}` loop can make your stories more interesting. For example, you can use `{while} game == 'on'` so you can play until the game is over.\nOr you can use `{while} sword == 'lost'` so the player can't continue the game until they have found something.\n\n### Exercise\nThe example code shows you how to use the `{while}` loop in a story. Now **think of your own scenario** in which the player has to find something before they can continue.\n" + example_code: "```\nkeys = 'lost'\n{print} 'You are standing in your garden and you have lost your keys.'\n{print} 'Where do you want to look for them?'\n{print} 'You can choose: tree, flowerbed, rock, postbox'\n{while} keys == 'lost'\n location = {ask} 'Where do you want to look?'\n {if} location == 'flowerbed'\n {print} 'Here they are!'\n keys = 'found'\n {else}\n {print} 'Nope they are not at the ' location\n{print} 'Now you can enter the house!'\n```\n" + name: कथा + description: कथा + default_save_name: Story + add_remove_command: + default_save_name: add_remove_command + levels: + 3: + example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n" + story_text_3: "### Exercise\nTry out the new commands in this virtual restaurant. Add the flavor the player is hoping for to the list and remove the flavors they are allergic to.\n" + example_code: "```\nanimals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\n{print} I choose animals {at} {random}\n```\n" + example_code_2: "```\nanimals {is} dog, cat, kangaroo\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}\n```\n" + story_text: "## Add to\nYou can add items to the list with the `{add} {to_list}` command. To add an item to a list you can simply type: `{add} penguin {to_list} animals` or you can use the `{ask}` command like in the example code.\n" + story_text_2: "## Remove from\nIf you can add items to a list, of course you can also take them off. This is done with the `{remove} {from}` command.\n" + description: introducing {add} {to_list} and {remove} {from} + name: '{add} {to_list} & {remove} {from}' + and_or_command: + name: '{and} & {or}' + levels: + 13: + example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n" + story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct." + default_save_name: and or + description: introducing {and} & {or} + ask_command: + description: Introduction {ask} command + name: '{ask}' + default_save_name: ask_command + levels: + 1: + story_text: "## The ask command\nNow that you can use the `{print}` command, you are ready to learn the next command: `{ask}`. With the `{ask}` command, you can ask a question. Check it out:\n" + example_code: "```\n{print} Hello!\n{ask} What is your name?\n```\n" + story_text_3: "### Exercise\nTry out the `{ask}` and `{echo}` commands. Firstly, fill in the blanks to make this program work.\nThen ask 2 more questions using the `{ask}` command, after each `{ask}` use an `{echo}` to print the answer on the screen.\n" + example_code_3: "```\n_ How are you doing?\n_\n```\n" + example_code_2: "```\n{print} Hello!\n{ask} What is your name?\n{echo} hello\n```\n" + story_text_2: "## The `{echo}` command\nIf you want the computer to repeat the answer back to you, you can use the `{echo}` command. The answer will be echoed back at the end of the sentence, so in this example after hello.\n" + 2: + example_code: "```\nname {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old.\n```\n" + example_code_2: "```\nfavorite_animal {is} {ask} What is your favorite animal?\n{print} I like favorite_animal\n```\n" + story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n" + story_text: "## The ask command\nNow that we can use **variables** in our codes, we no longer need the `{echo}` command.\nWe can use variables to store the answers to our questions and this way we can use the answer to multiple questions in our codes.\nCheck it out:\n\nThis way your code is becoming interactive!\n" + 18: + story_text: The final change we will need to make to get Python code is changing `{ask}` into `{input}`. + example_code: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n" + blackjack: + description: Try to get as close to 21 as you can + default_save_name: Blackjack + levels: + 17: + story_text: "Blackjack is a simple game of cards in which you have to get as close to 21 points as possible. You get two cards. Each card is worth their numeral value, and the face cards (Jack, Queen and King) are worth 10 points.\nThe Ace is worth either 1 or 11 points (you can choose). The dealer, your opponent, also gets two cards.\nIf you want, you can get another card, and its points will be added to your total. The dealer can also choose to take another card.\nBut be careful not to get more than 21 points, because if you do, you lose!\nThe player who gets closest to 21, without going over it, wins!\n\n### Exercise\nIn this adventure we code the first part of our Blackjack game. We'll create a function to calculate how many points a card is worth.\n\n***Set the variables***\nStart by making a list of all the cards, from 2 to Ace. Next make a list of the face cards, so Jack, Queen and King. Then pick a random card from the list of cards to be card_1.\n\n***Create a function to calculate the points***\nCreate a function that calculates how many points a card is worth.\nAll the face cards are worth 10 points, the Ace is worth 11 and all the other cards are worth their numeral.\nReturn the variable `points` at the end of the function.\n\n***Test the function***\nTest if your function is working properly. Finish the first print command by filling in which card you've drawn. Then finish the second line by calling the function with card_1.\nRun the code a couple of times. Are you happy with the results? Great! Then you can remove the testing part and move on the the next tab!\n" + example_code: "```\n{print} 'BLACKJACK'\n\n# Set these variables\ncards = _\nface_cards = _\ncard_1 =\n\n# Create a function to calculate the points\n{define} calculate_points {with} card:\n {if} card {in} face_cards:\n points = _\n {elif} _\n _\n {else}:\n _\n _ points\n\n# Test your function\n{print} 'Your card is a ' _\n{print} 'That is worth ' _ ' points'.\n```\n" + name: Blackjack + blackjack_2: + description: Blackjack part 2 + default_save_name: Blackjack_2 + name: Blackjack 2 + levels: + 17: + story_text: "### Exercise\nIn this adventure we code the second part of our Blackjack game.\n\n***Paste your code from the previous adventure***\nIn the previous adventure you've started a list of variables and created a function to calculate how many points a card is worth. Copy your code and paste it here. Mind that you don't need the testing part, so if you haven't removed that yet, please do so now.\n\n***Add more variables***\nYou have already set the lists `cards` and `face_cards` and the variable `card_1`. Underneath those variables create 3 more variables: `card_2`, dealer_card_1` and `dealer_card_2`. These variables are all set to a random card from the list of cards.\n\n***Add up points***\nTo calculate how many points you have scored we call the function with card 1 and we do it again for card 2. Then we add both these scores together to get your total.\nDo the same thing for the dealers points, but be sure to use the dealer's cards and not your own!\n\n***2 Aces***\nYou're doing great! Almost all scores can be calculated now. There is only one exception: 2 Aces. If you get 2 Aces, your total is 12 points and not 22 (because 22 points would be losing!). This of course also goes for the dealer.\n\n***Show the score***\nLastly, you want to tell the program to tell you which cards you have drawn and how many points that is. Then show which cards the dealer has and how many points they have.\n\n***Continue in the next tab***\nGreat! You have finished this part of the game! Copy your code and go to the next tab to learn how to ask for an extra card and to declare a winner.\n" + example_code: "```\n# Paste your code from the previous adventure here\n\n# Add these variables to the list of variables\ncard_2 = _\ndealer_card_1 = _\ndealer_card_2 = _\n\n# Add up your points\nyour_points_1 = {call} _ {with} card_1\nyour_points_2 = _\nyour_total = _\n\n# Add up the dealers points\ndealer_points_1 = _\n_\n_\n\n# 2 Aces\n{if} card_1 == 'Ace' {and} _\n your_total = 12\n{if} dealer_card_1 _\n dealer_total = _\n\n# Show the score\n{print} 'You have drawn a ' _ ' and a ' _ '. That is ' _ ' points'\n{print} 'The dealer has drawn a ' _ ' and a ' _ '. That is ' _ ' points'\n```\n" + blackjack_3: + description: Blackjack part 3 + levels: + 17: + story_text: "In the previous tabs you have learned how to draw 2 random cards for yourself and for the dealer and to calculate how many points you both got.\nIn this adventure we add the option to ask for an extra card for both you and the dealer.\n\n### Exercise\n***Paste your code from the previous adventure*** Firstly, copy your code from the previous tab and paste it here.\n\n***Extra card for you*** If you want, you can get an extra card to get your total as close to 21 as possible. First ask the player if they want an extra card.\nIf they do, pick a random card and print what they have drawn. If the card is not an Ace, you can call the function and add the points to your total.\nIn case the card is an Ace, you can't use the function, because the Ace can be either 1 point or 11 points, depending on how many points you already have earned.\nIf your total is less than 11, you want the ace to be 11 points (because this is closest to 21). So you add 11 points to your total.\nIf the total is more than or equal to 11, you want the ace to be 1 point (because you don't want more than 21 points). So you add 1 point to your total.\nLastly, print your new total of points.\n\n***Extra card for the dealer*** The dealer can also get an extra card. The dealer doesn't need to be asked, because they always get an extra card if their total is less than 17.\nCopy the 'Extra card for you code' and paste it in the dealers section. Then change it to fit the dealer picking an extra card and getting points added to their total.\n" + example_code: "```\n# Paste your code from the previous adventure here\n\n# Extra card for you\nhit = {ask} _\n{if} hit == 'yes':\n card_3 = _\n {print} _\n {if} card_3 _ 'Ace':\n your_points_3 = _\n your_total = _\n {else}:\n {if} your_total _\n _\n {else}:\n _\n {print} _\n\n# Extra card for the dealer\n{if} dealer_total < 17\n_\n```\n" + default_save_name: Blackjack_3 + name: Blackjack 3 + blackjack_4: + description: Blackjack part 4 + default_save_name: Blackjack_4 + name: Blackjack 4 + levels: + 17: + example_code: "```\n# Paste your code from the previous adventure here\n\n# Decide a winner\n{if} _\n {print} 'Its a draw! Play again!'\n{elif} _\n {print} 'You win!'\n{elif} _ :\n {if} _:\n {print} _\n {else}:\n {print} _\n{else}:\n _\n```\n" + story_text: "In the last 3 adventures you have alsmost created a working blackjack game! The only thing left to do is to decide a winner!\n\n### Exercise\n***Paste your code from the previous adventure*** Start by pasting the code that you've made so far into your programming field.\n\n***Decide a winner***\nFirstly, if you and the dealer have an equal amount of points, it's a draw.\nSecondly, if the dealer has more than 21 points and you don't, you are the winner.\nThirdly, if both you and the dealer have less than 22 points, we have to see who came closest to 21. We do that by comparing who has the highest score. Is your total higher than the dealer's total, then you are the winner. If not, the dealer wins.\nLastly, in all other scenarios (e.g. you have more than 21 points and the dealer doesn't, or you both have more than 21 points) you are the loser.\n\n***Enjoy the game!***\nDoes your game work properly? Amazing! You have done a great job! Enjoy your game!\nIf it doesn't work right away, no worries, you might have made a mistake. Just keep calm and bebug your code using the ladybug button.\n" + calculator: + name: Calculator + default_save_name: Calculator + levels: + 6: + story_text: "Now that you can do maths, you can make a calculator yourself!\n" + example_code_3: "```\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber_1 = _\nnumber_2 = _\ncorrect_answer = number_1 * number_2\ngiven_answer = {ask} 'What is ' number_1 ' times ' number_2 '?'\n{if} _\n{else} _\n```" + story_text_3: "**Extra** You can also let the computer do random products on its own using `{random}`.\n" + story_text_2: "### Exercise\nThe calculator above will calculate the answer for you, but you can also make a program to test your own maths skills, like this:\nFill in the blanks to make it complete!\n" + example_code: "```\nnumber_1 = {ask} 'Fill in the first number:'\nnumber_2 = {ask} 'Fill in the second number:'\ncorrect_answer = number_1 * number_2\n{print} number_1 ' times ' number_2 ' is ' correct_answer\n```\n" + example_code_2: "```\ncorrect_answer = 11 * 27\nanswer = {ask} 'How much is 11 times 27?'\n{if} answer {is} _ {print} 'good job!'\n{else} {print} 'Wrong! It was ' _\n```\n" + 12: + story_text: "In this level, you can make a calculator that works for decimal numbers.\n\n### Exercise 1\nFill out the blanks to complete the calculator. Remember to use a period and not a comma for decimal numbers.\n\n### Exercise 2\nCreate a new mathematics practice program, but now use decimal numbers.\nCreate a list of numbers, choose two to multiple and let the player answer.\nAnd of course you have to validate the answer! **Extra** Increase the difficulty by adding lives: A player loses a life for a wrong answer and after three wrong answers the game ends.\n" + example_code: "```\nnumber1 = {ask} 'What is the first number?'\nnumber2 = {ask} 'What is the second number?'\nanswer = _\n{print} number1 ' plus ' number2 ' is ' _\n```\n" + 13: + example_code: "```\nanswer1 = {ask} 'What is 10 times 7?'\nanswer2 = {ask} 'What is 6 times 7?'\n{if} _ _ _ _ _ _ _\n {print} _\n```\n" + story_text: "### Exercise 1\nLet's make the practice program a bit harder. The player now has to answers two questions correctly. Fill out the blanks to complete the program.\n\n### Exercise 2\nSometimes, calculations have multiple correct answers. For example, 10 can be divided by 5 and by 2. So the question 'What number divides 10?' can be answered by 2 and by 5.\nAsk for a calculation that has multiple correct answers, ask the player to answer it, and determine if it is correct using `{or}`.\nEmpty the programming field and create your own solution.\n" + 14: + example_code: "```\n{define} calculate_mean_grade\n total = 0\n {for} i {in} {range} 1 {to} 4\n grade = {ask} _\n total = total + _\n {return} _ / 4\n\nmean_grade = {call} _\n{print} 'Your mean grade is ' mean_grade\n```\n" + story_text: "In this adventure you will build a calculator that calculates your mean grade for you. If you get your calculator to work, you can move on to the next adventure, which allows you to add two extra features.\n\n### Exercise 1\nFill in the blanks to get the calculator to work.\n* Start with the fourth line, add a question to figure out what grade the student got.\n* In the fifth line you'll want to calculate the total of all grades, so the total = total + grade.\n* Then we get to set the return value. We want to return the mean, so the total devided by the amount of tests (4).\n* Lastly we finish the code by calling the function in line 8.\n\nDid you get it? Awesome! Would you like to add even more to your calculator? **This adventure continues in the next tab!**\n" + 15: + example_code: "```\n{define} new_question\n numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n number_1 = numbers {at} {random}\n number_2 = numbers {at} {random}\n correct = number_1 * number_2\n answer = 0\n _\n _\n _\n {print} 'Well done!'\n\n{print} 'Give 10 correct answers to win!'\n{for} i {in} {range} 1 {to} 10\n _\n{print} 'You win!'\n```\n" + story_text: "You can add the `{while}` loop to the calculator game you've learned to make in a previous level.\nThis makes sure the player can't continue to the next question if they answer incorrectly.\n\n### Exercise\nAdd the `{while}` loop in the function, ask the player what number_1 times number_2 is and print their answer.\nThen `{call}` the function.\n" + 9: + story_text: "In a previous level, you've created a calculator. In this level, you can expand that code so it asks multiple questions.\n\n### Exercise 1\nCan you finish line 10 to get the code to work?\n\n### Exercise 2\nGive the player feedback when they enter an answer, like `{print} 'Correct!'` or `{print} 'Wrong! The correct answer is ' correct_answer`.\n" + example_code: "```\nscore = 0\n{repeat} 10 {times}\n numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n number_1 = numbers {at} {random}\n number_2 = numbers {at} {random}\n correct_answer = number_1 * number_2\n {print} 'What is ' number_1 ' times ' number_2 '?'\n answer = {ask} 'Type your answer here...'\n {print} 'Your answer is ' answer\n {if} _ {is} _\n score = score + 1\n{print} 'Great job! Your score is... ' score ' out of 10!'\n```\n" + 10: + example_code: "```\nnumbers = 1, 2, 3\n{for} _\n {for} _\n answer = {ask} _\n correct = number_1 * number_2\n {if} answer {is} correct\n {print} 'Great job!'\n {else}\n {print} 'That is wrong. The right answer is ' correct\n```\n" + story_text: "This calculator game helps you practise your tables of multiplication!\n### Exercise\nFill in the blanks. We want this program to ask the player these questions:\n```\nHow much is 1 times 1?\nHow much is 1 times 2?\nHow much is 1 times 3?\nHow much is 2 times 1?\nHow much is 2 times 2?\nHow much is 2 times 3?\nHow much is 3 times 1?\nHow much is 3 times 2?\nHow much is 3 times 3?\n_\n```\n" + 11: + story_text: "With a `{for}` you can simplify tables of multiplication practise program.\n\n### Exercise 1\nImprove the example code such that it prints a nice multiplication table:
\"1 times 10 is 10\", \"2 times 10 is 20\", etc.\n\n### Exercise 2\nGo back to your level 10 multiplication code, and modify it so that it uses a `{for}` and `{range}`.\n" + example_code: "```\nnumber = 10\n{for} i {in} {range} 1 {to} 10\n {print} i * number\n```\n" + description: Create a calculator + calculator_2: + name: Calculator 2 + default_save_name: Calculator 2 + description: Calculator 2 + levels: + 14: + example_code: "```\n# Use your own code from the previous adventure.\n```\n" + story_text: "### Exercise 2\n**This is the second part of this adventure.** The adventure starts in the previous tab.\nOf course, you don't always want to calculate the mean of 4 tests. You might want to calculate the mean of 10 tests or only 2...\nWe can fix this problem by adding the argument and variable 'amount_of_tests'.\n* Start a new line on line 3. Set the amount_of_tests argument by asking the student how many tests they have made.\n* Change the 4 in line 4 to the new argument amount_of_tests.\n* Lastly, change the 4 in line 6 to amount_of_tests\n\nTry out your new program. Does it work?\n\n### Exercise 3\nDid you want to make your program even better? Great! In the previous program you could only calculate the mean grade of 1 subject, but it would be better if you could calculate the mean grade for all subjects you want!\nWe won't tell you how to do it, but we will give you one tip: Start your code in line 1 with: define calculate_mean_grade with subject.\n" + clear_command: + default_save_name: clear_command + description: '{clear} command' + levels: + 4: + example_code: "```\n{print} '3'\n{clear}\n{print} '2'\n{clear}\n{print} '1'\n{clear}\n{print} 'wait for it...'\n{sleep} 3\n{clear}\n{print} 'SURPRISE!'\n```\n" + story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, you might need to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read as you can see in the example!\n" + name: '{clear}' + debugging: + levels: + 2: + example_code: "**Warning! This code needs to be debugged!**\n```\ndestination {ask} Where are you going on holidays?\n{print} The flight to dstination leaves at 3 pm.\n{ask} Did you check in your luggage yet?\n{echo}\n{print} Let me print your boarding pass for you.\n{sleep}\nHere you go! Have a nice trip!\n```\n" + story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will give you a code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\nDebug this code. Good luck!" + 4: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Welcome to the online library!\n{ask} What genre of books do you like?\n{print} You like genre\nauthor {is} {ask} 'Who's your favorite author?'\n{print} 'author is your favorite author'\n{print} Hmmm... i think you should try... books {at} {random}\n```\n" + 5: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} Welcome to Swimming Pool Hedy!\nclass {is} {ask} 'Are you here to join a class today?'\n{if} class yes\n{print} 'Great! You're joining a class!\n{print} {else} 'You will not be joining a class'\ndiscount {is} 'Do you have a discount code?'\n{if} discount {is} yes\ndiscount_answer {is} {ask} 'What's your discount code?'\ndiscount_codes = Senior4231, Student8786, NewMember6709\n{if} discount_answer {is} {in} discount_cods\n{print} 'That will be $3,50'\n'That will be $5,50'\n{print} 'Have a nice swim!'\n```\n" + 8: + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Welcome to Manicures and Pedicures by Hedy'\nbodypart = {ask} 'Are you getting your fingernails or toenails done today? Or both?'\n{if} bodyparts {is} both\n {print} That will be $25'\n price = 25\n {else}\n {print} That will be $18'\n price = 18\ncolor = {ask} What color would you like?\nsparkles = {ask} 'Would you like some sparkles with that?'\n{if} sparkles {is} yes\n {print} 'We charge $3 extra for that'\nprice = price + 3\n{else} {print} 'No sparkles' {print} 'So no extra charge'\n{sleep} 5\n{print} 'All done! That will be $' price ' please!'\n{print} 'Thank you! Byebye!'\n```" + story_text: "### Exercise\nDebug this code. Good luck!" + 10: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\nnames = Muad Hasan Samira Noura\nactivities = fly a kite, go swimming, go hiking, catch tan in the sun\n{for} name {is} names\n{print} At the beach name loves to activity {at} {random}\n```\n" + 9: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Welcome to our sandwich shop'\namount 'How many sandwiches would you like to buy?'\n{repeat} amount {times}\n{ask} {is} {ask} 'What kind or bread would you like your sandwich to be?'\ntypes_of_bread {is} white, wheat, rye, garlic, gluten free\n{if} chosen_bread in types_of_bread\n{print} 'Lovely!'\n{else}\n'I'm sorry we don't sell that'\ntopping {is} {ask} 'What kind of topping would you like?'\nsauce {is} {ask} 'What kind of sauce would you like?'\n{print} One chosen_bread with topping and sauce.\nprice = amount * 6\n{print} 'That will be 'price dollar' please'\n```\n" + 11: + story_text: "### Exercise\nDebug this calendar program. The output of this program is supposed to look like a list of dates.\nFor example:\n\n```\nHedy calendar\nHere are all the days of November\nNovember 1\nNovember 2\nNovember 3\n```\nAnd so on.\n\nMind that you have to test your code extra carefully for the month February, because the amount of days in this month changes in leap years." + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Hedy calendar'\nmonths_with_31 days = January, March, May, July, September, October, December\nmonths_with_30_days = April, June, August, November\nmonth = {ask} 'Which month would you like to see?'\n{if} month {in} months_with_31_days\n days = 31\n {if} month {in} months_with30_days\n days = 30\n{if} month = February\n leap_years = 2020, 2024, 2028, 2036, 2040, 2044, 2028\n year = {ask} 'What year is it?'\n{if} year {in} leap_years\n days = 29\n{else}\n days = 28\n\n{print} 'Here are all the days of ' moth\n{for} i {in} {range} 1 {to} days\n {print} month i\n```\n" + 12: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{define} greet\ngreetings = 'Hello', 'Hi there', 'Goodevening'\n {print} greetings {at} {random}\n\n{define} take_order\n food = {ask} 'What would you like to eat?'\n {print} 'One food'\n drink = 'What would you like to drink?'\n {print} 'One ' drink\n more = {ask} 'Would you like anything else?'\n {if} more {is} 'no'\n {print} 'Alright'\n {else}\n {print} 'And ' more\n{print} 'Thank you'\n\n{print} 'Welcome to our restaurant'\npeople = {ask} 'How many people are in your party tonight?'\n{for} i {in} {range} 0 {to} people\n {call} greet_costumer\n```\n" + 14: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{define} calculate_heartbeat\n {print} 'Press your fingertips gently against the side of your neck'\n {print} '(just under your jawline)'\n {print} 'Count the number of beats you feel for 15 seconds'\n beats == {ask} 'How many beats do you feel in 15 seconds?'\n heartbeat = beats*4\n {print} 'Your heartbeat is ' heartbeat\n {if} heartbeat >= 60 {or} heartbeat <= 100\n {print} 'Your heartbeat seems fine'\n {else}\n {if} heartbeat > 60\n {print} 'Your heartbeat seems to be too low'\n {if} heartbeat < 100\n {print} 'Your heartbeat seems to be too high'\n {print} 'You might want to contact a medical professional'\n\nmeasure_heartbeat = {ask} 'Would you like to measure your heartbeat?'\n{if} measure_heartbeat = 'yes'\n {call} measure_heartbeat\n{else}\n 'no problem'\n```\n" + 15: + story_text: "### Exercise\nDebug this random children's story. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\nnames = 'Tanya', 'Romy', 'Kayla', 'Aldrin', 'Ali'\nverbs='walking', 'skipping', 'cycling', 'driving', 'running'\nlocations = 'on a mountaintop', 'in the supermarket', 'to the swimming pool'\nhiding_spots = 'behind a tree', under a table', in a box'\nsounds = 'a trumpet', 'a car crash', 'thunder'\ncauses_of_noise = 'a television', 'a kid with firecrackers', 'a magic elephant', 'a dream'\n\nchosen_ name = names {at} {random}\nchosen_verb = verbs {at} {random}\nchosen_location = 'locations {at} {random}'\nchosen_sounds = noises {at} {random}\nchosen_spot = hiding_spots {random}\nchosen_causes = causes_of_noise {at} {random}\n\n{print} chosen_name ' was ' chosen_verb ' ' chosen_location\n{print} 'when they suddenly heard a sound like ' sounds {at} {random}\n{print} chosen_name ' looked around, but they couldn't discover where the noise came from'\n{print} chosen_name ' hid ' chosen_spot'\n{print} 'They tried to look around, but couldn't see anything from there'\nhidden = 'yes'\n{while} hidden = 'yes'\n {print} chosen_name 'still didn't see anything'\nanswer = {ask} 'does ' chosen_name ' move from their hiding spot?'\n {if} answer = 'yes'\n hidden == 'no'\n{print} 'chosen_name moved from' chosen_spot\n{print} 'And then they saw it was just' chosen_cause\n{print} chosen_name 'laughed and went on with their day'\n{print} The End\n```\n" + 16: + story_text: "### Exercise\nDebug this code. Good luck!\nTip: Make sure that you only see your score once in the end." + example_code: "**Warning! This code needs to be debugged!**\n```\ncountry = ['The Netherlands', 'Poland', 'Turkey', 'Zimbabwe', 'Thailand', 'Brasil', 'Peru', 'Australia', 'India', 'Romania' ]\ncapitals = 'Amsterdam', 'Warshaw' 'Istanbul', 'Harare', 'Bangkok', 'Brasilia', 'Lima', 'Canberra', 'New Delhi', 'Bucharest'\nscore = 0\n{for} i {in} {range} 0 {to} 10\n answer = {ask} 'What's the capital of ' countries[i]\n correct = capital[i]\n {if} answer = correct\n {print} 'Correct!'\n score = score + 1\n {else}\n {print} 'Wrong,' capitals[i] 'in the capital of' countries[i]\n {print} 'You scored ' score ' out of 10'\n\n```\n" + 17: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{define} food_order\n toppings = {ask} 'pepperoni, tuna, veggie or cheese?'\n size = {ask} 'big, medium or small?'\n number_of_pizza = {ask} 'How many these pizzas would you like?'\n\n {print} 'YOU ORDERED'\n {print} number_of_pizzas ' size ' topping ' pizza'\n\n{define} drinks_order\n drink = {ask} 'water, coke, icetea, lemonade or coffee?'\n number_of_drinks = {ask} 'How many of these drinks would you like?'\n\n {print} 'YOU ORDERED'\n {print} number_of_drinks ' ' drink\n\n'Welcome to Hedy pizza'\nmore_food = {ask} 'Would you like to order a pizza?'\n{while} more_food = 'yes'\n {return} food_order\n more_food = {ask} 'Would you like to order a pizza?'\nmore_drinks = {ask} 'Would you like to order some drinks?'\n{while} more_drinks == 'yes'\n {call} drink_order\n more_drinks == {ask} 'Would you like to order more drinks?'\n\n\n{print} 'Thanks for ordering!'\n```\n" + 18: + story_text: "### Exercise\nDebug this Old MacDonald program from level 16. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\nanimals = ['pig', 'dog', 'cow']\nsounds = ['oink', 'woof', 'moo']\n{for} i {in} {range} 1 {to} 3\n animal = animals[i]\n sound = sounds[i]\n {print} 'Old MacDonald had a farm'\n {print} 'E I E I O!'\n {print} 'and on that farm he had a ' animal\n {print} 'E I E I O!'\n {print} 'with a ' sound sound ' here'\n {print} 'and a ' sound sound ' there'\n {print} 'here a ' sound\n {print} 'there a ' sound\n {print} 'everywhere a ' sound sound\n```\n" + 13: + example_code: "**Warning! This code needs to be debugged!**\n```\n{define}movie_recommendation {with} name\n action_movies == 'Die Hard', 'Fast and Furious', 'Inglorious Bastards'\n romance_movies = 'Love Actually', 'The Notebook', 'Titanic'\n comedy_movies = 'Mr Bean' 'Barbie''Deadpool'\n kids_movies = 'Minions', 'Paddington', 'Encanto'\n {if} name {is} 'Camila' {or} name {is} 'Manuel'\n recommended_movie = kids_movie {at} {random}\n {if} name {is} 'Pedro' {or} 'Gabriella'\n mood = {ask} 'What you in the mood for?'\n {if} mood {is} 'action'\n recommended_movie = comedy_movies {at} {random}\n {if} mood {is} 'romance'\n recommended_movie = romance_movies\n {if} mood {is} 'comedy'\n recommended_movie = comedy_movies {at} {random}\n\n{print} 'I would recommend ' recommended_movie ' for ' name\n\nname = {ask} 'Who is watching?'\nrecommendation = {ask} 'Would you like a recommendation?'\n{if} recommendaion {is} 'yes'\n{print} movie_recommendation {with} name\n{else}\n{print} 'No problem!'\n```\n" + story_text: "### Exercise\nDebug this code. Good luck!" + 1: + story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will show you code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} I love programming\nDo you love programming too?\n{echo}\n{print} What are your hobbies?\n{echo} Your hobbies are\n```\n" + 7: + example_code: "**Warning! This code needs to be debugged!**\n```\nAre you sleeping?\nBrother John!\nMorning bells are ringing!\nDing, dang, dong!\n```\n" + story_text: "### Exercise\nSurprise! This program looks more like an output than a code. And yet, we don't want you to just add `{print}` commands in front of each line.\nFix this program to turn it into the nursery rhyme 'Brother John (Frère Jacques)' by using the {repeat} command of course!" + 3: + example_code: "**Warning! This code needs to be debugged!**\n```\nmovie_choices {is} dracula, fast and furious, home alone, barbie\nchosen_movie {is} movies {at} {random}\n{print} Tonight we will watch chosen _movies\nlike {ask} Do you like that movie?\n{print} Tomorrow we will watch something else.\n{add} chosen_movie {to_list} movie_choices\n{print} Tomorrow we will watch tomorrows_movie\ntomorrows_movie {is} movie_choices {at} {random}\nI'll go get the popcorn! {print}\n```\n" + story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will give you a code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\nDebug this code. Good luck!" + 6: + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Vending machine'\nchosen_product = {ask} 'Please select a product'\n1_dollar_products = coke orange juice water\n2_dollar_products = chocolate, cookie, museli bar\n3dollar_prodcuts = potato chips, beef jerky, banana bread\n{if} chosen {is} {in} 1_dollar_products\nprice = 1\n{if} chosen_product {is} 2_dollar_products\nprice = 2\n{else} chosen_product {in} 3_dollar_products\nprice = 3\namount_of_products = '{ask} How many of ' chosen_product would you like to have?'\ntotal = price + amount_of_product\n{print} 'That will be $' price 'please'\n```\n" + story_text: "### Exercise\nDebug this code. Good luck!" + default_save_name: debugging + description: debugging adventure + name: debugging + default: + default_save_name: intro + name: Introduction + description: Level explanation + levels: + 1: + story_text: "Welcome to Hedy! Here you can learn how to program step by step.\n\nTry the code yourself! The yellow button copies the example code to your programming field.\nThen push the green 'Run code' button under the programming field to run the code.\n\nReady? Then go to the next tab to learn how to make your own codes!\n" + example_code: "```\n{print} Hello world!\n```\n" + 3: + story_text: "In the previous level you've learned what a variable is and how you can use it to make your adventures more interactive.\nBut... that's not the only thing you can do with variables! You can also use variables to make lists.\nAnd you can even let Hedy pick a random word out of a list, which allows you to make real games!\nTake a quick look at the next tab!\n" + 4: + story_text: "In the previous levels you've been practising with variables, but you may have come across this problem.\nYou might have tried to run a code like this:\n\nOf course you wanted to print\n\n`My name is Sophie`\n\nbut Hedy prints\n\n`My Sophie is Sophie`.\n\nIn this level this problem is fixed by using quotation marks.\n" + example_code: "```\nname {is} Sophie\n{print} My name is name\n```\n" + 5: + example_code: "```\npassword {is} {ask} 'What is the correct password?'\n```\n" + story_text: "In the previous levels you've already learned to use `{at} {random}` which made your games different every time you ran the code.\nBut it's not really interactive, the player doesn't have any influence on what happens in the game.\n\nIn this level you'll learn the `{if}` command, that allows you to give different responses in your program. This way you can program a secret password for your computer for example.\nSo let's go to next tab for the new command!\n" + 9: + example_code: "```\nanswer = {ask} 'Are you ready to learn something new?'\n{if} answer {is} yes\n {print} 'Great! You can learn to use the repeat command in the if command!'\n {print} 'Hooray!'\n {print} 'Hooray!'\n {print} 'Hooray!'\n{else}\n {print} 'Maybe you should practice some more in the previous level'\n" + story_text: "Great job! You've reached another new level! In the previous level you've learned to use multiple lines of code in an {if} or {repeat} command. But you can't yet combine the two...\nGood news! In this level you will be allowed to put an {if} inside an {if}, or inside a {repeat} command. Putting a block of code inside another block of code is called nesting. ``` Putting a block of code inside another block of code is called nesting.\n" + 10: + example_code: "```\n{repeat} 2 {times}\n {print} 'if youre happy and you know it clap your hands'\n{print} 'if youre happy and you know it and you really want to show it'\n{print} 'if youre happy and you know it clap your hands'\n```\n" + story_text: "You're doing great! In the previous levels we still faced a small problem. You have learned to repeat lines, but what if you'd want to slightly change the line.\nFor example if you want to sing the song 'if you're happy and you know it'. It would look like this:\n\nIf you'd also want the next verse 'stomp your feet', and the next one, and the next one, you'd have to change the code completely.\nIn this level you'll learn the `{for}` command, which allows you to make a list of actions and repeat the code with another action each time!\nPlease take a look!\n" + 12: + story_text: "Maybe you have tried using decimal numbers in your restaurant adventure. If you did, you probably noticed that Hedy didn't understand them yet and always rounded off.\nFrom this level on you can use decimal numbers.\n" + example_code: "```\nburger = 5\ndrink = 2\ntotal = burger + drink\nprint 'You have ordered a burger and a drink'\nprint 'That costs ' total ' dollars please'\n```\n" + 13: + example_code: "```\nusername = {ask} 'What is your username?'\npassword = {ask} 'What is your password?'\n{if} username {is} 'Hedy'\n {if} password {is} 'secret'\n {print} 'Welcome Hedy!'\n {else}\n {print} 'Access denied'\n{else}\n {print} 'Access denied!'\n```\n" + story_text: "In the previous levels you've learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:\n\nIn this system you have to give both the correct username and the correct password.\nIn this level you will learn the `{and}` command that will make this code a lot shorter and more understandable!\nCheck it out!\n" + 15: + story_text: "In this game below a code has been made to make sure the player can play on as long as they want...\nBut the code is ineffective and way too long. Also, what if the player wants to play 101 games instead of 100?\nYou can't play to infinity?\nIn this level you will learn a command that makes all of this a lot easier!\n" + example_code: "```\ngame = 'on'\n{for} i {in} {range} 1 {to} 100\n {if} game == 'on'\n answer = {ask} 'Do you want to continue?'\n {if} answer == 'no'\n game = 'over'\n {if} answer == 'yes'\n {print} 'Ok we will continue'\n```\n" + 16: + story_text: "In this level we will grow a bit more towards real Python code. You will also learn how to match two lists together.\nThis way you can program a code in which the correct animal is matched to the right sound.\nBecause the two codes below... Are obviously nonsense!\n" + example_code: "```\nanimals = 'chicken', 'horse', 'cow'\nsounds = 'cluck', 'neigh', 'moo'\n{for} animal {in} animals\n {print} 'A ' animal ' says ' sounds {at} {random}\n```\nYou could also try to make it work this way, but....\n```\nanimals = 'chicken', 'horse', 'cow'\nsounds = 'cluck', 'neigh', 'moo'\n{for} animal {in} animals\n {for} sound {in} sounds\n {print} 'A ' animal ' says ' sound\n```\nNote: These codes will not work like this in this level. Head to the next tab to see which parts you need to correct." + 6: + example_code: "```\nfood_price {is} 0\ndrink_price {is} 0\ntotal_price {is} 0\n{print} 'Welcome to McHedy'\norder {is} {ask} 'What would you like to eat?'\n{if} order {is} hamburger food_price {is} 5\n{if} order {is} fries food_price {is} 2\ndrink {is} {ask} 'What would you like to drink?'\n{if} drink {is} water drink_price {is} 0\n{else} drink_price {is} 3\ntotal_price {is} food_price + drink_price\n{print} 'That will be ' total_price ' dollars, please'\n```\n" + story_text: "In the previous level you have practiced with `{ask}` and `{if}`. For example you can ask guests what they would like to eat.\nWhat you can't yet do though, is calculate the price for everyone's dinner.\n\nThis level makes it possible to use addition, subtraction and multiplication in your programs. This way you can calculate the prices in your restaurant, but you could also add a secret code to give your friends and family a discount.\nAnother option in this level is programming your own maths game, for your little brother or sister to practice their multiplications.\nGo see for yourself!\n" + 7: + story_text: "Great job! You've reached the next level, which means you have practiced with `{if}` and `{else}`. You have probably noticed that your codes are getting longer and longer.\nFor example if you want to program 'Happy Birthday'.\n\nThat's a lot of code for mainly the same words over and over again. Luckily in the next tab you'll learn a solution with the `{repeat}` command, that allows you to repeat a line of code multiple times.\n" + example_code: "```\n{print} 'happy birthday to you'\n{print} 'happy birthday to you'\n{print} 'happy birthday dear Hedy'\n{print} 'happy birthday to you'\n```\n" + 11: + story_text: "You have reached level 11, you're doing great! In the higher levels, Hedy is focussing more and more on teaching you the programming language Python.\nIn Python there is no `{repeat}` command, but there is a command that works like {repeat}. Are you curious to find out how to say `{repeat}` in Python language? Quickly go on to find out!\n" + 2: + story_text: "Congratulations! You've reached level 2. Hopefully you've already made some awesome codes!\nIn the first level you might've notice that the `{echo}` command can only save one bit of information at a time.\nFor example in the restaurant adventure, you could echo what the costumer wanted to eat, or what they wanted to drink, but not both in one sentence.\n\nThat changes in level 2. In level 2 you'll learn to work with variables, that allow you to save multiple pieces of information and print them in any place you want.\nSo let's go to the next tab!\n" + example_code: "**Warning! This code does not work!**\nIn Hedy commands will change sometimes. `{echo}` for example only works in level 1. In this level you'll learn a better way to echo answers back.\n```\n{print} Welcome at Hedy's\n{ask} What would you like to eat?\n{echo} So you want\n{ask} what would you like to drink?\n{echo} So you want\n```\n" + 8: + example_code: "```\n{repeat} 5 {times} {print} 'In the next tab you can repeat multiple lines of code at once!'\n```\n" + story_text: "Now you've learned how to repeat one single line of code. This comes in handy, but it's not always enough. Sometimes you want to repeat multiple lines at once.\nThis level allows you to group a couple of lines of code, and repeat that little group of lines all at once!\n" + 14: + story_text: "With the example code you can calculate if you've passed a subject at school (so, a grade of six or higher).\nYou can see this code is extremely inefficient, due to the very long code in line 5.\nAll the different grades from 1 to 5 had to be programmed separately. Lucky for you, in this level you'll learn how to do this without this extremely long code!\n" + example_code: "```\nfirst_grade = {ask} 'What score did you get on your first test?'\nsecond_grade = {ask} 'What score did you get on your second test?'\nadded = first_grade + second_grade\nmean_grade = added / 2\n{if} mean_grade = 1 {or} mean_grade = 2 {or} mean_grade = 3 {or} mean_grade = 4 {or} mean_grade = 5\n {print} 'Oh no! You have failed the subject...'\n{else}\n {print} 'Great! You have passed the subject!'\n```\n" + 17: + story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n\nIn this level you can also use a new command: `{elif}`. `{elif}` is short for ``{else} {if}`` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n" + 18: + story_text: "Congratulations! You have reached the last level of Hedy! The code you have created here can be copied to real Python environments like replit or PyCharm, and you can continue learning there!\nNote however that Python can only read English commands, so if you have been using other languages, you will need to switch to English now.\n" + dice: + levels: + 7: + example_code: "```\nchoices = 1, 2, 3, 4, 5, 6\n_ _ _ _ _ _ _\n```\n" + story_text: "You can also make a dice again in this level. With the `{repeat}` code you can easily roll a whole hand of dice.\n\n### Exercise\nTry to finish the sample code! **Extra** Think of a game you know that involves a dice and program that using a `{repeat}`.\n" + 6: + story_text: "You can also make an Earthworm die again in this, but now you can also calculate how many points have been rolled.\nYou may know that the worm counts 5 points for Earthworms. Now after a roll you can immediately calculate how many points you have thrown.\nThis is the code to calculate points for one die:\n\n### Exercise\nCan you make the code so that you get the total score for 8 dice? To do that, you have to copy and paste some lines of the code.\n" + example_code: "```\nchoices = 1, 2, 3, 4, 5, earthworm\npoints = 0\nthrow = choices {at} {random}\n{print} 'you threw ' throw\n{if} throw {is} earthworm points = points + 5 {else} points = points + throw\n{print} 'those are ' points ' points'\n```\n" + example_code_2: "Did you manage to calculate the score for 8 dice? That required a lot of copy and pasting, right? We are going to make that easier in level 7!\n" + 3: + story_text_2: "### Exercise\nThe dice in the example above are dice for a specific game. Can you make normal dice?\nOr other special dice from a different game?\n" + example_code_2: "```\nchoices {is} _\n```\n" + example_code: "```\nchoices {is} 1, 2, 3, 4, 5, earthworm\n{print} You threw _ {at} {random} !\n```\n" + story_text: "In this level we can choose from a list. With that we can let the computer choose one side of the die.\nTake a look at the games you have in your closet at home.\nAre there games with a (special) die? You can also copy it with this code.\nFor example, the dice of the game Earthworms with the numbers 1 to 5 and an earthworm on it.\n\n![Die of earthworms with 1 to 5 and an earthworm on it](https://cdn.jsdelivr.net/gh/felienne/hedy@24f19e9ac16c981517e7243120bc714912407eb5/coursedata/img/dobbelsteen.jpeg)\n" + 15: + example_code: "```\noptions = 1, 2, 3, 4, 5, 6\n{print} 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\n_\n_\n_\n_\n_\n{print} 'Yes! You have thrown 6 in ' tries ' tries.'\n```\n" + story_text: "### Exercise\nIn this level you can create a little game in which you'll have to throw 6 as fast as possible.\nWe have started the code, it's up to you to get the game to work!\n\nFirstly, add a `{while}` loop that checks if 6 has been thrown or not.\nAs long as you haven't thrown 6 already, throw the dice on a random number.\nPrint what the player has thrown.\nAdd a try to the amount of tries\nWait a second before you throw again, or - in case you've thrown a 6 - before the game ends.\n" + 10: + story_text: "### Exercise\nIs everybody taking too long throwing the dice? In this level you can let Hedy throw all the dice at once!\nChange the names into names of your friends or family, and finish the code.\n" + example_code: "```\nplayers = Ann, John, Jesse\nchoices = 1, 2, 3, 4, 5, 6\n_ _ _ _\n {print} player ' throws ' choices {at} {random}\n {sleep}\n```\n" + 4: + story_text: "In this level you can also create dice. But this time you can try it yourself, without an example code!\n\n### Exercise\nMake your own dice in this level.\nTip: If you have no idea how to make dice. Take a peek at your dice from the previous level, but don't forget to add quotation marks.\n" + 5: + example_code: "```\nchoices {is} 1, 2, 3, 4, 5, earthworm\nthrow {is} choices {at} {random}\n{print} 'you have thrown ' throw\n_ throw {is} earthworm {print} 'You can stop throwing.'\n_ {print} 'You have to throw it again!'\n```\n" + story_text: "We are going to add the `{if}` and `{else}` commands to our dice!\n\n### Exercise\nComplete the sample code so that the code says \"You can stop throwing\" once you have thrown an earthworm. It should say \"You have to throw again\" if you've thrown anything else.\n**Extra** Maybe you want to recreate a die from a completely different game. That's fine too! Then make up your own reaction, e.g. 'yes' for 6 and 'pity' for something else.\n" + default_save_name: Dice + name: Dice + description: Make your own dice + dishes: + levels: + 5: + story_text: "With the `{if}` you can now have more fun with choice in the program. You can have your program respond to the choice that the computer has made.\n### Exercise\nCan you finish the code so that it prints 'too bad' when it is your turn and otherwise 'yes!'?\nDon't forget the quotes!\n" + example_code: "```\npeople {is} mom, dad, Emma, Sophie\ndishwasher {is} people {at} {random}\n_ dishwasher {is} Sophie {print} _ too bad I have to do the dishes _\n_ {print} 'luckily no dishes because ' _ ' is already washing up'\n```\n" + 4: + example_code: "```\npeople {is} mom, dad, Emma, Sophie\n{print} _ the dishes are done by _\n{sleep}\n{print} people {at} _\n```\n" + story_text: "With quotation marks you can make your dishwashing program even better.\n\n### Exercise\nFirst, fill in right symbols or commands on the blanks to make this example program work.\nDid you get it? Great! Now copy your own code from the previous level and make it work in this level by adding quotation marks in the right spots.\n" + 6: + example_code: "```\npeople = mom, dad, Emma, Sophie\nemma_washes = 0\ndishwasher = people {at} {random}\n{print} 'The dishwasher is' dishwasher\n{if} dishwasher {is} Emma emma_washes = emma_washes + 1\n{print} 'Emma will do the dishes this week' emma_washes 'times'\n```\n\nNow you can copy lines 3 to 5 a few times (e.g. 7 times for a whole week) to calculate for a whole week again.\nDo you make the code for the whole week?\n" + story_text: "How often is everyone going to do the dishes? Is that fair? You can count it in this level.\n" + example_code_2: "```\npeople = mom, dad, Emma, Sophie\ndishwasher = people {at} {random}\n{print} 'Monday the dishes are done by: ' dishwasher\n{remove} dishwasher {from} people\ndishwasher = people {at} {random}\n{print} 'Tuesday the dishes are done by: ' dishwasher\n{remove} dishwasher {from} people\n```\n" + story_text_2: "If you are extremely unlucky the previous program might choose you to do the dishes for the whole week! That's not fair!\nTo create a fairer system you can use the `{remove}` command to remove the chosen person from the list. This way you don't have to do the dishes again until everybody has had a turn.\n\nMonday and Tuesday are ready for you! Can you add the rest of the week?\nAnd… can you come up with a solution for when your list is empty?\n" + 10: + example_code: "```\ndays = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday\nnames = mom, dad, Emma, Sophie\n{for} day {in} days\n {print} names {at} {random} ' does the dishes on ' day\n```\n" + story_text: "In this level you can make a schedule for the whole week in an easy way!\n\n### Exercise\nAdd a second chore, such as vacuuming or tidying up, and make sure it is also divided for the whole week.\n
**Extra** The program is not fair, you can be unlucky and wash up all week. How could you make the program more fair?\n" + 3: + story_text_2: "### Exercise\nMake your own version of the dishwasher program. Firstly make a list of your family members.\nThen think of a task that needs to be done, and let the computer decide who has to do the task with the `{at} {random}` command.\n\n**Extra** Don't feel like doing the dishes yourself? Hack the program by removing your name from the list with the `{remove}` `{from}` command.\n" + example_code: "```\npeople {is} mom, dad, Emma, Sophie\n{print} people {at} {random} has to do the dishes\n```\n" + story_text: "Do you always disagree at home about who should wash the dishes or change the litter box today?\nThen you can let the computer choose very fairly. You can program that in this level!\n" + 7: + story_text: "With the `{repeat}` you can repeat pieces of code. You can use this to calculate who will be washing dishes for multiple days!\n### Exercise\nUse the `{repeat}` command to decide on who needs to wash the dishes for an entire week. Each blank needs to be filled with one command or number!\n**Extra** Can you think of other tasks in the house? Adapt the code so it decides on three household chores. Do not forget to print what tasks it concerns!\n" + example_code: "```\npeople = mom, dad, Emma, Sophie\n{repeat} _ _ {print} 'Dishwashing will be done by ' _ _ _\n```\n" + name: Dishes? + description: Use the computer to see who does the dishes + default_save_name: Dishes + elif_command: + description: '{elif}' + name: '{elif}' + levels: + 17: + story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is a combination of the keywords `{else}` and `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n" + example_code: "```\nprizes = ['1 million dollars', 'an apple pie', 'nothing']\nyour_prize = prizes[{random}]\n{print} 'You win ' your_prize\n{if} your_prize == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_prize == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n" + default_save_name: elif + for_command: + levels: + 10: + story_text_2: "### Exercise\nFinish this code by adding `{for} action {in} actions` to line 2.\n" + example_code: "```\nanimals = dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal\n```\n" + example_code_2: "```\nactions = clap your hands, stomp your feet, shout Hurray!\n_\n {repeat} 2 {times}\n {print} 'If youre happy and you know it, ' action\n {sleep} 2\n {print} 'If youre happy and you know it, and you really want to show it'\n {print} 'If youre happy and you know it, ' action\n {sleep} 3\n```\n" + story_text: "## For\nIn this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements.\n`{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces." + 18: + story_text: "Lastly, we'll turn `{for} i {in} {range} 1 to 5` into real Python code, like this:\n" + example_code: "```\n{for} i {in} {range}(1,5):\n {print} (i)\n```\n" + 11: + example_code: "```\n{for} counter {in} {range} 1 {to} 10\n {print} counter\n{print} 'Ready or not. Here I come!'\n```\n" + story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements." + 17: + story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n" + example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'\n```\n" + default_save_name: for + name: '{for}' + description: '{for} command' + fortune: + levels: + 3: + story_text_2: "### Exercise\nNow, Hedy can only answer yes, no or maybe. Can you give Hedy more answer options, like 'definitely' or 'ask again'.\n" + story_text: "In the previous levels you've created your first fortune telling machine, but Hedy couldn't really predict anything, only `{echo}`.\nIn 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:\n" + example_code: "```\n{print} I’m Hedy the fortune teller!\nquestion {is} {ask} What do you want to know?\n{print} This is what you want to know: question\nanswers {is} yes, no, maybe\n{print} My crystal ball says...\n{sleep} 2\n{print} answers {at} {random}\n```\n" + 4: + example_code: "```\n_ Add the quotation marks to this code _\n{print} Im Hedy the fortune teller!\nquestion {is} {ask} What do you want to know?\n{print} This is your question: question\nanswers {is} yes, no, maybe\n{print} My crystal ball says...\n{sleep} 2\n{print} answers {at} {random}\n```\n" + story_text: "### Exercise\nWe have removed all the quotation marks from this example code, can you add them in all the right places?\n\n### Exercise 2\nGo back to the previous level and copy your fortune teller code. Make the code work in this level by adding quotation marks in the right spots.\n" + 6: + example_code: "```\n{print} 'I am Hedy the fortune teller!'\n{print} 'I can predict how many kids youll get when you grow up!'\nage = {ask} 'How old are you?'\nsiblings = {ask} 'How many siblings do you have?'\nlength = {ask} 'How tall are you in centimetres?'\nkids = length / age\nkids = kids - siblings\n{print} 'You will get ...'\n{sleep}\n{print} kids ' kids!'\n```\n" + story_text: "In this level you can use math in your predictions as a fortune teller. This allows you to make up (silly) formulas to calculate the future.\nFor example you could calculate how rich you'll get or how many kids you will have when you grow up.\n\n\n\n### Exercise\nCan you think of your own (silly) fortune telling machine?\n" + 5: + example_code: "```\nfriends {is} Jordan, Lucy, Dave\n{print} 'I can predict if you will win the lottery tomorrow!'\nperson {is} {ask} 'Who are you?'\ngood_answer {is} Hurray! You win!, You will definitely win!, We have a winner!\nbad_answer {is} Bad luck! Try again!, Another person will win, You lose!\n{if} person {in} friends {print} good_answer {at} {random}\n{else} {print} bad_answer {at} {random}\n```\n" + story_text: "### Exercise\nIn the example code you see how to make a fortune teller program that allows you to tip the odds in your favor. This cheating program always tells you that you will win the lottery, but your friends will never win.\n\nUse this to make your own program, be creative! For example you could create a code that predicts that:\n* your favorite sports team will beat all the competitors!\n* your favorite movie will be chosen for movie night!\n* you win tickets to your favorite show!\n* you are the fairest of them all, like Snow White's magic mirror.\nLet your imagination do the work!\n\nYour program has to exist of at least 10 lines of code and need to have at least one `{if}` and `{else}` command.\n" + 7: + story_text: "### Exercise\nFinish this program that tells you if your crush loves you back or not.\n" + example_code: "```\n{print} 'I have a flower with magic petals'\n{print} 'If you pick the petals the flower will tell you if your crush loves you back'\namount = {ask} 'How many petals do you want to pick?'\noptions = they love you, they love you not\n_ _ _ _ options {at} {random}\n```\n" + 10: + story_text: "In this level you'll learn how to program the game MASH (mansion, apartment, shack, house). In this game you can predict for all the players at once, what their future will look like.\n\n### Exercise\nFil in the blanks by using the new command that you've learned this level.\n" + example_code: "```\nhouses = mansion, apartment, shack, house\nloves = nobody, a royal, their neighbour, their true love\npets = dog, cat, elephant\nnames = Jenna, Ryan, Jim\n_\n {print} name ' lives in a ' houses {at} {random}\n {print} name ' will marry ' loves {at} {random}\n {print} name ' will get a ' pets {at} {random} ' as their pet.'\n {sleep}\n```\n" + 12: + story_text: "From level 12 on, you will also have to use quotation marks in lists, before and after each item.\n\n### Exercise\nAdd two predictions to the list" + example_code: "```\nfortunes = 'you will slip on a banana peel', _\n{print} 'I will take a look in my crystal ball for your future.'\n{print} 'I see... I see...'\n{sleep}\n{print} fortunes {at} {random}\n```\n" + 1: + story_text: "Have you ever been to a carnival and had your future predicted by a fortune teller? Or have you ever played with a magic eight ball?\nThen you probably know that they can't really predict your future, but it's still fun to play!\n\nIn the upcoming levels you can learn how to create your own fortune telling machine!\nIn level 1 you can start off easy by letting Hedy introduce herself as a fortune teller and let her `{echo}` the players' answers.\nLike this:\n" + example_code: "```\n_ Hello, I'm Hedy the fortune teller!\n_ Who are you?\n_ Let me take a look in my crystal ball\n_ I see... I see...\n_ Your name is\n```\n" + story_text_2: "### Exercise\nCopy the example code into your input screen and fill in the blanks to make the code work.\n**Extra** Change the code and let the fortune teller not only predict your name, but also your age, your favorite sports team or something else about yourself.\n" + 8: + example_code: "```\n{print} 'I am Hedy the fortune teller!'\n{print} 'You can ask me 3 questions.'\nanswers = yes, no, maybe\n_ _ _\n question = {ask} 'What do you want to know?'\n {print} question\n {sleep}\n {print} 'My crystal ball says... ' answers {at} {random}\n```\n" + story_text: "In the next example you can have your fortune teller ask multiple questions and also print them!\n\n### Exercise\nCan you fill in right command on the blanks?\n" + default_save_name: Fortune Teller + description: Let Hedy predict the future + name: Fortune teller + functions: + name: functions + description: functions + levels: + 13: + example_code: "```\n{define} song {with} place\n {print} 'My Bonnie is over the ' place\n\n{call} song {with} 'ocean'\n{call} song {with} 'sea'\n{call} song {with} 'ocean'\n```\n" + story_text: "Now that you've learned how to use functions, you'll learn how to use a function with an argument.\nAn **argument** is a variable that is used within a function. It is not used outside the function.\n\nFor example in this code we've programmed the first verse of the song 'My Bonnie is over the ocean'.\nIn this example code the argument 'place' is used. Place is a variable that is only used in the function, so an argument.\nTo use 'place' we have placed `{with} place` after `{define} song`.\nWhen the function is called, the computer will replace the argument 'place', with the piece of text after `{call} song {with}`.\n\n### Exercise\nThe next verse of this song goes:\n\n```not_hedy_code\nLast night as I lay on my pillow\nLast night as I lay on my bed\nLast night as I lay on my pillow\nI dreamed that my Bonnie is dead\n```\n\nCan you program this verse in the same way as the example?\n" + 14: + story_text: "In the previous levels you have learned to create functions and use arguments with them. Another great use of a function is to let it calculate something for you.\nYou can give the function a calculation and it will give you the answer of the calculation. This answer is called a **return value**.\n\nFor example, in this code the function calculate_new_price will calculate the new price of any item. It will give you the new price as a return value.\n\n### Exercise\nFinish this code. We have already made the variable new_price for you, you only need to set it.\nYou should finish the line of code by calling the function that calculates the new price.\n" + example_code: "```\n{define} calculate_new_price {with} amount, percentage\n percentage = percentage / 100\n discount_amount = amount * percentage\n {return} amount - discount_amount\n\nold_price = {ask} 'How much is on the price tag?'\ndiscount = {ask} 'What percentage is the discount?'\n\nnew_price = _ calculate_new_price {with} old_price, _\n{print} 'The new price is ' new_price ' dollar'\n```\n" + 18: + story_text: "Let's make functions the Pythons way! To define a function, we no longer use:\n\n`{define} name_function {with} argument_1, argument_2:`\n\nbut we use:\n\n`{def} name_function(argument_1, argument_2):`.\n\n\nIf you don't want to use arguments, you just leave the space between the parantheses empty.\nTo call a function, we don't need the `{call}` command anymore. You just type the name of the function.\n" + example_code: "```\n{def} calculate_score(answer, correct_answer):\n {if} answer == correct_answer:\n score = 1\n {elif} answer == '?':\n score = 0\n {else}:\n score = -1\n {return} score\n\nanswer = {input} ('Where can you find the Eiffel Tower?')\ncorrect_answer = 'Paris'\nscore = calculate_score(answer, correct_answer)\n{print} ('Your score is... ', score)\n```\n" + 12: + story_text: "In this level you'll learn how to use **functions**. A function is a block of code you can easily use multiple times. Using functions helps us organize pieces of code that we can use again and again.\nTo create a function, use `{define}` and give the function a name. Then put all the lines you want in the function in a indented block under the `{define}` line.\nLeave one empty line in your code to make it look nice and neat. Great job! You have created a function!\n\nNow, whenever we need that block of code, we just use {call} with the function's name to call it up! We don't have to type that block of code again.\n\nCheck out this example code of a game of Twister. The function 'turn' contains a block of code that chooses which limb should go where.\n\n### Exercise\nFinish this code by setting the 2 variables chosen_limb and chosen_color.\nThen, choose how many times you want to call the function to give the twister spinner a spin.\n\n### Exercise 2\nImprove your code by adding a variable called 'people'. Use the variable to give all the players their own command in the game.\nFor example: 'Ahmed, right hand on green' or 'Jessica, left foot on yellow'.\n" + example_code: "```\nsides = 'left', 'right'\nlimbs = 'hand', 'foot'\ncolors = 'red', 'blue', 'green', 'yellow'\n\n{define} turn\n chosen_side = sides {at} {random}\n chosen_limb = limbs _\n chosen_color = colors _\n {print} chosen_side ' ' chosen_limb ' on ' chosen_color\n\n{print} 'Lets play a game of Twister!'\n{for} i {in} {range} 1 {to} _\n {call} turn\n {sleep} 2\n```\n" + default_save_name: functions + guess_my_number: + name: Guess my number + description: guess my number + levels: + 14: + example_code: "```\n{print} 'Guess my number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess _ number\n {print} 'Lower!'\n {if} guess _ number\n {print} 'Higher!'\n {if} guess _ number\n {print} 'You win!'\n game = 'over'\n```\n" + story_text: "In this level you can program the game 'Guess my number'\n\n### Exercise\nFill in the correct symbols on the blanks to get the game to work.\n" + default_save_name: guess my number + hangman: + default_save_name: Hangman + name: Hangman + description: Guess the word + levels: + 17: + story_text: "In this adventure we program a game of hangman. First we make some preparations, then we program the game and in the third part we add a drawing with the turtle.\n\n### Exercise\n***Set the variables*** In this game of hangman, Player 1 chooses an answer and Player 2 has to guess the letters in this answer.\nTo let the computer know all the letters in the word, we will turn the answer into a list of letters. We also do this with the guesses Player 2 makes.\nWe will start the game with 2 empty lists. We have made an empty list for the variable answer for you. Now make an empty list for guessed_letters as well.\nThen we fill in how many mistakes were made. At the start of the game, this should be 0.\nThe variable `amount_letters` tells us how many letters are in the answer. Ask Player 1 to tell us how many letters their word has.\nLastly we tell the computer if the game is over. We use the variable `game_over` and set it to `False`.\n\n***Choosing the answer*** We want Player 1 to be able to choose the answer. We'll ask them, as many times as necessary, what the next letter is.\nThen we add that letter to the answer. Lastly, we add an empty _ to the list of guessed letters, so we get as many _s as there are letters in the answer.\n\n***Player 2's turn***\nTell Player 2 its their turn. Then tell Player 2 how many letters there are in the answer. Finally, print the list of `guessed_letters`.\n\n***Go to the next tab*** Now that all the starting variables are set, we can start programming the game itself. Check out the next tab to learn how!\n" + example_code: "```\nprint 'Hangman!'\n\n# Set the variables\nanswer = []\nguessed_letters = _\nmistakes_made = _\namount_letters = {ask} _\n_ = 'False'\n\n# Choosing the answer\n{for} _\n letter = {ask} 'Player 1, what is letter ' i '?'\n _\n {add} '_' {to} _\n\n# Player 2 turn\nprint _\nprint _\nprint guessed_letters\n```\n" + hangman_2: + default_save_name: Hangman_2 + name: Hangman 2 + description: Hangman 2 + levels: + 17: + story_text: "Now it's time to program the hangman game.\n\n### Exercise\n\n***Paste your code*** Copy your code from the previous tab and paste the code in the programming field.\n\n***The game*** This games continues playing until Player 2 is game over. Fill in the while command accordingly. Now, Player 2 is allowed to guess a letter, so ask Player 2 to guess a letter.\nWe need to check if their answer is correct, so check if their `guess` is (somewhere) in the (list) `answer`. Then we let the computer figure out which of the letter(s) is the guess. We have already programmed that part for you.\nNext we want to compliment the player for finding a correct letter and we want to print the list `guessed_letters`, so the player can see their progress.\n\nThe next part we're going to program is what happens when the player has guessed all of the letters. So if their list of `guessed_letters` is the same as our list `answer`.\nIf the lists are the same, congratulate Player 2 with their victory and set the variable `game_over` to `True`.\n\nNext we'll program what happens when Player 2 guesses wrong (so the `{else}` command). First, tell the player that their guess was wrong. Then increase the `mistakes_made` variable by 1.\n\nFor the last part we'll program what happens when Player 2 has made 10 mistakes. We'll print that Player 1 has won the game. Then we'll print the correct answer. And finally, we'll set our `game_over` variable to `True`, so the game stops.\n\n***Go to the next tab*** Amazing work! Your game is playable, but wouldn't it be fun if the hangman was actually drawn when Player 2 makes a mistake..?\n" + example_code: "```\n# Paste your code here\n\n# The game\n{while} game_over _\n guess = _\n {if} _\n {for} i {in} {range} 1 {to} amount_letters:\n if answer[i] == guess:\n guessed_letters[i] = guess\n {print} _\n {if} guessed_letters == _:\n {print} _\n game_over = _\n {else}:\n {print} _\n mistakes_made _\n {if} _ == 10:\n {print} _\n {print} _\n _\n```\n" + hangman_3: + name: Hangman 3 + default_save_name: Hangman_3 + levels: + 17: + example_code: "```\n# Create a function that draws the hangman\n{define} draw_hangman {with} step:\n {if} step == 1:\n {color} white\n {forward} -100\n {turn} 90\n {forward} -50\n {color} black\n {forward} 100\n {forward} -50\n\n {if} step == 2:\n _\n# Paste your hangman game here\n\n```\n" + story_text: "In a game of hangman the mistakes are shown by drawing a part of the hangman each time a mistake has been made.\nWe now add those drawings with our turtle!\n\n### Exercise\n***Create a function that draws the hangman*** Create a function that draws the hangman in 10 steps. We have already made step 1 for you.\n\n***Test the function*** Test the function by calling the function with 10. If you are happy with the function, remove the line that calls the function for now. We will call the function when the player makes a mistake.\n\n***Paste your hangman game under your function*** Go back to the previous tab and copy your hangman game. Paste the game underneath your function.\n\n***Call the function when the player makes a mistake*** Under the line `mistakes_made = mistakes_made + 1` we will call the function. We want the turtle to take the same amount of steps as the player has made mistakes, so we call the function with `mistakes_made` as argument.\n\n***Enjoy your game!***\n
\n The hangman could look like this \n
\n" + description: Hangman 3 + harry_potter: + levels: + 10: + story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n" + example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n" + default_save_name: Harry Potter + name: Harry Potter + description: Harry Potter adventures + haunted: + description: Escape from the haunted house + levels: + 1: + story_text: "In this adventure you are working towards making a game in which you have to escape from a haunted house by picking the correct door.\nIf you pick the right door you'll survive, but if not a terrible monster might...\n\nIn level 1 we start our haunted house game by making up a scary story and ask the player what monster they'll see in the haunted house.\n" + example_code: "```\n{print} How did I get here?\n{print} I remember my friend telling me to go into the old mansion...\n{print} and suddenly everything went black.\n{print} But how did I end up on the floor...?\n{print} My head hurts like Ive been hit by a baseball bat!\n{print} What's that sound?\n{print} Oh no! I feel like Im not alone in this house!\n{print} I need to get out of here!\n{print} There are 3 doors in front of me..\n{ask} Which door should i pick?\n{echo} I choose door\n{print} ...?\n```\n" + story_text_2: "### Exercise\nCopy the example code to your input screen by clicking the yellow button.\nNow finish the story by adding at least 5 lines of code.\nRemember to start each line of codes with a `{print}` command.\n" + 5: + example_code: "```\n{print} 'Escape from the haunted house!'\n{print} 'There are 3 doors in front of you...'\ndoors {is} 1, 2, 3\nmonsters {is} werewolf, mummy, vampire, zombie\nchosen_door {is} {ask} 'Which door do you choose?'\n{print} 'You chose door...' chosen_door\n{sleep}\ncorrect_door {is} doors {at} {random}\n_ _ _ _ {print} 'Great! Youve escaped!'\n{else} {print} 'Oh no! You are being eaten by a...' monsters {at} {random}\n```\n" + story_text: "Up until this level the haunted house game always asked the player to choose a door, but as you might have noticed, they didn't really have to answer correctly.\nIf the player filled in a completely random answer, the game would still work and the player might even win (despite not picking a door).\nIn this level you can only win the game by picking the same door Hedy picked randomly.\n\n### Exercise\nCan you find the 4 missing words to complete the code?\n" + 11: + example_code: "```\n{print} 'Escape from the Haunted House!'\nmonsters = zombie, vampire, giant spider\n_\n {print} 'Room ' i\n monster = monsters {at} {random}\n```\n" + story_text: "In this level we've changed the `{for}` command so we can tell the player where they are. \n\n### Exercise 1\nFinish the program so the player knows which room they are in.\n\n### Exercise 2\nMake the program into an adventure by following these steps:\n\n1. Make a list of choices (like: fight or flight)\n2. Make sure the player can choose an option with `{ask}`\n3. Is answer correct? Then they may proceed to the next monster. Do they give a wrong answer? Let the player know with a `{print}`. \n\n**Extra** If you make a wrong choice, a monster is still shown! How could you change that?\n" + 16: + example_code: "```\nnumbers = [1, 2, 3]\ni = numbers[{random}]\nhint = ['growling', 'a cackling laugh', 'fluttering batwings']\nmonsters = ['zombie', 'witch', 'vampire']\nbad_fate = ['Your brain is eaten', 'You are forever cursed', 'You are bitten']\ngood_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']\nweapons = ['ham', 'lighter', 'garlic']\n{print} 'You are standing in front of an old mansion'\n{print} 'Something is not right here'\n{print} 'You hear ' _\n{print} 'You are going to explore it'\n{print} 'You enter the kitchen and see a lighter, a raw ham and a garlic.'\nyour_weapon = {ask} 'What do you bring with you?'\n{print} 'With your ' your_weapon ' you enter the living room'\n{print} 'There you find a ' _\nneeded_weapon = _\n{if} your_weapon == needed_weapon\n {print} 'You use your ' your_weapon\n {print} _\n {print} 'YOU WIN!'\n{else}\n {print} 'You have chosen the wrong weapon...'\n {print} _\n {print} 'GAME OVER'\n```\n" + story_text: "### Exercise\nThis haunted house game uses the connection between the lists you can use in this level.\nFor example: all the properties that belong to the zombie are first in all the lists, witch second and vampire third.\nCheck out the code and fill in `weapons[i]`, `monsters[i]` , `bad_fate[i]`, `good_fate[i]`, `hint[i]` on the correct blanks to get the code to work!\n" + 9: + story_text: "In this level you can use nesting, which allows you to make the haunted house even more interactive!\n\n### Exercise\nNow it's very hard to win this game, can you make it easier to win?\nChange your code so it only has one wrong door and two correct doors instead of one correct door and two wrong ones? \nTip: This means changing the variable correct_door into wrong_door, and switching the `{if}` and `{else}` code.\nAnd of course you may also change the story and make it your own. Change the monsters or make it a happy game show where you get a gift!\n" + example_code: "```\n{print} 'Escape from the Haunted House!'\nplayer = alive\ndoors = 1, 2, 3\nmonsters = zombie, vampire, giant spider\n{repeat} 3 {times}\n {if} player {is} alive\n correct_door {is} doors {at} {random}\n {print} 'There are 3 doors in front of you...'\n chosen_door = {ask} 'Which door do you choose?'\n {if} chosen_door {is} correct_door\n {print} 'No monsters here!'\n {else}\n {print} 'You are eaten by a ' monsters {at} {random}\n player = dead\n {else}\n {print} 'GAME OVER'\n{if} player {is} alive\n {print} 'Great! You survived!'\n```\n" + 14: + example_code: "```\n{print} 'Escape from the haunted house'\nlives = 3\ndoors = 1, 2, 3\nmonsters = 'the wicked witch', 'a zombie', 'a sleeping 3 headed dog'\n{for} i {in} {range} 1 {to} 10\n {if} lives _\n good_door = doors {at} {random}\n monster = monsters {at} {random}\n chosen_door = {ask} 'Which door do you choose?'\n {if} good_door == chosen_door\n {print} 'You have chosen the correct door'\n {else}\n {print} 'You see...' monster\n {if} monster == 'a sleeping 3 headed dog'\n {print} 'Pffieuw.... Its asleep'\n {else}\n {print} 'You lose one life'\n lives = _\n {else}\n {print} 'GAME OVER'\n```\n" + story_text: "### Exercise\nIn this level you can use the `<` and `>` symbol to introduce lives to your game.\nMake sure the player loses a life when they come across the wrong monster and that the game stops if you have no lives left.\n" + 3: + example_code: "```\n_ Escape from the haunted house!\n_ There are 3 doors in front of you...\n_ _ _ Which door do you choose?\n_ You picked door ... choice\nmonsters _ a zombie, a vampire, NOTHING YOUVE ESCAPED\n_ You see...\n{sleep}\n_ _ _ _\n```\n" + story_text: "In the previous levels you've made an introduction to your haunted house game, but as you might have noticed the story would always have a dreadful end.\nIn this level you can make your story more interactive by changing the outcome of the game; sometimes you'll get eaten, sometimes you'll escape!\nLet Hedy decide randomly!\n\n### Exercise\nCopy the example codes and fill in the blanks to make it work!\n\n**Extra** This story is pretty straight forward, maybe you can spook it up a bit by adding a more exciting story.\nAlso you have very limited outcomes right now, there are only 3 options of what's behind the doors. Maybe you can think of more monsters to add to the list!\n" + 2: + 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...\n{print} 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" + example_code: "```\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...\n{print} 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" + story_text: "In this haunted house you can choose your monsters with emojis. Of course you could also use words.\n" + 4: + example_code: "```\n_ Add quotation marks to this code _\n{print} Escape from the haunted house!\n{print} There are 3 doors in front of you...\nchoice {is} {ask} Which door do you choose?\n{print} You picked door ... choice\nmonsters {is} a zombie, a vampire, NOTHING YOUVE ESCAPED\n{print} You see...\n{sleep}\n{print} monsters {at} {random}\n ```\n" + story_text: "In this level you learn how to use quotation marks in your games.\n\n### Exercise\nCan you make your Haunted House level 4 proof?\n\n### Exercise 2\nGo back to the previous level and copy your haunted house code. Make the code work in this level by adding quotation marks in the right spots.\n" + default_save_name: Haunted House + name: Haunted House + hotel: + description: hotel + default_save_name: hotel + name: hotel + levels: + 13: + example_code: "```\n{define} welcome_message {with} title, last_name, country, room_number\n {print} 'Welcome to Hotel Hedy, ' title ' ' last_name\n nice_trip {is} {ask} 'Did you have a nice trip from, ' country '?'\n {if} nice_trip {is} 'yes'\n {print} 'Lovely!'\n {else}\n {print} 'Sorry to hear that.'\n {print} 'Hopefully you can take a nice rest in you room.'\n {print} 'Your room number is ' room_number\n\n{print} 'Hello. Please fill in your information to check in.'\ntitle = {ask} 'What is your title (mr, mrs, ms, dr, etc.)?'\nname = {ask} 'What is you last name?'\nhomecountry = {ask} 'What country do you come from?'\n\n{call} welcome_message {with} title, name, homecountry, 105\n```\n\ntitle = {ask} 'What is your title (mr, mrs, ms, dr, etc.)?'\nname = {ask} 'What is you last name?'\nhomecountry = {ask} 'What country do you come from?'\n\n{call} welcome_message {with} title, name, homecountry, 105\n" + story_text: "In the previous adventure you have learned how to use an argument in a function, and you've learned how to combine it with an {ask}.\nYou might have wondered why you would use functions, because the functions in the example were only one line of code.\nNow we will show you what a bigger function looks like and we will use multiple agruments now as well. You'll see how much better it is to use a function once the function gets bigger.\nHere is an example of a function with arguments combined with {ask} commands.\n" + if_command: + name: '{if} & {else}' + levels: + 9: + story_text: "In this level you can also put an `{if}` command inside another `{if}` command.\n" + example_code: "```\ncontinue = {ask} 'Do you want to continue?'\n{if} 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'\n{else}\n {print} 'You do not want to continue'\n```\n" + 8: + example_code: "```\nname = {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" + 5: + story_text: "## If... else....\nIn level 5 there is something new, the `{if}`! With the `{if}` you can choose between two different options.\nThis code prints nice if you enter Hedy as a name, and boo! if you enter something else.\n`{ask}` and `{print}` still work like they did in level 4.\n" + example_code_3: "```\nanswer {is} {ask} '2 + 2 = ?'\n_ _ _ 4 _ 'Great job!'\n_ _ 'No 2 + 2 = 4'\n```\n" + story_text_2: "Sometimes code with an `{if}` gets really long and does not fit on the line well.
You may also divide the code over two lines, starting the second line at the `{else}` like this:\n" + example_code: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'\n```\n" + story_text_3: "### Exercise\nTry to create your own code with `{if}` and `{else}`. You can use the example code if you want.\n" + example_code_2: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'\n```\n" + default_save_name: if_command + description: Introducing the {if} command + in_command: + description: Introducing the {in} command + name: '{in}' + default_save_name: in_command + levels: + 5: + story_text: "## Lists\nWhen we want to check if something is in a list, we can now use the `{in}` command.\nThis code prints pretty! if you choose green or yellow, and meh otherwise.\n" + example_code_2: "```\nanimals {is} dog, cow, sheep\nanswer {is} {ask} 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n" + example_code: "```\npretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'\n```\n" + story_text_2: "### Exercise\nFinish the example code by filling in the blanks with commands that you've learned.\nWhen you've finished the code, try to create a code of your own and use a question that you've thought of yourself.\n" + is_command: + default_save_name: is_command + description: introducing {is} command + name: '{is}' + levels: + 2: + story_text: "## Variables\nYou can name a word with `{is}`. This is called a **variable**. In this example we made a variable called name and a variable called age. You can use the word name anywhere in your code and it will be replaced by Hedy, like this:\n" + example_code_2: "```\nfavorite_animal {is} _\n{print} I like favorite_animal\n```\n" + story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animal`. In line 1 the variable is set, and in line 2 we used the variable in a `{print}` command.\nFirstly, finish our example by filling in your favorite animal on the blank. 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: "```\nname {is} Hedy\nage {is} 15\n{print} name is age years old\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" + 14: + story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" + example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\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" + example_code: "```\nage = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'\n```\n```\nage = {ask} 'How old are you?'\n{if} age < 12\n {print} 'You are younger than me!'\n{else}\n {print} 'You are older than me!'\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" + language: + name: Language + default_save_name: Language + description: Practice words in a foreign language + levels: + 5: + story_text: "Make your own program to practice your vocabulary in a new language.\n\n### Exercise\nMake the code longer by adding at least 3 more words for the player to learn.\n**Extra** Of course, you can choose to use a different language than French. You can change to code to any language you'd like to learn.\n" + example_code: "```\n{print} 'Learn French!'\ncat {is} {ask} '🐱'\n{if} cat {is} chat {print} 'Terrific!'\n{else} {print} 'No, cat is chat'\nfrog {is} {ask} '🐸'\n{if} frog {is} grenouille {print} 'Super!'\n{else} {print} 'No, frog is grenouille'\n```\n" + 16: + story_text: "### Exercise\nTake a look at the example code. This is a program to practise French vocabulary. Now make your own program to practice your vocabulary in a new language.\nIf you don't know any other languages, you can use Google translate or you can use emojis and your native language.\n" + example_code: "```\nfrench_words = ['bonjour', 'ordinateur', 'pomme de terre']\ntranslation = ['hello', 'computer', 'potato']\nscore = 0\n{for} i {in} {range} 1 {to} 3\n answer = {ask} 'What does ' french_words[i] ' mean?'\n correct = translation[i]\n {if} answer == correct\n {print} 'Correct!'\n score = score + 1\n {else}\n {print} 'Wrong, ' french_words[i] ' means ' translation[i]\n{print} 'You gave ' score ' correct answers.'\n```\n" + maths: + name: maths + levels: + 6: + story_text: "In this level you learn something new: you can now also calculate.\n\nThe plus is easy, you write it like with math: `5 + 5` for example. The minus also works fine, it is `5 - 5`.\n\nThe times is a bit different, because there is no times symbol on your keyboard. Just search, there really isn't!\nThat is why we multiply with the asterisk above 8: `5 * 5`. Read that as \"5 times 5\" that helps you remember it best.\n" + example_code: "```\n{print} '5 plus 5 is ' 5 + 5\n{print} '5 minus 5 is ' 5 - 5\n{print} '5 times 5 is ' 5 * 5\n{print} '5 divided by 5 is ' 5 / 5\n```\n" + 12: + story_text_2: "**Maths with words**\nIn this level you can also do addition with words like this:" + example_code_2: "```\na = 'Hello '\nb = 'world!'\n{print} a + b\n```\n" + story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers." + example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n" + default_save_name: maths + description: Introducing maths + music: + default_save_name: music + levels: + 3: + example_code: "```\nnotes {is} A4, B4, C4\n{play} notes {at} {random}\n{play} notes {at} {random}\n{play} notes {at} {random}\n```\n" + story_text: "Create a random melody!\n\n### Exercise\nThe example code creates a random melody, but it's very short and not many notes are used.\nAdd more notes to the list and create a longer melody by copying the last line a couple more times.\n" + 2: + story_text_2: As you can see, you can also use the `{sleep}` command to add a little pause in the song. + example_code_2: "```\n{print} Twinkle Twinkle Little Star\n{play} C\n{play} C\n{play} G\n{play} G\n{play} A\n{play} A\n{play} G\n{sleep} 1\n{play} F\n{play} F\n```\n" + example_code: "```\n{print} Old Mac Donald had a farm\n{play} C5\n{play} C5\n{play} C5\n{play} G4\n{play} A4\n{play} A4\n{play} G4\n```\n" + story_text: "### Exercise\nFinish the songs! We have started the codes for some melodies.\n" + 1: + example_code: "```\n{play} C4\n{play} D4\n{play} E4\n{play} F4\n{play} G4\n{play} A4\n{play} B4\n{play} C5\n```" + story_text: "In this level you'll learn how to use the `{play}` command to play a tune!\n\nType `{play}` followed by the note you want to play. The scale goes C-D-E-F-G-A-B.\nAs you can see there are 7 different letters, but we can play more than just 7 notes.\nType a number between 1 and 10 behind the letter to choose the scale, for example after B4 comes C5.\nC1 is the lowest note you can play, C10 is the highest.\n\n### Exercise\nTry out the example code and then play around with it! Can you create your own melody?\nIn the next level you'll learn how to play some existing songs." + 6: + example_code: "```\nnumber = {ask} 'Say a starting number between 1 and 67'\n{print} number\n{play} number\nnumber = number + 1\n{print} number\n{play} number\nnumber = number + 1\n{print} number\n{play} number\n```\n" + story_text: "Instead of playing notes, you can also play numbers now. Simply type `{play} 1` for the lowest note, `{play} 70` for the highest note, or anything in between.\n\n### Exercise\nThis calls for musical maths! Try out the example code a couple of times with different starting numbers.\nThen, see if you can compose a song using the numbers.\n" + 4: + example_code: "```\n{print} 'Mary had a little lamb'\n{play} E\n{play} D\n{play} C\n{play} D\n{play} E\n{play} E\n{play} E\n{clear}\n{print} 'Little lamb, little lamb'\n{play} D\n{play} D\n{play} D\n{play} E\n{play} E\n{play} E\n{clear}\n{print} 'Mary had a little lamb'\n{play} E\n```\n" + story_text: "Use the `{clear}` command to create a karaoke machine!\n\n### Exercise\nFinish the karaoke version of 'Mary had a little lamb'.\nThen, create a karaoke version of any song you'd like!\n" + 5: + example_code: "```\nanswer {is} {ask} 'What is the capital of Zimbabwe?'\n{if} answer {is} Harare {play} C6\n_\n```\n" + story_text: "You don't always have to use the `{play}` command to play a whole song, sometimes you just want to play one note.\nFor example, if you want to make a quiz, you can play a happy high note if the answer is right and a sad low note if the answer is wrong.\n\n### Exercise\nFinish the first question by adding a line of code that plays a C3 note if the wrong answer is given.\nThen think of 3 more questions to add to this quiz.\n" + 7: + example_code: "```\n{print} 'Twinkle Twinkle Little Star'\n{repeat} 2 {times} {play} C4\n{repeat} 2 {times} {play} G4\n_\n```\n" + story_text: "Using the `{repeat}` command can make your codes for melodies a lot shorter!\n\n### Exercise\nFinish the code for Twinkle Twinkle Little Star by using the `{repeat}`command.\nThen go back to the songs you've made in the previous levels. Can you shorten those codes too?\n" + 8: + story_text: "Now that we can use the `{repeat}` command for multiple lines, we can make songs even more easily!\n\n### Exercise\nFinish the song of Brother John (Frère Jacques). Don't forget to use `{repeat}`!\n" + example_code: "```\n{print} 'Brother John'\n{repeat} 2 {times}\n {play} C\n {play} D\n {play} E\n {play} C\n{repeat} 2 {times}\n {play} E\n {play} F\n {play} G\n {sleep} 1\n```\n" + 9: + story_text: "From this level on you can - among other things - use a {repeat} command inside a {repeat} command.\nThat makes songs like 'Happy birthday' even shorter!\n\n### Exercise\nFinish the song!\n" + example_code: "```\nfirst_time = yes\n{repeat} 2 {times}\n {repeat} 2 {times}\n {play} C\n {play} D\n {play} C\n {if} first_time {is} yes\n {play} F\n {play} E\n first_time {is} no\n {else}\n _\n```\n" + 17: + story_text: "You can use the {elif} to create different options.\n\n### Exercise\nFirstly, add colons to get the code to work.\nThen finish this code by adding at least 2 other songs for other moods. For example a happy song and an angry song.\n" + example_code: "```\n{define} scary_song\n {for} i {in} {range} 1 {to} 3\n {play} G\n {play} E\n {sleep} 2\n {for} i {in} {range} 1 {to} 3\n {play} F\n {play} D\n\nmood = {ask} 'Which emotion are you feeling?'\n{if} mood {is} 'fear'\n {call} scary_song\n{elif} _\n```\n" + 18: + story_text: "### Exercise\nEven in this last level of Hedy we can make some music! Be careful of all the syntax that is needed now.\nTake a good look at how the functions are defined and called upon in the example code.\nFinish the song!\n" + example_code: "```\n{def} line_1():\n {for} i {in} {range}(1, 5):\n {play} A\n {play} D\n {play} F\n {play} A\n\n{def} line_2():\n {for} i {in} {range}(1, 5):\n {play} G\n {play} C\n {play} E\n {play} G\n\n{def} line_3():\n_\n\n{print} ('The drunken sailor')\n{print} ('What shall we do with the drunken sailor?')\nline_1()\nline_2()\nline_3()\n{print} ('Early in the morning')\n```\n" + 13: + example_code: "```\n{print} 'Yankee Doodle'\n{define} _ {with} note_1, note_2, note_3\n {play} C4\n {play} C4\n {play} D4\n {play} E4\n {play} _\n {play} _\n {play} _\n\n{call} line_1 {with} 29, 31, 30\n{call} line_1 {with} 29, 28, 0\n{call} line_1 {with} 32, 31, 30\n\n{play} C4\n{play} B3\n{play} G3\n{play} A3\n{play} B3\n{play} C4\n{play} C4\n```\n" + story_text: "You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.\nOne example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, but each time they are followed by a different couple of notes.\n\n### Exercise\nCan you finish the song of Yankee Doodle?\nCan you think of another song to program this way?\n" + 14: + story_text: "You can program music for fun, but you can also use the musical notes to make something useful like a fire alarm!\n\n### Exercise\nMake sure the fire alarm rings when there is a fire!\n" + example_code: "```\n{define} fire_alarm\n {print} 'FIRE!'\n note = 40\n {for} i {in} {range} 1 {to} 100\n {if} note _ 50\n note = note + 5\n {play} _\n {else}\n note = 40\n\nfire = {ask} 'Is there a fire?'\n{if} fire _ 'yes'\n {call} fire_alarm\n```\n" + 15: + example_code: "```\n{define} song\n {play} _\n\nyes_or_no = {ask} 'Do you want to hear my never-ending song?'\n{while} yes_or_no = 'yes'\n {call} song\n {print} '🥳'\n```\n" + story_text: "**Warning** This adventure can become extremely annoying!\nWe can also use the {while} command to repeat a song forever.\n\n### Exercise\nFinish the never-ending song.\n" + 16: + story_text: "Upgrade your Old MacDonald code!\n\n### Exercise\nTake your code from the 'Sing a Song' adventure and add musical notes to it!\nYou can make a function for each line in the song and call that function after the line is printed.\nWe defined the first line for you and called it in the code. Can you finish the whole song?\n" + example_code: "```\n{define} line_1\n {for} i {in} {range} 1 {to} 3\n {play} G\n {play} D\n {for} i {in} {range} 1 {to} 2\n {play} E\n {play} D\n\nanimals = ['pig', 'dog', 'cow']\nsounds = ['oink', 'woof', 'moo']\nfor i in range 1 to 3\n animal = animals[i]\n sound = sounds[i]\n print 'Old MacDonald had a farm'\n call line_1\n print 'E I E I O!'\n _\n```\n" + 12: + story_text: "Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.\n\n### Exercise\nFinish the song of Twinkle Twinkle Little Star.\nThen look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?\n" + example_code: "```\n{define} first_line\n {play} C\n {play} C\n {play} G\n {play} G\n {play} A\n {play} A\n {play} G\n {sleep}\n\n{define} second_line\n {play} F\n {play} F\n {play} E\n {play} E\n {play} D\n {play} D\n {play} C\n {sleep}\n\n{define} third_line\n {play} G\n {play} G\n {play} F\n {play} F\n {play} E\n {play} E\n {play} D\n {sleep}\n\n{call} _\n{call} _\n{call} _\n{call} _\n{call} _\n{call} _\n```\n" + name: music + description: Play a tune! + parrot: + levels: + 1: + example_code: "```\n{print} Im Hedy the parrot\n{ask} whats your name?\n{echo}\n{echo}\n```\n" + story_text: "Create your own online pet parrot that will copy you!\n" + story_text_2: "### Exercise\nCopy the example code to your input screen by clicking on the yellow button.\nMake the parrot ask a different question. Fill in the blanks in the example!\n**Extra** You can also let the parrot ask multiple questions. Type in some more lines of code beneath your own code.\n" + example_code_2: "```\n{print} Im Hedy the parrot\n{ask} _\n{echo}\n{echo}\n" + 2: + story_text_2: "### Exercise\nFirstly, finish line 2 with an `{is}` and an `{ask}` command.\nThen fill in a `{sleep}` command on line 4 and 6 to let the parrot stay quiet for a little bit.\n\n**Extra** Can you make the parrot ask for more then only your name by adding more lines of code?\n" + story_text: "In the previous level you've made a parrot that will repeat after you. In this level we'll make the parrot interactive using a variable and `{ask}` command.\nWe will also make the parrot more life-like by adding `{sleep}` commands after something is said.\n" + example_code: "```\n{print} Im Hedy the parrot\nname _ _ what is your name?\n{print} name\n_\n{print} squawk\n_\n{print} name\n```\n" + 3: + story_text: "Teach your parrot a new word with `{add}`.\n### Exercise\nCan you add the `{add} {to_list}` command to get the code to work?\n" + example_code: "```\nwords {is} squawk, Hedy\n{print} Train your parrot!\nnew_word {is} {ask} Which word do you want to teach them?\n_ new_word _ words\n{print} 🧒 Say new_word, Hedy!\n{print} 🦜 words {at} {random}\n```\n" + 4: + story_text: "In this level we have to use quotation marks with the commands `{ask}` and `{print}`.\n### Exercise\nComplete the code by filling in quotation marks on the blanks.\n" + example_code: "```\nwords {is} squawk, Hedy\n{print} _ Train your parrot! _\nnew_word {is} {ask} _ Which word do you want to teach them? _\n{add} new_word {to_list} words\n{print} _ 🧒 Say _ new_word _, Hedy!_\n{print} _ 🦜 _ words {at} {random}\n```\n" + 5: + story_text: "Reward your parrot if it says the correct word!\n\n### Exercise\nFinish the code by filling in the 4 missing commands.\n" + example_code: "```\nwords {is} squawk, Hedy\n{print} 'Train your parrot!'\nnew_word {is} {ask} 'Which word do you want to teach them?'\n{add} new_word {to_list} words\nsaid_word {is} words {at} {random}\n{print} '🧒 Say ' new_word ', Hedy!'\n{print} '🦜 ' said_word\n_ said_word {is} new_word _ '🧒 Great job, Hedy! 🍪'\n_ _ '🧒 No, Hedy! Say ' new_word\n```\n" + name: Parrot + description: Create your own online pet parrot that will copy you! + default_save_name: Parrot + pressit: + name: Key presses + default_save_name: Pressed + levels: + 7: + example_code: "```\n{if} x {is} {pressed} {forward} 15 {else} {turn} 90\n```\n" + story_text: "Now that you have learned about `{repeat}`, we can press keys multiple times.\nYou can use it to make the turtle walk forward and turn.\n\n### Exercise\nThe code you have seen in level 5 only checks the key once. Copy the example code and add a `{repeat}` to it, so that you can press the keys many times.\nUse this code to draw something nice.\n" + 9: + example_code: "```\npoints = 0\nletters = a, b, c, d, e\n{repeat} 10 {times}\n letter = _ _ _\n {print} 'Press the letter ' letter\n {if} letter {is} {pressed}\n _\n _\n _\n```\n" + story_text: "Now that you know how to combine statements, you can create a touch type tool with `{pressed}`.\n\n### Exercise\nFinish the code. Each time a random letter should be chosen, which you have to press. You get a point for a correct press, and and two points deduction for a wrong press.\n**Extra** Clear the screen after each letter, and show the user how many points they have scored.\n" + 5: + story_text_2: "You can also link turtle commands to keys.\n\n### Exercise\nCopy the lines a few times so you can create a larger drawing.\n" + story_text: "In this level there is another new keyword: `{pressed}`!\nWith `{pressed}` you can use keys on your keyboard to control what lines are used.\n\n### Exercise\nLook at the example and add one more line of code that reacts to a key press.\n" + example_code: "```\n{print} 'Do you want a good (g) or bad (b) ending?'\n{if} g {is} {pressed} {print} 'They lived happily ever after ❤'\n{else} {print} 'The prince was eaten by a hippopotamus 😭'\n```\n" + example_code_2: "```\n{if} y {is} {pressed} {forward} 15\n{else} {turn} 90\n```\n" + description: Try linking a keyboard key to a command! + piggybank: + levels: + 12: + example_code: "```\n{print} 'The digital piggy bank'\nwish = {ask} 'What would you like to buy?'\nprice = {ask} 'How much does that cost?'\nsaved = {ask} 'How much money have you saved already?'\nallowance = {ask} 'How much pocket money do you get per week?'\nto_save = price - saved\nweeks = to_save / allowance\n{print} 'You can buy a ' _ ' in ' _ ' weeks.'\n```\n" + story_text: "In this adventure you learn how to make a digital piggy bank.\n\n### Exercise\nFinish the code to calculate how much money you have and how long you need to save up to buy what you want!\n**Extra** Maybe you have already saved some money? Deduct that from the amount you will have to save up.\n" + 14: + example_code: "```\n_ calculate_budget {with} wish, money, allowance\n to_save = wish - money\n weeks = to_save / allowance\n {if} wish _ money\n {print} 'You need to save up some more!'\n {print} 'Youll need ' weeks ' more weeks.'\n {else}\n {print} 'Great! You have enough'\n {print} 'Lets go shopping!'\n\nmoney = {ask} 'How much money have you saved?'\nwish = {ask} 'How much money do you need?'\nallowance = {ask} 'How much pocket money do you get each week?'\n\n{call} _\n```\n" + story_text: "### Exercise\nIn this level you can let Hedy tell you if you have saved up enough money!\nFinish this code by filling in the blanks!\n" + description: Count your pocketmoney! + name: Piggy Bank + default_save_name: Piggy Bank + print_command: + description: Introduction print command + levels: + 1: + example_code_2: "```\n_ Hello!\n```\n" + example_code: "```\n{print} Hi there, programmer!\n{print} Welcome to Hedy!\n```\n" + story_text: "## The print command\nYou can print text to the screen using the `{print}` command.\n" + story_text_2: "### Exercise\nIn Hedy you will find exercises in every adventure. An exercise allows you to practise the new commands and concepts, and lets you give your own twist to the example codes.\nIn this exercise you will see a pink blank space. You have to fill something in the place of the blank space before the code can be run.\n\nFill in the `{print}` command in the blank space and then add five more lines of code. Each line has to start with a `{print}` command.\nHave fun!\n" + 18: + example_code: "```\n{print}('Hello!')\n{for} i {in} {range}(1, 10):\n {print}('This is line ', i)\n```\n" + example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n```\nname = 'Hedy'\n{print}('My name is ', name)\n```\n" + story_text_2: If you want to print more than one item, you need to separate them by commas. + story_text: "We arrived at real Python code! That means we need to use parentheses with `{print}` and `{range}` from now on.\nIt also means you can use Hedy code from this level in any Python environment as long as you use the English commands. If you haven't until now, you can switch the toggle in the commands menu to do so." + name: '{print}' + default_save_name: print + quotation_marks: + default_save_name: quotation_marks + description: Introduction quotation marks + levels: + 4: + example_code: "```\n{print} 'You need to use quotation marks from now on!'\nanswer {is} {ask} 'What do we need to use from now on?'\n{print} 'We need to use ' answer\n```\n" + story_text: "## 'Quotation marks'\nIn level 4 `{ask}` and `{print}` have changed.\nYou must put text that you want to print between quotation marks.\nThis is useful, because now you can print all the words you want. Also the words you used to store something with `{is}`.\nMost programming languages also use quotation marks when printing, so we are also getting a step closer to real programming!\n" + story_text_2: "## Contractions\nImportant! Mind that now that we're using quotation marks, Hedy will get confused when you use the apostrophe for contractions like I'm or What's.\nMake sure to remove those apostrophes and change the spelling to I am or What is.\nCheck out the example code to see the wrong way of using apostrophes.\n" + example_code_2: "```\n_ This is the wrong way of using apostrophes _\n{print} 'I'm babysitting my sister's kids'\n{print} 'What's more fun than that?'\n```\n" + 12: + example_code: "```\nname = 'Hedy the Robot'\n{print} 'Hello ' name\n```\n" + story_text: "**All texts need to be in quotation marks**\nFor this level on you will also have to use quotation marks when storing a text with `=`:\n" + example_code_2: "```\nsuperheroes = 'Spiderman', 'Batman', 'Black Widow'\n{print} superheroes {at} {random}\n```\n" + story_text_3: "**All text after `{if}` comparisons need quotation marks too**\n" + story_text_4: "**Numbers don't need quotation marks**\nFor numbers, you do not use quotation marks in the `=`:\n" + example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n" + example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'\n```\n" + story_text_2: "**All items in lists need quotation marks too**\nLists are texts, so they need quotation marks too. Mind that each single item on the list has quotation marks.\nThis allows you to save two words as 1 item on the list, for example 'Black Widow'.\n" + name: "'quotation marks'" + quizmaster: + levels: + 14: + story_text: "### Exercise\nIn this adventure you can make your own quiz! Fill in the blanks, add more questions and enjoy your own quiz!\nYou can make a quiz about anything you like: your hobby, your favorite animal, your favorite book or anything at all!\n" + example_code: "```\n{print} 'Make your own quiz'\npoints_a = 0\npoints_b = 0\n{print} 'Question'\n{print} 'Answer option A'\n{print} 'Answer option B'\nanswer = {ask} 'Which answer?'\n{if} answer == 'A'\n points_a = points_a + 1\n{if} answer == 'B'\n points_b = points_b + 1\n{print} 'End of the quiz!'\n{print} 'Lets see the results!'\n{if} points_a > points_b\n {print} 'You belong to the A club'\n{if} points_b > points_a\n {print} 'You belong to the B club'\n```\n" + name: Quizmaster + default_save_name: Quizmaster + description: Make your own quiz! + random_command: + name: '{random}' + default_save_name: random_command + description: introducing at random command + levels: + 3: + story_text_3: "### Exercise\nTry out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price!\nCan you do it? We have already put the first lines into the example code.\n" + story_text: "## At random\nIn this level you can make a list using the `{is}` command. You can let the computer choose a random item from that list. You do that with `{at} {random}`.\n" + example_code: "```\nanimals {is} dogs, cats, kangaroos\n{print} animals {at} {random}\n```\n" + story_text_2: "You can use the `{at} {random}` command in a sentence as well.\n" + example_code_2: "```\nfood {is} sandwich, slice of pizza, salad, burrito\n{print} I am going to have a food {at} {random} for lunch.\n```\n" + example_code_3: "```\n{print} The big gameshow!\n{print} There are 3 suitcases in front of you...\nchosen {is} {ask} Which suitcase do you choose?\nprices {is} _\n_\n```\n" + 16: + story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. For example: `friends[1]` is the first name on the list of friends, as you can see in the first part of the example code.\nThe second part of the example code shows you that we can also match 2 lists using the variable i." + story_text_2: "Now that you've learned to use the brackets in lists, you can also start using the {at} {random} command in the Python way!\nYou simply type the name of your list with `[random]` behind it!" + example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\n{print} friends[1] ' is the first friend on the list.'\n{print} friends[2] ' is the second friend on the list.'\n{print} friends[3] ' is the third friend on the list.'\n#now we will match 2 lists using the variable i\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} friends[i] 's lucky number is ' lucky_numbers[i]\n```\n" + example_code_2: "```\nfruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]\n```" + restaurant: + levels: + 1: + story_text: "In level 1 you can make your own virtual restaurant and take your guests' orders.\n" + example_code_2: "```\n{print} Welcome to Hedy's restaurant 🍟\n_ What would you like to order?\n{echo} So you would like to order\n{print} Thank you for your order!\n{print} It's on its way!\n```\n" + story_text_2: "### Exercise\nCopy the example code into your input screen by clicking the yellow button.\nFirstly, fill in the correct command on the blanks to make to code work properly.\nThen add at least 4 more lines of code to the restaurant program.\nAsk the costumer what they would like to drink and ask if they want to pay with cash or card.\nLastly, think of a nice way to say goodbye to your costumer.\n" + 2: + story_text: "In level 2 you could expand your restaurant by using variables. In level 1 Hedy could only `{echo}` the order once and only remember the last thing that was ordered.\nNow you can use variables and Hedy can remember both the food and the toppings!\n" + example_code: "```\n{print} Welcome to Hedy's restaurant!\n{print} Today we're serving pizza or lasagna.\nfood {is} {ask} What would you like to eat?\n{print} Great choice! The food is my favorite!\ntopping {is} {ask} Would you like meat or veggies on that?\n{print} food with topping is on its way!\n```\n" + story_text_2: "### Exercise\nCopy your own restaurant code from to previous level to the input screen below.\nFix the code by replacing the `{ask}` and `{echo}` commands and using variables, like you've learned in this level.\n\nNow that your code is working again, it's time to add something more.\nLook at the last line of the example code: `{print} food with topping is on its way!`\nIn this single line 2 variables have been used to create a summary of the order.\nNow add your own summary of the food and drinks ordered by the customer.\n\n**Extra** Now that you've learned how to use variables, you can use as many variables in one line as you'd like. Can you add more variables to your code, like eat in or take-away, cash or card, with or without a straw etc.?\n" + 3: + story_text: "Having trouble to decide what you wanna have for dinner? You can let Hedy choose for you!\nSimply add lists of your favorite (or least favorite) meals and Hedy can randomly choose your dinner.\nYou can also have a bit of fun, by letting Hedy choose the price for your dinner as well! What will you get?\n" + story_text_2: "### Exercise\nNow make your own version of the random restaurant.\nMake a list of starts, mains, desserts, drinks and prices yourself.\nThen use `{print}` and `{at} {random}` commands to tell the costumer what will be on their menu tonight.\n" + example_code: "```\ndishes {is} spaghetti, brussels sprouts, hamburgers\n{print} You will have dishes {at} {random} tonight!\nprices {is} 1 euro, 10 euros, 100 euros\n{print} That will be prices {at} {random} please.\n```\n" + example_code_2: "```\n{print} Welcome to your own random restaurant!\nstarters {is} _\nmains {is} _\ndesserts {is} _\ndrinks {is} _\nprices {is} _\n_\n```\n" + 6: + example_code: "You can make a simple restaurant code, like this:\n```\n{print} 'Welcome to Restaurant Chez Hedy'\n{print} 'Here is our menu:'\n{print} 'Our main courses are pizza, lasagne, or spaghetti'\nmain = {ask} 'Which main course would you like?'\nprice = 0\n{if} main {is} pizza price = 10\n{if} main {is} lasagne price = 12\n{if} main {is} spaghetti price = 8\n{print} 'You have ordered ' main\n{print} 'That will be ' price ' dollars, please'\n{print} 'Thank you, enjoy your meal!'\n```\n" + story_text: "In this level you can use maths to calculate the total price of your customer's order, which can make your virtual restaurant more realistic.\nBut you can also add many more things to your virtual restaurant, for example more courses.\n\n### Exercise\nYou can add many more things to your virtual restaurant. For example, can you...\n- ask how many people are coming and multiply the price by that amount?\n- add another course?\n- give people a discount when they enter a (secret) couponcode?\n- add a children's menu?\n- think of other fun things to add?\n" + 7: + story_text: "In this level you've learned how to use the `{repeat}` command to repeat a line of code a certain amount of times.\nYou can use that in your restaurant to `{ask}` multiple people what they'd like to eat.\n\n### Exercise\nCan you complete the code? Hedy needs to repeat this question as many times as there are people. So if there are 5 people, the question needs to be asked 5 times.\n**Extra** Expand your code with more questions, for example about drinks or sauce.\n" + example_code: "```\n{print} 'Welcome to Restaurant Chez Hedy'\npeople = {ask} 'How many people are joining us today?'\n```\n" + 8: + story_text: "In this level you can make your virtual restaurant more elaborate by repeating multiple lines of code. Like this:\n\n### Exercise\nThis code can be expanded with more items on the menu, for example offering drinks, and/or multiple courses or desserts. Add at least one more item.\n**Extra** Add even more items, as many options as you like!\n" + example_code: "```\n{print} 'Welcome to Restaurant Chez Hedy!'\npeople = {ask} 'How many people will be joining us today?'\n{print} 'Great!'\n{repeat} people {times}\n food = {ask} 'What would you like to order?'\n {print} food\n{print} 'Thank you for ordering!'\n{print} 'Enjoy your meal!'\n```\n" + 10: + story_text: "In this level you'll learn how to easily ask orders for different courses.\n\n### Exercise 1\nFinish the code with an `{ask}` on the blanks such that the customer is asked what they want to eat for each course.\n" + example_code_2: "```\n_ courses = appetizer, main course, dessert\n_ names = Timon, Ono\n_ {for} name {in} names\n_ {for} course {in} courses\n_ food = {ask} name ', what would you like to eat as your ' course '?'\n_ {print} name ' orders ' food ' as their ' course\n```\n" + story_text_2: "### Exercise\nOf course, you could also order for multiple people!\nCan you add the correct amount of indentation before each line to make the code work properly?\nTip: some lines don't need any indentation at all.\n" + example_code: "```\ncourses = appetizer, main course, dessert\n{for} course {in} courses\n {print} 'What is your order for ' course '?'\n _ \n _\n```\n" + 9: + story_text: "In this level you can use nesting to make your restaurant more realistic and more fun!\n\n### Exercise\nThe indentation was removed in the example code. \nCan you figure out how much indentation each line needs in order for the code to work properly?\nIf the customer orders pizza, Hedy shouldn't ask what sauce the costumer wants.\n\n**Extra** A restaurant does not stock all sauces. Make a list of available sauces and give a reply with each order whether you sell it.
\n**Extra** Pizzas have toppings. Ask customers what they want.
\n**Extra** Do customers want a drink? Ask them too!
\n" + example_code: "```\n{print} 'Welcome to Restaurant Chez Hedy!'\npeople = {ask} 'How many people will be joining us today?'\n{print} 'Great!'\nprice = 0\n{repeat} people {times}\n_ food = {ask} 'What would you like to order?'\n_ {print} food\n_ {if} food {is} fries\n_ price = price + 3\n_ sauce = {ask} 'What kind of sauce would you like with your fries?'\n_ {if} sauce {is} no\n_ {print} 'no sauce'\n_ {else}\n_ price = price + 1\n_ {print} 'with ' sauce\n_ {if} food {is} pizza\n_ price = price + 4\n{print} 'That will be ' price ' dollar'\n{print} 'Enjoy your meal!'\n```\n" + 15: + story_text: "With the `{while}` you can make sure your costumers can keep adding orders until they are done.\n\n### Exercise\nCorrectly add the `{while}` command to this code.\n" + example_code: "```\n{print} 'Welcome at McHedy'\nmore = 'yes'\n_\n order = {ask} 'What would you like to order?'\n {print} order\n more = {ask} 'Would you like to order anything else?'\n{print} 'Thank you!'\n```\n" + 4: + story_text: "In the restaurant you have to use quotation marks too when using the `{print}` or `{ask}` command.\n\n### Exercise\nAdd the quotation marks to this code to make it work! Be careful: variables should not be in quotation marks.\nThen, use the `{clear}` command to only show one line at a time in your output screen.\n\n### Exercise 2\nGo back to the previous level and copy your restaurant code. Make the code work in this level by adding quotation marks in the right spots and add some `{clear}` commands.\n" + example_code: "```\n_ Add the quotation marks to this code _\n{print} Welcome to Restaurant Chez Hedy!\n{print} Today we are serving pizza or lasagna.\nfood {is} {ask} What would you like to eat?\n{print} Great choice! The food is my favorite!\ntopping {is} {ask} Would you like meat or veggies on that?\n{print} food with topping is on its way!\ndrinks {is} {ask} What would you like to drink with that?\n{print} Thank you for your order.\n{print} Your food and drinks will be right there!\n```\n" + 12: + example_code: "```\nprice = 0.0\nfood = {ask} 'What would you like to order?'\ndrink = {ask} 'What would you like to drink?'\n{if} food {is} 'hamburger'\n price = price + 6.50\n{if} food {is} 'pizza'\n price = price + 5.75\n{if} drink {is} 'water'\n price = price + 1.20\n{if} drink {is} 'soda'\n price = price + 2.35\n{print} 'That will be ' price ' dollar, please'\n```\n" + story_text: "From this level on, you can use decimal numbers to make your menu more realistic.\n\n### Exercise\nCan you think of a code to give your friends and family a 15% discount?\n" + 11: + example_code: "```\n{print} 'Welcome to Restaurant Hedy!'\npeople = {ask} 'For how many people would you like to order?'\n{print} 'So you want to order for ' people ' people.'\n{print} \"Let's go!\"\n```\n" + story_text: "We can use the `{for}` with `{range}` to print the orders from multiple customers in an orderly manner.\n\n### Exercise\nFinish the restaurant code, so that you can ask for the order of multiple people. Print the order number each time: 'Order 1', 'Order 2', etc.\nAre you not sure how to go about this? Have a peek at your level 8 code.\n\n**Extra** In level 9 the restaurant also used prices. You can add that here too!\n" + 5: + story_text: "### Exercise\nThe example code shows how you could program that you've run out of a menu item in your restaurant.\nCopy your own restaurant code from the previous levels. Create a problem in your restaurant and code it, like the example code did.\nFor instance, you could also run out of a menu item, or you don't take credit cards, or the ice cream machine is broken.\n\n**Extra** Have you programmed the problem and programmed appropriate responses? Then try to add more `{if}` and `{else}` commands into your code.\nTry to add an `{if}` after every `{ask}` command in your code to make the code as interactive as possible!\n" + example_code: "```\ndrinks_in_stock {is} water, lemonade, cola, orange juice\ndrink {is} {ask} 'What would you like to drink?'\n{if} drink {in} drinks_in_stock {print} 'One ' drink 'coming up!'\n{else} {print} 'Sorry, we do not sell that'\n```\n" + 13: + story_text: "In this level you will learn new commands to extend your code even further.\n\n### Exercise 1\nPlace a `{and}` and a `{or}` in the logical place in the program.\n\n### Exercise 2\nExpand your restaurant with at least one more `{and}` and one `{or}`.\nFor example, create a special discount coupon that only applies to pizza, or give your customer a free drink\nwith fries and pancakes. Or something completely different of course!\n" + example_code: "```\nprice = 10\nfood = {ask} 'What would you like to eat?'\ndrinks = {ask} 'What would you like to drink?'\n{if} food {is} 'sandwich' _ drinks {is} 'juice'\n {print} 'That is our discount menu'\n price = price - 3\n{if} drinks {is} 'water' _ drinks {is} 'juice'\n {print} 'That is a healthy choice'\n{print} 'That will be ' price ' dollars'\n```\n" + description: Create your own virtual restaurant + name: Restaurant + default_save_name: Restaurant + repeat_command_2: + name: '{repeat} 2' + levels: + 8: + example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n" + story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n### Exercise\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n" + 7: + story_text_2: "Another interesting thing you can do with the `{repeat}` command is using variables to set the amount of times something should be repeated. In the example code you can see that we first ask the person how old they are.\nThen, in line 3, the question is repeated 'age' times. So we have used the variable 'age' with the `{repeat}` command.\n" + example_code_2: "```\n{print} 'Yay! It is your birthday!'\nage = {ask} 'How old are you now?'\n{repeat} age {times} {print} 'Hip Hip Hurray!'\n```\n" + story_text: "## Repeat with other commands and with variables\nYou have practiced the `{repeat}` command in combination with the `{print}` command now, but did you know you could also use other commands with `{repeat}` ?\nIn this example code you can see that `{repeat}` can also be used with an `{ask}`, `{if}` or `{else}` command.\n" + example_code: "```\n{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'\n```\n" + default_save_name: repeat_command_2 + description: '{repeat} command 2' + rock: + levels: + 1: + example_code_2: "```\n{print} what do you choose?\n{ask} choose from _\n{echo} so your choice was:\n```\n" + story_text_2: "### Exercise\nInstead of using words, you could also use emojis: ✊✋✌\nCan you create a code using emojis?\n" + example_code: "```\n{print} what do you choose?\n{ask} choose from rock, paper or scissors\n{echo} so your choice was:\n```\n" + story_text: "In level 1 you can start with a rock, paper, scissors game.\n\nWith `{ask}` you can make a choice, and with `{echo}` you can repeat that choice.\n" + 5: + story_text: "In this level we can determine whether it's a tie or not. For that you need the new `{if}` code.\n\n### Exercise\nFinish the code by filling in the blanks:\n* Let the computer pick a random option\n* Ask the player what they want to choose\n* Fill in the correct variables in line 4 and 5\n* Finish line 6 so that Hedy can check whether it's a tie or not.\n" + example_code: "```\noptions {is} rock, paper, scissors\ncomputer_choice {is} _\nchoice {is} _\n{print} 'you chose ' _\n{print} 'computer chose ' _\n{if} _ {is} _ {print} 'tie!' {else} {print} 'no tie'\n```\n\nFill in the correct code on the blanks to see if it is a draw.\n" + 2: + story_text: "In this level you can practise using the variables, so that you can make the rock, paper, scissors game in the next level!\n### Exercise\nFinish the code by filling in the **variable** on the blank.\nThis game is not very interactive, but no worries! In the next tab you'll learn how to use variables with the `{ask}` command to make your game interactive!\n" + example_code: "```\nchoice {is} rock\n{print} I choose _\n```" + 3: + example_code_2: "```\nchoices {is} rock, paper, scissors\nplayer_1 {is} {ask} Name of player 1:\n_\n```\n" + story_text: "You can use the `{at} {random}` command to let the computer pick rock, paper or scissors!\n\n### Exercise\nFinish the code by using the `{at} {random}` command.\n" + story_text_2: "**Extra** Make a two player game. Firstly ask the two players to fill in their names. Then let the computer randomly pick their choices.\n" + example_code: "```\nchoices {is} rock, paper, scissors\n{print} choices _\n```\n" + 15: + story_text: "### Exercise\nPlay until you beat the computer! But first, finish the example code...\n" + example_code: "```\nwon = 'no'\noptions = 'rock', 'paper', 'scissors'\n{while} won == 'no'\n your_choice = {ask} 'What do you choose?'\n computer_choice = options {at} {random}\n {print} 'you chose ' your_choice\n {print} 'the computer chose ' computer_choice\n {if} computer_choice == your_choice\n {print} 'Tie!'\n {if} computer_choice == 'rock' {and} your_choice == 'scissors'\n {print} 'You lose!'\n {if} computer_choice == 'rock' {and} your_choice == 'paper'\n {print} 'You win!'\n won = 'yes'\n_\n```\n" + 9: + example_code: "```\nchoices = rock, paper, scissors\nyour_choice {is} {ask} 'What do you choose?'\n{print} 'You choose ' your_choice\ncomputer_choice {is} choices {at} {random}\n{print} 'The computer chooses ' computer_choice\n{if} computer_choice {is} your_choice\n {print} 'Tie'\n{if} computer_choice {is} rock\n {if} your_choice {is} paper\n {print} 'You win!'\n {if} your_choice {is} scissors\n {print} 'You lose!'\n# finish this code\n```\n" + story_text: "In this level you can program the whole rock, paper, scissors game by nesting the `{if}` commands. \n\n### Exercise\nCan you finish the code? The program must tell who has won for every combination.\n\n**Extra** Want to play more than one game? Expand the code so that you can play multiple rounds. You can even use an `{ask}` to ask the user how many rounds they want to play.\n" + 13: + story_text: "With the `{and}` command you can shorten your rock, paper, scissors code! Check out the example code.\n\n### Exercise\nFinish the code such that a winner is always decided on. Run your code a few times to verify there is always a winner printed.\n" + example_code: "```\noptions = 'rock', 'paper', 'scissors'\nyour_choice = {ask} 'What do you choose?'\ncomputer_choice = options {at} {random}\n{print} 'You choose ' your_choice\n{print} 'The computer chooses ' computer_choice\n{if} computer_choice {is} your_choice\n {print} 'Tie'\n{if} computer_choice {is} 'rock' {and} your_choice {is} 'paper'\n {print} 'You win!'\n{if} computer_choice {is} 'rock' {and} your_choice {is} 'scissors'\n {print} 'The computer wins!'\n_\n```\n" + 10: + story_text: "### Exercise\nIn the previous levels you have often made your own rock paper scissors game. Can you finish the code and use the `{for}` command properly to get the game to work?\n" + example_code: "```\nchoices = _\nplayers = _\n{for} _\n```\n" + 4: + story_text: "In this level we can further program rock, paper, scissors. But if you want to add text, you have to use quotation marks here too.\n### Exercise\nFill in quotation marks on the blanks. Mind that the variable `choices` should be outside the quotes.\n" + example_code: "```\nchoices {is} rock, paper, scissors\n{print} _The computer chooses..._ choices {at} {random}\n```\n" + name: Rock, paper, scissors + default_save_name: Rock_2 + description: Make your own rock, paper, scissors game + secret: + levels: + 13: + story_text: "We can simplify the superspy code with `{and}`, such that we only need one `{if}`.\n\n### Exercise 1\nComplete the code by filling the right command on the blank. Tip: The superspy has to answer BOTH questions correctly, before they get the confidential information!\n\n### Exercise 2\nWe want to confuse the enemy even more! Create a list with fake answers and select one at random when a wrong answer is given.\n" + example_code: "```\nname = {ask} 'What is your name?'\npassword = {ask} 'What is your password?'\n{if} name {is} 'Agent007' _ password {is} 'TOPSECRET'\n {print} 'Go to the airport at 02.00'\n{else}\n {print} 'Go to the trainstation at 10.00'\n ```\n" + 12: + story_text: "In this adventure you can create your own super spy code. Encode a message that only the right agent can decipher.\nIf the enemy tries to crack the code, they will get some false info to waste their time.\n\n### Exercise 1\nMake your own secret code for your superspy and return both parts only to the real spy.\n\n### Exercise 2\nAdd a third component to the code, like a piece of clothing or an object.\n" + example_code: "```\nname = {ask} 'What is your name?'\n{if} name {is} _\n a = 'Go to the airport '\n{else}\n a = 'Go to the trainstation '\npassword = {ask} 'What is the password?'\n{if} password {is} _\n b = 'tomorrow at 02.00'\n{else}\n b = 'today at 10.00'\n{print} _ _ _\n```\n" + description: Make your own spy code + default_save_name: SuperSpy + name: SuperSpy + rock_2: + levels: + 2: + example_code: "```\nchoice {is} _\n{print} I choose choice\n```\n" + story_text: "Now that you have learned how to use the `{ask}` command, you can make your rock, paper, scissors code interactive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n" + description: Part 2 of rock, paper, scissors + name: Rock, paper, scissors 2 + default_save_name: rock_2 + simon: + default_save_name: Simon + description: Make a game of Simon Says + name: Simon Says + levels: + 16: + story_text: "Let's make a game of Simon Says! Simon Says is a memory game in which the player will be given a color. They have to repeat that color back.\nIf they get it right a color is added to the sequence, so they now have to remember 2 colors, then 3, then 4 etc. the game stops as soon as the player makes a mistake.\n\n### Exercise\nIn this first part of the Simon Says adventure, we'll let the computer pick a random color and add it to a list.\n\n***Make 2 lists*** First, make a list called `colors` and fill it with the colors red, yellow, green and blue.\nThen make a list called `simon_sequence`. This list will be used as the answer.\nAt the start of the game this lists need to be empty. unfortunately, we can't create an empty list (yet), so we'll fill it with the words 'empty' and 'list' and we'll remove them from the list immediately.\n\n***Create a function that adds a color to the sequence*** Now that we have an empty list called simon_sequence, we can start filling it with random colors.\nWe do that with a function, so we can call it everytime there's a new level in our game. Create a function called `add_random_color`.\nThen create the variable random_color and set it to a random color. Next, add this random color to the simon_sequence.\n\n***Create a function that shows the simon_sequence*** Start by naming the new function `show_simon_sequence` with `level` as an argument. Now we want to show as many colors as the level we are in (in level 1 you see 1 color, in level 2 you see 2 colors etc).\nSo we repeat `level` times, to print the `simon_sequence[i]`. Each time a color is shown, wait for 1 second and then clear the screen.\n\n***Test your program*** Before you go to the next level, test if the functions are working by calling both of the functions. If they're working you should see a random color in your output screen.\nRemove this testing part of your code, copy the code and continue to the next tab to learn more about the simon says game!\n" + example_code: "```\n# Make 2 lists\ncolors = _\n_ = ['empty', 'list']\n{remove} _ {from} simon_sequence\n{remove} _\n\n# Create a function that adds a color\n_ add_random_color\n _\n {add} _\n\n# Create a function that shows the simon_sequence\n{define} _\n {for} i {in} {range} 1 {to} _\n {print} _\n _\n _\n\n# Test your program\n{call} _\n{call} show_simon_sequence {with} 1\n```\n" + simon_2: + default_save_name: Simon + name: Simon Says 2 + description: Make a game of Simon Says + levels: + 16: + example_code: "```\n# Paste your code here\n\n\n# Create a function that creates the player_sequence\n{define} _\n {for} _\n _ 'What is color number ' i '?'\n {add} answer {to} _\n\n# Set up\nlevel = _\ngame_over = _\n{print} _\n_ 1\n_\n```\n" + story_text: "We'll continue with our Simon Says game!\n\n### Exercise\n***Paste your code here*** Paste your code from the previous level here. Don't forget to remove the part that was just used for testing the functions.\n\n***Create a function that creates the player_sequence*** The list `player_sequence` is used to capture the answers of the player. First we define the function with the argument level.\nNext, we ask level times what the color is that they choose. We call that variable `answer`. Then we add the variable `answer` to the list player_sequence.\n\n***Setting up the game*** Before we program the game in the next tab, we'll need some starting variables. First, we'll set the variable `level` to 1 and the variable `game_over` to False.\nThen we make an introduction for the game. We'll print 'Welcome to Simon Says!' and clear the screen after 1 second.\n\n***Continue to the next tab to finish the game!**** Don't forget to copy your code and take it with you to the next tab.\n" + simon_3: + default_save_name: Simon + name: Simon Says 3 + description: Make a game of Simon Says + levels: + 16: + story_text: "In this tab we'll program the game of Simon Says!\n\n### Exercise\n***Paste your code*** Copy your code from the previous tab and paste it here.\n\n***Program the game*** We start by making sure the game goes on while the game isn't over. Then we print what level the player is on, we use the variable level for that. We only show that for 1 second and then we clear the screen again.\nNow, we have to create the empty list player_sequence. We've already programmed how to fill the list, with our function `player_sequence`, but we never made the list itself. To create the list we use the same trick as we did in the previous tab.\nWe'll make a list with the words 'empty' and 'list' on it, and then we remove both these words. Next, we'll call all of the 3 functions that we've created.\nLastly, we'll have to check if the player gave the correct answers (so if the player_sequence and the simon_sequence are the same).\nIf that's the case, we'll compliment the player. Wait for 1 second and increase the level with 1.\nDid the player give the wrong answer, we'll tell them and end the game by setting game_over to 'True'\n\n***Enjoy your game!*** Great job! Does your game not work? Use the ladybug button to debug your code!\n" + example_code: "```\n# Paste your code here\n\n# The game\n{while} game_over _\n {print} _\n _\n _\n _ = ['empty', 'list']\n {remove} _\n {remove} _\n {call} _\n {call} _ {with} _\n {call} _ {with} _\n {if} player_sequence == _\n _\n _\n _\n {else}\n _\n game_over = _\n```\n" + sleep_command: + levels: + 2: + example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n" + story_text: "Another new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds.\n\n### Exercise\nPractise this new command by making a code of your own in which you use the {sleep} command at least 3 times. With each {sleep} command the pausing time should differ.\n" + name: '{sleep}' + description: introducing {sleep} command + default_save_name: sleep_command + songs: + levels: + 6: + 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\n{print} number ' little monkeys jumping on the bed'\n{print} 'One fell off and bumped his head'\n{print} 'Mama called the doctor and the doctor said'\n{print} 'NO MORE MONKEYS JUMPING ON THE BED!'\n{sleep}\n```\n" + example_code: "```\nverse = 99\n{print} verse ' bottles of beer on the wall'\n{print} verse ' bottles of beer'\n{print} 'Take one down, pass it around'\nverse = verse - 1\n{print} verse ' bottles of beer on the wall'\n{sleep}\n```\n" + story_text: "Songs often contain a lot of repetition. Sometimes the repetition is also based on counting.\nFor example, in the well-known song 'Bottles of beer'. You can program that song with a little math.\n\nTip: Use the read aloud function to let Hedy sing the song to you!\n\n### Exercise\nYou can now repeat lines 2 to 7 as many times as you want by copying the lines.\n" + 7: + example_code: "```\n{repeat} _ _ {print} 'Baby Shark tututudutudu'\n{print} 'Baby Shark'\n```\n" + story_text: "Songs often contain a lot of repetition. For example... Baby Shark! If you sing it, you keep singing the same thing:\n\nBaby Shark tututudutudu
\nBaby Shark tututudutudu
\nBaby Shark tututudutudu
\nBaby Shark\n\n### Exercise\nYou can print the song Baby Shark with a `{repeat}`? Finish the code by replacing the blanks?\n**Extra** After Baby Shark you can of course also program other songs. There are many songs with repetition!\nCan you think of one more song and print it?\n" + 10: + example_code_2: "```\nmonkeys = 5, 4, 3, 2, 1\n```\n" + example_code: "```\nfamily = baby, mammy, daddy, grandma, grandpa\n_ _ _ _ \n {print} _\n```\n" + story_text: "With `{for}` you can print make the whole baby shark song (including all the other sharks in the family) in only 6 lines!\n\n### Exercise 1\nCan you make the baby shark code even shorter by using a `{for}` command? Finish the example code.\n" + story_text_2: "### Exercise 2\nPrint the song Five little moneys jumping on the bed. Look up the text if you don't remember.\n\n**Extra** Print the song Old MacDonald had a farm, and make sure all animals make a different sound, using an `{if}`.\n" + 13: + story_text: "In the previous adventure you have learned how to use an argument in a function, but did you know that you could combine them with {ask} commands as well?\nIn this example we have changed the 'My Bonnie' program and made it interactive. You are now asked where Bonnie is.\n" + example_code: "```\n{define} song {with} place\n {print} 'My Bonnie is ' place\n\nchosen_place = {ask} 'Where do you want Bonnie to be?'\nsynonym = {ask} 'What is another word for that?'\n\n{call} song {with} chosen_place\n{call} song {with} synonym\n{call} song {with} chosen_place\n```\n" + 12: + example_code: "```\n_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'\n_ {for} action {in} actions\n_ {for} i {in} {range} 1 {to} 2\n_ {print} 'if youre happy and you know it'\n_ {print} action\n_ {print} 'if youre happy and you know it and you really want to show it'\n_ {print} 'if youre happy and you know it'\n_ {print} action\n```\n" + story_text: "In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:\n\n### Exercise\nCan you add the right amount of indentation to each line to make the song play correctly?\nHint: Not all lines need indentation.\n" + 18: + example_code: "```\nlines = ['what shall we do with the drunken sailor', 'shave his belly with a rusty razor', 'put him in a long boat till hes sober']\n{for} line {in} lines _\n {for} i {in} {range} 1 {to} 3 _\n {print} _ line _\n {print} 'early in the morning'\n {for} i {in} {range} 1 {to} 3\n {print} 'way hay and up she rises'\n {print} 'early in the morning'\n```\n" + story_text: "In level 16 we made songs using lists. These programs however are no longer working properly in this level. The colons from level 17 and the brackets from level 18 still need to be added.\n\n### Exercise 1\nThe Drunken sailor song is given as sample code, but not yet working.\nCan you make sure everything works again? To help you, we've put _ in the places of _some_ errors.\n\n### Exercise 2\nNow also look up your Old MacDonald song from level 16, and correct it.\n" + 8: + example_code: "```\nverse = 99\n_ 99 {times}\n{print} verse ' bottles of beer on the wall'\n{print} verse ' bottles of beer'\n{print} 'Take one down, pass it around'\nverse = verse - 1\n{print} verse ' bottles of beer on the wall'\n```\n" + story_text: "In a previous level you've programmed the song 'Bottles of beer'. But without the `{repeat}` command, you had to copy the verses many times.\nIn this level you can repeat the song 99 times, just by adding one simple line!\n\n### Exercise\nAdd the right command on the blanks and indent the code correctly.\n" + 11: + example_code: "```\n_ monkeys _ _ 5 _ 1\n {print} monkeys ' little monkeys jumping on the bed'\n _\n```\n" + story_text: "In this level you can use the `{for}` with `{range}` to make songs that use counting, like the 5 little monkeys.\n\n### Exercise 1\nFill in the blanks and make the code work! If you don't remember the song text, look it up yourself.\n\n### Exercise 2\nThe final line of the song is different from the others. Print this line inside the `{for}`, and use an `{if}` to make it work correctly.\n" + 16: + story_text: "In this level, you can program a song like OldMacDonald even more quickly. You can connect the right animal to the right sound by simply putting them in the same place in the list.\nThe Drunken Sailor is also quickly made in this level. You only need 8 lines for the entire song, check it out!\n\n### Exercise\nComplete the Old MacDonald song by setting the variable `animal` to `animals[i]` and `sound` to `sounds[i]`.\n" + example_code: "```\nanimals = ['pig', 'dog', 'cow']\nsounds = ['oink', 'woof', 'moo']\n{for} i {in} {range} 1 {to} 3\n animal = _\n sound = _\n {print} 'Old MacDonald had a farm'\n {print} 'E I E I O!'\n {print} 'and on that farm he had a ' animal\n {print} 'E I E I O!'\n {print} 'with a ' sound sound ' here'\n {print} 'and a ' sound sound ' there'\n {print} 'here a ' sound\n {print} 'there a ' sound\n {print} 'everywhere a ' sound sound\n```\n\n```\nlines = ['what shall we do with the drunken sailor', 'shave his belly with a rusty razor', 'put him in a long boat till hes sober']\n{for} line {in} lines\n {for} i {in} {range} 1 {to} 3\n {print} line\n {print} 'early in the morning'\n {for} i {in} {range} 1 {to} 3\n {print} 'way hay and up she rises'\n {print} 'early in the morning'\n```\n" + description: Print a song + name: Sing a song! + default_save_name: Song + songs_2: + description: Sing a song 2 + levels: + 16: + story_text_2: "### Exersice 2\nNow create your own code for the nursery rhyme 'The wheels on the bus' on the same way!\n" + example_code_2: "```\nobject = ['wheels', 'doors', _]\nmovement = [ 'round and round', 'open and shut', _]\n```\n" + example_code: "```\nnumber = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']\nobject = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']\n\n_\n {print} 'This old man'\n {print} 'He played ' _\n {print} 'He played knick-knack ' _\n {print} 'With a knick-knack paddywhack'\n {print} 'Give the dog a bone'\n {print} 'This old man came rolling home'\n {sleep} 8\n {clear}\n```\n" + story_text: "### Exercise\nFinish the nursery rhyme!\n" + 12: + example_code: "```\n{define} twinkle\n {print} 'Twinkle'\n {print} _\n\n{call} twinkle\n{print} 'Up above the world so high'\n{print} 'Like a diamond in the sky'\n{call} _\n```\n" + story_text: "Songs contain a lot of repetition. We can capture it with a function!\n### Exercise\nLook at the example code with the function. Fill out the two lines so the full song is printed.\n" + default_save_name: Song 2 + name: Sing a song! 2 + tic: + default_save_name: Tic + description: Play a game of Tic Tac Toe! + levels: + 16: + example_code: "```\n# Create a list called field\n_ = ['.', '.', '.', '.', '.', '.', '.', '.', '.']\n\n# Create a function that prints the field\n{define} print_field\n _\n {print} 'TIC TAC TOE'\n {print} field[1] field[2] field[3]\n _\n _\n\n# Call the function\n```\n" + story_text: "Let's program a game of tic-tac-toe!\n\n### Exercise\nIn this adventure we'll start with creating an empty field.\n\n***Create a list called field*** This list will be our playing field. This list is filled with 9 dots, since there are no x's and o's yet at the start of our game.\n\n***Create a function that prints the field*** Firstly, clear the screen so the old playing fields will be removed. Then we print the first line of our Tic Tac Toe field. This line constists of the first 3 spots in our list field.\nWe have already programmed this line for you. Now finish the field by printing spot 4, 5, and 6 on the second row and spot 7, 8 and 9 in the third row.\n\n***Call the function that prints the field*** Now call the function.\n
\n Run the code. Your output should look like this: \n
\n\n***Continue in the next tab*** In the next tab you'll learn how to program the game itself.\n" + 17: + example_code: "```\n# Paste your code here and make it level 17 proof\n\n# Create a function that detects if someone has won\n{define} detect_winner {with} field, sign:\n {if} field[1] == field[2] {and} field[2] == field[3] {and} field[1] != '.':\n game_over = 'yes'\n {print} 'Player ' sign 'wins!'\n {elif}:\n _\n {else}:\n game_over = 'no'\n{return} _\n```\n" + story_text: "In the previous level you've learned how to make a tic-tac-toe game. The game works, but is quite annoying as it keeps asking you if you've won yet.\nNow that we have the {elif} command, we can let the game decide if someone has won and it can stop asking us!\n\n### Exercise\n***Paste your code*** Paste your code from the previous level here and make it level 17 proof. In this level you've learned to use a colon everytime you create a block of code. Please add the colons in the correct spots.\n\n***Create a function that detects if someone's won*** We have started the function for you, paste it under the function `print_field` and finish the function. You can see that this first piece of code checks to see if spot 1, 2 and 3 are the same, because if they are you have 3 in a row.\nIt also checks if they are not a dot, because if they are, the line might have the same symbols on them, but that's just because it's still empty.\nIf all these conditions are met, the game is over and the winner is printed.\nFinish this function with all possible ways to win. This means you have to make this for the other 2 rows, 3 columns and 2 diagonals.\nIf you've finished all the other options, the function should return the variable `game_over` so we can use it in our game.\n\n***Call the function in the game*** Go to the line `game_over = {ask} 'Did you win?'` and change it to `game_over = {call} detect_winner {with} field, sign`. Now the function will check if there's a winner and the game doesn't need to keep asking anymore!\n\n***Enjoy your game!*** Great job! You have finished the game! Enjoy playing it!\n" + name: Tic-Tac-Toe + tic_2: + default_save_name: Tic + name: Tic-Tac-Toe 2 + description: Play a game of Tic Tac Toe! + levels: + 16: + example_code: "```\n# Paste your code from the previous adventure here\n\n# Add variables\ngame_over = _\nsign = _\n\n# The game\n{while} _\n choice = _ 'Player ' sign '_?'\n field[choice] = _\n _ print_field\n game_over = {ask} _\n {if} sign = 'o'\n sign = _\n _\n sign = _\n```\n" + story_text: "In the previous adventure you've learned how to create a playing field. Now you'll learn how to create the game!\n\n### Exercise\n***Paste your code*** Start by pasting your code from the previous adventure here.\n\n***Add variables*** Underneath your list called `field` we'll add 2 more variables that we'll need to program the game.\nThe variable `game_over` tells us if the game is over, and should be 'no' at the start of the game.\nThe variable `sign` tells us if it's the turn of player x or player o. Set the variable to 'x'.\n\n***The game*** First use a {while} command, to make sure the game keeps on playing the variable while game_over is set to no.\nDuring the game, we first ask the player which spot they choose. Then we change the field with the number they chose into their sign.\nThen we print the field again and we ask the player if they've won yet. Lastly we want to switch whose turn it is, so if the sign is 'x' it should be 'o' and the other way around.\n\n***Test your game*** Does your game work? Great, have fun playing the game! If not, use the ladybug button to debug your code.\nYou might have noticed one mistake in the code though, you can steal the other player's spot! If the other person chose spot 1, you could simply enter 1 after them and steal their spot.\nThat's not fair! Go to the next tab to learn how to fix this problem.\n" + tic_3: + name: Tic-Tac-Toe 3 + default_save_name: Tic + description: Play a game of Tic Tac Toe! + levels: + 16: + story_text: "You might have noticed one mistake in the code you've made in the previous adventure. You can steal the other player's spot! If the other person chose spot 1, you could simply enter 1 after them and steal their spot.\nThat's not fair! In this tab we'll fix that mistake.\n\n### Exercise\n***Paste your code here*** Paste your code from the previous adventure here.\n\n***Fix the mistake*** To fix the mistake we replace the line that says `field[choice] = sign`. This turns any spot that the player has chosen into their sign.\nGo to the header that says 'Use this to fix the mistake' and finish the code. We first want to check if the chosen spot is still empty, so `if field[choice] = '.'`. If that is the case, you are allowed to take it.\nThen we make an else command and print 'Sorry, this spot is already taken' if the spot is not empty. Lastly, we add a {sleep} command, so the players can actually read the text before it gets cleared again.\nNow copy this piece of code and replace the line `field[choice] = sign` with this new piece of code.\n\n***Play your game!*** Now the game should work properly! Good job!\nThe only flaw is that you can get a bit annoyed that the game keeps asking you if you've won yet. Do you want to fix that? Go to level 17 and we'll fix it!\n" + example_code: "```\n# Paste your code here\n\n# Use this to fix the mistake\n{if} _ = '.'\n field[choice] = sign\n{else}\n {print} _\n _\n```\n" + turtle: + levels: + 1: + example_code_2: "```\n{forward} 20\n{turn} {right}\n{forward} 20\n{turn} {left}\n{forward} 20\n```\n" + example_code: "```\n{forward} 100\n{turn} {left}\n```\n" + story_text: "You can also use Hedy to draw. By combining turns and lines, you can make a square or stairs!\n\nUsing `{forward}` you draw a line forwards. The number behind it determines how far the turtle will walk. `{turn} {right}` turns a quarter turn in clockwise direction, `{turn} {left}` turns counter clockwise.\n\nIf you want to go backwards, you use the `{forward}` command but with a negative number. So for example `{forward} -100`\n" + story_text_2: "### Exercise\nThis is the start of a little staircase. Can you make it have 5 steps?\n" + 4: + story_text: "In level 4 you have to use quotation marks with `{print}` and `{ask}`. Also when drawing!\n" + example_code_2: "```\n{color} {white}\n{forward} -80\n{color} {green}\n{forward} 50\n{color} {yellow}\n{forward} 50\n{color} {red}\n{forward} 50\n```\n" + example_code: "```\n{print} _ Drawing figures _\nangle {is} 90\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n```\n" + story_text_2: "You can also change the color of the lines with the command `{color}`. Check out the example.\nYou can also use the command `{color} {white}` to make 'invisible' lines. You could use these white lines to move the turtle anywhere in the screen before you start drawing.\n" + 2: + example_code_2: "```\n{print} Drawing figures\nangle {is} 90\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n```\n" + example_code: "```\n{forward} 20\n{turn} 90\n{forward} 20\n{turn} 180\n{forward} 100\n```\n" + story_text: "In level 1 the turtle could only turn left or right. That is a bit boring!\nIn level 2 he can point his nose in all directions. \n\nUse 90 degrees to turn a quarter, 180 to turn half, and a full circle is 360 degrees.\n\n### Exercise\nThis code now creates the letter T. Can you change it to make the letter B?\n\n**Extra** Change the letter into a different letter, like the first one of your name. \nYou can also make multiple letters, by setting the color to `{color}` `{white}` in between. \n" + story_text_2: "You can use variables to in the turtle `turn`. \n\n### Exercise\nChange the code such that it creates a triangle. Hint: you only have to change the code in one place.\n" + 5: + story_text: "In level 5 you can make a choice with `{if}`. For example between different types of figures.\n" + story_text_2: "### Exercise\nFill in the correct numbers in this code to get it to work.\nAfter you've done that, you can try to add the option backwards.\n\n**Extra** Instead of using 'left' and 'right', remake the program with North, East, South and West.\nThis way you could add even more directions like Northeast and Southwest etc.\n" + example_code_2: "```\ndirection {is} {ask} 'Do you want to go left, right, or straight ahead?'\n{if} direction {is} left {turn} _\n{if} direction {is} right {turn} _\n{forward} 100\n```\n" + example_code: "```\n{print} 'Drawing Figures'\nfigure {is} {ask} 'Do you want a square or a triangle?'\n{if} figure {is} triangle angle {is} 120\n{else} angle {is} 90\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n```\n" + 6: + example_code: "```\nangles = {ask} 'How many angles do you want?'\nangle = 360 / angles\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n```\n" + story_text: "In this level you can use calculations to draw different figures.\nYou may have learned in school that turning a full circle is 360 degrees. If not, now you know!\nThat's why you also use 90 degrees for a square. 360 divided by 4 is 90.\nNow that we can do math with Hedy, we can draw all the figures we want!\n" + 8: + story_text: "Now that we can repeat several lines, we can make figures more easily.\nWe only have to set the angle once and then use that variable in the `{repeat}`.\n\n### Exercise 1\nThe example code creates a square. Change the code so that it create another figure, such as a triangle or a hexagon. \nThis requires a change to two lines of code.\nTip: An entire circle is 360 degrees.\n\n### Exercise 2\nNow create a drawing consisting of at least two polygons.\n" + example_code: "```\nangle = 90\n{repeat} 4 {times}\n {turn} angle\n {forward} 50\n```\n" + story_text_2: "**Extra** We can now improve the program that draws different figures. Finish the code and you can draw any polygon you'd like!\n" + example_code_2: "```\nfigure = {ask} 'How many angles should I draw?'\nangle = 360 / figure\n{repeat} figure {times}\n {turn} _\n {forward} _\n```\n" + 9: + story_text: "Now that we can use a `{repeat}` inside a `{repeat}`, we can create more complex figures.\n\n### Exercise 1\nThis code creates three black triangles, change that into five pink squares.\n\n **Extra** Create a figure of your own choosing consisting of at least two different shapes types.\n" + example_code: "```\n{color} {black}\n{repeat} 3 {times}\n {repeat} 3 {times}\n {forward} 10\n {turn} 120\n {color} {white}\n {forward} 50\n {color} {black}\n```\n" + 12: + example_code: "```\n{define} square\n {repeat} 4 {times}\n {turn} _\n {forward} _\n{call} square\n{forward} 50\n{call} square\n{forward} 50\n{call} square\n```\n" + story_text: "We can use functions to draw more complex figures with less code.\n### Exercise 1\nFill the function so that three squares are created. If you want the image to look nicer, you can make the lines between the squares white.\n\n### Exercise 2\nThe code can be made even shorter. Place the final lines into a `{repeat}` so the figure remains the same.\n\n### Exercise 3\nCreate your own drawing with different figures.\nChange both the number of figures with the `{repeat}` and the shape of the figures in the `{define}`\n" + 10: + example_code: "```\n{turn} 90\ndistances = 10, 20, 30, 40, 50, 60\n{for} distance {in} distances\n {forward} distance\n```\n" + story_text: "In this level you can make the turtle draw a figure.\nThe turtle will travel the distances in the list, one by one, making bigger and bigger steps.\n### Exercise 1\nAdd a 90 degree turn in the loop, so that a spiral is drawn.\nAdd at least 5 numbers to the list, so the spiral grows larger.\n**(extra)** can you change the spiral into another shape? Experiment with numbers for the turn!\n### Exercise 2\nThe spiral is drawn outwards, make it go inwards?\n" + 3: + story_text: "In this level you can use `{at} {random}` with the drawing turtle. A random choice makes the turtle walk a different path each time.\nUse `{at} {random}` to choose a value from a list.\n### Exercise\nCan you copy and paste lines 2 and 3 to create a longer random path?\n" + example_code: "```\nangles {is} 10, 50, 90, 150, 250\n{turn} angles {at} {random}\n{forward} 25\n```\n" + name: Turtle + description: Make your own drawing + default_save_name: Turtle + turtle_draw_it: + name: Draw it! + description: Draw this picture with the turtle + default_save_name: Draw it + levels: + 2: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nTriangle \nArrow \nBoat \n
\n" + 3: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nTriangle \nStar \nArrow \n
\n" + 5: + example_code: "Hint:\n```\nchosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'\n{if} _\n```\n" + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n**Extra** Make only one code that lets the player decide which letter they'd like to see! And can you add even more letters?\n\n
\nF \nE \nL \n
\n" + 4: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nColored Star \nRainbow \nNested squares \n
\n" + example_code: "**Extra** Up for a real challenge? Make sure that the colors of these figures are selected randomly, so that each time you run your programs they'll look differently!\n\n```\ncolors {is} red, orange, yellow, green, blue, purple, pink, brown, gray, black\ncolor _\n```\n" + 7: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nHexagon \nTriangle \nFan \n
\n" + 6: + example_code: "Hint for the square:\n```\nchosen_color = {ask} _\n```\n" + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n**Extra** Let the player decide which color the square should be.\n\n***Extra*** Can you make the letter of your own first name and the flag of your own country too?\n\n
\nSquare \nLetters \nFlag \n
\n" + 9: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n**Extra** The number in brackets indicates in how many lines of code this figure can be drawn. Can you do it in the same amount of lines?\n\n**Extra** Give the player a choice which country they would like to see the flag of.\n\n
\nCross (7) \nRandomly colored nested squares (8) \nFlags \n
\n" + example_code: "Hint for the nested squares:\n```\ncolors = red, blue, orange, yellow, pink, purple, green, brown, black\ndistance = 120\n{repeat} 5 {times}\n_\n```\nHint for the flags:\n```\ncountry = {ask} 'which country would you like to see the flag of?'\n{if} country {is} 'the Netherlands'\n color_1 = red\n color_2 = white\n color_3 = blue\n```\n" + 10: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nNested Hexagon \nTraffic lights \n
\n" + example_code: "Hint Nested Hexagon:\n```\ndistances = 100, 80, 60, 40, 20\n{for} distance {in} distances\n_\n```\n\nHint Traffic Lights:\n```\ncolors = red, yellow, green\n{for} chosen_color {in} colors\n {color} _\n {repeat} _\n```\n" + story_text_2: "Christmas lights \n" + example_code_2: "Hint Christmas Lights:\n\nStart by moving to the left side of the screen with an invisible white line. Then hang up the Christmas lights!\n```\n{color} white\n{turn} -90\n{forward} 300\n{turn} 90\n\ncolors = red, blue, yellow, purple, green, orange, pink\n{for} chosen_color {in} colors\n_\n```\n" + 11: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nBeehive (6) \nFan (5) \nSnowflake (13) \n
\n" + example_code: "Hint Beehive:\n```\n{for} amount_of_combs {in} {range} 1 {to} _\n {for} walls_of_one_comb {in} {range} 1 {to} _\n {forward} _\n {turn} _\n {forward} _\n {turn} _\n```\n\nHint Fan:\nStart out like the fan you made in level 7. Or take a peak at the hint for the beehive, because the codes are very similar.\n\nHint Snowflake: Start by making one 'leg' and repeat it 6 times.\n" + 12: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\nFirstly, define a function **for each shape** you want to use on the bracelet. Then, add the shapes to the bracelet like this:\n\nBracelet Designing program \n" + example_code: "Hint Bracelet Designing program\n```\n{define} draw_a_square\n_\n\n{color} white\n{turn} -90\n{forward} 300\n{turn} 180\n\n{for} i {in} {range} 1 {to} 5\n {color} gray\n {forward} 100\n shape = {ask} 'What kind of shape would you like next on the bracelet?'\n chosen_color = {ask} 'In which color?'\n {color} chosen_color\n {if} shape = 'square'\n {call} draw_a_square\n```\n" + 14: + example_code: "```\n{define} calculate_degrees {with} amount_of_corners\n _ 360 / amount_of_corners\n\n\n{define} draw_figure {with} degrees\n _\n {forward} 400/amount_of_corners\n {turn} _\n\namount_of_corners = {ask} _\ndegrees = {call} _ {with} _\n\n{call} _ {with}\n{call} _ {with}\n```\n" + story_text: "### Exercise\nCreate a program that asks the player how many corners their figure should have and then creates that figure.\nThe figure in the image is the output when the player fills in 10.\n\n
\n \n \n
\n" + 15: + story_text_2: "Fan \n" + story_text_3: "Star \n" + example_code: "Spiral\n```\ndistance = 5\n{while} distance < 200\n distance = distance + 5\n _\n```\n" + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\nSpiral \n" + example_code_2: "Fan\n```\n{define} draw_a_square {with} side\n_\n\ni = 100\n{while} i > 1\n _ {with} i\n _\n i = i - 3\n```\n" + example_code_3: "Star\nA star is usually drawn using 144-degree-turns. If you change this slightly to 143 degrees for example and repeat the pattern multiple times with a {while} loop you can make this figure.\n" + 13: + example_code: "Hint Street in different sizes\n```\n{define} draw_a_house {with} size\n_\n\n{call} draw_a_house {with} 90\n{call} draw_a_house {with} 60\n{call} draw_a_house {with} 30\n```\n\nHint Colored street\n```\n{define} draw_a_house {with} chosen_color\n_\n```\n\nHint Snow Storm\n```\n{define} draw_snowflake {with} length, color\n _\n\nnumbers = 10, 20, 30\ncolors = _\n\n{for} i {in} {range} 1 {to} 5\n random_number = _\n random_color = _\n {call} draw_snowflake {with} random_number, random_color\n {color} white\n {turn} random_number * 5\n {forward} 80\n```\n" + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\nStreet in different sizes \nColored street \nSnow Storm \n" + 8: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n**Extra** The number in brackets indicates in how many lines of code this figure can be drawn. Can you do it in the same amount of lines?\n\n
\nSquare (3) \nRandomly colored star (5) \nRandomly colored spiral (7) \n
\n" + 1: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\n Rectangle \n Square \n Stairs\n
\n" + while_command: + name: '{while}' + levels: + 15: + story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!" + example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n" + description: '{while}' + default_save_name: while_command + years: + default_save_name: New Year's Countdown + levels: + 11: + example_code: "```\n{for} number {in} {range} _ {to} _\n {print} number\n {sleep}\n{print} 'Happy New Year!'\n```\n" + story_text: "In this level you can use the `{for}` number `{in}` `{range}` command to countdown to the New Year.\n\n### Exercise\nFill in the blanks and make the code work!\n" + description: Countdown to the New Year! + name: New Year's + repeat_command: + levels: + 9: + story_text: "Great job! You've reached another new level! In the previous level you've learned to use multiple lines of code in an `{if}` or `{repeat}` command. \nBut you can't yet combine the two...\n\nGood news! In this level you will be allowed to put an `{if}` inside an `{if}`, `{repeat}` inside a `{repeat}` command and in eachother.\nGive it a try!\n" + example_code: "```\n{repeat} 3 {times}\n order = {ask} 'What would you like to order?'\n {if} order {is} pizza\n {print} 'Yammie'\n {else}\n {print} 'pizza is better!'\n```\n" + 7: + example_code: "```\n{repeat} 3 {times} {print} 'Hedy is fun!'\n```\n" + story_text: "## Repeat! Repeat! Repeat!\nLevel 7 adds the `{repeat}` command. `{repeat}` can be used to execute one line of code multiple times. Like this:\n\n### Exercise\nPlay around with the `{repeat}` command. Can you make the happy birthday song in only 3 lines of code instead of 4 now?\n" + 8: + example_code: "```\n{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This is all repeated 5 times'\n```\n" + story_text: "### Repeat commands and indentation\nIn this level you can repeat multiple lines of code with only 1 repeat command.\nYou do this by making a block of lines that you want to repeat.\nThe lines in this block will need **indentation** .\nThat means putting four spaces at the beginning of each line. You will also have to indent when you just want to create a block of one line.\n" + description: '{repeat} command' + name: '{repeat}' + default_save_name: repeat_command diff --git a/content/adventures/nl.yaml b/content/adventures/nl.yaml index 228802f1dc8..98392a3ce87 100644 --- a/content/adventures/nl.yaml +++ b/content/adventures/nl.yaml @@ -591,7 +591,7 @@ adventures: Kun jij regel 10 afmaken zodat het programma werkt? ### Opdracht 2 - Geef de speler feedback over een goed en over een fout antwoord, zoals `{print} 'Super!'` of `{print} 'Helaas, het goede antwoord was ' goede_antwoord`. + Geef de speler feedback over een goed en over een fout antwoord, zoals `{print} 'Super!'` of `{print} 'Helaas! Het goede antwoord is ' goede_antwoord`. example_code: | ``` score = 0 @@ -1736,7 +1736,7 @@ adventures: ``` 18: story_text: | - Tot slot maken we echte Python code van `{for} i {in} {range} 1 to 5` op deze manier: + Tot slot maken we echte Python code van `{for} i {in} {range} 1 {to} 5` door rondje haakjes te gebruiken en afscheid te nemen van {tot} en daarvoor in de plaats een komma te gebruiken tussen het begin en eindgetal. Op deze manier: example_code: | ``` {for} i {in} {range}(1,5): @@ -1937,7 +1937,7 @@ adventures: {print} gekozen_kant gekozen_ledemaat ' op ' gekozen_kleur {print} 'Klaar voor een potje Twister?' - {for} i {in} {range} 1 to _ + {for} i {in} {range} 1 {to} _ {call} draai {sleep} 2 ``` @@ -2623,7 +2623,7 @@ adventures: {print} 'Dan ben je ouder dan ik!' ``` story_text_2: | - Als je iets precies wilt vergelijken, mag je dat nu doen met twee isgelijktekentjes. Zo doen de meeste programmeertalen dat: + Als je iets precies wilt vergelijken, mag je dat nu doen met twee isgelijktekentjes `==`. Zo doen de meeste programmeertalen dat: example_code_2: | ``` name = {ask} 'Hoe heet jij?' @@ -2830,7 +2830,8 @@ adventures: In plaats van noten zoals 'C5' of 'B8', kun je nu ook getallen spelen. Type bijvoorbeeld `{play} 1` voor de laagste noot, `{play} 70` voor de hoogste noot of elk willekeurig getal er tussenin. ### Opdracht - Dit vraagt om muzikale berekeningen! Probeer de voorbeeldcode een paar keer uit met verschillende startgetallen. Componeer daarna je eigen muziek door getallen te gebruiken! + Dit vraagt om muzikale berekeningen! Probeer de voorbeeldcode een paar keer uit met verschillende startgetallen. + Componeer daarna je eigen muziek door getallen te gebruiken! example_code: | ``` getal = {ask} 'Noem een getal tussen 1 en 67:' @@ -4275,8 +4276,8 @@ adventures: {print} 'veh heh het' {print} 'al op de tafel gezet' couplet = couplet + 1 - {sleep} {print} 'Door naar het ' couplet 'e couplet' + {sleep} ``` story_text_2: "Dit kinderliedje telt van 10 visjes naar 1 visje. \nKopieer regel 2 tot en met 7 om het hele lied te maken!\n" example_code_2: | @@ -4342,7 +4343,7 @@ adventures: ``` 11: story_text: | - In dit level kun je makkelijk (af)tellen in een liedje. Zo kun je bijvoorbeeld het kinderliedje '10 kleine visjes' programmeren. + In dit level kun je makkelijk (af)tellen in een liedje, met gebruik van `{for}` met een `{range}`. Zo kun je bijvoorbeeld het kinderliedje '10 kleine visjes' programmeren. ### Opdracht 1 Maak het liedje af. Zoek de tekst op als je die niet meer weet. @@ -4532,7 +4533,7 @@ adventures: # Roep de functie op ``` 17: - example_code: "```\n# Paste your code here and make it level 17 proof\n\n# Create a function that detects if someone has won\n{define} detect_winner {with} field, sign:\n {if} field[1] == field[2] {and} field[2] == field[3] {and} field[1] != '.':\n game_over = 'yes'\n {print} 'Player ' sign 'wins!'\n {elif}:\n _\n {else}:\n game_over = 'no'\n{return} _\n```\n" + example_code: "```\n# Plak hier jouw code en maak het \"level 17\" waardig\n\n# Creeer een functie zodat deze detecteert dat iemand heeft gewonnen\n{define} detect_winner {with} field, sign:\n {if} field[1] == field[2] {and} field[2] == field[3] {and} field[1] != '.':\n game_over = 'yes'\n {print} 'Player ' sign 'wins!'\n {elif}:\n _\n {else}:\n game_over = 'no'\n{return} _\n```\n" story_text: "In het vorige level heb je geleerd hoe je een boter-kaas-en-eieren spel maakt. Het spel werkt, maar is behoorlijk irritant omdat het je steeds vraagt of je al gewonnen hebt.\nNu we de '{elif}' opdracht hebben, kunnen we het spel laten beslissen of iemand gewonnen heeft. Het spel hoeft ons dan niet meer om informatie te vragen!\n\n### Opdracht\n***Plak je code*** Plak je code van het vorige level hier en maak het level 17 proof. In dit level heb je geleerd om een `:` te gebruiken elke keer dat je een codeblok maakt. Voeg de dubbele punten toe op de juiste plekken.\n\n***Maak een functie die detecteert of iemand gewonnen heeft*** We hebben de functie voor je gestart, plak deze onder de functie `print_field` en voltooi de functie. Je ziet dat dit eerste stukje code controleert of plek 1, 2 en 3 hetzelfde zijn, want als dat zo is, heb je er 3 op een rij.\nHet controleert ook of ze geen punt zijn, want als dat zo is, kan de lijn dezelfde symbolen bevatten, maar dat komt alleen omdat deze nog leeg is.\nAls aan al deze voorwaarden is voldaan, is het spel afgelopen en wordt de winnaar afgedrukt.\nVoltooi deze functie met alle mogelijke manieren om te winnen. Dit betekent dat je dit moet doen voor de andere 2 rijen, 3 kolommen en 2 diagonalen.\nAls je alle andere opties hebt voltooid, moet de functie de variabele `game_over` retourneren, zodat we deze in ons spel kunnen gebruiken.\n\n***Roep de functie aan in het spel*** Ga naar de regel`game_over = {ask} 'Heb je gewonnen?'` en verander het in `game_over = {call} detect_winner {with} field, sign`. Nu controleert de functie of er een winnaar is en hoeft het spel niet dat niet meer te vragen!\n\n***Geniet van je spel!*** Goed gedaan! Je hebt het spel geprogrammeerd! Veel plezier met spelen!\n" tic_2: name: Boter-kaas-en-eieren 2 @@ -4967,7 +4968,7 @@ adventures: example_code: | Hint voor de geneste vierkanten: ``` - kleuren = {red}, {blue}, {orange}, {yellow}, {pink}, {purple}, {green}, {brown}, {black} + kleuren = red, blue, orange, yellow, pink, purple, green, brown, black afstand = 120 {repeat} 5 {times} _ @@ -4976,9 +4977,9 @@ adventures: ``` land = {ask} 'Van welk land wil je de vlag zien?' {if} land {is} 'Nederland' - kleur_1 = {red} - kleur_2 = {white} - kleur_3 = {blue} + kleur_1 = red + kleur_2 = white + kleur_3 = blue ``` 10: story_text: | @@ -4999,7 +5000,7 @@ adventures: Hint voor het stoplicht: ``` - kleuren = {red}, {yellow}, {green} + kleuren = red, yellow, green {for} kleur {in} kleuren {color} _ {repeat} _ @@ -5052,21 +5053,18 @@ adventures: Bracelet Designing program example_code: | - Hint voor het ontwerpen van armbanden: - - Definieer eerst een functie **voor elke vorm** die je wilt gebruiken op de armband. Voeg daarna op deze manier vormen aan de armband toe: - + Hint voor het ontwerpen van armbanden. Definieer eerst een functie **voor elke vorm** die je wilt gebruiken op de armband. Voeg daarna op deze manier vormen aan de armband toe: ``` {define} teken_een_vierkant _ - {color} {white} + {color} white {turn} -90 {forward} 300 {turn} 180 {for} i {in} {range} 1 {to} 5 - {color} {gray} + {color} gray {forward} 100 gekozen_vorm = {ask} 'Wat voor vorm wil je op de armband?' gekozen_kleur = {ask} 'In welke kleur?' diff --git a/content/adventures/sv.yaml b/content/adventures/sv.yaml index b12187691e4..45c3f8cc129 100644 --- a/content/adventures/sv.yaml +++ b/content/adventures/sv.yaml @@ -14,11 +14,11 @@ adventures: Du använder `{echo}` om du vill att namnet på huvudkaraktären ska vara på slutet av meningen. example_code: | ``` - {ask} Huvudkaraktären av denna berättelse är - {print} Nu kommer huvudkaraktären ta en promenad i skogen - {echo} Han är lite rädd, - {print} Han hör galna ljud överallt - {print} Han är rädd för att detta är en hemsökt skog + {ask} Huvudkaraktären i den här berättelsen är + {print} Huvudkaraktären kommer nu att ta en promenad i skogen + {echo} De är lite rädda, + {print} De hör galna ljud överallt + {print} De är rädda för att detta är en hemsökt skog ``` story_text_2: | ### Övning diff --git a/content/adventures/ta.yaml b/content/adventures/ta.yaml new file mode 100644 index 00000000000..7245bfbbf30 --- /dev/null +++ b/content/adventures/ta.yaml @@ -0,0 +1,1094 @@ +adventures: + story: + name: கதை + description: கதை + levels: + 3: + example_code_2: "```\n{print} They hear a sound\nanimals {is} 🐿, 🦔, 🦇, 🦉\nanimal {is} {ask} What do you think it is?\n{add} animal {to_list} animals\n{print} it was an animals {at} {random}\n```\n" + example_code: "```\nanimals {is} 🦔, 🐿, 🦉, 🦇\n{print} They now hear the sound of an animals {at} {random}\n```\n" + example_code_3: "```\n{print} His backpack got way too heavy.\n{print} Inside were a bottle of water, a flashlight and a brick.\nbag {is} water, flashlight, brick\ndump {is} {ask} Which item should he dump?\n{remove} dump {from} bag\n```\n" + story_text: "In level 3 you can make your story more fun. You can use randomness for any monster, animal or other obstacle, like this:\n" + story_text_2: "The command `{add}` can also come in handy in your story.\n" + story_text_3: "This is an example of the `{remove}` command in your story\n\n### Exercise\nCopy your story from the previous levels into this level.\nIn this level you've learned 3 new commands `{at} {random}` , `{add} {to_list}` and `{remove} {from}`.\nAdd new lines of code to your story, so that all of the new commands are featured at least once in your story.\n" + 5: + example_code: "```\nname {is} {ask} 'Who is walking in the forest?'\n{print} name ' walks through the forest'\n{print} name ' encounters a monster'\nend {is} {ask} 'Would you like a good or a bad ending?'\n{if} end {is} good {print} name ' takes the sword and the monster quickly runs away'\n{else} {print} 'The monster eats ' name\n```\n" + story_text: "In this level you can program different endings, which will make your story even more fun.\nIn the example code you can see how to make 2 different endings.\n\n### Exercise 1\nWrite a new short story of at least 6 lines of code about a topic of your choosing.\nNo inspiration? Choose one of these topics: a superhero, a boring school day, stranded on a desert island.\n\nNow give the player a change to choose a happy or a bad end, just like in the example code.\nProgram both the endings.\n\n### Exercise 2\nCopy the story you've created in your own story adventure in the previous levels.\nFind a way to add at least 2 `{if}` and `{else}` commands to your story.\nThis can be with a happy or bad ending, but you can also try to find other ways to incoporate the commands.\n" + 10: + example_code: "```\nanimals = _ , _ , _ \n{print} 'Brown bear, Brown bear'\n{print} 'What do you see?'\n```\n" + story_text: "In this level you can use the {for} command in your story. In this way you could easily program the children's book 'Brown bear, Brown bear, what do you see'.\n\n### Exercise\n\nLook at the story if you do not know it, and make sure it is printed as in the book.\n" + 12: + example_code: "```\nname = 'The Queen of England'\n{print} name ' was eating a piece of cake, when suddenly…'\n```\n" + story_text: "In this level quotation marks will be needed to save multiple words in a variable.\n\n### Exercise\n\nFind a story from a previous level, any level is ok. Now make sure quotation marks are added in the right places." + 18: + story_text: "We are going to print another story, but now we have to use brackets with `{print}`.\n\n### Exercise 1\nCreate a story of at least 5 sentences. You don't have to use 'name' just yet.\n" + story_text_2: "### Exercise 2\nWe have already prepared an `{input}` for you. First, use the `name` variable in your story.\nThen add a second `{ask}` and use that variable as well.\nTip: Remember the commas in a `{print}` between text and variables!\n" + example_code: "```\n{print}('Welcome to this story!')\n```\n" + example_code_2: "```\nnaam = {input}(\"What's your name?\")\n{print}('Welcome to this story!')\n```\n" + 2: + story_text: "In level 2 you can make your story more fun. Your main character's name can now be anywhere in the sentence.\n\nYou do have to program a little bit extra for that. You must now name your main character first.\n\nYou can then put that name anywhere in a sentence.\n" + 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" + example_code: "```\nname {is} {ask} What is the name of the main character?\n{print} name is now going to run in the woods\n{print} name is a bit scared\n{print} Suddenly she hears a crazy noise...\n{sleep}\n{print} name is afraid this is a haunted forest\n```" + 9: + story_text: "In this level you can use `{if}` and `{repeat}` commands inside other `{if}` and `{repeat}` commands. \nThis gives you many options and really helps you to make your story interactive.\n\n### Exercise 1\nFinish the code so the `{if}` works correctly.\n\n### Exercise 2\nAdd an `{if}` and `{else}` for the part of the story where Robin goes home too.\n\n### Exercise 3\nGo back to your level 8 story and use at least two `{if}`s inside another `{if}`.\n" + example_code: "```\n{print} 'Robin is walking downtown'\nlocation = {ask} 'Is Robin going into a shop, or does she go home?'\n{if} location {is} shop\n {print} 'She enters the shop.'\n {print} 'Robin sees an interesting looking book'\n book = {ask} 'Does Robin buy the book?'\n {if} book {is} yes\n _ {print} 'Robin buys the book and goes home'\n _ {else}\n _ {print} 'Robin leaves the shop and goes home'\n{else}\n {print} 'Robin goes home'\n```\n" + 1: + story_text: "நிலை 1-இல், நீங்களே உருவாக்கிய வேறொரு முக்கிய கதாபாத்திரத்தைக் கொண்டு கதையை உருவாக்கலாம்.\n\nமுதல் வரியில், `{ask}` என்கிற கட்டளையைப் பயன்படுத்தி, கதையின் முக்கிய கதாபாத்திரம் யார் என்று கேட்கவும்.\n\nஅந்த முதல் வரிக்குப்பின், வாக்கியத்தை அச்சிட வேண்டுமானால் `{print}` என்ற \nகட்டளையைக் கொண்டு தொடங்கவும்.\nஉங்கள் முக்கிய கதாபாத்திரம் வாக்கியத்தின் முடிவில் இருக்க வேண்டுமெனில் `{echo}` என்ற கட்டளையைப் பயன்படுத்தவும்.\n" + example_code: "```\n{ask} The main character of this story is\n{print} The main character is now going to walk in the forest\n{echo} They're a bit scared,\n{print} They hear crazy noises everywhere\n{print} They're afraid this is a haunted forest\n```\n" + story_text_2: "### Exercise\nNow create your own story of at least 6 lines of code.\nThis story cannot be the same as the example code.\nUse at least one `{ask}` and one `{echo}` command.\nYou can make it about any topic you like.\nIf you can't think of a topic, use one of our choices: going to the movies, a sports match or a day at the zoo.\n" + 8: + story_text: "In this level you can use multiple lines in your `{if}` commands, this way you can upgrade your happy or sad ending!\n\n### Exercise 1\nThe example code shows two different endings; one where the characters jump in a time machine and one where they do not.\nComplete the blanks with at least one sentence per ending.\n**Extra** Make the story longer. What happens in the story? You can also add a second `{ask}` with different options.\n\n### Exercise 2\nGo back to your saved programs, choose your story program from level 5. Now write a good and a bad ending of at least three lines long each!\n" + example_code: "```\n{print} 'OH NO! The T-rex is closing in!'\nend = {ask} 'Do you want a happy or a sad ending?'\n{if} end {is} happy\n {print} 'Just in time Richard jumps back into the time machine!'\n {print} _\n{else}\n {print} 'Oh no! Richard is too slow...'\n {print} _\n```\n" + 4: + example_code: "```\nname {is} {ask} _ What is your name? _\n{print} _ The main character is called _ name\n_\n_\n{print} name _ is now going to walk in the woods _\n{print} name _ is a bit scared _\nanimals {is} 🦔, 🐿, 🦉, 🦇\n{print} _ He hears the sound of a _ animals {at} {random}\n{print} name _ is afraid this is a haunted forest _\n```\n" + story_text: "### Exercise\nCopy the example code and finish it by adding quotation marks on the blanks in lines 1 and 2.\nThe blanks in line 3 and 4 should not be replaced by quotation marks, but a `{sleep}` and a `{clear}` command. Can you make it work?\n\n### Exercise 2\nGo back to the previous level and copy your story code. Make the code work in this level by adding quotation marks in the right spots.\nMind: The variables in your own story should be outside of the quotation marks. Just like the second line of the example code. In that line the variable name is placed outside of the quotation marks.\n" + 7: + story_text: "In a story, someone says words several times. For example, when someone calls for help or sings a song.\nYou can put such repetitions in your story, in this level with `{repeat}`.\n\n### Exercise\nAdd repetition to your own story. Go back to your saved programs, choose your story program from a previous level and\nfind a line containing `{print}` and repeat it!\n" + example_code: "```\n{print} 'The prince kept calling for help'\n{repeat} 5 {times} {print} 'Help!'\n{print} 'Why is nobody helping me?'\n```\n" + 13: + story_text: "By using the `{and}` and `{or}` commands, you can make your stories more versatile. You can ask two questions and respond to the combination of answers.\n\n### Exercise 1\nLook at the example code and finish it. Then add at least 2 more `{if}` codes with `{and}` or `{or}`.\n\n### Exercise 2\nFind a story from a previous level, and add one `{and}` or `{or}`.\n" + example_code: "```\n{print} 'Our hero is walking through the forest'\n{print} 'The path splits two ways'\npath = {ask} 'Which path should she choose?'\nweapon = {ask} 'What weapon does she draw?'\n{if} path {is} 'left' {and} weapon {is} 'sword'\n _\n```\n" + 15: + story_text: "Using the `{while}` loop can make your stories more interesting. For example, you can use `{while} game == 'on'` so you can play until the game is over.\nOr you can use `{while} sword == 'lost'` so the player can't continue the game until they have found something.\n\n### Exercise\nThe example code shows you how to use the `{while}` loop in a story. Now **think of your own scenario** in which the player has to find something before they can continue.\n" + example_code: "```\nkeys = 'lost'\n{print} 'You are standing in your garden and you have lost your keys.'\n{print} 'Where do you want to look for them?'\n{print} 'You can choose: tree, flowerbed, rock, postbox'\n{while} keys == 'lost'\n location = {ask} 'Where do you want to look?'\n {if} location == 'flowerbed'\n {print} 'Here they are!'\n keys = 'found'\n {else}\n {print} 'Nope they are not at the ' location\n{print} 'Now you can enter the house!'\n```\n" + default_save_name: கதை + ask_command: + levels: + 1: + story_text: "## The ask command\nNow that you can use the `{print}` command, you are ready to learn the next command: `{ask}`. With the `{ask}` command, you can ask a question. Check it out:\n" + example_code_2: "```\n{print} Hello!\n{ask} What is your name?\n{echo} hello\n```\n" + story_text_3: "### Exercise\nTry out the `{ask}` and `{echo}` commands. Firstly, fill in the blanks to make this program work.\nThen ask 2 more questions using the `{ask}` command, after each `{ask}` use an `{echo}` to print the answer on the screen.\n" + example_code_3: "```\n_ How are you doing?\n_\n```\n" + example_code: "```\n{print} Hello!\n{ask} What is your name?\n```\n" + story_text_2: "## The `{echo}` command\nIf you want the computer to repeat the answer back to you, you can use the `{echo}` command. The answer will be echoed back at the end of the sentence, so in this example after hello.\n" + 2: + example_code_2: "```\nfavorite_animal {is} {ask} What is your favorite animal?\n{print} I like favorite_animal\n```\n" + story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n" + example_code: "```\nname {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old.\n```\n" + story_text: "## The ask command\nNow that we can use **variables** in our codes, we no longer need the `{echo}` command.\nWe can use variables to store the answers to our questions and this way we can use the answer to multiple questions in our codes.\nCheck it out:\n\nThis way your code is becoming interactive!\n" + 18: + story_text: The final change we will need to make to get Python code is changing `{ask}` into `{input}`. + example_code: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n" + description: Introduction {ask} command + name: '{ask}' + default_save_name: ask_command + and_or_command: + default_save_name: and or + name: '{and} & {or}' + levels: + 13: + example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n" + story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct." + description: introducing {and} & {or} + blackjack: + description: Try to get as close to 21 as you can + default_save_name: Blackjack + levels: + 17: + story_text: "Blackjack is a simple game of cards in which you have to get as close to 21 points as possible. You get two cards. Each card is worth their numeral value, and the face cards (Jack, Queen and King) are worth 10 points.\nThe Ace is worth either 1 or 11 points (you can choose). The dealer, your opponent, also gets two cards.\nIf you want, you can get another card, and its points will be added to your total. The dealer can also choose to take another card.\nBut be careful not to get more than 21 points, because if you do, you lose!\nThe player who gets closest to 21, without going over it, wins!\n\n### Exercise\nIn this adventure we code the first part of our Blackjack game. We'll create a function to calculate how many points a card is worth.\n\n***Set the variables***\nStart by making a list of all the cards, from 2 to Ace. Next make a list of the face cards, so Jack, Queen and King. Then pick a random card from the list of cards to be card_1.\n\n***Create a function to calculate the points***\nCreate a function that calculates how many points a card is worth.\nAll the face cards are worth 10 points, the Ace is worth 11 and all the other cards are worth their numeral.\nReturn the variable `points` at the end of the function.\n\n***Test the function***\nTest if your function is working properly. Finish the first print command by filling in which card you've drawn. Then finish the second line by calling the function with card_1.\nRun the code a couple of times. Are you happy with the results? Great! Then you can remove the testing part and move on the the next tab!\n" + example_code: "```\n{print} 'BLACKJACK'\n\n# Set these variables\ncards = _\nface_cards = _\ncard_1 =\n\n# Create a function to calculate the points\n{define} calculate_points {with} card:\n {if} card {in} face_cards:\n points = _\n {elif} _\n _\n {else}:\n _\n _ points\n\n# Test your function\n{print} 'Your card is a ' _\n{print} 'That is worth ' _ ' points'.\n```\n" + name: Blackjack + blackjack_2: + description: Blackjack part 2 + default_save_name: Blackjack_2 + name: Blackjack 2 + levels: + 17: + story_text: "### Exercise\nIn this adventure we code the second part of our Blackjack game.\n\n***Paste your code from the previous adventure***\nIn the previous adventure you've started a list of variables and created a function to calculate how many points a card is worth. Copy your code and paste it here. Mind that you don't need the testing part, so if you haven't removed that yet, please do so now.\n\n***Add more variables***\nYou have already set the lists `cards` and `face_cards` and the variable `card_1`. Underneath those variables create 3 more variables: `card_2`, dealer_card_1` and `dealer_card_2`. These variables are all set to a random card from the list of cards.\n\n***Add up points***\nTo calculate how many points you have scored we call the function with card 1 and we do it again for card 2. Then we add both these scores together to get your total.\nDo the same thing for the dealers points, but be sure to use the dealer's cards and not your own!\n\n***2 Aces***\nYou're doing great! Almost all scores can be calculated now. There is only one exception: 2 Aces. If you get 2 Aces, your total is 12 points and not 22 (because 22 points would be losing!). This of course also goes for the dealer.\n\n***Show the score***\nLastly, you want to tell the program to tell you which cards you have drawn and how many points that is. Then show which cards the dealer has and how many points they have.\n\n***Continue in the next tab***\nGreat! You have finished this part of the game! Copy your code and go to the next tab to learn how to ask for an extra card and to declare a winner.\n" + example_code: "```\n# Paste your code from the previous adventure here\n\n# Add these variables to the list of variables\ncard_2 = _\ndealer_card_1 = _\ndealer_card_2 = _\n\n# Add up your points\nyour_points_1 = {call} _ {with} card_1\nyour_points_2 = _\nyour_total = _\n\n# Add up the dealers points\ndealer_points_1 = _\n_\n_\n\n# 2 Aces\n{if} card_1 == 'Ace' {and} _\n your_total = 12\n{if} dealer_card_1 _\n dealer_total = _\n\n# Show the score\n{print} 'You have drawn a ' _ ' and a ' _ '. That is ' _ ' points'\n{print} 'The dealer has drawn a ' _ ' and a ' _ '. That is ' _ ' points'\n```\n" + blackjack_3: + description: Blackjack part 3 + default_save_name: Blackjack_3 + name: Blackjack 3 + levels: + 17: + story_text: "In the previous tabs you have learned how to draw 2 random cards for yourself and for the dealer and to calculate how many points you both got.\nIn this adventure we add the option to ask for an extra card for both you and the dealer.\n\n### Exercise\n***Paste your code from the previous adventure*** Firstly, copy your code from the previous tab and paste it here.\n\n***Extra card for you*** If you want, you can get an extra card to get your total as close to 21 as possible. First ask the player if they want an extra card.\nIf they do, pick a random card and print what they have drawn. If the card is not an Ace, you can call the function and add the points to your total.\nIn case the card is an Ace, you can't use the function, because the Ace can be either 1 point or 11 points, depending on how many points you already have earned.\nIf your total is less than 11, you want the ace to be 11 points (because this is closest to 21). So you add 11 points to your total.\nIf the total is more than or equal to 11, you want the ace to be 1 point (because you don't want more than 21 points). So you add 1 point to your total.\nLastly, print your new total of points.\n\n***Extra card for the dealer*** The dealer can also get an extra card. The dealer doesn't need to be asked, because they always get an extra card if their total is less than 17.\nCopy the 'Extra card for you code' and paste it in the dealers section. Then change it to fit the dealer picking an extra card and getting points added to their total.\n" + example_code: "```\n# Paste your code from the previous adventure here\n\n# Extra card for you\nhit = {ask} _\n{if} hit == 'yes':\n card_3 = _\n {print} _\n {if} card_3 _ 'Ace':\n your_points_3 = _\n your_total = _\n {else}:\n {if} your_total _\n _\n {else}:\n _\n {print} _\n\n# Extra card for the dealer\n{if} dealer_total < 17\n_\n```\n" + calculator: + name: Calculator + levels: + 6: + story_text_3: "**Extra** You can also let the computer do random products on its own using `{random}`.\n" + example_code_3: "```\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber_1 = _\nnumber_2 = _\ncorrect_answer = number_1 * number_2\ngiven_answer = {ask} 'What is ' number_1 ' times ' number_2 '?'\n{if} _\n{else} _\n```" + story_text_2: "### Exercise\nThe calculator above will calculate the answer for you, but you can also make a program to test your own maths skills, like this:\nFill in the blanks to make it complete!\n" + story_text: "Now that you can do maths, you can make a calculator yourself!\n" + example_code: "```\nnumber_1 = {ask} 'Fill in the first number:'\nnumber_2 = {ask} 'Fill in the second number:'\ncorrect_answer = number_1 * number_2\n{print} number_1 ' times ' number_2 ' is ' correct_answer\n```\n" + example_code_2: "```\ncorrect_answer = 11 * 27\nanswer = {ask} 'How much is 11 times 27?'\n{if} answer {is} _ {print} 'good job!'\n{else} {print} 'Wrong! It was ' _\n```\n" + 10: + example_code: "```\nnumbers = 1, 2, 3\n{for} _\n {for} _\n answer = {ask} _\n correct = number_1 * number_2\n {if} answer {is} correct\n {print} 'Great job!'\n {else}\n {print} 'That is wrong. The right answer is ' correct\n```\n" + story_text: "This calculator game helps you practise your tables of multiplication!\n### Exercise\nFill in the blanks. We want this program to ask the player these questions:\n```\nHow much is 1 times 1?\nHow much is 1 times 2?\nHow much is 1 times 3?\nHow much is 2 times 1?\nHow much is 2 times 2?\nHow much is 2 times 3?\nHow much is 3 times 1?\nHow much is 3 times 2?\nHow much is 3 times 3?\n_\n```\n" + 13: + example_code: "```\nanswer1 = {ask} 'What is 10 times 7?'\nanswer2 = {ask} 'What is 6 times 7?'\n{if} _ _ _ _ _ _ _\n {print} _\n```\n" + story_text: "### Exercise 1\nLet's make the practice program a bit harder. The player now has to answers two questions correctly. Fill out the blanks to complete the program.\n\n### Exercise 2\nSometimes, calculations have multiple correct answers. For example, 10 can be divided by 5 and by 2. So the question 'What number divides 10?' can be answered by 2 and by 5.\nAsk for a calculation that has multiple correct answers, ask the player to answer it, and determine if it is correct using `{or}`.\nEmpty the programming field and create your own solution.\n" + 14: + example_code: "```\n{define} calculate_mean_grade\n total = 0\n {for} i {in} {range} 1 {to} 4\n grade = {ask} _\n total = total + _\n {return} _ / 4\n\nmean_grade = {call} _\n{print} 'Your mean grade is ' mean_grade\n```\n" + story_text: "In this adventure you will build a calculator that calculates your mean grade for you. If you get your calculator to work, you can move on to the next adventure, which allows you to add two extra features.\n\n### Exercise 1\nFill in the blanks to get the calculator to work.\n* Start with the fourth line, add a question to figure out what grade the student got.\n* In the fifth line you'll want to calculate the total of all grades, so the total = total + grade.\n* Then we get to set the return value. We want to return the mean, so the total devided by the amount of tests (4).\n* Lastly we finish the code by calling the function in line 8.\n\nDid you get it? Awesome! Would you like to add even more to your calculator? **This adventure continues in the next tab!**\n" + 9: + story_text: "In a previous level, you've created a calculator. In this level, you can expand that code so it asks multiple questions.\n\n### Exercise 1\nCan you finish line 10 to get the code to work?\n\n### Exercise 2\nGive the player feedback when they enter an answer, like `{print} 'Correct!'` or `{print} 'Wrong! The correct answer is ' correct_answer`.\n" + example_code: "```\nscore = 0\n{repeat} 10 {times}\n numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n number_1 = numbers {at} {random}\n number_2 = numbers {at} {random}\n correct_answer = number_1 * number_2\n {print} 'What is ' number_1 ' times ' number_2 '?'\n answer = {ask} 'Type your answer here...'\n {print} 'Your answer is ' answer\n {if} _ {is} _\n score = score + 1\n{print} 'Great job! Your score is... ' score ' out of 10!'\n```\n" + 12: + story_text: "In this level, you can make a calculator that works for decimal numbers.\n\n### Exercise 1\nFill out the blanks to complete the calculator. Remember to use a period and not a comma for decimal numbers.\n\n### Exercise 2\nCreate a new mathematics practice program, but now use decimal numbers.\nCreate a list of numbers, choose two to multiple and let the player answer.\nAnd of course you have to validate the answer! **Extra** Increase the difficulty by adding lives: A player loses a life for a wrong answer and after three wrong answers the game ends.\n" + example_code: "```\nnumber1 = {ask} 'What is the first number?'\nnumber2 = {ask} 'What is the second number?'\nanswer = _\n{print} number1 ' plus ' number2 ' is ' _\n```\n" + 15: + example_code: "```\n{define} new_question\n numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n number_1 = numbers {at} {random}\n number_2 = numbers {at} {random}\n correct = number_1 * number_2\n answer = 0\n _\n _\n _\n {print} 'Well done!'\n\n{print} 'Give 10 correct answers to win!'\n{for} i {in} {range} 1 {to} 10\n _\n{print} 'You win!'\n```\n" + story_text: "You can add the `{while}` loop to the calculator game you've learned to make in a previous level.\nThis makes sure the player can't continue to the next question if they answer incorrectly.\n\n### Exercise\nAdd the `{while}` loop in the function, ask the player what number_1 times number_2 is and print their answer.\nThen `{call}` the function.\n" + 11: + story_text: "With a `{for}` you can simplify tables of multiplication practise program.\n\n### Exercise 1\nImprove the example code such that it prints a nice multiplication table:
\"1 times 10 is 10\", \"2 times 10 is 20\", etc.\n\n### Exercise 2\nGo back to your level 10 multiplication code, and modify it so that it uses a `{for}` and `{range}`.\n" + example_code: "```\nnumber = 10\n{for} i {in} {range} 1 {to} 10\n {print} i * number\n```\n" + default_save_name: Calculator + description: Create a calculator + calculator_2: + name: Calculator 2 + levels: + 14: + story_text: "### Exercise 2\n**This is the second part of this adventure.** The adventure starts in the previous tab.\nOf course, you don't always want to calculate the mean of 4 tests. You might want to calculate the mean of 10 tests or only 2...\nWe can fix this problem by adding the argument and variable 'amount_of_tests'.\n* Start a new line on line 3. Set the amount_of_tests argument by asking the student how many tests they have made.\n* Change the 4 in line 4 to the new argument amount_of_tests.\n* Lastly, change the 4 in line 6 to amount_of_tests\n\nTry out your new program. Does it work?\n\n### Exercise 3\nDid you want to make your program even better? Great! In the previous program you could only calculate the mean grade of 1 subject, but it would be better if you could calculate the mean grade for all subjects you want!\nWe won't tell you how to do it, but we will give you one tip: Start your code in line 1 with: define calculate_mean_grade with subject.\n" + example_code: "```\n# Use your own code from the previous adventure.\n```\n" + default_save_name: Calculator 2 + description: Calculator 2 + clear_command: + default_save_name: clear_command + description: '{clear} command' + levels: + 4: + example_code: "```\n{print} '3'\n{clear}\n{print} '2'\n{clear}\n{print} '1'\n{clear}\n{print} 'wait for it...'\n{sleep} 3\n{clear}\n{print} 'SURPRISE!'\n```\n" + story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, you might need to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read as you can see in the example!\n" + name: '{clear}' + debugging: + name: debugging + default_save_name: debugging + levels: + 2: + example_code: "**Warning! This code needs to be debugged!**\n```\ndestination {ask} Where are you going on holidays?\n{print} The flight to dstination leaves at 3 pm.\n{ask} Did you check in your luggage yet?\n{echo}\n{print} Let me print your boarding pass for you.\n{sleep}\nHere you go! Have a nice trip!\n```\n" + story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will give you a code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\nDebug this code. Good luck!" + 3: + story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will give you a code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\nmovie_choices {is} dracula, fast and furious, home alone, barbie\nchosen_movie {is} movies {at} {random}\n{print} Tonight we will watch chosen _movies\nlike {ask} Do you like that movie?\n{print} Tomorrow we will watch something else.\n{add} chosen_movie {to_list} movie_choices\n{print} Tomorrow we will watch tomorrows_movie\ntomorrows_movie {is} movie_choices {at} {random}\nI'll go get the popcorn! {print}\n```\n" + 4: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Welcome to the online library!\n{ask} What genre of books do you like?\n{print} You like genre\nauthor {is} {ask} 'Who's your favorite author?'\n{print} 'author is your favorite author'\n{print} Hmmm... i think you should try... books {at} {random}\n```\n" + 5: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} Welcome to Swimming Pool Hedy!\nclass {is} {ask} 'Are you here to join a class today?'\n{if} class yes\n{print} 'Great! You're joining a class!\n{print} {else} 'You will not be joining a class'\ndiscount {is} 'Do you have a discount code?'\n{if} discount {is} yes\ndiscount_answer {is} {ask} 'What's your discount code?'\ndiscount_codes = Senior4231, Student8786, NewMember6709\n{if} discount_answer {is} {in} discount_cods\n{print} 'That will be $3,50'\n'That will be $5,50'\n{print} 'Have a nice swim!'\n```\n" + 6: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Vending machine'\nchosen_product = {ask} 'Please select a product'\n1_dollar_products = coke orange juice water\n2_dollar_products = chocolate, cookie, museli bar\n3dollar_prodcuts = potato chips, beef jerky, banana bread\n{if} chosen {is} {in} 1_dollar_products\nprice = 1\n{if} chosen_product {is} 2_dollar_products\nprice = 2\n{else} chosen_product {in} 3_dollar_products\nprice = 3\namount_of_products = '{ask} How many of ' chosen_product would you like to have?'\ntotal = price + amount_of_product\n{print} 'That will be $' price 'please'\n```\n" + 8: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Welcome to Manicures and Pedicures by Hedy'\nbodypart = {ask} 'Are you getting your fingernails or toenails done today? Or both?'\n{if} bodyparts {is} both\n {print} That will be $25'\n price = 25\n {else}\n {print} That will be $18'\n price = 18\ncolor = {ask} What color would you like?\nsparkles = {ask} 'Would you like some sparkles with that?'\n{if} sparkles {is} yes\n {print} 'We charge $3 extra for that'\nprice = price + 3\n{else} {print} 'No sparkles' {print} 'So no extra charge'\n{sleep} 5\n{print} 'All done! That will be $' price ' please!'\n{print} 'Thank you! Byebye!'\n```" + 12: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{define} greet\ngreetings = 'Hello', 'Hi there', 'Goodevening'\n {print} greetings {at} {random}\n\n{define} take_order\n food = {ask} 'What would you like to eat?'\n {print} 'One food'\n drink = 'What would you like to drink?'\n {print} 'One ' drink\n more = {ask} 'Would you like anything else?'\n {if} more {is} 'no'\n {print} 'Alright'\n {else}\n {print} 'And ' more\n{print} 'Thank you'\n\n{print} 'Welcome to our restaurant'\npeople = {ask} 'How many people are in your party tonight?'\n{for} i {in} {range} 0 {to} people\n {call} greet_costumer\n```\n" + 13: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{define}movie_recommendation {with} name\n action_movies == 'Die Hard', 'Fast and Furious', 'Inglorious Bastards'\n romance_movies = 'Love Actually', 'The Notebook', 'Titanic'\n comedy_movies = 'Mr Bean' 'Barbie''Deadpool'\n kids_movies = 'Minions', 'Paddington', 'Encanto'\n {if} name {is} 'Camila' {or} name {is} 'Manuel'\n recommended_movie = kids_movie {at} {random}\n {if} name {is} 'Pedro' {or} 'Gabriella'\n mood = {ask} 'What you in the mood for?'\n {if} mood {is} 'action'\n recommended_movie = comedy_movies {at} {random}\n {if} mood {is} 'romance'\n recommended_movie = romance_movies\n {if} mood {is} 'comedy'\n recommended_movie = comedy_movies {at} {random}\n\n{print} 'I would recommend ' recommended_movie ' for ' name\n\nname = {ask} 'Who is watching?'\nrecommendation = {ask} 'Would you like a recommendation?'\n{if} recommendaion {is} 'yes'\n{print} movie_recommendation {with} name\n{else}\n{print} 'No problem!'\n```\n" + 15: + story_text: "### Exercise\nDebug this random children's story. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\nnames = 'Tanya', 'Romy', 'Kayla', 'Aldrin', 'Ali'\nverbs='walking', 'skipping', 'cycling', 'driving', 'running'\nlocations = 'on a mountaintop', 'in the supermarket', 'to the swimming pool'\nhiding_spots = 'behind a tree', under a table', in a box'\nsounds = 'a trumpet', 'a car crash', 'thunder'\ncauses_of_noise = 'a television', 'a kid with firecrackers', 'a magic elephant', 'a dream'\n\nchosen_ name = names {at} {random}\nchosen_verb = verbs {at} {random}\nchosen_location = 'locations {at} {random}'\nchosen_sounds = noises {at} {random}\nchosen_spot = hiding_spots {random}\nchosen_causes = causes_of_noise {at} {random}\n\n{print} chosen_name ' was ' chosen_verb ' ' chosen_location\n{print} 'when they suddenly heard a sound like ' sounds {at} {random}\n{print} chosen_name ' looked around, but they couldn't discover where the noise came from'\n{print} chosen_name ' hid ' chosen_spot'\n{print} 'They tried to look around, but couldn't see anything from there'\nhidden = 'yes'\n{while} hidden = 'yes'\n {print} chosen_name 'still didn't see anything'\nanswer = {ask} 'does ' chosen_name ' move from their hiding spot?'\n {if} answer = 'yes'\n hidden == 'no'\n{print} 'chosen_name moved from' chosen_spot\n{print} 'And then they saw it was just' chosen_cause\n{print} chosen_name 'laughed and went on with their day'\n{print} The End\n```\n" + 17: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{define} food_order\n toppings = {ask} 'pepperoni, tuna, veggie or cheese?'\n size = {ask} 'big, medium or small?'\n number_of_pizza = {ask} 'How many these pizzas would you like?'\n\n {print} 'YOU ORDERED'\n {print} number_of_pizzas ' size ' topping ' pizza'\n\n{define} drinks_order\n drink = {ask} 'water, coke, icetea, lemonade or coffee?'\n number_of_drinks = {ask} 'How many of these drinks would you like?'\n\n {print} 'YOU ORDERED'\n {print} number_of_drinks ' ' drink\n\n'Welcome to Hedy pizza'\nmore_food = {ask} 'Would you like to order a pizza?'\n{while} more_food = 'yes'\n {return} food_order\n more_food = {ask} 'Would you like to order a pizza?'\nmore_drinks = {ask} 'Would you like to order some drinks?'\n{while} more_drinks == 'yes'\n {call} drink_order\n more_drinks == {ask} 'Would you like to order more drinks?'\n\n\n{print} 'Thanks for ordering!'\n```\n" + 11: + story_text: "### Exercise\nDebug this calendar program. The output of this program is supposed to look like a list of dates.\nFor example:\n\n```\nHedy calendar\nHere are all the days of November\nNovember 1\nNovember 2\nNovember 3\n```\nAnd so on.\n\nMind that you have to test your code extra carefully for the month February, because the amount of days in this month changes in leap years." + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Hedy calendar'\nmonths_with_31 days = January, March, May, July, September, October, December\nmonths_with_30_days = April, June, August, November\nmonth = {ask} 'Which month would you like to see?'\n{if} month {in} months_with_31_days\n days = 31\n {if} month {in} months_with30_days\n days = 30\n{if} month = February\n leap_years = 2020, 2024, 2028, 2036, 2040, 2044, 2028\n year = {ask} 'What year is it?'\n{if} year {in} leap_years\n days = 29\n{else}\n days = 28\n\n{print} 'Here are all the days of ' moth\n{for} i {in} {range} 1 {to} days\n {print} month i\n```\n" + 10: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\nnames = Muad Hasan Samira Noura\nactivities = fly a kite, go swimming, go hiking, catch tan in the sun\n{for} name {is} names\n{print} At the beach name loves to activity {at} {random}\n```\n" + 14: + example_code: "**Warning! This code needs to be debugged!**\n```\n{define} calculate_heartbeat\n {print} 'Press your fingertips gently against the side of your neck'\n {print} '(just under your jawline)'\n {print} 'Count the number of beats you feel for 15 seconds'\n beats == {ask} 'How many beats do you feel in 15 seconds?'\n heartbeat = beats*4\n {print} 'Your heartbeat is ' heartbeat\n {if} heartbeat >= 60 {or} heartbeat <= 100\n {print} 'Your heartbeat seems fine'\n {else}\n {if} heartbeat > 60\n {print} 'Your heartbeat seems to be too low'\n {if} heartbeat < 100\n {print} 'Your heartbeat seems to be too high'\n {print} 'You might want to contact a medical professional'\n\nmeasure_heartbeat = {ask} 'Would you like to measure your heartbeat?'\n{if} measure_heartbeat = 'yes'\n {call} measure_heartbeat\n{else}\n 'no problem'\n```\n" + story_text: "### Exercise\nDebug this code. Good luck!" + 1: + story_text: "Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.\nThat means that in these debugging adventures, we will show you code that does not work yet.\nYou will have to figure out what's wrong and correct the mistakes.\n\n### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} I love programming\nDo you love programming too?\n{echo}\n{print} What are your hobbies?\n{echo} Your hobbies are\n```\n" + 18: + story_text: "### Exercise\nDebug this Old MacDonald program from level 16. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\nanimals = ['pig', 'dog', 'cow']\nsounds = ['oink', 'woof', 'moo']\n{for} i {in} {range} 1 {to} 3\n animal = animals[i]\n sound = sounds[i]\n {print} 'Old MacDonald had a farm'\n {print} 'E I E I O!'\n {print} 'and on that farm he had a ' animal\n {print} 'E I E I O!'\n {print} 'with a ' sound sound ' here'\n {print} 'and a ' sound sound ' there'\n {print} 'here a ' sound\n {print} 'there a ' sound\n {print} 'everywhere a ' sound sound\n```\n" + 7: + example_code: "**Warning! This code needs to be debugged!**\n```\nAre you sleeping?\nBrother John!\nMorning bells are ringing!\nDing, dang, dong!\n```\n" + story_text: "### Exercise\nSurprise! This program looks more like an output than a code. And yet, we don't want you to just add `{print}` commands in front of each line.\nFix this program to turn it into the nursery rhyme 'Brother John (Frère Jacques)' by using the {repeat} command of course!" + 16: + story_text: "### Exercise\nDebug this code. Good luck!\nTip: Make sure that you only see your score once in the end." + example_code: "**Warning! This code needs to be debugged!**\n```\ncountry = ['The Netherlands', 'Poland', 'Turkey', 'Zimbabwe', 'Thailand', 'Brasil', 'Peru', 'Australia', 'India', 'Romania' ]\ncapitals = 'Amsterdam', 'Warshaw' 'Istanbul', 'Harare', 'Bangkok', 'Brasilia', 'Lima', 'Canberra', 'New Delhi', 'Bucharest'\nscore = 0\n{for} i {in} {range} 0 {to} 10\n answer = {ask} 'What's the capital of ' countries[i]\n correct = capital[i]\n {if} answer = correct\n {print} 'Correct!'\n score = score + 1\n {else}\n {print} 'Wrong,' capitals[i] 'in the capital of' countries[i]\n {print} 'You scored ' score ' out of 10'\n\n```\n" + 9: + story_text: "### Exercise\nDebug this code. Good luck!" + example_code: "**Warning! This code needs to be debugged!**\n```\n{print} 'Welcome to our sandwich shop'\namount 'How many sandwiches would you like to buy?'\n{repeat} amount {times}\n{ask} {is} {ask} 'What kind or bread would you like your sandwich to be?'\ntypes_of_bread {is} white, wheat, rye, garlic, gluten free\n{if} chosen_bread in types_of_bread\n{print} 'Lovely!'\n{else}\n'I'm sorry we don't sell that'\ntopping {is} {ask} 'What kind of topping would you like?'\nsauce {is} {ask} 'What kind of sauce would you like?'\n{print} One chosen_bread with topping and sauce.\nprice = amount * 6\n{print} 'That will be 'price dollar' please'\n```\n" + description: debugging adventure + default: + default_save_name: intro + levels: + 1: + example_code: "```\n{print} Hello world!\n```\n" + story_text: "Welcome to Hedy! Here you can learn how to program step by step.\n\nTry the code yourself! The yellow button copies the example code to your programming field.\nThen push the green 'Run code' button under the programming field to run the code.\n\nReady? Then go to the next tab to learn how to make your own codes!\n" + 4: + example_code: "```\nname {is} Sophie\n{print} My name is name\n```\n" + story_text: "In the previous levels you've been practising with variables, but you may have come across this problem.\nYou might have tried to run a code like this:\n\nOf course you wanted to print\n\n`My name is Sophie`\n\nbut Hedy prints\n\n`My Sophie is Sophie`.\n\nIn this level this problem is fixed by using quotation marks.\n" + 8: + example_code: "```\n{repeat} 5 {times} {print} 'In the next tab you can repeat multiple lines of code at once!'\n```\n" + story_text: "Now you've learned how to repeat one single line of code. This comes in handy, but it's not always enough. Sometimes you want to repeat multiple lines at once.\nThis level allows you to group a couple of lines of code, and repeat that little group of lines all at once!\n" + 9: + story_text: "Great job! You've reached another new level! In the previous level you've learned to use multiple lines of code in an {if} or {repeat} command. But you can't yet combine the two...\nGood news! In this level you will be allowed to put an {if} inside an {if}, or inside a {repeat} command. Putting a block of code inside another block of code is called nesting. ``` Putting a block of code inside another block of code is called nesting.\n" + example_code: "```\nanswer = {ask} 'Are you ready to learn something new?'\n{if} answer {is} yes\n {print} 'Great! You can learn to use the repeat command in the if command!'\n {print} 'Hooray!'\n {print} 'Hooray!'\n {print} 'Hooray!'\n{else}\n {print} 'Maybe you should practice some more in the previous level'\n" + 15: + story_text: "In this game below a code has been made to make sure the player can play on as long as they want...\nBut the code is ineffective and way too long. Also, what if the player wants to play 101 games instead of 100?\nYou can't play to infinity?\nIn this level you will learn a command that makes all of this a lot easier!\n" + example_code: "```\ngame = 'on'\n{for} i {in} {range} 1 {to} 100\n {if} game == 'on'\n answer = {ask} 'Do you want to continue?'\n {if} answer == 'no'\n game = 'over'\n {if} answer == 'yes'\n {print} 'Ok we will continue'\n```\n" + 16: + example_code: "```\nanimals = 'chicken', 'horse', 'cow'\nsounds = 'cluck', 'neigh', 'moo'\n{for} animal {in} animals\n {print} 'A ' animal ' says ' sounds {at} {random}\n```\nYou could also try to make it work this way, but....\n```\nanimals = 'chicken', 'horse', 'cow'\nsounds = 'cluck', 'neigh', 'moo'\n{for} animal {in} animals\n {for} sound {in} sounds\n {print} 'A ' animal ' says ' sound\n```\nNote: These codes will not work like this in this level. Head to the next tab to see which parts you need to correct." + story_text: "In this level we will grow a bit more towards real Python code. You will also learn how to match two lists together.\nThis way you can program a code in which the correct animal is matched to the right sound.\nBecause the two codes below... Are obviously nonsense!\n" + 17: + story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n\nIn this level you can also use a new command: `{elif}`. `{elif}` is short for ``{else} {if}`` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n" + 10: + example_code: "```\n{repeat} 2 {times}\n {print} 'if youre happy and you know it clap your hands'\n{print} 'if youre happy and you know it and you really want to show it'\n{print} 'if youre happy and you know it clap your hands'\n```\n" + story_text: "You're doing great! In the previous levels we still faced a small problem. You have learned to repeat lines, but what if you'd want to slightly change the line.\nFor example if you want to sing the song 'if you're happy and you know it'. It would look like this:\n\nIf you'd also want the next verse 'stomp your feet', and the next one, and the next one, you'd have to change the code completely.\nIn this level you'll learn the `{for}` command, which allows you to make a list of actions and repeat the code with another action each time!\nPlease take a look!\n" + 12: + story_text: "Maybe you have tried using decimal numbers in your restaurant adventure. If you did, you probably noticed that Hedy didn't understand them yet and always rounded off.\nFrom this level on you can use decimal numbers.\n" + example_code: "```\nburger = 5\ndrink = 2\ntotal = burger + drink\nprint 'You have ordered a burger and a drink'\nprint 'That costs ' total ' dollars please'\n```\n" + 6: + example_code: "```\nfood_price {is} 0\ndrink_price {is} 0\ntotal_price {is} 0\n{print} 'Welcome to McHedy'\norder {is} {ask} 'What would you like to eat?'\n{if} order {is} hamburger food_price {is} 5\n{if} order {is} fries food_price {is} 2\ndrink {is} {ask} 'What would you like to drink?'\n{if} drink {is} water drink_price {is} 0\n{else} drink_price {is} 3\ntotal_price {is} food_price + drink_price\n{print} 'That will be ' total_price ' dollars, please'\n```\n" + story_text: "In the previous level you have practiced with `{ask}` and `{if}`. For example you can ask guests what they would like to eat.\nWhat you can't yet do though, is calculate the price for everyone's dinner.\n\nThis level makes it possible to use addition, subtraction and multiplication in your programs. This way you can calculate the prices in your restaurant, but you could also add a secret code to give your friends and family a discount.\nAnother option in this level is programming your own maths game, for your little brother or sister to practice their multiplications.\nGo see for yourself!\n" + 7: + story_text: "Great job! You've reached the next level, which means you have practiced with `{if}` and `{else}`. You have probably noticed that your codes are getting longer and longer.\nFor example if you want to program 'Happy Birthday'.\n\nThat's a lot of code for mainly the same words over and over again. Luckily in the next tab you'll learn a solution with the `{repeat}` command, that allows you to repeat a line of code multiple times.\n" + example_code: "```\n{print} 'happy birthday to you'\n{print} 'happy birthday to you'\n{print} 'happy birthday dear Hedy'\n{print} 'happy birthday to you'\n```\n" + 13: + example_code: "```\nusername = {ask} 'What is your username?'\npassword = {ask} 'What is your password?'\n{if} username {is} 'Hedy'\n {if} password {is} 'secret'\n {print} 'Welcome Hedy!'\n {else}\n {print} 'Access denied'\n{else}\n {print} 'Access denied!'\n```\n" + story_text: "In the previous levels you've learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:\n\nIn this system you have to give both the correct username and the correct password.\nIn this level you will learn the `{and}` command that will make this code a lot shorter and more understandable!\nCheck it out!\n" + 11: + story_text: "You have reached level 11, you're doing great! In the higher levels, Hedy is focussing more and more on teaching you the programming language Python.\nIn Python there is no `{repeat}` command, but there is a command that works like {repeat}. Are you curious to find out how to say `{repeat}` in Python language? Quickly go on to find out!\n" + 3: + story_text: "In the previous level you've learned what a variable is and how you can use it to make your adventures more interactive.\nBut... that's not the only thing you can do with variables! You can also use variables to make lists.\nAnd you can even let Hedy pick a random word out of a list, which allows you to make real games!\nTake a quick look at the next tab!\n" + 2: + story_text: "Congratulations! You've reached level 2. Hopefully you've already made some awesome codes!\nIn the first level you might've notice that the `{echo}` command can only save one bit of information at a time.\nFor example in the restaurant adventure, you could echo what the costumer wanted to eat, or what they wanted to drink, but not both in one sentence.\n\nThat changes in level 2. In level 2 you'll learn to work with variables, that allow you to save multiple pieces of information and print them in any place you want.\nSo let's go to the next tab!\n" + example_code: "**Warning! This code does not work!**\nIn Hedy commands will change sometimes. `{echo}` for example only works in level 1. In this level you'll learn a better way to echo answers back.\n```\n{print} Welcome at Hedy's\n{ask} What would you like to eat?\n{echo} So you want\n{ask} what would you like to drink?\n{echo} So you want\n```\n" + 14: + story_text: "With the example code you can calculate if you've passed a subject at school (so, a grade of six or higher).\nYou can see this code is extremely inefficient, due to the very long code in line 5.\nAll the different grades from 1 to 5 had to be programmed separately. Lucky for you, in this level you'll learn how to do this without this extremely long code!\n" + example_code: "```\nfirst_grade = {ask} 'What score did you get on your first test?'\nsecond_grade = {ask} 'What score did you get on your second test?'\nadded = first_grade + second_grade\nmean_grade = added / 2\n{if} mean_grade = 1 {or} mean_grade = 2 {or} mean_grade = 3 {or} mean_grade = 4 {or} mean_grade = 5\n {print} 'Oh no! You have failed the subject...'\n{else}\n {print} 'Great! You have passed the subject!'\n```\n" + 5: + example_code: "```\npassword {is} {ask} 'What is the correct password?'\n```\n" + story_text: "In the previous levels you've already learned to use `{at} {random}` which made your games different every time you ran the code.\nBut it's not really interactive, the player doesn't have any influence on what happens in the game.\n\nIn this level you'll learn the `{if}` command, that allows you to give different responses in your program. This way you can program a secret password for your computer for example.\nSo let's go to next tab for the new command!\n" + 18: + story_text: "Congratulations! You have reached the last level of Hedy! The code you have created here can be copied to real Python environments like replit or PyCharm, and you can continue learning there!\nNote however that Python can only read English commands, so if you have been using other languages, you will need to switch to English now.\n" + name: Introduction + description: Level explanation + dice: + default_save_name: Dice + name: Dice + levels: + 3: + example_code_2: "```\nchoices {is} _\n```\n" + story_text_2: "### Exercise\nThe dice in the example above are dice for a specific game. Can you make normal dice?\nOr other special dice from a different game?\n" + example_code: "```\nchoices {is} 1, 2, 3, 4, 5, earthworm\n{print} You threw _ {at} {random} !\n```\n" + story_text: "In this level we can choose from a list. With that we can let the computer choose one side of the die.\nTake a look at the games you have in your closet at home.\nAre there games with a (special) die? You can also copy it with this code.\nFor example, the dice of the game Earthworms with the numbers 1 to 5 and an earthworm on it.\n\n![Die of earthworms with 1 to 5 and an earthworm on it](https://cdn.jsdelivr.net/gh/felienne/hedy@24f19e9ac16c981517e7243120bc714912407eb5/coursedata/img/dobbelsteen.jpeg)\n" + 7: + example_code: "```\nchoices = 1, 2, 3, 4, 5, 6\n_ _ _ _ _ _ _\n```\n" + story_text: "You can also make a dice again in this level. With the `{repeat}` code you can easily roll a whole hand of dice.\n\n### Exercise\nTry to finish the sample code! **Extra** Think of a game you know that involves a dice and program that using a `{repeat}`.\n" + 6: + story_text: "You can also make an Earthworm die again in this, but now you can also calculate how many points have been rolled.\nYou may know that the worm counts 5 points for Earthworms. Now after a roll you can immediately calculate how many points you have thrown.\nThis is the code to calculate points for one die:\n\n### Exercise\nCan you make the code so that you get the total score for 8 dice? To do that, you have to copy and paste some lines of the code.\n" + example_code: "```\nchoices = 1, 2, 3, 4, 5, earthworm\npoints = 0\nthrow = choices {at} {random}\n{print} 'you threw ' throw\n{if} throw {is} earthworm points = points + 5 {else} points = points + throw\n{print} 'those are ' points ' points'\n```\n" + example_code_2: "Did you manage to calculate the score for 8 dice? That required a lot of copy and pasting, right? We are going to make that easier in level 7!\n" + 15: + example_code: "```\noptions = 1, 2, 3, 4, 5, 6\n{print} 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\n_\n_\n_\n_\n_\n{print} 'Yes! You have thrown 6 in ' tries ' tries.'\n```\n" + story_text: "### Exercise\nIn this level you can create a little game in which you'll have to throw 6 as fast as possible.\nWe have started the code, it's up to you to get the game to work!\n\nFirstly, add a `{while}` loop that checks if 6 has been thrown or not.\nAs long as you haven't thrown 6 already, throw the dice on a random number.\nPrint what the player has thrown.\nAdd a try to the amount of tries\nWait a second before you throw again, or - in case you've thrown a 6 - before the game ends.\n" + 10: + story_text: "### Exercise\nIs everybody taking too long throwing the dice? In this level you can let Hedy throw all the dice at once!\nChange the names into names of your friends or family, and finish the code.\n" + example_code: "```\nplayers = Ann, John, Jesse\nchoices = 1, 2, 3, 4, 5, 6\n_ _ _ _\n {print} player ' throws ' choices {at} {random}\n {sleep}\n```\n" + 4: + story_text: "In this level you can also create dice. But this time you can try it yourself, without an example code!\n\n### Exercise\nMake your own dice in this level.\nTip: If you have no idea how to make dice. Take a peek at your dice from the previous level, but don't forget to add quotation marks.\n" + 5: + example_code: "```\nchoices {is} 1, 2, 3, 4, 5, earthworm\nthrow {is} choices {at} {random}\n{print} 'you have thrown ' throw\n_ throw {is} earthworm {print} 'You can stop throwing.'\n_ {print} 'You have to throw it again!'\n```\n" + story_text: "We are going to add the `{if}` and `{else}` commands to our dice!\n\n### Exercise\nComplete the sample code so that the code says \"You can stop throwing\" once you have thrown an earthworm. It should say \"You have to throw again\" if you've thrown anything else.\n**Extra** Maybe you want to recreate a die from a completely different game. That's fine too! Then make up your own reaction, e.g. 'yes' for 6 and 'pity' for something else.\n" + description: Make your own dice + dishes: + description: Use the computer to see who does the dishes + levels: + 3: + story_text: "Do you always disagree at home about who should wash the dishes or change the litter box today?\nThen you can let the computer choose very fairly. You can program that in this level!\n" + story_text_2: "### Exercise\nMake your own version of the dishwasher program. Firstly make a list of your family members.\nThen think of a task that needs to be done, and let the computer decide who has to do the task with the `{at} {random}` command.\n\n**Extra** Don't feel like doing the dishes yourself? Hack the program by removing your name from the list with the `{remove}` `{from}` command.\n" + example_code: "```\npeople {is} mom, dad, Emma, Sophie\n{print} people {at} {random} has to do the dishes\n```\n" + 4: + example_code: "```\npeople {is} mom, dad, Emma, Sophie\n{print} _ the dishes are done by _\n{sleep}\n{print} people {at} _\n```\n" + story_text: "With quotation marks you can make your dishwashing program even better.\n\n### Exercise\nFirst, fill in right symbols or commands on the blanks to make this example program work.\nDid you get it? Great! Now copy your own code from the previous level and make it work in this level by adding quotation marks in the right spots.\n" + 10: + example_code: "```\ndays = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday\nnames = mom, dad, Emma, Sophie\n{for} day {in} days\n {print} names {at} {random} ' does the dishes on ' day\n```\n" + story_text: "In this level you can make a schedule for the whole week in an easy way!\n\n### Exercise\nAdd a second chore, such as vacuuming or tidying up, and make sure it is also divided for the whole week.\n
**Extra** The program is not fair, you can be unlucky and wash up all week. How could you make the program more fair?\n" + 5: + story_text: "With the `{if}` you can now have more fun with choice in the program. You can have your program respond to the choice that the computer has made.\n### Exercise\nCan you finish the code so that it prints 'too bad' when it is your turn and otherwise 'yes!'?\nDon't forget the quotes!\n" + example_code: "```\npeople {is} mom, dad, Emma, Sophie\ndishwasher {is} people {at} {random}\n_ dishwasher {is} Sophie {print} _ too bad I have to do the dishes _\n_ {print} 'luckily no dishes because ' _ ' is already washing up'\n```\n" + 6: + example_code_2: "```\npeople = mom, dad, Emma, Sophie\ndishwasher = people {at} {random}\n{print} 'Monday the dishes are done by: ' dishwasher\n{remove} dishwasher {from} people\ndishwasher = people {at} {random}\n{print} 'Tuesday the dishes are done by: ' dishwasher\n{remove} dishwasher {from} people\n```\n" + example_code: "```\npeople = mom, dad, Emma, Sophie\nemma_washes = 0\ndishwasher = people {at} {random}\n{print} 'The dishwasher is' dishwasher\n{if} dishwasher {is} Emma emma_washes = emma_washes + 1\n{print} 'Emma will do the dishes this week' emma_washes 'times'\n```\n\nNow you can copy lines 3 to 5 a few times (e.g. 7 times for a whole week) to calculate for a whole week again.\nDo you make the code for the whole week?\n" + story_text_2: "If you are extremely unlucky the previous program might choose you to do the dishes for the whole week! That's not fair!\nTo create a fairer system you can use the `{remove}` command to remove the chosen person from the list. This way you don't have to do the dishes again until everybody has had a turn.\n\nMonday and Tuesday are ready for you! Can you add the rest of the week?\nAnd… can you come up with a solution for when your list is empty?\n" + story_text: "How often is everyone going to do the dishes? Is that fair? You can count it in this level.\n" + 7: + story_text: "With the `{repeat}` you can repeat pieces of code. You can use this to calculate who will be washing dishes for multiple days!\n### Exercise\nUse the `{repeat}` command to decide on who needs to wash the dishes for an entire week. Each blank needs to be filled with one command or number!\n**Extra** Can you think of other tasks in the house? Adapt the code so it decides on three household chores. Do not forget to print what tasks it concerns!\n" + example_code: "```\npeople = mom, dad, Emma, Sophie\n{repeat} _ _ {print} 'Dishwashing will be done by ' _ _ _\n```\n" + name: Dishes? + default_save_name: Dishes + elif_command: + description: '{elif}' + levels: + 17: + story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is a combination of the keywords `{else}` and `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n" + example_code: "```\nprizes = ['1 million dollars', 'an apple pie', 'nothing']\nyour_prize = prizes[{random}]\n{print} 'You win ' your_prize\n{if} your_prize == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_prize == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n" + name: '{elif}' + default_save_name: elif + for_command: + levels: + 11: + example_code: "```\n{for} counter {in} {range} 1 {to} 10\n {print} counter\n{print} 'Ready or not. Here I come!'\n```\n" + story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements." + 18: + story_text: "Lastly, we'll turn `{for} i {in} {range} 1 to 5` into real Python code, like this:\n" + example_code: "```\n{for} i {in} {range}(1,5):\n {print} (i)\n```\n" + 10: + story_text_2: "### Exercise\nFinish this code by adding `{for} action {in} actions` to line 2.\n" + example_code_2: "```\nactions = clap your hands, stomp your feet, shout Hurray!\n_\n {repeat} 2 {times}\n {print} 'If youre happy and you know it, ' action\n {sleep} 2\n {print} 'If youre happy and you know it, and you really want to show it'\n {print} 'If youre happy and you know it, ' action\n {sleep} 3\n```\n" + example_code: "```\nanimals = dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal\n```\n" + story_text: "## For\nIn this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements.\n`{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces." + 17: + story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n" + example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'\n```\n" + default_save_name: for + name: '{for}' + description: '{for} command' + fortune: + levels: + 1: + story_text: "Have you ever been to a carnival and had your future predicted by a fortune teller? Or have you ever played with a magic eight ball?\nThen you probably know that they can't really predict your future, but it's still fun to play!\n\nIn the upcoming levels you can learn how to create your own fortune telling machine!\nIn level 1 you can start off easy by letting Hedy introduce herself as a fortune teller and let her `{echo}` the players' answers.\nLike this:\n" + example_code: "```\n_ Hello, I'm Hedy the fortune teller!\n_ Who are you?\n_ Let me take a look in my crystal ball\n_ I see... I see...\n_ Your name is\n```\n" + story_text_2: "### Exercise\nCopy the example code into your input screen and fill in the blanks to make the code work.\n**Extra** Change the code and let the fortune teller not only predict your name, but also your age, your favorite sports team or something else about yourself.\n" + 10: + story_text: "In this level you'll learn how to program the game MASH (mansion, apartment, shack, house). In this game you can predict for all the players at once, what their future will look like.\n\n### Exercise\nFil in the blanks by using the new command that you've learned this level.\n" + example_code: "```\nhouses = mansion, apartment, shack, house\nloves = nobody, a royal, their neighbour, their true love\npets = dog, cat, elephant\nnames = Jenna, Ryan, Jim\n_\n {print} name ' lives in a ' houses {at} {random}\n {print} name ' will marry ' loves {at} {random}\n {print} name ' will get a ' pets {at} {random} ' as their pet.'\n {sleep}\n```\n" + 6: + example_code: "```\n{print} 'I am Hedy the fortune teller!'\n{print} 'I can predict how many kids youll get when you grow up!'\nage = {ask} 'How old are you?'\nsiblings = {ask} 'How many siblings do you have?'\nlength = {ask} 'How tall are you in centimetres?'\nkids = length / age\nkids = kids - siblings\n{print} 'You will get ...'\n{sleep}\n{print} kids ' kids!'\n```\n" + story_text: "In this level you can use math in your predictions as a fortune teller. This allows you to make up (silly) formulas to calculate the future.\nFor example you could calculate how rich you'll get or how many kids you will have when you grow up.\n\n\n\n### Exercise\nCan you think of your own (silly) fortune telling machine?\n" + 3: + story_text_2: "### Exercise\nNow, Hedy can only answer yes, no or maybe. Can you give Hedy more answer options, like 'definitely' or 'ask again'.\n" + story_text: "In the previous levels you've created your first fortune telling machine, but Hedy couldn't really predict anything, only `{echo}`.\nIn 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:\n" + example_code: "```\n{print} I’m Hedy the fortune teller!\nquestion {is} {ask} What do you want to know?\n{print} This is what you want to know: question\nanswers {is} yes, no, maybe\n{print} My crystal ball says...\n{sleep} 2\n{print} answers {at} {random}\n```\n" + 5: + example_code: "```\nfriends {is} Jordan, Lucy, Dave\n{print} 'I can predict if you will win the lottery tomorrow!'\nperson {is} {ask} 'Who are you?'\ngood_answer {is} Hurray! You win!, You will definitely win!, We have a winner!\nbad_answer {is} Bad luck! Try again!, Another person will win, You lose!\n{if} person {in} friends {print} good_answer {at} {random}\n{else} {print} bad_answer {at} {random}\n```\n" + story_text: "### Exercise\nIn the example code you see how to make a fortune teller program that allows you to tip the odds in your favor. This cheating program always tells you that you will win the lottery, but your friends will never win.\n\nUse this to make your own program, be creative! For example you could create a code that predicts that:\n* your favorite sports team will beat all the competitors!\n* your favorite movie will be chosen for movie night!\n* you win tickets to your favorite show!\n* you are the fairest of them all, like Snow White's magic mirror.\nLet your imagination do the work!\n\nYour program has to exist of at least 10 lines of code and need to have at least one `{if}` and `{else}` command.\n" + 12: + story_text: "From level 12 on, you will also have to use quotation marks in lists, before and after each item.\n\n### Exercise\nAdd two predictions to the list" + example_code: "```\nfortunes = 'you will slip on a banana peel', _\n{print} 'I will take a look in my crystal ball for your future.'\n{print} 'I see... I see...'\n{sleep}\n{print} fortunes {at} {random}\n```\n" + 4: + example_code: "```\n_ Add the quotation marks to this code _\n{print} Im Hedy the fortune teller!\nquestion {is} {ask} What do you want to know?\n{print} This is your question: question\nanswers {is} yes, no, maybe\n{print} My crystal ball says...\n{sleep} 2\n{print} answers {at} {random}\n```\n" + story_text: "### Exercise\nWe have removed all the quotation marks from this example code, can you add them in all the right places?\n\n### Exercise 2\nGo back to the previous level and copy your fortune teller code. Make the code work in this level by adding quotation marks in the right spots.\n" + 8: + example_code: "```\n{print} 'I am Hedy the fortune teller!'\n{print} 'You can ask me 3 questions.'\nanswers = yes, no, maybe\n_ _ _\n question = {ask} 'What do you want to know?'\n {print} question\n {sleep}\n {print} 'My crystal ball says... ' answers {at} {random}\n```\n" + story_text: "In the next example you can have your fortune teller ask multiple questions and also print them!\n\n### Exercise\nCan you fill in right command on the blanks?\n" + 7: + story_text: "### Exercise\nFinish this program that tells you if your crush loves you back or not.\n" + example_code: "```\n{print} 'I have a flower with magic petals'\n{print} 'If you pick the petals the flower will tell you if your crush loves you back'\namount = {ask} 'How many petals do you want to pick?'\noptions = they love you, they love you not\n_ _ _ _ options {at} {random}\n```\n" + default_save_name: Fortune Teller + description: Let Hedy predict the future + name: Fortune teller + functions: + name: functions + description: functions + default_save_name: functions + levels: + 13: + example_code: "```\n{define} song {with} place\n {print} 'My Bonnie is over the ' place\n\n{call} song {with} 'ocean'\n{call} song {with} 'sea'\n{call} song {with} 'ocean'\n```\n" + story_text: "Now that you've learned how to use functions, you'll learn how to use a function with an argument.\nAn **argument** is a variable that is used within a function. It is not used outside the function.\n\nFor example in this code we've programmed the first verse of the song 'My Bonnie is over the ocean'.\nIn this example code the argument 'place' is used. Place is a variable that is only used in the function, so an argument.\nTo use 'place' we have placed `{with} place` after `{define} song`.\nWhen the function is called, the computer will replace the argument 'place', with the piece of text after `{call} song {with}`.\n\n### Exercise\nThe next verse of this song goes:\n\n```not_hedy_code\nLast night as I lay on my pillow\nLast night as I lay on my bed\nLast night as I lay on my pillow\nI dreamed that my Bonnie is dead\n```\n\nCan you program this verse in the same way as the example?\n" + 14: + example_code: "```\n{define} calculate_new_price {with} amount, percentage\n percentage = percentage / 100\n discount_amount = amount * percentage\n {return} amount - discount_amount\n\nold_price = {ask} 'How much is on the price tag?'\ndiscount = {ask} 'What percentage is the discount?'\n\nnew_price = _ calculate_new_price {with} old_price, _\n{print} 'The new price is ' new_price ' dollar'\n```\n" + story_text: "In the previous levels you have learned to create functions and use arguments with them. Another great use of a function is to let it calculate something for you.\nYou can give the function a calculation and it will give you the answer of the calculation. This answer is called a **return value**.\n\nFor example, in this code the function calculate_new_price will calculate the new price of any item. It will give you the new price as a return value.\n\n### Exercise\nFinish this code. We have already made the variable new_price for you, you only need to set it.\nYou should finish the line of code by calling the function that calculates the new price.\n" + 12: + story_text: "In this level you'll learn how to use **functions**. A function is a block of code you can easily use multiple times. Using functions helps us organize pieces of code that we can use again and again.\nTo create a function, use `{define}` and give the function a name. Then put all the lines you want in the function in a indented block under the `{define}` line.\nLeave one empty line in your code to make it look nice and neat. Great job! You have created a function!\n\nNow, whenever we need that block of code, we just use {call} with the function's name to call it up! We don't have to type that block of code again.\n\nCheck out this example code of a game of Twister. The function 'turn' contains a block of code that chooses which limb should go where.\n\n### Exercise\nFinish this code by setting the 2 variables chosen_limb and chosen_color.\nThen, choose how many times you want to call the function to give the twister spinner a spin.\n\n### Exercise 2\nImprove your code by adding a variable called 'people'. Use the variable to give all the players their own command in the game.\nFor example: 'Ahmed, right hand on green' or 'Jessica, left foot on yellow'.\n" + example_code: "```\nsides = 'left', 'right'\nlimbs = 'hand', 'foot'\ncolors = 'red', 'blue', 'green', 'yellow'\n\n{define} turn\n chosen_side = sides {at} {random}\n chosen_limb = limbs _\n chosen_color = colors _\n {print} chosen_side ' ' chosen_limb ' on ' chosen_color\n\n{print} 'Lets play a game of Twister!'\n{for} i {in} {range} 1 {to} _\n {call} turn\n {sleep} 2\n```\n" + 18: + story_text: "Let's make functions the Pythons way! To define a function, we no longer use:\n\n`{define} name_function {with} argument_1, argument_2:`\n\nbut we use:\n\n`{def} name_function(argument_1, argument_2):`.\n\n\nIf you don't want to use arguments, you just leave the space between the parantheses empty.\nTo call a function, we don't need the `{call}` command anymore. You just type the name of the function.\n" + example_code: "```\n{def} calculate_score(answer, correct_answer):\n {if} answer == correct_answer:\n score = 1\n {elif} answer == '?':\n score = 0\n {else}:\n score = -1\n {return} score\n\nanswer = {input} ('Where can you find the Eiffel Tower?')\ncorrect_answer = 'Paris'\nscore = calculate_score(answer, correct_answer)\n{print} ('Your score is... ', score)\n```\n" + guess_my_number: + description: guess my number + levels: + 14: + story_text: "In this level you can program the game 'Guess my number'\n\n### Exercise\nFill in the correct symbols on the blanks to get the game to work.\n" + example_code: "```\n{print} 'Guess my number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess _ number\n {print} 'Lower!'\n {if} guess _ number\n {print} 'Higher!'\n {if} guess _ number\n {print} 'You win!'\n game = 'over'\n```\n" + name: Guess my number + default_save_name: guess my number + hangman: + name: Hangman + default_save_name: Hangman + description: Guess the word + levels: + 17: + story_text: "In this adventure we program a game of hangman. First we make some preparations, then we program the game and in the third part we add a drawing with the turtle.\n\n### Exercise\n***Set the variables*** In this game of hangman, Player 1 chooses an answer and Player 2 has to guess the letters in this answer.\nTo let the computer know all the letters in the word, we will turn the answer into a list of letters. We also do this with the guesses Player 2 makes.\nWe will start the game with 2 empty lists. We have made an empty list for the variable answer for you. Now make an empty list for guessed_letters as well.\nThen we fill in how many mistakes were made. At the start of the game, this should be 0.\nThe variable `amount_letters` tells us how many letters are in the answer. Ask Player 1 to tell us how many letters their word has.\nLastly we tell the computer if the game is over. We use the variable `game_over` and set it to `False`.\n\n***Choosing the answer*** We want Player 1 to be able to choose the answer. We'll ask them, as many times as necessary, what the next letter is.\nThen we add that letter to the answer. Lastly, we add an empty _ to the list of guessed letters, so we get as many _s as there are letters in the answer.\n\n***Player 2's turn***\nTell Player 2 its their turn. Then tell Player 2 how many letters there are in the answer. Finally, print the list of `guessed_letters`.\n\n***Go to the next tab*** Now that all the starting variables are set, we can start programming the game itself. Check out the next tab to learn how!\n" + example_code: "```\nprint 'Hangman!'\n\n# Set the variables\nanswer = []\nguessed_letters = _\nmistakes_made = _\namount_letters = {ask} _\n_ = 'False'\n\n# Choosing the answer\n{for} _\n letter = {ask} 'Player 1, what is letter ' i '?'\n _\n {add} '_' {to} _\n\n# Player 2 turn\nprint _\nprint _\nprint guessed_letters\n```\n" + hangman_3: + description: Hangman 3 + default_save_name: Hangman_3 + levels: + 17: + example_code: "```\n# Create a function that draws the hangman\n{define} draw_hangman {with} step:\n {if} step == 1:\n {color} white\n {forward} -100\n {turn} 90\n {forward} -50\n {color} black\n {forward} 100\n {forward} -50\n\n {if} step == 2:\n _\n# Paste your hangman game here\n\n```\n" + story_text: "In a game of hangman the mistakes are shown by drawing a part of the hangman each time a mistake has been made.\nWe now add those drawings with our turtle!\n\n### Exercise\n***Create a function that draws the hangman*** Create a function that draws the hangman in 10 steps. We have already made step 1 for you.\n\n***Test the function*** Test the function by calling the function with 10. If you are happy with the function, remove the line that calls the function for now. We will call the function when the player makes a mistake.\n\n***Paste your hangman game under your function*** Go back to the previous tab and copy your hangman game. Paste the game underneath your function.\n\n***Call the function when the player makes a mistake*** Under the line `mistakes_made = mistakes_made + 1` we will call the function. We want the turtle to take the same amount of steps as the player has made mistakes, so we call the function with `mistakes_made` as argument.\n\n***Enjoy your game!***\n
\n The hangman could look like this \n
\n" + name: Hangman 3 + harry_potter: + levels: + 10: + story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n" + example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n" + default_save_name: Harry Potter + name: Harry Potter + description: Harry Potter adventures + haunted: + description: Escape from the haunted house + default_save_name: Haunted House + levels: + 2: + story_text: "In this haunted house you can choose your monsters with emojis. Of course you could also use words.\n" + 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...\n{print} 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" + example_code: "```\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...\n{print} 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" + 3: + example_code: "```\n_ Escape from the haunted house!\n_ There are 3 doors in front of you...\n_ _ _ Which door do you choose?\n_ You picked door ... choice\nmonsters _ a zombie, a vampire, NOTHING YOUVE ESCAPED\n_ You see...\n{sleep}\n_ _ _ _\n```\n" + story_text: "In the previous levels you've made an introduction to your haunted house game, but as you might have noticed the story would always have a dreadful end.\nIn this level you can make your story more interactive by changing the outcome of the game; sometimes you'll get eaten, sometimes you'll escape!\nLet Hedy decide randomly!\n\n### Exercise\nCopy the example codes and fill in the blanks to make it work!\n\n**Extra** This story is pretty straight forward, maybe you can spook it up a bit by adding a more exciting story.\nAlso you have very limited outcomes right now, there are only 3 options of what's behind the doors. Maybe you can think of more monsters to add to the list!\n" + 16: + story_text: "### Exercise\nThis haunted house game uses the connection between the lists you can use in this level.\nFor example: all the properties that belong to the zombie are first in all the lists, witch second and vampire third.\nCheck out the code and fill in `weapons[i]`, `monsters[i]` , `bad_fate[i]`, `good_fate[i]`, `hint[i]` on the correct blanks to get the code to work!\n" + example_code: "```\nnumbers = [1, 2, 3]\ni = numbers[{random}]\nhint = ['growling', 'a cackling laugh', 'fluttering batwings']\nmonsters = ['zombie', 'witch', 'vampire']\nbad_fate = ['Your brain is eaten', 'You are forever cursed', 'You are bitten']\ngood_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']\nweapons = ['ham', 'lighter', 'garlic']\n{print} 'You are standing in front of an old mansion'\n{print} 'Something is not right here'\n{print} 'You hear ' _\n{print} 'You are going to explore it'\n{print} 'You enter the kitchen and see a lighter, a raw ham and a garlic.'\nyour_weapon = {ask} 'What do you bring with you?'\n{print} 'With your ' your_weapon ' you enter the living room'\n{print} 'There you find a ' _\nneeded_weapon = _\n{if} your_weapon == needed_weapon\n {print} 'You use your ' your_weapon\n {print} _\n {print} 'YOU WIN!'\n{else}\n {print} 'You have chosen the wrong weapon...'\n {print} _\n {print} 'GAME OVER'\n```\n" + 14: + story_text: "### Exercise\nIn this level you can use the `<` and `>` symbol to introduce lives to your game.\nMake sure the player loses a life when they come across the wrong monster and that the game stops if you have no lives left.\n" + example_code: "```\n{print} 'Escape from the haunted house'\nlives = 3\ndoors = 1, 2, 3\nmonsters = 'the wicked witch', 'a zombie', 'a sleeping 3 headed dog'\n{for} i {in} {range} 1 {to} 10\n {if} lives _\n good_door = doors {at} {random}\n monster = monsters {at} {random}\n chosen_door = {ask} 'Which door do you choose?'\n {if} good_door == chosen_door\n {print} 'You have chosen the correct door'\n {else}\n {print} 'You see...' monster\n {if} monster == 'a sleeping 3 headed dog'\n {print} 'Pffieuw.... Its asleep'\n {else}\n {print} 'You lose one life'\n lives = _\n {else}\n {print} 'GAME OVER'\n```\n" + 9: + story_text: "In this level you can use nesting, which allows you to make the haunted house even more interactive!\n\n### Exercise\nNow it's very hard to win this game, can you make it easier to win?\nChange your code so it only has one wrong door and two correct doors instead of one correct door and two wrong ones? \nTip: This means changing the variable correct_door into wrong_door, and switching the `{if}` and `{else}` code.\nAnd of course you may also change the story and make it your own. Change the monsters or make it a happy game show where you get a gift!\n" + example_code: "```\n{print} 'Escape from the Haunted House!'\nplayer = alive\ndoors = 1, 2, 3\nmonsters = zombie, vampire, giant spider\n{repeat} 3 {times}\n {if} player {is} alive\n correct_door {is} doors {at} {random}\n {print} 'There are 3 doors in front of you...'\n chosen_door = {ask} 'Which door do you choose?'\n {if} chosen_door {is} correct_door\n {print} 'No monsters here!'\n {else}\n {print} 'You are eaten by a ' monsters {at} {random}\n player = dead\n {else}\n {print} 'GAME OVER'\n{if} player {is} alive\n {print} 'Great! You survived!'\n```\n" + 5: + example_code: "```\n{print} 'Escape from the haunted house!'\n{print} 'There are 3 doors in front of you...'\ndoors {is} 1, 2, 3\nmonsters {is} werewolf, mummy, vampire, zombie\nchosen_door {is} {ask} 'Which door do you choose?'\n{print} 'You chose door...' chosen_door\n{sleep}\ncorrect_door {is} doors {at} {random}\n_ _ _ _ {print} 'Great! Youve escaped!'\n{else} {print} 'Oh no! You are being eaten by a...' monsters {at} {random}\n```\n" + story_text: "Up until this level the haunted house game always asked the player to choose a door, but as you might have noticed, they didn't really have to answer correctly.\nIf the player filled in a completely random answer, the game would still work and the player might even win (despite not picking a door).\nIn this level you can only win the game by picking the same door Hedy picked randomly.\n\n### Exercise\nCan you find the 4 missing words to complete the code?\n" + 1: + story_text: "In this adventure you are working towards making a game in which you have to escape from a haunted house by picking the correct door.\nIf you pick the right door you'll survive, but if not a terrible monster might...\n\nIn level 1 we start our haunted house game by making up a scary story and ask the player what monster they'll see in the haunted house.\n" + example_code: "```\n{print} How did I get here?\n{print} I remember my friend telling me to go into the old mansion...\n{print} and suddenly everything went black.\n{print} But how did I end up on the floor...?\n{print} My head hurts like Ive been hit by a baseball bat!\n{print} What's that sound?\n{print} Oh no! I feel like Im not alone in this house!\n{print} I need to get out of here!\n{print} There are 3 doors in front of me..\n{ask} Which door should i pick?\n{echo} I choose door\n{print} ...?\n```\n" + story_text_2: "### Exercise\nCopy the example code to your input screen by clicking the yellow button.\nNow finish the story by adding at least 5 lines of code.\nRemember to start each line of codes with a `{print}` command.\n" + 11: + story_text: "In this level we've changed the `{for}` command so we can tell the player where they are. \n\n### Exercise 1\nFinish the program so the player knows which room they are in.\n\n### Exercise 2\nMake the program into an adventure by following these steps:\n\n1. Make a list of choices (like: fight or flight)\n2. Make sure the player can choose an option with `{ask}`\n3. Is answer correct? Then they may proceed to the next monster. Do they give a wrong answer? Let the player know with a `{print}`. \n\n**Extra** If you make a wrong choice, a monster is still shown! How could you change that?\n" + example_code: "```\n{print} 'Escape from the Haunted House!'\nmonsters = zombie, vampire, giant spider\n_\n {print} 'Room ' i\n monster = monsters {at} {random}\n```\n" + 4: + example_code: "```\n_ Add quotation marks to this code _\n{print} Escape from the haunted house!\n{print} There are 3 doors in front of you...\nchoice {is} {ask} Which door do you choose?\n{print} You picked door ... choice\nmonsters {is} a zombie, a vampire, NOTHING YOUVE ESCAPED\n{print} You see...\n{sleep}\n{print} monsters {at} {random}\n ```\n" + story_text: "In this level you learn how to use quotation marks in your games.\n\n### Exercise\nCan you make your Haunted House level 4 proof?\n\n### Exercise 2\nGo back to the previous level and copy your haunted house code. Make the code work in this level by adding quotation marks in the right spots.\n" + name: Haunted House + hotel: + description: hotel + default_save_name: hotel + name: hotel + levels: + 13: + example_code: "```\n{define} welcome_message {with} title, last_name, country, room_number\n {print} 'Welcome to Hotel Hedy, ' title ' ' last_name\n nice_trip {is} {ask} 'Did you have a nice trip from, ' country '?'\n {if} nice_trip {is} 'yes'\n {print} 'Lovely!'\n {else}\n {print} 'Sorry to hear that.'\n {print} 'Hopefully you can take a nice rest in you room.'\n {print} 'Your room number is ' room_number\n\n{print} 'Hello. Please fill in your information to check in.'\ntitle = {ask} 'What is your title (mr, mrs, ms, dr, etc.)?'\nname = {ask} 'What is you last name?'\nhomecountry = {ask} 'What country do you come from?'\n\n{call} welcome_message {with} title, name, homecountry, 105\n```\n\ntitle = {ask} 'What is your title (mr, mrs, ms, dr, etc.)?'\nname = {ask} 'What is you last name?'\nhomecountry = {ask} 'What country do you come from?'\n\n{call} welcome_message {with} title, name, homecountry, 105\n" + story_text: "In the previous adventure you have learned how to use an argument in a function, and you've learned how to combine it with an {ask}.\nYou might have wondered why you would use functions, because the functions in the example were only one line of code.\nNow we will show you what a bigger function looks like and we will use multiple agruments now as well. You'll see how much better it is to use a function once the function gets bigger.\nHere is an example of a function with arguments combined with {ask} commands.\n" + if_command: + default_save_name: if_command + levels: + 5: + example_code_3: "```\nanswer {is} {ask} '2 + 2 = ?'\n_ _ _ 4 _ 'Great job!'\n_ _ 'No 2 + 2 = 4'\n```\n" + story_text: "## If... else....\nIn level 5 there is something new, the `{if}`! With the `{if}` you can choose between two different options.\nThis code prints nice if you enter Hedy as a name, and boo! if you enter something else.\n`{ask}` and `{print}` still work like they did in level 4.\n" + story_text_2: "Sometimes code with an `{if}` gets really long and does not fit on the line well.
You may also divide the code over two lines, starting the second line at the `{else}` like this:\n" + example_code: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'\n```\n" + story_text_3: "### Exercise\nTry to create your own code with `{if}` and `{else}`. You can use the example code if you want.\n" + example_code_2: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'\n```\n" + 9: + story_text: "In this level you can also put an `{if}` command inside another `{if}` command.\n" + example_code: "```\ncontinue = {ask} 'Do you want to continue?'\n{if} 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'\n{else}\n {print} 'You do not want to continue'\n```\n" + 8: + 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" + example_code: "```\nname = {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n" + name: '{if} & {else}' + description: Introducing the {if} command + in_command: + name: '{in}' + default_save_name: in_command + levels: + 5: + example_code_2: "```\nanimals {is} dog, cow, sheep\nanswer {is} {ask} 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n" + story_text: "## Lists\nWhen we want to check if something is in a list, we can now use the `{in}` command.\nThis code prints pretty! if you choose green or yellow, and meh otherwise.\n" + example_code: "```\npretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'\n```\n" + story_text_2: "### Exercise\nFinish the example code by filling in the blanks with commands that you've learned.\nWhen you've finished the code, try to create a code of your own and use a question that you've thought of yourself.\n" + description: Introducing the {in} command + is_command: + levels: + 2: + example_code_2: "```\nfavorite_animal {is} _\n{print} I like favorite_animal\n```\n" + story_text: "## Variables\nYou can name a word with `{is}`. This is called a **variable**. In this example we made a variable called name and a variable called age. You can use the word name anywhere in your code and it will be replaced by Hedy, like this:\n" + story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animal`. In line 1 the variable is set, and in line 2 we used the variable in a `{print}` command.\nFirstly, finish our example by filling in your favorite animal on the blank. 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: "```\nname {is} Hedy\nage {is} 15\n{print} name is age years old\n```\n" + 6: + example_code: "```\nname = Hedy\nanswer = 20 + 4\n```\n" + 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" + 14: + story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n" + example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\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" + example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n" + example_code: "```\nage = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'\n```\n```\nage = {ask} 'How old are you?'\n{if} age < 12\n {print} 'You are younger than me!'\n{else}\n {print} 'You are older than me!'\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" + default_save_name: is_command + description: introducing {is} command + name: '{is}' + language: + levels: + 16: + story_text: "### Exercise\nTake a look at the example code. This is a program to practise French vocabulary. Now make your own program to practice your vocabulary in a new language.\nIf you don't know any other languages, you can use Google translate or you can use emojis and your native language.\n" + example_code: "```\nfrench_words = ['bonjour', 'ordinateur', 'pomme de terre']\ntranslation = ['hello', 'computer', 'potato']\nscore = 0\n{for} i {in} {range} 1 {to} 3\n answer = {ask} 'What does ' french_words[i] ' mean?'\n correct = translation[i]\n {if} answer == correct\n {print} 'Correct!'\n score = score + 1\n {else}\n {print} 'Wrong, ' french_words[i] ' means ' translation[i]\n{print} 'You gave ' score ' correct answers.'\n```\n" + 5: + story_text: "Make your own program to practice your vocabulary in a new language.\n\n### Exercise\nMake the code longer by adding at least 3 more words for the player to learn.\n**Extra** Of course, you can choose to use a different language than French. You can change to code to any language you'd like to learn.\n" + example_code: "```\n{print} 'Learn French!'\ncat {is} {ask} '🐱'\n{if} cat {is} chat {print} 'Terrific!'\n{else} {print} 'No, cat is chat'\nfrog {is} {ask} '🐸'\n{if} frog {is} grenouille {print} 'Super!'\n{else} {print} 'No, frog is grenouille'\n```\n" + description: Practice words in a foreign language + name: Language + default_save_name: Language + maths: + name: maths + default_save_name: maths + levels: + 6: + story_text: "In this level you learn something new: you can now also calculate.\n\nThe plus is easy, you write it like with math: `5 + 5` for example. The minus also works fine, it is `5 - 5`.\n\nThe times is a bit different, because there is no times symbol on your keyboard. Just search, there really isn't!\nThat is why we multiply with the asterisk above 8: `5 * 5`. Read that as \"5 times 5\" that helps you remember it best.\n" + example_code: "```\n{print} '5 plus 5 is ' 5 + 5\n{print} '5 minus 5 is ' 5 - 5\n{print} '5 times 5 is ' 5 * 5\n{print} '5 divided by 5 is ' 5 / 5\n```\n" + 12: + story_text_2: "**Maths with words**\nIn this level you can also do addition with words like this:" + example_code_2: "```\na = 'Hello '\nb = 'world!'\n{print} a + b\n```\n" + story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers." + example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n" + description: Introducing maths + music: + name: music + default_save_name: music + description: Play a tune! + levels: + 7: + example_code: "```\n{print} 'Twinkle Twinkle Little Star'\n{repeat} 2 {times} {play} C4\n{repeat} 2 {times} {play} G4\n_\n```\n" + story_text: "Using the `{repeat}` command can make your codes for melodies a lot shorter!\n\n### Exercise\nFinish the code for Twinkle Twinkle Little Star by using the `{repeat}`command.\nThen go back to the songs you've made in the previous levels. Can you shorten those codes too?\n" + 6: + example_code: "```\nnumber = {ask} 'Say a starting number between 1 and 67'\n{print} number\n{play} number\nnumber = number + 1\n{print} number\n{play} number\nnumber = number + 1\n{print} number\n{play} number\n```\n" + story_text: "Instead of playing notes, you can also play numbers now. Simply type `{play} 1` for the lowest note, `{play} 70` for the highest note, or anything in between.\n\n### Exercise\nThis calls for musical maths! Try out the example code a couple of times with different starting numbers.\nThen, see if you can compose a song using the numbers.\n" + 9: + story_text: "From this level on you can - among other things - use a {repeat} command inside a {repeat} command.\nThat makes songs like 'Happy birthday' even shorter!\n\n### Exercise\nFinish the song!\n" + example_code: "```\nfirst_time = yes\n{repeat} 2 {times}\n {repeat} 2 {times}\n {play} C\n {play} D\n {play} C\n {if} first_time {is} yes\n {play} F\n {play} E\n first_time {is} no\n {else}\n _\n```\n" + 4: + example_code: "```\n{print} 'Mary had a little lamb'\n{play} E\n{play} D\n{play} C\n{play} D\n{play} E\n{play} E\n{play} E\n{clear}\n{print} 'Little lamb, little lamb'\n{play} D\n{play} D\n{play} D\n{play} E\n{play} E\n{play} E\n{clear}\n{print} 'Mary had a little lamb'\n{play} E\n```\n" + story_text: "Use the `{clear}` command to create a karaoke machine!\n\n### Exercise\nFinish the karaoke version of 'Mary had a little lamb'.\nThen, create a karaoke version of any song you'd like!\n" + 3: + example_code: "```\nnotes {is} A4, B4, C4\n{play} notes {at} {random}\n{play} notes {at} {random}\n{play} notes {at} {random}\n```\n" + story_text: "Create a random melody!\n\n### Exercise\nThe example code creates a random melody, but it's very short and not many notes are used.\nAdd more notes to the list and create a longer melody by copying the last line a couple more times.\n" + 13: + example_code: "```\n{print} 'Yankee Doodle'\n{define} _ {with} note_1, note_2, note_3\n {play} C4\n {play} C4\n {play} D4\n {play} E4\n {play} _\n {play} _\n {play} _\n\n{call} line_1 {with} 29, 31, 30\n{call} line_1 {with} 29, 28, 0\n{call} line_1 {with} 32, 31, 30\n\n{play} C4\n{play} B3\n{play} G3\n{play} A3\n{play} B3\n{play} C4\n{play} C4\n```\n" + story_text: "You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.\nOne example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, but each time they are followed by a different couple of notes.\n\n### Exercise\nCan you finish the song of Yankee Doodle?\nCan you think of another song to program this way?\n" + 14: + story_text: "You can program music for fun, but you can also use the musical notes to make something useful like a fire alarm!\n\n### Exercise\nMake sure the fire alarm rings when there is a fire!\n" + example_code: "```\n{define} fire_alarm\n {print} 'FIRE!'\n note = 40\n {for} i {in} {range} 1 {to} 100\n {if} note _ 50\n note = note + 5\n {play} _\n {else}\n note = 40\n\nfire = {ask} 'Is there a fire?'\n{if} fire _ 'yes'\n {call} fire_alarm\n```\n" + 5: + story_text: "You don't always have to use the `{play}` command to play a whole song, sometimes you just want to play one note.\nFor example, if you want to make a quiz, you can play a happy high note if the answer is right and a sad low note if the answer is wrong.\n\n### Exercise\nFinish the first question by adding a line of code that plays a C3 note if the wrong answer is given.\nThen think of 3 more questions to add to this quiz.\n" + example_code: "```\nanswer {is} {ask} 'What is the capital of Zimbabwe?'\n{if} answer {is} Harare {play} C6\n_\n```\n" + 2: + story_text_2: As you can see, you can also use the `{sleep}` command to add a little pause in the song. + example_code_2: "```\n{print} Twinkle Twinkle Little Star\n{play} C\n{play} C\n{play} G\n{play} G\n{play} A\n{play} A\n{play} G\n{sleep} 1\n{play} F\n{play} F\n```\n" + example_code: "```\n{print} Old Mac Donald had a farm\n{play} C5\n{play} C5\n{play} C5\n{play} G4\n{play} A4\n{play} A4\n{play} G4\n```\n" + story_text: "### Exercise\nFinish the songs! We have started the codes for some melodies.\n" + 1: + story_text: "In this level you'll learn how to use the `{play}` command to play a tune!\n\nType `{play}` followed by the note you want to play. The scale goes C-D-E-F-G-A-B.\nAs you can see there are 7 different letters, but we can play more than just 7 notes.\nType a number between 1 and 10 behind the letter to choose the scale, for example after B4 comes C5.\nC1 is the lowest note you can play, C10 is the highest.\n\n### Exercise\nTry out the example code and then play around with it! Can you create your own melody?\nIn the next level you'll learn how to play some existing songs." + example_code: "```\n{play} C4\n{play} D4\n{play} E4\n{play} F4\n{play} G4\n{play} A4\n{play} B4\n{play} C5\n```" + 17: + story_text: "You can use the {elif} to create different options.\n\n### Exercise\nFirstly, add colons to get the code to work.\nThen finish this code by adding at least 2 other songs for other moods. For example a happy song and an angry song.\n" + example_code: "```\n{define} scary_song\n {for} i {in} {range} 1 {to} 3\n {play} G\n {play} E\n {sleep} 2\n {for} i {in} {range} 1 {to} 3\n {play} F\n {play} D\n\nmood = {ask} 'Which emotion are you feeling?'\n{if} mood {is} 'fear'\n {call} scary_song\n{elif} _\n```\n" + 18: + story_text: "### Exercise\nEven in this last level of Hedy we can make some music! Be careful of all the syntax that is needed now.\nTake a good look at how the functions are defined and called upon in the example code.\nFinish the song!\n" + example_code: "```\n{def} line_1():\n {for} i {in} {range}(1, 5):\n {play} A\n {play} D\n {play} F\n {play} A\n\n{def} line_2():\n {for} i {in} {range}(1, 5):\n {play} G\n {play} C\n {play} E\n {play} G\n\n{def} line_3():\n_\n\n{print} ('The drunken sailor')\n{print} ('What shall we do with the drunken sailor?')\nline_1()\nline_2()\nline_3()\n{print} ('Early in the morning')\n```\n" + 15: + example_code: "```\n{define} song\n {play} _\n\nyes_or_no = {ask} 'Do you want to hear my never-ending song?'\n{while} yes_or_no = 'yes'\n {call} song\n {print} '🥳'\n```\n" + story_text: "**Warning** This adventure can become extremely annoying!\nWe can also use the {while} command to repeat a song forever.\n\n### Exercise\nFinish the never-ending song.\n" + 8: + example_code: "```\n{print} 'Brother John'\n{repeat} 2 {times}\n {play} C\n {play} D\n {play} E\n {play} C\n{repeat} 2 {times}\n {play} E\n {play} F\n {play} G\n {sleep} 1\n```\n" + story_text: "Now that we can use the `{repeat}` command for multiple lines, we can make songs even more easily!\n\n### Exercise\nFinish the song of Brother John (Frère Jacques). Don't forget to use `{repeat}`!\n" + 16: + story_text: "Upgrade your Old MacDonald code!\n\n### Exercise\nTake your code from the 'Sing a Song' adventure and add musical notes to it!\nYou can make a function for each line in the song and call that function after the line is printed.\nWe defined the first line for you and called it in the code. Can you finish the whole song?\n" + example_code: "```\n{define} line_1\n {for} i {in} {range} 1 {to} 3\n {play} G\n {play} D\n {for} i {in} {range} 1 {to} 2\n {play} E\n {play} D\n\nanimals = ['pig', 'dog', 'cow']\nsounds = ['oink', 'woof', 'moo']\nfor i in range 1 to 3\n animal = animals[i]\n sound = sounds[i]\n print 'Old MacDonald had a farm'\n call line_1\n print 'E I E I O!'\n _\n```\n" + 12: + story_text: "Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.\n\n### Exercise\nFinish the song of Twinkle Twinkle Little Star.\nThen look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?\n" + example_code: "```\n{define} first_line\n {play} C\n {play} C\n {play} G\n {play} G\n {play} A\n {play} A\n {play} G\n {sleep}\n\n{define} second_line\n {play} F\n {play} F\n {play} E\n {play} E\n {play} D\n {play} D\n {play} C\n {sleep}\n\n{define} third_line\n {play} G\n {play} G\n {play} F\n {play} F\n {play} E\n {play} E\n {play} D\n {sleep}\n\n{call} _\n{call} _\n{call} _\n{call} _\n{call} _\n{call} _\n```\n" + parrot: + levels: + 1: + example_code: "```\n{print} Im Hedy the parrot\n{ask} whats your name?\n{echo}\n{echo}\n```\n" + story_text: "Create your own online pet parrot that will copy you!\n" + story_text_2: "### Exercise\nCopy the example code to your input screen by clicking on the yellow button.\nMake the parrot ask a different question. Fill in the blanks in the example!\n**Extra** You can also let the parrot ask multiple questions. Type in some more lines of code beneath your own code.\n" + example_code_2: "```\n{print} Im Hedy the parrot\n{ask} _\n{echo}\n{echo}\n" + 2: + story_text_2: "### Exercise\nFirstly, finish line 2 with an `{is}` and an `{ask}` command.\nThen fill in a `{sleep}` command on line 4 and 6 to let the parrot stay quiet for a little bit.\n\n**Extra** Can you make the parrot ask for more then only your name by adding more lines of code?\n" + story_text: "In the previous level you've made a parrot that will repeat after you. In this level we'll make the parrot interactive using a variable and `{ask}` command.\nWe will also make the parrot more life-like by adding `{sleep}` commands after something is said.\n" + example_code: "```\n{print} Im Hedy the parrot\nname _ _ what is your name?\n{print} name\n_\n{print} squawk\n_\n{print} name\n```\n" + 3: + story_text: "Teach your parrot a new word with `{add}`.\n### Exercise\nCan you add the `{add} {to_list}` command to get the code to work?\n" + example_code: "```\nwords {is} squawk, Hedy\n{print} Train your parrot!\nnew_word {is} {ask} Which word do you want to teach them?\n_ new_word _ words\n{print} 🧒 Say new_word, Hedy!\n{print} 🦜 words {at} {random}\n```\n" + 4: + story_text: "In this level we have to use quotation marks with the commands `{ask}` and `{print}`.\n### Exercise\nComplete the code by filling in quotation marks on the blanks.\n" + example_code: "```\nwords {is} squawk, Hedy\n{print} _ Train your parrot! _\nnew_word {is} {ask} _ Which word do you want to teach them? _\n{add} new_word {to_list} words\n{print} _ 🧒 Say _ new_word _, Hedy!_\n{print} _ 🦜 _ words {at} {random}\n```\n" + 5: + story_text: "Reward your parrot if it says the correct word!\n\n### Exercise\nFinish the code by filling in the 4 missing commands.\n" + example_code: "```\nwords {is} squawk, Hedy\n{print} 'Train your parrot!'\nnew_word {is} {ask} 'Which word do you want to teach them?'\n{add} new_word {to_list} words\nsaid_word {is} words {at} {random}\n{print} '🧒 Say ' new_word ', Hedy!'\n{print} '🦜 ' said_word\n_ said_word {is} new_word _ '🧒 Great job, Hedy! 🍪'\n_ _ '🧒 No, Hedy! Say ' new_word\n```\n" + name: Parrot + description: Create your own online pet parrot that will copy you! + default_save_name: Parrot + piggybank: + name: Piggy Bank + levels: + 12: + example_code: "```\n{print} 'The digital piggy bank'\nwish = {ask} 'What would you like to buy?'\nprice = {ask} 'How much does that cost?'\nsaved = {ask} 'How much money have you saved already?'\nallowance = {ask} 'How much pocket money do you get per week?'\nto_save = price - saved\nweeks = to_save / allowance\n{print} 'You can buy a ' _ ' in ' _ ' weeks.'\n```\n" + story_text: "In this adventure you learn how to make a digital piggy bank.\n\n### Exercise\nFinish the code to calculate how much money you have and how long you need to save up to buy what you want!\n**Extra** Maybe you have already saved some money? Deduct that from the amount you will have to save up.\n" + 14: + example_code: "```\n_ calculate_budget {with} wish, money, allowance\n to_save = wish - money\n weeks = to_save / allowance\n {if} wish _ money\n {print} 'You need to save up some more!'\n {print} 'Youll need ' weeks ' more weeks.'\n {else}\n {print} 'Great! You have enough'\n {print} 'Lets go shopping!'\n\nmoney = {ask} 'How much money have you saved?'\nwish = {ask} 'How much money do you need?'\nallowance = {ask} 'How much pocket money do you get each week?'\n\n{call} _\n```\n" + story_text: "### Exercise\nIn this level you can let Hedy tell you if you have saved up enough money!\nFinish this code by filling in the blanks!\n" + description: Count your pocketmoney! + default_save_name: Piggy Bank + pressit: + name: Key presses + default_save_name: Pressed + levels: + 7: + example_code: "```\n{if} x {is} {pressed} {forward} 15 {else} {turn} 90\n```\n" + story_text: "Now that you have learned about `{repeat}`, we can press keys multiple times.\nYou can use it to make the turtle walk forward and turn.\n\n### Exercise\nThe code you have seen in level 5 only checks the key once. Copy the example code and add a `{repeat}` to it, so that you can press the keys many times.\nUse this code to draw something nice.\n" + 5: + story_text_2: "You can also link turtle commands to keys.\n\n### Exercise\nCopy the lines a few times so you can create a larger drawing.\n" + story_text: "In this level there is another new keyword: `{pressed}`!\nWith `{pressed}` you can use keys on your keyboard to control what lines are used.\n\n### Exercise\nLook at the example and add one more line of code that reacts to a key press.\n" + example_code: "```\n{print} 'Do you want a good (g) or bad (b) ending?'\n{if} g {is} {pressed} {print} 'They lived happily ever after ❤'\n{else} {print} 'The prince was eaten by a hippopotamus 😭'\n```\n" + example_code_2: "```\n{if} y {is} {pressed} {forward} 15\n{else} {turn} 90\n```\n" + 9: + example_code: "```\npoints = 0\nletters = a, b, c, d, e\n{repeat} 10 {times}\n letter = _ _ _\n {print} 'Press the letter ' letter\n {if} letter {is} {pressed}\n _\n _\n _\n```\n" + story_text: "Now that you know how to combine statements, you can create a touch type tool with `{pressed}`.\n\n### Exercise\nFinish the code. Each time a random letter should be chosen, which you have to press. You get a point for a correct press, and and two points deduction for a wrong press.\n**Extra** Clear the screen after each letter, and show the user how many points they have scored.\n" + description: Try linking a keyboard key to a command! + print_command: + name: '{print}' + levels: + 18: + example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n```\nname = 'Hedy'\n{print}('My name is ', name)\n```\n" + example_code: "```\n{print}('Hello!')\n{for} i {in} {range}(1, 10):\n {print}('This is line ', i)\n```\n" + story_text_2: If you want to print more than one item, you need to separate them by commas. + story_text: "We arrived at real Python code! That means we need to use parentheses with `{print}` and `{range}` from now on.\nIt also means you can use Hedy code from this level in any Python environment as long as you use the English commands. If you haven't until now, you can switch the toggle in the commands menu to do so." + 1: + example_code_2: "```\n_ Hello!\n```\n" + example_code: "```\n{print} Hi there, programmer!\n{print} Welcome to Hedy!\n```\n" + story_text: "## The print command\nYou can print text to the screen using the `{print}` command.\n" + story_text_2: "### Exercise\nIn Hedy you will find exercises in every adventure. An exercise allows you to practise the new commands and concepts, and lets you give your own twist to the example codes.\nIn this exercise you will see a pink blank space. You have to fill something in the place of the blank space before the code can be run.\n\nFill in the `{print}` command in the blank space and then add five more lines of code. Each line has to start with a `{print}` command.\nHave fun!\n" + description: Introduction print command + default_save_name: print + quizmaster: + levels: + 14: + story_text: "### Exercise\nIn this adventure you can make your own quiz! Fill in the blanks, add more questions and enjoy your own quiz!\nYou can make a quiz about anything you like: your hobby, your favorite animal, your favorite book or anything at all!\n" + example_code: "```\n{print} 'Make your own quiz'\npoints_a = 0\npoints_b = 0\n{print} 'Question'\n{print} 'Answer option A'\n{print} 'Answer option B'\nanswer = {ask} 'Which answer?'\n{if} answer == 'A'\n points_a = points_a + 1\n{if} answer == 'B'\n points_b = points_b + 1\n{print} 'End of the quiz!'\n{print} 'Lets see the results!'\n{if} points_a > points_b\n {print} 'You belong to the A club'\n{if} points_b > points_a\n {print} 'You belong to the B club'\n```\n" + name: Quizmaster + default_save_name: Quizmaster + description: Make your own quiz! + quotation_marks: + default_save_name: quotation_marks + name: "'quotation marks'" + description: Introduction quotation marks + levels: + 12: + story_text_4: "**Numbers don't need quotation marks**\nFor numbers, you do not use quotation marks in the `=`:\n" + example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n" + example_code: "```\nname = 'Hedy the Robot'\n{print} 'Hello ' name\n```\n" + example_code_2: "```\nsuperheroes = 'Spiderman', 'Batman', 'Black Widow'\n{print} superheroes {at} {random}\n```\n" + story_text: "**All texts need to be in quotation marks**\nFor this level on you will also have to use quotation marks when storing a text with `=`:\n" + story_text_3: "**All text after `{if}` comparisons need quotation marks too**\n" + example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'\n```\n" + story_text_2: "**All items in lists need quotation marks too**\nLists are texts, so they need quotation marks too. Mind that each single item on the list has quotation marks.\nThis allows you to save two words as 1 item on the list, for example 'Black Widow'.\n" + 4: + story_text_2: "## Contractions\nImportant! Mind that now that we're using quotation marks, Hedy will get confused when you use the apostrophe for contractions like I'm or What's.\nMake sure to remove those apostrophes and change the spelling to I am or What is.\nCheck out the example code to see the wrong way of using apostrophes.\n" + example_code: "```\n{print} 'You need to use quotation marks from now on!'\nanswer {is} {ask} 'What do we need to use from now on?'\n{print} 'We need to use ' answer\n```\n" + story_text: "## 'Quotation marks'\nIn level 4 `{ask}` and `{print}` have changed.\nYou must put text that you want to print between quotation marks.\nThis is useful, because now you can print all the words you want. Also the words you used to store something with `{is}`.\nMost programming languages also use quotation marks when printing, so we are also getting a step closer to real programming!\n" + example_code_2: "```\n_ This is the wrong way of using apostrophes _\n{print} 'I'm babysitting my sister's kids'\n{print} 'What's more fun than that?'\n```\n" + random_command: + levels: + 3: + story_text: "## At random\nIn this level you can make a list using the `{is}` command. You can let the computer choose a random item from that list. You do that with `{at} {random}`.\n" + example_code: "```\nanimals {is} dogs, cats, kangaroos\n{print} animals {at} {random}\n```\n" + story_text_3: "### Exercise\nTry out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price!\nCan you do it? We have already put the first lines into the example code.\n" + example_code_3: "```\n{print} The big gameshow!\n{print} There are 3 suitcases in front of you...\nchosen {is} {ask} Which suitcase do you choose?\nprices {is} _\n_\n```\n" + story_text_2: "You can use the `{at} {random}` command in a sentence as well.\n" + example_code_2: "```\nfood {is} sandwich, slice of pizza, salad, burrito\n{print} I am going to have a food {at} {random} for lunch.\n```\n" + 16: + story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. For example: `friends[1]` is the first name on the list of friends, as you can see in the first part of the example code.\nThe second part of the example code shows you that we can also match 2 lists using the variable i." + story_text_2: "Now that you've learned to use the brackets in lists, you can also start using the {at} {random} command in the Python way!\nYou simply type the name of your list with `[random]` behind it!" + example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\n{print} friends[1] ' is the first friend on the list.'\n{print} friends[2] ' is the second friend on the list.'\n{print} friends[3] ' is the third friend on the list.'\n#now we will match 2 lists using the variable i\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} friends[i] 's lucky number is ' lucky_numbers[i]\n```\n" + example_code_2: "```\nfruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]\n```" + name: '{random}' + default_save_name: random_command + description: introducing at random command + repeat_command: + name: '{repeat}' + default_save_name: repeat_command + description: '{repeat} command' + levels: + 7: + example_code: "```\n{repeat} 3 {times} {print} 'Hedy is fun!'\n```\n" + story_text: "## Repeat! Repeat! Repeat!\nLevel 7 adds the `{repeat}` command. `{repeat}` can be used to execute one line of code multiple times. Like this:\n\n### Exercise\nPlay around with the `{repeat}` command. Can you make the happy birthday song in only 3 lines of code instead of 4 now?\n" + 8: + story_text: "### Repeat commands and indentation\nIn this level you can repeat multiple lines of code with only 1 repeat command.\nYou do this by making a block of lines that you want to repeat.\nThe lines in this block will need **indentation** .\nThat means putting four spaces at the beginning of each line. You will also have to indent when you just want to create a block of one line.\n" + example_code: "```\n{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This is all repeated 5 times'\n```\n" + 9: + story_text: "Great job! You've reached another new level! In the previous level you've learned to use multiple lines of code in an `{if}` or `{repeat}` command. \nBut you can't yet combine the two...\n\nGood news! In this level you will be allowed to put an `{if}` inside an `{if}`, `{repeat}` inside a `{repeat}` command and in eachother.\nGive it a try!\n" + example_code: "```\n{repeat} 3 {times}\n order = {ask} 'What would you like to order?'\n {if} order {is} pizza\n {print} 'Yammie'\n {else}\n {print} 'pizza is better!'\n```\n" + repeat_command_2: + name: '{repeat} 2' + levels: + 7: + story_text: "## Repeat with other commands and with variables\nYou have practiced the `{repeat}` command in combination with the `{print}` command now, but did you know you could also use other commands with `{repeat}` ?\nIn this example code you can see that `{repeat}` can also be used with an `{ask}`, `{if}` or `{else}` command.\n" + story_text_2: "Another interesting thing you can do with the `{repeat}` command is using variables to set the amount of times something should be repeated. In the example code you can see that we first ask the person how old they are.\nThen, in line 3, the question is repeated 'age' times. So we have used the variable 'age' with the `{repeat}` command.\n" + example_code_2: "```\n{print} 'Yay! It is your birthday!'\nage = {ask} 'How old are you now?'\n{repeat} age {times} {print} 'Hip Hip Hurray!'\n```\n" + example_code: "```\n{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'\n```\n" + 8: + example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n" + story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n### Exercise\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n" + default_save_name: repeat_command_2 + description: '{repeat} command 2' + restaurant: + levels: + 1: + story_text: "In level 1 you can make your own virtual restaurant and take your guests' orders.\n" + example_code_2: "```\n{print} Welcome to Hedy's restaurant 🍟\n_ What would you like to order?\n{echo} So you would like to order\n{print} Thank you for your order!\n{print} It's on its way!\n```\n" + story_text_2: "### Exercise\nCopy the example code into your input screen by clicking the yellow button.\nFirstly, fill in the correct command on the blanks to make to code work properly.\nThen add at least 4 more lines of code to the restaurant program.\nAsk the costumer what they would like to drink and ask if they want to pay with cash or card.\nLastly, think of a nice way to say goodbye to your costumer.\n" + 3: + story_text_2: "### Exercise\nNow make your own version of the random restaurant.\nMake a list of starts, mains, desserts, drinks and prices yourself.\nThen use `{print}` and `{at} {random}` commands to tell the costumer what will be on their menu tonight.\n" + example_code: "```\ndishes {is} spaghetti, brussels sprouts, hamburgers\n{print} You will have dishes {at} {random} tonight!\nprices {is} 1 euro, 10 euros, 100 euros\n{print} That will be prices {at} {random} please.\n```\n" + story_text: "Having trouble to decide what you wanna have for dinner? You can let Hedy choose for you!\nSimply add lists of your favorite (or least favorite) meals and Hedy can randomly choose your dinner.\nYou can also have a bit of fun, by letting Hedy choose the price for your dinner as well! What will you get?\n" + example_code_2: "```\n{print} Welcome to your own random restaurant!\nstarters {is} _\nmains {is} _\ndesserts {is} _\ndrinks {is} _\nprices {is} _\n_\n```\n" + 8: + story_text: "In this level you can make your virtual restaurant more elaborate by repeating multiple lines of code. Like this:\n\n### Exercise\nThis code can be expanded with more items on the menu, for example offering drinks, and/or multiple courses or desserts. Add at least one more item.\n**Extra** Add even more items, as many options as you like!\n" + example_code: "```\n{print} 'Welcome to Restaurant Chez Hedy!'\npeople = {ask} 'How many people will be joining us today?'\n{print} 'Great!'\n{repeat} people {times}\n food = {ask} 'What would you like to order?'\n {print} food\n{print} 'Thank you for ordering!'\n{print} 'Enjoy your meal!'\n```\n" + 12: + example_code: "```\nprice = 0.0\nfood = {ask} 'What would you like to order?'\ndrink = {ask} 'What would you like to drink?'\n{if} food {is} 'hamburger'\n price = price + 6.50\n{if} food {is} 'pizza'\n price = price + 5.75\n{if} drink {is} 'water'\n price = price + 1.20\n{if} drink {is} 'soda'\n price = price + 2.35\n{print} 'That will be ' price ' dollar, please'\n```\n" + story_text: "From this level on, you can use decimal numbers to make your menu more realistic.\n\n### Exercise\nCan you think of a code to give your friends and family a 15% discount?\n" + 10: + story_text: "In this level you'll learn how to easily ask orders for different courses.\n\n### Exercise 1\nFinish the code with an `{ask}` on the blanks such that the customer is asked what they want to eat for each course.\n" + example_code_2: "```\n_ courses = appetizer, main course, dessert\n_ names = Timon, Ono\n_ {for} name {in} names\n_ {for} course {in} courses\n_ food = {ask} name ', what would you like to eat as your ' course '?'\n_ {print} name ' orders ' food ' as their ' course\n```\n" + story_text_2: "### Exercise\nOf course, you could also order for multiple people!\nCan you add the correct amount of indentation before each line to make the code work properly?\nTip: some lines don't need any indentation at all.\n" + example_code: "```\ncourses = appetizer, main course, dessert\n{for} course {in} courses\n {print} 'What is your order for ' course '?'\n _ \n _\n```\n" + 15: + story_text: "With the `{while}` you can make sure your costumers can keep adding orders until they are done.\n\n### Exercise\nCorrectly add the `{while}` command to this code.\n" + example_code: "```\n{print} 'Welcome at McHedy'\nmore = 'yes'\n_\n order = {ask} 'What would you like to order?'\n {print} order\n more = {ask} 'Would you like to order anything else?'\n{print} 'Thank you!'\n```\n" + 2: + story_text_2: "### Exercise\nCopy your own restaurant code from to previous level to the input screen below.\nFix the code by replacing the `{ask}` and `{echo}` commands and using variables, like you've learned in this level.\n\nNow that your code is working again, it's time to add something more.\nLook at the last line of the example code: `{print} food with topping is on its way!`\nIn this single line 2 variables have been used to create a summary of the order.\nNow add your own summary of the food and drinks ordered by the customer.\n\n**Extra** Now that you've learned how to use variables, you can use as many variables in one line as you'd like. Can you add more variables to your code, like eat in or take-away, cash or card, with or without a straw etc.?\n" + story_text: "In level 2 you could expand your restaurant by using variables. In level 1 Hedy could only `{echo}` the order once and only remember the last thing that was ordered.\nNow you can use variables and Hedy can remember both the food and the toppings!\n" + example_code: "```\n{print} Welcome to Hedy's restaurant!\n{print} Today we're serving pizza or lasagna.\nfood {is} {ask} What would you like to eat?\n{print} Great choice! The food is my favorite!\ntopping {is} {ask} Would you like meat or veggies on that?\n{print} food with topping is on its way!\n```\n" + 7: + story_text: "In this level you've learned how to use the `{repeat}` command to repeat a line of code a certain amount of times.\nYou can use that in your restaurant to `{ask}` multiple people what they'd like to eat.\n\n### Exercise\nCan you complete the code? Hedy needs to repeat this question as many times as there are people. So if there are 5 people, the question needs to be asked 5 times.\n**Extra** Expand your code with more questions, for example about drinks or sauce.\n" + example_code: "```\n{print} 'Welcome to Restaurant Chez Hedy'\npeople = {ask} 'How many people are joining us today?'\n```\n" + 4: + story_text: "In the restaurant you have to use quotation marks too when using the `{print}` or `{ask}` command.\n\n### Exercise\nAdd the quotation marks to this code to make it work! Be careful: variables should not be in quotation marks.\nThen, use the `{clear}` command to only show one line at a time in your output screen.\n\n### Exercise 2\nGo back to the previous level and copy your restaurant code. Make the code work in this level by adding quotation marks in the right spots and add some `{clear}` commands.\n" + example_code: "```\n_ Add the quotation marks to this code _\n{print} Welcome to Restaurant Chez Hedy!\n{print} Today we are serving pizza or lasagna.\nfood {is} {ask} What would you like to eat?\n{print} Great choice! The food is my favorite!\ntopping {is} {ask} Would you like meat or veggies on that?\n{print} food with topping is on its way!\ndrinks {is} {ask} What would you like to drink with that?\n{print} Thank you for your order.\n{print} Your food and drinks will be right there!\n```\n" + 6: + example_code: "You can make a simple restaurant code, like this:\n```\n{print} 'Welcome to Restaurant Chez Hedy'\n{print} 'Here is our menu:'\n{print} 'Our main courses are pizza, lasagne, or spaghetti'\nmain = {ask} 'Which main course would you like?'\nprice = 0\n{if} main {is} pizza price = 10\n{if} main {is} lasagne price = 12\n{if} main {is} spaghetti price = 8\n{print} 'You have ordered ' main\n{print} 'That will be ' price ' dollars, please'\n{print} 'Thank you, enjoy your meal!'\n```\n" + story_text: "In this level you can use maths to calculate the total price of your customer's order, which can make your virtual restaurant more realistic.\nBut you can also add many more things to your virtual restaurant, for example more courses.\n\n### Exercise\nYou can add many more things to your virtual restaurant. For example, can you...\n- ask how many people are coming and multiply the price by that amount?\n- add another course?\n- give people a discount when they enter a (secret) couponcode?\n- add a children's menu?\n- think of other fun things to add?\n" + 11: + example_code: "```\n{print} 'Welcome to Restaurant Hedy!'\npeople = {ask} 'For how many people would you like to order?'\n{print} 'So you want to order for ' people ' people.'\n{print} \"Let's go!\"\n```\n" + story_text: "We can use the `{for}` with `{range}` to print the orders from multiple customers in an orderly manner.\n\n### Exercise\nFinish the restaurant code, so that you can ask for the order of multiple people. Print the order number each time: 'Order 1', 'Order 2', etc.\nAre you not sure how to go about this? Have a peek at your level 8 code.\n\n**Extra** In level 9 the restaurant also used prices. You can add that here too!\n" + 5: + story_text: "### Exercise\nThe example code shows how you could program that you've run out of a menu item in your restaurant.\nCopy your own restaurant code from the previous levels. Create a problem in your restaurant and code it, like the example code did.\nFor instance, you could also run out of a menu item, or you don't take credit cards, or the ice cream machine is broken.\n\n**Extra** Have you programmed the problem and programmed appropriate responses? Then try to add more `{if}` and `{else}` commands into your code.\nTry to add an `{if}` after every `{ask}` command in your code to make the code as interactive as possible!\n" + example_code: "```\ndrinks_in_stock {is} water, lemonade, cola, orange juice\ndrink {is} {ask} 'What would you like to drink?'\n{if} drink {in} drinks_in_stock {print} 'One ' drink 'coming up!'\n{else} {print} 'Sorry, we do not sell that'\n```\n" + 13: + story_text: "In this level you will learn new commands to extend your code even further.\n\n### Exercise 1\nPlace a `{and}` and a `{or}` in the logical place in the program.\n\n### Exercise 2\nExpand your restaurant with at least one more `{and}` and one `{or}`.\nFor example, create a special discount coupon that only applies to pizza, or give your customer a free drink\nwith fries and pancakes. Or something completely different of course!\n" + example_code: "```\nprice = 10\nfood = {ask} 'What would you like to eat?'\ndrinks = {ask} 'What would you like to drink?'\n{if} food {is} 'sandwich' _ drinks {is} 'juice'\n {print} 'That is our discount menu'\n price = price - 3\n{if} drinks {is} 'water' _ drinks {is} 'juice'\n {print} 'That is a healthy choice'\n{print} 'That will be ' price ' dollars'\n```\n" + 9: + story_text: "In this level you can use nesting to make your restaurant more realistic and more fun!\n\n### Exercise\nThe indentation was removed in the example code. \nCan you figure out how much indentation each line needs in order for the code to work properly?\nIf the customer orders pizza, Hedy shouldn't ask what sauce the costumer wants.\n\n**Extra** A restaurant does not stock all sauces. Make a list of available sauces and give a reply with each order whether you sell it.
\n**Extra** Pizzas have toppings. Ask customers what they want.
\n**Extra** Do customers want a drink? Ask them too!
\n" + example_code: "```\n{print} 'Welcome to Restaurant Chez Hedy!'\npeople = {ask} 'How many people will be joining us today?'\n{print} 'Great!'\nprice = 0\n{repeat} people {times}\n_ food = {ask} 'What would you like to order?'\n_ {print} food\n_ {if} food {is} fries\n_ price = price + 3\n_ sauce = {ask} 'What kind of sauce would you like with your fries?'\n_ {if} sauce {is} no\n_ {print} 'no sauce'\n_ {else}\n_ price = price + 1\n_ {print} 'with ' sauce\n_ {if} food {is} pizza\n_ price = price + 4\n{print} 'That will be ' price ' dollar'\n{print} 'Enjoy your meal!'\n```\n" + description: Create your own virtual restaurant + name: Restaurant + default_save_name: Restaurant + rock: + levels: + 3: + story_text: "You can use the `{at} {random}` command to let the computer pick rock, paper or scissors!\n\n### Exercise\nFinish the code by using the `{at} {random}` command.\n" + example_code: "```\nchoices {is} rock, paper, scissors\n{print} choices _\n```\n" + example_code_2: "```\nchoices {is} rock, paper, scissors\nplayer_1 {is} {ask} Name of player 1:\n_\n```\n" + story_text_2: "**Extra** Make a two player game. Firstly ask the two players to fill in their names. Then let the computer randomly pick their choices.\n" + 2: + example_code: "```\nchoice {is} rock\n{print} I choose _\n```" + story_text: "In this level you can practise using the variables, so that you can make the rock, paper, scissors game in the next level!\n### Exercise\nFinish the code by filling in the **variable** on the blank.\nThis game is not very interactive, but no worries! In the next tab you'll learn how to use variables with the `{ask}` command to make your game interactive!\n" + 5: + story_text: "In this level we can determine whether it's a tie or not. For that you need the new `{if}` code.\n\n### Exercise\nFinish the code by filling in the blanks:\n* Let the computer pick a random option\n* Ask the player what they want to choose\n* Fill in the correct variables in line 4 and 5\n* Finish line 6 so that Hedy can check whether it's a tie or not.\n" + example_code: "```\noptions {is} rock, paper, scissors\ncomputer_choice {is} _\nchoice {is} _\n{print} 'you chose ' _\n{print} 'computer chose ' _\n{if} _ {is} _ {print} 'tie!' {else} {print} 'no tie'\n```\n\nFill in the correct code on the blanks to see if it is a draw.\n" + 15: + story_text: "### Exercise\nPlay until you beat the computer! But first, finish the example code...\n" + example_code: "```\nwon = 'no'\noptions = 'rock', 'paper', 'scissors'\n{while} won == 'no'\n your_choice = {ask} 'What do you choose?'\n computer_choice = options {at} {random}\n {print} 'you chose ' your_choice\n {print} 'the computer chose ' computer_choice\n {if} computer_choice == your_choice\n {print} 'Tie!'\n {if} computer_choice == 'rock' {and} your_choice == 'scissors'\n {print} 'You lose!'\n {if} computer_choice == 'rock' {and} your_choice == 'paper'\n {print} 'You win!'\n won = 'yes'\n_\n```\n" + 1: + example_code_2: "```\n{print} what do you choose?\n{ask} choose from _\n{echo} so your choice was:\n```\n" + story_text_2: "### Exercise\nInstead of using words, you could also use emojis: ✊✋✌\nCan you create a code using emojis?\n" + example_code: "```\n{print} what do you choose?\n{ask} choose from rock, paper or scissors\n{echo} so your choice was:\n```\n" + story_text: "In level 1 you can start with a rock, paper, scissors game.\n\nWith `{ask}` you can make a choice, and with `{echo}` you can repeat that choice.\n" + 9: + example_code: "```\nchoices = rock, paper, scissors\nyour_choice {is} {ask} 'What do you choose?'\n{print} 'You choose ' your_choice\ncomputer_choice {is} choices {at} {random}\n{print} 'The computer chooses ' computer_choice\n{if} computer_choice {is} your_choice\n {print} 'Tie'\n{if} computer_choice {is} rock\n {if} your_choice {is} paper\n {print} 'You win!'\n {if} your_choice {is} scissors\n {print} 'You lose!'\n# finish this code\n```\n" + story_text: "In this level you can program the whole rock, paper, scissors game by nesting the `{if}` commands. \n\n### Exercise\nCan you finish the code? The program must tell who has won for every combination.\n\n**Extra** Want to play more than one game? Expand the code so that you can play multiple rounds. You can even use an `{ask}` to ask the user how many rounds they want to play.\n" + 13: + story_text: "With the `{and}` command you can shorten your rock, paper, scissors code! Check out the example code.\n\n### Exercise\nFinish the code such that a winner is always decided on. Run your code a few times to verify there is always a winner printed.\n" + example_code: "```\noptions = 'rock', 'paper', 'scissors'\nyour_choice = {ask} 'What do you choose?'\ncomputer_choice = options {at} {random}\n{print} 'You choose ' your_choice\n{print} 'The computer chooses ' computer_choice\n{if} computer_choice {is} your_choice\n {print} 'Tie'\n{if} computer_choice {is} 'rock' {and} your_choice {is} 'paper'\n {print} 'You win!'\n{if} computer_choice {is} 'rock' {and} your_choice {is} 'scissors'\n {print} 'The computer wins!'\n_\n```\n" + 10: + story_text: "### Exercise\nIn the previous levels you have often made your own rock paper scissors game. Can you finish the code and use the `{for}` command properly to get the game to work?\n" + example_code: "```\nchoices = _\nplayers = _\n{for} _\n```\n" + 4: + story_text: "In this level we can further program rock, paper, scissors. But if you want to add text, you have to use quotation marks here too.\n### Exercise\nFill in quotation marks on the blanks. Mind that the variable `choices` should be outside the quotes.\n" + example_code: "```\nchoices {is} rock, paper, scissors\n{print} _The computer chooses..._ choices {at} {random}\n```\n" + name: Rock, paper, scissors + default_save_name: Rock_2 + description: Make your own rock, paper, scissors game + rock_2: + name: Rock, paper, scissors 2 + levels: + 2: + example_code: "```\nchoice {is} _\n{print} I choose choice\n```\n" + story_text: "Now that you have learned how to use the `{ask}` command, you can make your rock, paper, scissors code interactive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n" + description: Part 2 of rock, paper, scissors + default_save_name: rock_2 + secret: + description: Make your own spy code + levels: + 12: + story_text: "In this adventure you can create your own super spy code. Encode a message that only the right agent can decipher.\nIf the enemy tries to crack the code, they will get some false info to waste their time.\n\n### Exercise 1\nMake your own secret code for your superspy and return both parts only to the real spy.\n\n### Exercise 2\nAdd a third component to the code, like a piece of clothing or an object.\n" + example_code: "```\nname = {ask} 'What is your name?'\n{if} name {is} _\n a = 'Go to the airport '\n{else}\n a = 'Go to the trainstation '\npassword = {ask} 'What is the password?'\n{if} password {is} _\n b = 'tomorrow at 02.00'\n{else}\n b = 'today at 10.00'\n{print} _ _ _\n```\n" + 13: + story_text: "We can simplify the superspy code with `{and}`, such that we only need one `{if}`.\n\n### Exercise 1\nComplete the code by filling the right command on the blank. Tip: The superspy has to answer BOTH questions correctly, before they get the confidential information!\n\n### Exercise 2\nWe want to confuse the enemy even more! Create a list with fake answers and select one at random when a wrong answer is given.\n" + example_code: "```\nname = {ask} 'What is your name?'\npassword = {ask} 'What is your password?'\n{if} name {is} 'Agent007' _ password {is} 'TOPSECRET'\n {print} 'Go to the airport at 02.00'\n{else}\n {print} 'Go to the trainstation at 10.00'\n ```\n" + default_save_name: SuperSpy + name: SuperSpy + simon: + levels: + 16: + story_text: "Let's make a game of Simon Says! Simon Says is a memory game in which the player will be given a color. They have to repeat that color back.\nIf they get it right a color is added to the sequence, so they now have to remember 2 colors, then 3, then 4 etc. the game stops as soon as the player makes a mistake.\n\n### Exercise\nIn this first part of the Simon Says adventure, we'll let the computer pick a random color and add it to a list.\n\n***Make 2 lists*** First, make a list called `colors` and fill it with the colors red, yellow, green and blue.\nThen make a list called `simon_sequence`. This list will be used as the answer.\nAt the start of the game this lists need to be empty. unfortunately, we can't create an empty list (yet), so we'll fill it with the words 'empty' and 'list' and we'll remove them from the list immediately.\n\n***Create a function that adds a color to the sequence*** Now that we have an empty list called simon_sequence, we can start filling it with random colors.\nWe do that with a function, so we can call it everytime there's a new level in our game. Create a function called `add_random_color`.\nThen create the variable random_color and set it to a random color. Next, add this random color to the simon_sequence.\n\n***Create a function that shows the simon_sequence*** Start by naming the new function `show_simon_sequence` with `level` as an argument. Now we want to show as many colors as the level we are in (in level 1 you see 1 color, in level 2 you see 2 colors etc).\nSo we repeat `level` times, to print the `simon_sequence[i]`. Each time a color is shown, wait for 1 second and then clear the screen.\n\n***Test your program*** Before you go to the next level, test if the functions are working by calling both of the functions. If they're working you should see a random color in your output screen.\nRemove this testing part of your code, copy the code and continue to the next tab to learn more about the simon says game!\n" + example_code: "```\n# Make 2 lists\ncolors = _\n_ = ['empty', 'list']\n{remove} _ {from} simon_sequence\n{remove} _\n\n# Create a function that adds a color\n_ add_random_color\n _\n {add} _\n\n# Create a function that shows the simon_sequence\n{define} _\n {for} i {in} {range} 1 {to} _\n {print} _\n _\n _\n\n# Test your program\n{call} _\n{call} show_simon_sequence {with} 1\n```\n" + description: Make a game of Simon Says + name: Simon Says + default_save_name: Simon + simon_3: + default_save_name: Simon + levels: + 16: + example_code: "```\n# Paste your code here\n\n# The game\n{while} game_over _\n {print} _\n _\n _\n _ = ['empty', 'list']\n {remove} _\n {remove} _\n {call} _\n {call} _ {with} _\n {call} _ {with} _\n {if} player_sequence == _\n _\n _\n _\n {else}\n _\n game_over = _\n```\n" + story_text: "In this tab we'll program the game of Simon Says!\n\n### Exercise\n***Paste your code*** Copy your code from the previous tab and paste it here.\n\n***Program the game*** We start by making sure the game goes on while the game isn't over. Then we print what level the player is on, we use the variable level for that. We only show that for 1 second and then we clear the screen again.\nNow, we have to create the empty list player_sequence. We've already programmed how to fill the list, with our function `player_sequence`, but we never made the list itself. To create the list we use the same trick as we did in the previous tab.\nWe'll make a list with the words 'empty' and 'list' on it, and then we remove both these words. Next, we'll call all of the 3 functions that we've created.\nLastly, we'll have to check if the player gave the correct answers (so if the player_sequence and the simon_sequence are the same).\nIf that's the case, we'll compliment the player. Wait for 1 second and increase the level with 1.\nDid the player give the wrong answer, we'll tell them and end the game by setting game_over to 'True'\n\n***Enjoy your game!*** Great job! Does your game not work? Use the ladybug button to debug your code!\n" + name: Simon Says 3 + description: Make a game of Simon Says + sleep_command: + name: '{sleep}' + description: introducing {sleep} command + default_save_name: sleep_command + levels: + 2: + example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n" + story_text: "Another new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds.\n\n### Exercise\nPractise this new command by making a code of your own in which you use the {sleep} command at least 3 times. With each {sleep} command the pausing time should differ.\n" + songs: + name: Sing a song! + default_save_name: Song + levels: + 7: + example_code: "```\n{repeat} _ _ {print} 'Baby Shark tututudutudu'\n{print} 'Baby Shark'\n```\n" + story_text: "Songs often contain a lot of repetition. For example... Baby Shark! If you sing it, you keep singing the same thing:\n\nBaby Shark tututudutudu
\nBaby Shark tututudutudu
\nBaby Shark tututudutudu
\nBaby Shark\n\n### Exercise\nYou can print the song Baby Shark with a `{repeat}`? Finish the code by replacing the blanks?\n**Extra** After Baby Shark you can of course also program other songs. There are many songs with repetition!\nCan you think of one more song and print it?\n" + 8: + example_code: "```\nverse = 99\n_ 99 {times}\n{print} verse ' bottles of beer on the wall'\n{print} verse ' bottles of beer'\n{print} 'Take one down, pass it around'\nverse = verse - 1\n{print} verse ' bottles of beer on the wall'\n```\n" + story_text: "In a previous level you've programmed the song 'Bottles of beer'. But without the `{repeat}` command, you had to copy the verses many times.\nIn this level you can repeat the song 99 times, just by adding one simple line!\n\n### Exercise\nAdd the right command on the blanks and indent the code correctly.\n" + 10: + example_code: "```\nfamily = baby, mammy, daddy, grandma, grandpa\n_ _ _ _ \n {print} _\n```\n" + example_code_2: "```\nmonkeys = 5, 4, 3, 2, 1\n```\n" + story_text: "With `{for}` you can print make the whole baby shark song (including all the other sharks in the family) in only 6 lines!\n\n### Exercise 1\nCan you make the baby shark code even shorter by using a `{for}` command? Finish the example code.\n" + story_text_2: "### Exercise 2\nPrint the song Five little moneys jumping on the bed. Look up the text if you don't remember.\n\n**Extra** Print the song Old MacDonald had a farm, and make sure all animals make a different sound, using an `{if}`.\n" + 13: + story_text: "In the previous adventure you have learned how to use an argument in a function, but did you know that you could combine them with {ask} commands as well?\nIn this example we have changed the 'My Bonnie' program and made it interactive. You are now asked where Bonnie is.\n" + example_code: "```\n{define} song {with} place\n {print} 'My Bonnie is ' place\n\nchosen_place = {ask} 'Where do you want Bonnie to be?'\nsynonym = {ask} 'What is another word for that?'\n\n{call} song {with} chosen_place\n{call} song {with} synonym\n{call} song {with} chosen_place\n```\n" + 18: + example_code: "```\nlines = ['what shall we do with the drunken sailor', 'shave his belly with a rusty razor', 'put him in a long boat till hes sober']\n{for} line {in} lines _\n {for} i {in} {range} 1 {to} 3 _\n {print} _ line _\n {print} 'early in the morning'\n {for} i {in} {range} 1 {to} 3\n {print} 'way hay and up she rises'\n {print} 'early in the morning'\n```\n" + story_text: "In level 16 we made songs using lists. These programs however are no longer working properly in this level. The colons from level 17 and the brackets from level 18 still need to be added.\n\n### Exercise 1\nThe Drunken sailor song is given as sample code, but not yet working.\nCan you make sure everything works again? To help you, we've put _ in the places of _some_ errors.\n\n### Exercise 2\nNow also look up your Old MacDonald song from level 16, and correct it.\n" + 6: + 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\n{print} number ' little monkeys jumping on the bed'\n{print} 'One fell off and bumped his head'\n{print} 'Mama called the doctor and the doctor said'\n{print} 'NO MORE MONKEYS JUMPING ON THE BED!'\n{sleep}\n```\n" + example_code: "```\nverse = 99\n{print} verse ' bottles of beer on the wall'\n{print} verse ' bottles of beer'\n{print} 'Take one down, pass it around'\nverse = verse - 1\n{print} verse ' bottles of beer on the wall'\n{sleep}\n```\n" + story_text: "Songs often contain a lot of repetition. Sometimes the repetition is also based on counting.\nFor example, in the well-known song 'Bottles of beer'. You can program that song with a little math.\n\nTip: Use the read aloud function to let Hedy sing the song to you!\n\n### Exercise\nYou can now repeat lines 2 to 7 as many times as you want by copying the lines.\n" + 11: + example_code: "```\n_ monkeys _ _ 5 _ 1\n {print} monkeys ' little monkeys jumping on the bed'\n _\n```\n" + story_text: "In this level you can use the `{for}` with `{range}` to make songs that use counting, like the 5 little monkeys.\n\n### Exercise 1\nFill in the blanks and make the code work! If you don't remember the song text, look it up yourself.\n\n### Exercise 2\nThe final line of the song is different from the others. Print this line inside the `{for}`, and use an `{if}` to make it work correctly.\n" + 16: + story_text: "In this level, you can program a song like OldMacDonald even more quickly. You can connect the right animal to the right sound by simply putting them in the same place in the list.\nThe Drunken Sailor is also quickly made in this level. You only need 8 lines for the entire song, check it out!\n\n### Exercise\nComplete the Old MacDonald song by setting the variable `animal` to `animals[i]` and `sound` to `sounds[i]`.\n" + example_code: "```\nanimals = ['pig', 'dog', 'cow']\nsounds = ['oink', 'woof', 'moo']\n{for} i {in} {range} 1 {to} 3\n animal = _\n sound = _\n {print} 'Old MacDonald had a farm'\n {print} 'E I E I O!'\n {print} 'and on that farm he had a ' animal\n {print} 'E I E I O!'\n {print} 'with a ' sound sound ' here'\n {print} 'and a ' sound sound ' there'\n {print} 'here a ' sound\n {print} 'there a ' sound\n {print} 'everywhere a ' sound sound\n```\n\n```\nlines = ['what shall we do with the drunken sailor', 'shave his belly with a rusty razor', 'put him in a long boat till hes sober']\n{for} line {in} lines\n {for} i {in} {range} 1 {to} 3\n {print} line\n {print} 'early in the morning'\n {for} i {in} {range} 1 {to} 3\n {print} 'way hay and up she rises'\n {print} 'early in the morning'\n```\n" + 12: + example_code: "```\n_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'\n_ {for} action {in} actions\n_ {for} i {in} {range} 1 {to} 2\n_ {print} 'if youre happy and you know it'\n_ {print} action\n_ {print} 'if youre happy and you know it and you really want to show it'\n_ {print} 'if youre happy and you know it'\n_ {print} action\n```\n" + story_text: "In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:\n\n### Exercise\nCan you add the right amount of indentation to each line to make the song play correctly?\nHint: Not all lines need indentation.\n" + description: Print a song + tic: + default_save_name: Tic + description: Play a game of Tic Tac Toe! + levels: + 16: + example_code: "```\n# Create a list called field\n_ = ['.', '.', '.', '.', '.', '.', '.', '.', '.']\n\n# Create a function that prints the field\n{define} print_field\n _\n {print} 'TIC TAC TOE'\n {print} field[1] field[2] field[3]\n _\n _\n\n# Call the function\n```\n" + story_text: "Let's program a game of tic-tac-toe!\n\n### Exercise\nIn this adventure we'll start with creating an empty field.\n\n***Create a list called field*** This list will be our playing field. This list is filled with 9 dots, since there are no x's and o's yet at the start of our game.\n\n***Create a function that prints the field*** Firstly, clear the screen so the old playing fields will be removed. Then we print the first line of our Tic Tac Toe field. This line constists of the first 3 spots in our list field.\nWe have already programmed this line for you. Now finish the field by printing spot 4, 5, and 6 on the second row and spot 7, 8 and 9 in the third row.\n\n***Call the function that prints the field*** Now call the function.\n
\n Run the code. Your output should look like this: \n
\n\n***Continue in the next tab*** In the next tab you'll learn how to program the game itself.\n" + 17: + example_code: "```\n# Paste your code here and make it level 17 proof\n\n# Create a function that detects if someone has won\n{define} detect_winner {with} field, sign:\n {if} field[1] == field[2] {and} field[2] == field[3] {and} field[1] != '.':\n game_over = 'yes'\n {print} 'Player ' sign 'wins!'\n {elif}:\n _\n {else}:\n game_over = 'no'\n{return} _\n```\n" + story_text: "In the previous level you've learned how to make a tic-tac-toe game. The game works, but is quite annoying as it keeps asking you if you've won yet.\nNow that we have the {elif} command, we can let the game decide if someone has won and it can stop asking us!\n\n### Exercise\n***Paste your code*** Paste your code from the previous level here and make it level 17 proof. In this level you've learned to use a colon everytime you create a block of code. Please add the colons in the correct spots.\n\n***Create a function that detects if someone's won*** We have started the function for you, paste it under the function `print_field` and finish the function. You can see that this first piece of code checks to see if spot 1, 2 and 3 are the same, because if they are you have 3 in a row.\nIt also checks if they are not a dot, because if they are, the line might have the same symbols on them, but that's just because it's still empty.\nIf all these conditions are met, the game is over and the winner is printed.\nFinish this function with all possible ways to win. This means you have to make this for the other 2 rows, 3 columns and 2 diagonals.\nIf you've finished all the other options, the function should return the variable `game_over` so we can use it in our game.\n\n***Call the function in the game*** Go to the line `game_over = {ask} 'Did you win?'` and change it to `game_over = {call} detect_winner {with} field, sign`. Now the function will check if there's a winner and the game doesn't need to keep asking anymore!\n\n***Enjoy your game!*** Great job! You have finished the game! Enjoy playing it!\n" + name: Tic-Tac-Toe + tic_2: + description: Play a game of Tic Tac Toe! + default_save_name: Tic + levels: + 16: + story_text: "In the previous adventure you've learned how to create a playing field. Now you'll learn how to create the game!\n\n### Exercise\n***Paste your code*** Start by pasting your code from the previous adventure here.\n\n***Add variables*** Underneath your list called `field` we'll add 2 more variables that we'll need to program the game.\nThe variable `game_over` tells us if the game is over, and should be 'no' at the start of the game.\nThe variable `sign` tells us if it's the turn of player x or player o. Set the variable to 'x'.\n\n***The game*** First use a {while} command, to make sure the game keeps on playing the variable while game_over is set to no.\nDuring the game, we first ask the player which spot they choose. Then we change the field with the number they chose into their sign.\nThen we print the field again and we ask the player if they've won yet. Lastly we want to switch whose turn it is, so if the sign is 'x' it should be 'o' and the other way around.\n\n***Test your game*** Does your game work? Great, have fun playing the game! If not, use the ladybug button to debug your code.\nYou might have noticed one mistake in the code though, you can steal the other player's spot! If the other person chose spot 1, you could simply enter 1 after them and steal their spot.\nThat's not fair! Go to the next tab to learn how to fix this problem.\n" + example_code: "```\n# Paste your code from the previous adventure here\n\n# Add variables\ngame_over = _\nsign = _\n\n# The game\n{while} _\n choice = _ 'Player ' sign '_?'\n field[choice] = _\n _ print_field\n game_over = {ask} _\n {if} sign = 'o'\n sign = _\n _\n sign = _\n```\n" + name: Tic-Tac-Toe 2 + tic_3: + name: Tic-Tac-Toe 3 + levels: + 16: + story_text: "You might have noticed one mistake in the code you've made in the previous adventure. You can steal the other player's spot! If the other person chose spot 1, you could simply enter 1 after them and steal their spot.\nThat's not fair! In this tab we'll fix that mistake.\n\n### Exercise\n***Paste your code here*** Paste your code from the previous adventure here.\n\n***Fix the mistake*** To fix the mistake we replace the line that says `field[choice] = sign`. This turns any spot that the player has chosen into their sign.\nGo to the header that says 'Use this to fix the mistake' and finish the code. We first want to check if the chosen spot is still empty, so `if field[choice] = '.'`. If that is the case, you are allowed to take it.\nThen we make an else command and print 'Sorry, this spot is already taken' if the spot is not empty. Lastly, we add a {sleep} command, so the players can actually read the text before it gets cleared again.\nNow copy this piece of code and replace the line `field[choice] = sign` with this new piece of code.\n\n***Play your game!*** Now the game should work properly! Good job!\nThe only flaw is that you can get a bit annoyed that the game keeps asking you if you've won yet. Do you want to fix that? Go to level 17 and we'll fix it!\n" + example_code: "```\n# Paste your code here\n\n# Use this to fix the mistake\n{if} _ = '.'\n field[choice] = sign\n{else}\n {print} _\n _\n```\n" + default_save_name: Tic + description: Play a game of Tic Tac Toe! + turtle: + name: Turtle + levels: + 1: + example_code_2: "```\n{forward} 20\n{turn} {right}\n{forward} 20\n{turn} {left}\n{forward} 20\n```\n" + example_code: "```\n{forward} 100\n{turn} {left}\n```\n" + story_text: "You can also use Hedy to draw. By combining turns and lines, you can make a square or stairs!\n\nUsing `{forward}` you draw a line forwards. The number behind it determines how far the turtle will walk. `{turn} {right}` turns a quarter turn in clockwise direction, `{turn} {left}` turns counter clockwise.\n\nIf you want to go backwards, you use the `{forward}` command but with a negative number. So for example `{forward} -100`\n" + story_text_2: "### Exercise\nThis is the start of a little staircase. Can you make it have 5 steps?\n" + 2: + example_code: "```\n{forward} 20\n{turn} 90\n{forward} 20\n{turn} 180\n{forward} 100\n```\n" + example_code_2: "```\n{print} Drawing figures\nangle {is} 90\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n```\n" + story_text: "In level 1 the turtle could only turn left or right. That is a bit boring!\nIn level 2 he can point his nose in all directions. \n\nUse 90 degrees to turn a quarter, 180 to turn half, and a full circle is 360 degrees.\n\n### Exercise\nThis code now creates the letter T. Can you change it to make the letter B?\n\n**Extra** Change the letter into a different letter, like the first one of your name. \nYou can also make multiple letters, by setting the color to `{color}` `{white}` in between. \n" + story_text_2: "You can use variables to in the turtle `turn`. \n\n### Exercise\nChange the code such that it creates a triangle. Hint: you only have to change the code in one place.\n" + 4: + story_text: "In level 4 you have to use quotation marks with `{print}` and `{ask}`. Also when drawing!\n" + example_code: "```\n{print} _ Drawing figures _\nangle {is} 90\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n```\n" + example_code_2: "```\n{color} {white}\n{forward} -80\n{color} {green}\n{forward} 50\n{color} {yellow}\n{forward} 50\n{color} {red}\n{forward} 50\n```\n" + story_text_2: "You can also change the color of the lines with the command `{color}`. Check out the example.\nYou can also use the command `{color} {white}` to make 'invisible' lines. You could use these white lines to move the turtle anywhere in the screen before you start drawing.\n" + 3: + story_text: "In this level you can use `{at} {random}` with the drawing turtle. A random choice makes the turtle walk a different path each time.\nUse `{at} {random}` to choose a value from a list.\n### Exercise\nCan you copy and paste lines 2 and 3 to create a longer random path?\n" + example_code: "```\nangles {is} 10, 50, 90, 150, 250\n{turn} angles {at} {random}\n{forward} 25\n```\n" + 9: + story_text: "Now that we can use a `{repeat}` inside a `{repeat}`, we can create more complex figures.\n\n### Exercise 1\nThis code creates three black triangles, change that into five pink squares.\n\n **Extra** Create a figure of your own choosing consisting of at least two different shapes types.\n" + example_code: "```\n{color} {black}\n{repeat} 3 {times}\n {repeat} 3 {times}\n {forward} 10\n {turn} 120\n {color} {white}\n {forward} 50\n {color} {black}\n```\n" + 8: + story_text_2: "**Extra** We can now improve the program that draws different figures. Finish the code and you can draw any polygon you'd like!\n" + story_text: "Now that we can repeat several lines, we can make figures more easily.\nWe only have to set the angle once and then use that variable in the `{repeat}`.\n\n### Exercise 1\nThe example code creates a square. Change the code so that it create another figure, such as a triangle or a hexagon. \nThis requires a change to two lines of code.\nTip: An entire circle is 360 degrees.\n\n### Exercise 2\nNow create a drawing consisting of at least two polygons.\n" + example_code_2: "```\nfigure = {ask} 'How many angles should I draw?'\nangle = 360 / figure\n{repeat} figure {times}\n {turn} _\n {forward} _\n```\n" + example_code: "```\nangle = 90\n{repeat} 4 {times}\n {turn} angle\n {forward} 50\n```\n" + 12: + story_text: "We can use functions to draw more complex figures with less code.\n### Exercise 1\nFill the function so that three squares are created. If you want the image to look nicer, you can make the lines between the squares white.\n\n### Exercise 2\nThe code can be made even shorter. Place the final lines into a `{repeat}` so the figure remains the same.\n\n### Exercise 3\nCreate your own drawing with different figures.\nChange both the number of figures with the `{repeat}` and the shape of the figures in the `{define}`\n" + example_code: "```\n{define} square\n {repeat} 4 {times}\n {turn} _\n {forward} _\n{call} square\n{forward} 50\n{call} square\n{forward} 50\n{call} square\n```\n" + 5: + story_text_2: "### Exercise\nFill in the correct numbers in this code to get it to work.\nAfter you've done that, you can try to add the option backwards.\n\n**Extra** Instead of using 'left' and 'right', remake the program with North, East, South and West.\nThis way you could add even more directions like Northeast and Southwest etc.\n" + example_code_2: "```\ndirection {is} {ask} 'Do you want to go left, right, or straight ahead?'\n{if} direction {is} left {turn} _\n{if} direction {is} right {turn} _\n{forward} 100\n```\n" + story_text: "In level 5 you can make a choice with `{if}`. For example between different types of figures.\n" + example_code: "```\n{print} 'Drawing Figures'\nfigure {is} {ask} 'Do you want a square or a triangle?'\n{if} figure {is} triangle angle {is} 120\n{else} angle {is} 90\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n{turn} angle\n{forward} 25\n```\n" + 6: + example_code: "```\nangles = {ask} 'How many angles do you want?'\nangle = 360 / angles\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n{forward} 50\n{turn} angle\n```\n" + story_text: "In this level you can use calculations to draw different figures.\nYou may have learned in school that turning a full circle is 360 degrees. If not, now you know!\nThat's why you also use 90 degrees for a square. 360 divided by 4 is 90.\nNow that we can do math with Hedy, we can draw all the figures we want!\n" + 10: + example_code: "```\n{turn} 90\ndistances = 10, 20, 30, 40, 50, 60\n{for} distance {in} distances\n {forward} distance\n```\n" + story_text: "In this level you can make the turtle draw a figure.\nThe turtle will travel the distances in the list, one by one, making bigger and bigger steps.\n### Exercise 1\nAdd a 90 degree turn in the loop, so that a spiral is drawn.\nAdd at least 5 numbers to the list, so the spiral grows larger.\n**(extra)** can you change the spiral into another shape? Experiment with numbers for the turn!\n### Exercise 2\nThe spiral is drawn outwards, make it go inwards?\n" + description: Make your own drawing + default_save_name: Turtle + turtle_draw_it: + name: Draw it! + description: Draw this picture with the turtle + default_save_name: Draw it + levels: + 4: + example_code: "**Extra** Up for a real challenge? Make sure that the colors of these figures are selected randomly, so that each time you run your programs they'll look differently!\n\n```\ncolors {is} red, orange, yellow, green, blue, purple, pink, brown, gray, black\ncolor _\n```\n" + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nColored Star \nRainbow \nNested squares \n
\n" + 5: + example_code: "Hint:\n```\nchosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'\n{if} _\n```\n" + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n**Extra** Make only one code that lets the player decide which letter they'd like to see! And can you add even more letters?\n\n
\nF \nE \nL \n
\n" + 6: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n**Extra** Let the player decide which color the square should be.\n\n***Extra*** Can you make the letter of your own first name and the flag of your own country too?\n\n
\nSquare \nLetters \nFlag \n
\n" + example_code: "Hint for the square:\n```\nchosen_color = {ask} _\n```\n" + 12: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\nFirstly, define a function **for each shape** you want to use on the bracelet. Then, add the shapes to the bracelet like this:\n\nBracelet Designing program \n" + example_code: "Hint Bracelet Designing program\n```\n{define} draw_a_square\n_\n\n{color} white\n{turn} -90\n{forward} 300\n{turn} 180\n\n{for} i {in} {range} 1 {to} 5\n {color} gray\n {forward} 100\n shape = {ask} 'What kind of shape would you like next on the bracelet?'\n chosen_color = {ask} 'In which color?'\n {color} chosen_color\n {if} shape = 'square'\n {call} draw_a_square\n```\n" + 13: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\nStreet in different sizes \nColored street \nSnow Storm \n" + example_code: "Hint Street in different sizes\n```\n{define} draw_a_house {with} size\n_\n\n{call} draw_a_house {with} 90\n{call} draw_a_house {with} 60\n{call} draw_a_house {with} 30\n```\n\nHint Colored street\n```\n{define} draw_a_house {with} chosen_color\n_\n```\n\nHint Snow Storm\n```\n{define} draw_snowflake {with} length, color\n _\n\nnumbers = 10, 20, 30\ncolors = _\n\n{for} i {in} {range} 1 {to} 5\n random_number = _\n random_color = _\n {call} draw_snowflake {with} random_number, random_color\n {color} white\n {turn} random_number * 5\n {forward} 80\n```\n" + 15: + story_text_2: "Fan \n" + story_text_3: "Star \n" + example_code: "Spiral\n```\ndistance = 5\n{while} distance < 200\n distance = distance + 5\n _\n```\n" + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\nSpiral \n" + example_code_3: "Star\nA star is usually drawn using 144-degree-turns. If you change this slightly to 143 degrees for example and repeat the pattern multiple times with a {while} loop you can make this figure.\n" + example_code_2: "Fan\n```\n{define} draw_a_square {with} side\n_\n\ni = 100\n{while} i > 1\n _ {with} i\n _\n i = i - 3\n```\n" + 2: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nTriangle \nArrow \nBoat \n
\n" + 10: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nNested Hexagon \nTraffic lights \n
\n" + story_text_2: "Christmas lights \n" + example_code_2: "Hint Christmas Lights:\n\nStart by moving to the left side of the screen with an invisible white line. Then hang up the Christmas lights!\n```\n{color} white\n{turn} -90\n{forward} 300\n{turn} 90\n\ncolors = red, blue, yellow, purple, green, orange, pink\n{for} chosen_color {in} colors\n_\n```\n" + example_code: "Hint Nested Hexagon:\n```\ndistances = 100, 80, 60, 40, 20\n{for} distance {in} distances\n_\n```\n\nHint Traffic Lights:\n```\ncolors = red, yellow, green\n{for} chosen_color {in} colors\n {color} _\n {repeat} _\n```\n" + 9: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n**Extra** The number in brackets indicates in how many lines of code this figure can be drawn. Can you do it in the same amount of lines?\n\n**Extra** Give the player a choice which country they would like to see the flag of.\n\n
\nCross (7) \nRandomly colored nested squares (8) \nFlags \n
\n" + example_code: "Hint for the nested squares:\n```\ncolors = red, blue, orange, yellow, pink, purple, green, brown, black\ndistance = 120\n{repeat} 5 {times}\n_\n```\nHint for the flags:\n```\ncountry = {ask} 'which country would you like to see the flag of?'\n{if} country {is} 'the Netherlands'\n color_1 = red\n color_2 = white\n color_3 = blue\n```\n" + 14: + example_code: "```\n{define} calculate_degrees {with} amount_of_corners\n _ 360 / amount_of_corners\n\n\n{define} draw_figure {with} degrees\n _\n {forward} 400/amount_of_corners\n {turn} _\n\namount_of_corners = {ask} _\ndegrees = {call} _ {with} _\n\n{call} _ {with}\n{call} _ {with}\n```\n" + story_text: "### Exercise\nCreate a program that asks the player how many corners their figure should have and then creates that figure.\nThe figure in the image is the output when the player fills in 10.\n\n
\n \n \n
\n" + 7: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nHexagon \nTriangle \nFan \n
\n" + 8: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n**Extra** The number in brackets indicates in how many lines of code this figure can be drawn. Can you do it in the same amount of lines?\n\n
\nSquare (3) \nRandomly colored star (5) \nRandomly colored spiral (7) \n
\n" + 11: + example_code: "Hint Beehive:\n```\n{for} amount_of_combs {in} {range} 1 {to} _\n {for} walls_of_one_comb {in} {range} 1 {to} _\n {forward} _\n {turn} _\n {forward} _\n {turn} _\n```\n\nHint Fan:\nStart out like the fan you made in level 7. Or take a peak at the hint for the beehive, because the codes are very similar.\n\nHint Snowflake: Start by making one 'leg' and repeat it 6 times.\n" + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nBeehive (6) \nFan (5) \nSnowflake (13) \n
\n" + 3: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\nTriangle \nStar \nArrow \n
\n" + 1: + story_text: "### Exercise\nRecreate the drawings with the turtle!\n\n
\n Rectangle \n Square \n Stairs\n
\n" + years: + default_save_name: New Year's Countdown + description: Countdown to the New Year! + levels: + 11: + example_code: "```\n{for} number {in} {range} _ {to} _\n {print} number\n {sleep}\n{print} 'Happy New Year!'\n```\n" + story_text: "In this level you can use the `{for}` number `{in}` `{range}` command to countdown to the New Year.\n\n### Exercise\nFill in the blanks and make the code work!\n" + name: New Year's + while_command: + name: '{while}' + levels: + 15: + story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!" + example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n" + description: '{while}' + default_save_name: while_command + add_remove_command: + levels: + 3: + example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n" + story_text_3: "### Exercise\nTry out the new commands in this virtual restaurant. Add the flavor the player is hoping for to the list and remove the flavors they are allergic to.\n" + example_code: "```\nanimals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\n{print} I choose animals {at} {random}\n```\n" + example_code_2: "```\nanimals {is} dog, cat, kangaroo\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}\n```\n" + story_text: "## Add to\nYou can add items to the list with the `{add} {to_list}` command. To add an item to a list you can simply type: `{add} penguin {to_list} animals` or you can use the `{ask}` command like in the example code.\n" + story_text_2: "## Remove from\nIf you can add items to a list, of course you can also take them off. This is done with the `{remove} {from}` command.\n" + description: introducing {add} {to_list} and {remove} {from} + default_save_name: add_remove_command + name: '{add} {to_list} & {remove} {from}' + simon_2: + default_save_name: Simon + name: Simon Says 2 + levels: + 16: + story_text: "We'll continue with our Simon Says game!\n\n### Exercise\n***Paste your code here*** Paste your code from the previous level here. Don't forget to remove the part that was just used for testing the functions.\n\n***Create a function that creates the player_sequence*** The list `player_sequence` is used to capture the answers of the player. First we define the function with the argument level.\nNext, we ask level times what the color is that they choose. We call that variable `answer`. Then we add the variable `answer` to the list player_sequence.\n\n***Setting up the game*** Before we program the game in the next tab, we'll need some starting variables. First, we'll set the variable `level` to 1 and the variable `game_over` to False.\nThen we make an introduction for the game. We'll print 'Welcome to Simon Says!' and clear the screen after 1 second.\n\n***Continue to the next tab to finish the game!**** Don't forget to copy your code and take it with you to the next tab.\n" + example_code: "```\n# Paste your code here\n\n\n# Create a function that creates the player_sequence\n{define} _\n {for} _\n _ 'What is color number ' i '?'\n {add} answer {to} _\n\n# Set up\nlevel = _\ngame_over = _\n{print} _\n_ 1\n_\n```\n" + description: Make a game of Simon Says + songs_2: + description: Sing a song 2 + levels: + 16: + story_text_2: "### Exersice 2\nNow create your own code for the nursery rhyme 'The wheels on the bus' on the same way!\n" + example_code: "```\nnumber = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']\nobject = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']\n\n_\n {print} 'This old man'\n {print} 'He played ' _\n {print} 'He played knick-knack ' _\n {print} 'With a knick-knack paddywhack'\n {print} 'Give the dog a bone'\n {print} 'This old man came rolling home'\n {sleep} 8\n {clear}\n```\n" + story_text: "### Exercise\nFinish the nursery rhyme!\n" + example_code_2: "```\nobject = ['wheels', 'doors', _]\nmovement = [ 'round and round', 'open and shut', _]\n```\n" + 12: + example_code: "```\n{define} twinkle\n {print} 'Twinkle'\n {print} _\n\n{call} twinkle\n{print} 'Up above the world so high'\n{print} 'Like a diamond in the sky'\n{call} _\n```\n" + story_text: "Songs contain a lot of repetition. We can capture it with a function!\n### Exercise\nLook at the example code with the function. Fill out the two lines so the full song is printed.\n" + default_save_name: Song 2 + name: Sing a song! 2 + blackjack_4: + description: Blackjack part 4 + levels: + 17: + example_code: "```\n# Paste your code from the previous adventure here\n\n# Decide a winner\n{if} _\n {print} 'Its a draw! Play again!'\n{elif} _\n {print} 'You win!'\n{elif} _ :\n {if} _:\n {print} _\n {else}:\n {print} _\n{else}:\n _\n```\n" + story_text: "In the last 3 adventures you have alsmost created a working blackjack game! The only thing left to do is to decide a winner!\n\n### Exercise\n***Paste your code from the previous adventure*** Start by pasting the code that you've made so far into your programming field.\n\n***Decide a winner***\nFirstly, if you and the dealer have an equal amount of points, it's a draw.\nSecondly, if the dealer has more than 21 points and you don't, you are the winner.\nThirdly, if both you and the dealer have less than 22 points, we have to see who came closest to 21. We do that by comparing who has the highest score. Is your total higher than the dealer's total, then you are the winner. If not, the dealer wins.\nLastly, in all other scenarios (e.g. you have more than 21 points and the dealer doesn't, or you both have more than 21 points) you are the loser.\n\n***Enjoy the game!***\nDoes your game work properly? Amazing! You have done a great job! Enjoy your game!\nIf it doesn't work right away, no worries, you might have made a mistake. Just keep calm and bebug your code using the ladybug button.\n" + default_save_name: Blackjack_4 + name: Blackjack 4 + hangman_2: + levels: + 17: + story_text: "Now it's time to program the hangman game.\n\n### Exercise\n\n***Paste your code*** Copy your code from the previous tab and paste the code in the programming field.\n\n***The game*** This games continues playing until Player 2 is game over. Fill in the while command accordingly. Now, Player 2 is allowed to guess a letter, so ask Player 2 to guess a letter.\nWe need to check if their answer is correct, so check if their `guess` is (somewhere) in the (list) `answer`. Then we let the computer figure out which of the letter(s) is the guess. We have already programmed that part for you.\nNext we want to compliment the player for finding a correct letter and we want to print the list `guessed_letters`, so the player can see their progress.\n\nThe next part we're going to program is what happens when the player has guessed all of the letters. So if their list of `guessed_letters` is the same as our list `answer`.\nIf the lists are the same, congratulate Player 2 with their victory and set the variable `game_over` to `True`.\n\nNext we'll program what happens when Player 2 guesses wrong (so the `{else}` command). First, tell the player that their guess was wrong. Then increase the `mistakes_made` variable by 1.\n\nFor the last part we'll program what happens when Player 2 has made 10 mistakes. We'll print that Player 1 has won the game. Then we'll print the correct answer. And finally, we'll set our `game_over` variable to `True`, so the game stops.\n\n***Go to the next tab*** Amazing work! Your game is playable, but wouldn't it be fun if the hangman was actually drawn when Player 2 makes a mistake..?\n" + example_code: "```\n# Paste your code here\n\n# The game\n{while} game_over _\n guess = _\n {if} _\n {for} i {in} {range} 1 {to} amount_letters:\n if answer[i] == guess:\n guessed_letters[i] = guess\n {print} _\n {if} guessed_letters == _:\n {print} _\n game_over = _\n {else}:\n {print} _\n mistakes_made _\n {if} _ == 10:\n {print} _\n {print} _\n _\n```\n" + default_save_name: Hangman_2 + name: Hangman 2 + description: Hangman 2 diff --git a/content/adventures/uk.yaml b/content/adventures/uk.yaml index 08c2226901c..46ec8d69321 100644 --- a/content/adventures/uk.yaml +++ b/content/adventures/uk.yaml @@ -268,14 +268,14 @@ adventures: {print}('Ласкаво просимо до цієї історії!') ``` add_remove_command: - name: '{add} {to} & {remove} {from}' - default_save_name: add_remove_command - description: introducing add to and remove from + name: '{add} {to_list} & {remove} {from}' + default_save_name: javascript licenses api веб-сайт go1.13.8 + description: '{add} {to_list} і {remove} {from}' levels: 3: story_text: | - ## Add to - You can add items to the list with the `{add} {to_list}` command. To add an item to a list you can simply type: `{add} penguin {to} animals` or you can use the `{ask}` command like in the example code. + ## Додати до + Ви можете додати елементи до списку за допомогою команди `{add} {to_list}`. Щоб додати елемент до списку, ви можете просто ввести: `{add} penguin {to_list} animals` або ви можете скористатися командою `{ask}`, як у прикладі коду. example_code: | ``` animals {is} dog, cat, kangaroo @@ -4614,12 +4614,12 @@ adventures: story_text: | In level 1 the turtle could only turn left or right. That is a bit boring! In level 2 he can point his nose in all directions. - + Use 90 degrees to turn a quarter, 180 to turn half, and a full circle is 360 degrees. - + ### Exercise This code now creates the letter T. Can you change it to make the letter B? - + **Extra** Change the letter into a different letter, like the first one of your name. You can also make multiple letters, by setting the color to `{color}` `{white}` in between. diff --git a/content/cheatsheets/ca.yaml b/content/cheatsheets/ca.yaml index 369b2fbc34b..ba8448c5f11 100644 --- a/content/cheatsheets/ca.yaml +++ b/content/cheatsheets/ca.yaml @@ -25,32 +25,32 @@ {turn} {right} 2: - name: '{is}' - explanation: Give a word a name to use in the program using `{is}`. You can choose the name yourself. + explanation: Assigna un nom a una paraula per usar en el programa amb `{is}`. Pots elegir el nom tu mateix. demo_code: |- nom {is} Hedy {print} hola nom - name: '{ask}' - explanation: Ask something with `{ask}`. Beware! You need to give the answer a name with `{is}`. + explanation: Demana alguna cosa amb `{ask}`. Alerta! Has de donar un nom a la resposta amb `{is}`. demo_code: |- - color {is} {ask} What is your favorite color? - {print} color is your favorite! + color {is} {ask} Quin és el teu color preferit? + {print} color és el seu preferit! - name: '{sleep}' - explanation: '`{sleep}` let Hedy pause for a (couple of) second(s).' + explanation: 'Amb `{sleep}`, pots deixar que Hedy faci una pausa d''un (parell de) segon(s).' demo_code: |- - {print} Let me think for one second... + {print} Deixa’m pensar en un segon... {sleep} - {print} Hmm.. I need 3 more seconds... + {print} Hmm.. Necessito 3 segons més ... {sleep} 3 - {print} Eureka! Ive got it! -- name: '{is} with turtle' - explanation: Give a number a name using `{is}`. You can choose the name yourself. + {print} Eureka! Ho tinc! +- name: '{is} amb tortuga' + explanation: Dona un nom a un número usant `{is}`. Pots elegir el nom tu mateix. demo_code: |- angle {is} 90 {turn} angle {forward} 100 3: -- name: Choose random - explanation: Choose a random word from a group with `{at}` and `{random}`. +- name: Tria l'atzar + explanation: Tria una paraula aleatòriament d'un grup usant `{at}` i `{random}`. demo_code: |- animals {is} dog, cat, kangaroo {print} animals {at} {random} @@ -74,37 +74,37 @@ name {is} Hedy {print} 'my name is ' name - name: '{ask}' - explanation: Ask something with `{ask}`. + explanation: Demana alguna cosa amb `{ask}`. demo_code: |- - color {is} {ask} 'What is your favorite color?' - {print} color ' is your favorite!' + color {is} {ask} 'Quin és el teu color preferit?' + {print} color ' és el teu preferit!' 5: - name: '{print}' - explanation: Print exactly using quotation marks. + explanation: Imprimeix un text literal usant cometes. demo_code: '{print} ''Hola benvingut a Hedy.''' - name: '{ask}' - explanation: Ask something with `{ask}`. + explanation: Demana alguna cosa amb `{ask}`. demo_code: |- - color {is} {ask} 'What is your favorite color?' - {print} color ' is your favorite!' + color {is} {ask} 'Quin és el teu color preferit?' + {print} color ' és el teu preferit!' - name: '{if}' - explanation: Make a choice with `{if}`. + explanation: Fes una elecció amb `{if}`. demo_code: |- - color {is} {ask} 'What is your favorite color?' - {if} color {is} green {print} 'pretty!' {else} {print} 'meh' -- name: '{if} with turtle' - explanation: Make a choice with `{if}`. + color {is} {ask} 'Quin és el teu color preferit?' + {if} color {is} verd {print} 'que bonic!' {else} {print} 'no és tan bonic' +- name: '{if} amb tortuga' + explanation: Fes una elecció amb `{if}`. demo_code: |- - answer {is} {ask} 'How far should I walk?' - {if} answer {is} far {forward} 100 {else} {forward} 5 + resposta {is} {ask} 'Com de lluny he de caminar?' + {if} resposta {is} lluny {forward} 100 {else} {forward} 5 - name: '{in}' - explanation: Check elements with `{in}`. + explanation: Comprova elements amb `{in}`. demo_code: |- - pretty_colors {is} green, yellow - color {is} {ask} 'What {is} your favorite color?' - {if} color {in} pretty_colors {print} 'pretty!' {else} {print} 'meh' + colors_bonics {is} verd, groc + color {is} {ask} 'Quin és el teu color preferit?' + {if} color {in} colors_bonics {print} 'bonic!' {else} {print} 'meh' - name: '{pressed}' - explanation: Check whether a given key on the keyboard is `{pressed}`. + explanation: Comprova si una tecla determinada del teclat està `{pressed}`. demo_code: '{if} a {is} {pressed} {print} ''You pressed A!'' {else} {print} ''You pressed another key!''' 6: - name: '{print}' diff --git a/content/cheatsheets/da.yaml b/content/cheatsheets/da.yaml index 9f4f9bddccc..061511f203c 100644 --- a/content/cheatsheets/da.yaml +++ b/content/cheatsheets/da.yaml @@ -1,7 +1,7 @@ 1: - name: '{print}' explanation: Print tekst med `{print}`. - demo_code: '{print} Hej, velkommen til Hedy!' + demo_code: '{print} Hej og velkommen til Hedy!' - name: '{ask}' explanation: Stil spørgsmål med `{ask}`. demo_code: '{ask} Hvad er din yndlingsfarve?' @@ -9,9 +9,9 @@ explanation: Gentag ting med `{echo}`. demo_code: |- {ask} Hvad er din yndlingsfarve? - {echo} Så din yndlingsfarve er -- name: '{print} emojis' - explanation: Print an emoji with `{print}`. + {echo} så din yndlingsfarve er +- name: '{print} emojier' + explanation: Udskriv en emoji med `{print}`. demo_code: '{print} 🙋 🌍 ❗' - name: '{forward}' explanation: Tegn en linje med `{forward}`. @@ -25,215 +25,215 @@ {turn} {right} 2: - name: '{is}' - explanation: Give a word a name to use in the program using `{is}`. You can choose the name yourself. + explanation: For at kunne bruge et ord i programmet kan du navngive det med `{is}`. Du kan vælge navnet selv. demo_code: |- - name {is} Hedy - {print} welcome name + navn {is} Hedy + {print} velkommen navn - name: '{ask}' - explanation: Ask something with `{ask}`. Beware! You need to give the answer a name with `{is}`. + explanation: Spørg om noget med `{ask}`. Vær opmærksom på at du skal navngive svaret med `{is}`. demo_code: |- - color {is} {ask} What is your favorite color? - {print} color is your favorite! + farve {is} {ask} Hvad er din yndlingsfarve? + {print} farve er din favorit! - name: '{sleep}' - explanation: '`{sleep}` let Hedy pause for a (couple of) second(s).' + explanation: 'Med `{sleep}` kan du lade Hedy pause i et (par) sekund(er).' demo_code: |- - {print} Let me think for one second... + {print} Lad mig tænke i et sekund {sleep} - {print} Hmm.. I need 3 more seconds... + {print} Hmm.. Jeg har brug for 3 sekunder til... {sleep} 3 - {print} Eureka! Ive got it! -- name: '{is} with turtle' - explanation: Give a number a name using `{is}`. You can choose the name yourself. + {print} Aha! Nu har jeg det! +- name: '{is} med skildpadde' + explanation: Navngiv et tal med `{is}`. Du kan vælge navnet selv. demo_code: |- - angle {is} 90 - {turn} angle + vinkel {is} 90 + {turn} vinkel {forward} 100 3: -- name: Choose random - explanation: Choose a random word from a group with `{at}` and `{random}`. +- name: Vælg tilfældigt + explanation: Vælg et tilfældigt ord fra en gruppe med `{at}` og `{random}`. demo_code: |- - animals {is} dog, cat, kangaroo - {print} animals {at} {random} + dyr {is} hund, kat, kænguru + {print} dyr {at} {random} - name: '{add}' - explanation: '`{add}` an item `{to_list}` a list.' + explanation: '`{add}` et element `{to_list}` en liste.' demo_code: |- - animals {is} cow, cat - {add} dog {to_list} animals + dyr {is} ko, kat + {add} hund {to_list} dyr - name: '{remove}' - explanation: '`{remove}` an item `{from}` a list.' + explanation: '`{remove}` et element `{from}` en liste.' demo_code: |- - animals {is} cat, dog, cow - {remove} dog {from} animals + dyr {is} kat, hund, ko + {remove} hund {from} dyr 4: - name: '{print}' - explanation: Print exactly using quotation marks. - demo_code: '{print} ''Hello welcome to Hedy.''' + explanation: Udskriv nøjagtigt ved hjælp af citationstegn. + demo_code: '{print} ''Hej og velkommen til Hedy.''' - name: '{is}' - explanation: Give a name to some text and `{print}` without quotation marks. + explanation: Navngiv et stykke tekst og `{print}` den uden citationstegn. demo_code: |- - name {is} Hedy - {print} 'my name is ' name + navn {is} Hedy + {print} 'mit navn er ' navn - name: '{ask}' - explanation: Ask something with `{ask}`. + explanation: Stil spørgsmål med `{ask}`. demo_code: |- - color {is} {ask} 'What is your favorite color?' - {print} color ' is your favorite!' + farve {is} {ask} 'Hvad er din yndlingsfarve?' + {print} farve ' er din favorit!' 5: - name: '{print}' - explanation: Print exactly using quotation marks. - demo_code: '{print} ''Hello welcome to Hedy.''' + explanation: Udskriv nøjagtigt ved hjælp af citationstegn. + demo_code: '{print} ''Hej og velkommen til Hedy.''' - name: '{ask}' - explanation: Ask something with `{ask}`. + explanation: Stil spørgsmål med `{ask}`. demo_code: |- - color {is} {ask} 'What is your favorite color?' - {print} color ' is your favorite!' + farve {is} {ask} 'Hvad er din yndlingsfarve?' + {print} farve ' er din favorit!' - name: '{if}' - explanation: Make a choice with `{if}`. + explanation: Træf et valg med `{if}`. demo_code: |- - color {is} {ask} 'What is your favorite color?' - {if} color {is} green {print} 'pretty!' {else} {print} 'meh' -- name: '{if} with turtle' - explanation: Make a choice with `{if}`. + farve {is} {ask} 'Hvad er din yndlingsfarve?' + {if} farve {is} grøn {print} 'pænt!' {else} {print} 'tja' +- name: '{if} med skildpadde' + explanation: Træf et valg med `{if}`. demo_code: |- - answer {is} {ask} 'How far should I walk?' - {if} answer {is} far {forward} 100 {else} {forward} 5 + svar {is} {ask} 'Hvor langt skal jeg gå?' + {if} svar {is} langt {forward} 100 {else} {forward} 5 - name: '{in}' - explanation: Check elements with `{in}`. + explanation: Tjek elementer med `{in}`. demo_code: |- - pretty_colors {is} green, yellow - color {is} {ask} 'What {is} your favorite color?' - {if} color {in} pretty_colors {print} 'pretty!' {else} {print} 'meh' + flotte_farver {is} grøn, gul + farve {is} {ask} 'Hvad er din yndlingsfarve?' + {if} farve {in} flotte_farver {print} 'flot!' {else} {print} 'kedeligt' - name: '{pressed}' - explanation: Check whether a given key on the keyboard is `{pressed}`. - demo_code: '{if} a {is} {pressed} {print} ''You pressed A!'' {else} {print} ''You pressed another key!''' + explanation: Kontroller om en given tast på tastaturet er `{pressed}`. + demo_code: '{if} a {is} {pressed} {print} ''Du trykkede på A!'' {else} {print} ''Du trykkede på en anden tast!''' 6: - name: '{print}' - explanation: Print exactly using quotation marks. - demo_code: '{print} ''5 times 5 is '' 5 * 5' + explanation: Udskriv nøjagtigt ved hjælp af citationstegn. + demo_code: '{print} ''5 gange 5 er '' 5 * 5' - name: '{ask}' - explanation: Ask for a calculation and check whether it is correct. + explanation: Bed om en udregning og kontroller om den er korrekt. demo_code: |- - answer = {ask} 'What is 10 plus 10?' - {if} answer {is} 20 {print} 'Yes!' {else} {print} 'Oops' -- name: '{ask} and {if} with turtle' - explanation: Ask the user how many angles they want. + svar = {ask} 'Hvad er 10 plus 10?' + {if} svar {is} 20 {print} 'Ja!' {else} {print} 'Ups' +- name: '`{ask}` og `{if}` med skildpadde' + explanation: Spørg brugeren hvor mange vinkler de ønsker. demo_code: |- - angles = {ask} 'How many angles?' - angle = 360 / angles + vinkler = {ask} 'Hvor mange vinkler?' + vinkel = 360 / vinkler {forward} 50 7: - name: '{print}' - explanation: Print exactly using quotation marks. - demo_code: '{print} ''Hello welcome to Hedy.''' + explanation: Udskriv nøjagtigt ved hjælp af citationstegn. + demo_code: '{print} ''Hej og velkommen til Hedy.''' - name: '{ask}' - explanation: Ask something with `{ask}`. + explanation: Stil spørgsmål med `{ask}`. demo_code: |- - color = {ask} 'What is your favorite color?' - {print} color ' is your favorite!' + farve = {ask} 'Hvad er din yndlingsfarve?' + {print} farve ' er din favorit!' - name: '{if}' - explanation: Make a choice with `{if}`. + explanation: Træf et valg med `{if}`. demo_code: |- - color = {ask} 'What is your favorite color?' - {if} color {is} green {print} 'pretty!' {else} {print} 'meh' -- name: '{repeat} with turtle' - explanation: Repeat a line of code with `{repeat}`. + farve = {ask} 'Hvad er din yndlingsfarve?' + {if} farve {is} grøn {print} 'pænt!' {else} {print} 'tja' +- name: '{repeat} med skildpadde' + explanation: Gentag en linje kode med `{repeat}`. demo_code: '{repeat} 3 {times} {forward} 10' 8: - name: '{print}' - explanation: Print something. Remember to use a quotation mark for literal printing. - demo_code: '{print} ''5 times 5 is '' 5 * 5' + explanation: Udskriv noget. Husk at bruge citationstegn til nøjagtig udskrivning. + demo_code: '{print} ''5 gange 5 er '' 5 * 5' - name: '{ask}' - explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines. + explanation: Spørg om svaret på en addition og kontroller, om det er korrekt. Vi kan nu udskrive 2 linjer. demo_code: |- - answer = {ask} 'What is 5 plus 5?' - {if} answer {is} 10 - {print} 'Well done!' - {print} 'Indeed, the answer was ' answer + svar = {ask} 'Hvad er 5 plus 5?' + {if} svar {is} 10 + {print} 'Godt klaret!' + {print} 'Svaret er nemlig ' svar {else} - {print} 'Oops!' - {print} 'The answer is 10' -- name: '{repeat} with turtle' - explanation: Repeat multiple lines. + {print} 'Ups!' + {print} 'Svaret er 10' +- name: '{repeat} med skildpadde' + explanation: Gentag flere linjer. demo_code: |- {repeat} 4 {times} {turn} 90 {forward} 50 - name: '{pressed}' - explanation: Check whether a given key on the keyboard is `{pressed}`. + explanation: Kontroller om en given tast på tastaturet er `{pressed}`. demo_code: |- {if} a {is} {pressed} - {print} 'You pressed A!' + {print} 'Du trykkede på A!' {else} - {print} 'You pressed another key!' + {print} 'Du trykkede på en anden tast!' 9: -- name: '{if} with multiple lines' - explanation: The answer of a sum of questions with `{ask}` and see if it is correct. Now we print out two lines. +- name: '{if} med flere linjer' + explanation: Spørg om svaret på en addition med `{ask}` og se om det er korrekt. Nu udskriver vi to linjer. demo_code: |- - answer = {ask} 'What is 10 plus 10?' - {if} answer {is} 20 - {print} 'Well done!!' - {print} 'The answer is indeed' answer + svar = {ask} 'Hvad er 10 plus 10?' + {if} svar {is} 20 + {print} 'Godt klaret!!' + {print} 'Svaret er nemlig ' svar {else} - {print} 'Wrong' - {print} 'The answer is 20' -- name: '{repeat} with turtle' - explanation: Repeat multiple lines. + {print} 'Niks' + {print} 'Svaret er 20' +- name: '{repeat} med skildpadde' + explanation: Gentag flere linjer. demo_code: |- {repeat} 4 {times} {turn} 90 {forward} 50 10: - name: '{print}' - explanation: Print something. Remember to use a quotation mark for literal printing. - demo_code: '{print} ''5 times 5 is '' 5 * 5' -- name: '{for} with a list' - explanation: Print all things in a list. - demo_code: |- - animals {is} dog, cat, blobfish - {for} animal {in} animals - {print} 'I love ' animal + explanation: Udskriv noget. Husk at bruge citationstegn til nøjagtig udskrivning. + demo_code: '{print} ''5 gange 5 er '' 5 * 5' +- name: '{for} med en liste' + explanation: Udskriv alle elementerne i en liste. + demo_code: |- + alle_dyr {is} hunde, katte, fisk + {for} dyr {in} alle_dyr + {print} 'Jeg elsker ' dyr 11: -- name: '{for} loop' - explanation: We can use `{for}` with a `{range}`. +- name: '{for}-løkke (sløjfe)' + explanation: Vi kan bruge `{for}` med et `{range}`. demo_code: |- - {for} counter {in} {range} 1 {to} 5 - {print} counter + {for} tæller {in} {range} 1 {to} 5 + {print} tæller - name: '{ask}' - explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines. + explanation: Spørg om svaret på en addition og kontroller, om det er korrekt. Vi kan nu udskrive 2 linjer. demo_code: |- - answer = {ask} 'What is 5 plus 5?' - {if} answer {is} 10 - {print} 'Well done!' - {print} 'Indeed, the answer was ' answer + svar = {ask} 'Hvad er 5 plus 5?' + {if} svar {is} 10 + {print} 'Godt klaret!' + {print} 'Svaret er nemlig ' svar {else} - {print} 'Oops!' - {print} 'The answer is 10' + {print} 'Ups!' + {print} 'Svaret er 10' 12: -- name: float directly - explanation: Decimal numbers. +- name: flyt direkte + explanation: Decimaltal. demo_code: |- - {print} 'Calculate away!' - {print} 'Two and a half plus two and a half is...' + {print} 'Regn løs!' + {print} 'To og en halv plus to og en halv er...' {print} 2.5 + 2.5 -- name: assign text - explanation: Text with quotation marks after `=` - demo_code: |- - name = 'Hedy the Robot' - {print} 'Hello ' name -- name: quotes after {if} comparison - explanation: Text with quotation marks after `{if}`. - demo_code: |- - name = {ask} 'Who are you?' - {if} name = 'Hedy' - {print} 'Hi there!' -- name: quotes in list - explanation: A list with quotation marks. - demo_code: |- - superheroes = 'Iron Man', 'Batman', 'Superman' - {print} superheroes {at} {random} +- name: tildel tekst + explanation: Tekst med citationstegn efter `=` + demo_code: |- + navn = 'Robotten Hedy' + {print} 'Hej ' navn +- name: citationstegn efter `{if}`-sammenligning + explanation: Tekst med citationstegn efter `{if}`. + demo_code: |- + navn = {ask} 'Hvem er du?' + {if} navn = 'Hedy' + {print} 'Hej du!' +- name: citationstegn i liste + explanation: En liste med citationstegn. + demo_code: |- + superhelte = 'Iron Man', 'Batman', 'Superman' + {print} superhelte {at} {random} 13: - name: '{and}' - explanation: Two parts both need to be correct. + explanation: To dele som begge skal være korrekte. demo_code: |- answer1 = {ask} 'What is 3+2?' answer2 = {ask} 'What is 2+2?' @@ -242,126 +242,126 @@ {else} {print} 'At least one answer is wrong!' - name: '{or}' - explanation: At least 1 of the two parts need to be correct. If both are correct, it is also fine. + explanation: Mindst en af de to dele skal være korrekte. Hvis begge er korrekte, er det også fint. demo_code: |- - answer1 = {ask} 'What is 3+2?' - answer2 = {ask} 'What is 2+2?' - {if} answer1 {is} 5 {or} answer2 {is} 4 - {print} 'At least one answer is correct!' + svar1 = {ask} 'Hvad er 3+2?' + svar2 = {ask} 'Hvad er 2+2?' + {if} svar1 {is} 5 {or} svar2 {is} 4 + {print} 'Mindst et svar er korrekt!' {else} - {print} 'Both answers are wrong!' + {print} 'Begge svar er forkerte!' 14: -- name: Smaller - explanation: We use the `<` to check if the first number is smaller than the second number. - demo_code: |- - age = {ask} 'How old are you?' - {if} age < 13 - {print} 'You are younger than me!' -- name: Bigger - explanation: We use the `>` to check if the first number is bigger than the second number. - demo_code: |- - age = {ask} 'How old are you?' - {if} age > 13 - {print} 'You are older than me!' -- name: Equal - explanation: We use the `==` to check if two things are the same. - demo_code: |- - answer = {ask} 'What is 5 * 5?' - {if} answer == 25 - {print} 'That is correct!' -- name: Not equal - explanation: We use the `!=` to check if two things are not the same. - demo_code: |- - answer = {ask} 'What is 5 * 5?' - {if} answer != 25 - {print} 'That is not correct!' -- name: Smaller or equal - explanation: We use the `<=` to check if the first number is smaller than or equal to the second number. - demo_code: |- - age = {ask} 'How old are you?' - {if} age <= 12 - {print} 'You are younger than me!' -- name: Bigger or equal - explanation: We use the `>=` to check if the first number is bigger than or equal to the second number. - demo_code: |- - age = {ask} 'How old are you?' - {if} age >= 14 - {print} 'You are older than me!' +- name: Mindre end + explanation: Vi bruger `<` til at kontrollere om det første tal er mindre end det andet. + demo_code: |- + alder = {ask} 'Hvor gammel er du?' + {if} alder < 13 + {print} 'Du er yngre end mig!' +- name: Større end + explanation: Vi bruger `>` til at kontrollere om det første tal er større end det andet. + demo_code: |- + alder = {ask} 'Hvor gammel er du?' + {if} alder > 13 + {print} 'Du er ældre end mig!' +- name: Lig med + explanation: Vi bruger `==` til at kontrollere om to ting er ens. + demo_code: |- + svar = {ask} 'Hvad er 5 * 5?' + {if} svar == 25 + {print} 'Det er korrekt!' +- name: Ikke lig med + explanation: Vi bruger `!=` til at kontrollere om to ting ikke er ens. + demo_code: |- + svar = {ask} 'Hvad er 5 * 5?' + {if} svar != 25 + {print} 'Det er ikke korrekt!' +- name: Mindre end eller lig med + explanation: Vi bruger `<=` til at kontrollere om det første tal er mindre end eller lig med det andet. + demo_code: |- + alder = {ask} 'Hvor gammel er du?' + {if} alder <= 12 + {print} 'Du er yngre end mig!' +- name: Større end eller lig med + explanation: Vi bruger `>=` til at kontrollere om det første tal er større end eller lig med det andet. + demo_code: |- + alder = {ask} 'Hvor gammel er du?' + {if} alder >= 14 + {print} 'Du er ældre end mig!' 15: - name: '{while}' - explanation: We can use the `{while}` loop with not equal. - demo_code: |- - answer = 0 - {while} answer != 25 - answer = {ask} 'What is 5 times 5?' - {print} 'A correct answer has been given' -- name: Smaller {while} - explanation: We can also use the `{while}` loop with `<` and `>`. - demo_code: |- - count = 1 - {while} count < 3 - {print} 'We do this ' 3 - count ' more times' - count = count + 1 - {print} 'We are done' + explanation: Vi kan bruge en `{while}`-løkke sammen med ikke lig med. + demo_code: |- + svar = 0 + {while} svar != 25 + svar = {ask} 'Hvad er 5 gange 5?' + {print} 'Det er rigtigt' +- name: '{while} mindre end' + explanation: Vi kan også bruge en `{while}`-løkke med `<` og `>`. + demo_code: |- + tælle = 1 + {while} tælle < 3 + {print} 'Vi gør dette ' 3 - tælle ' flere gange' + tælle = tælle + 1 + {print} 'Vi er færdige' 16: -- name: square brackets - explanation: Lists with square brackets. - demo_code: |- - fruit = ['apple', 'banana', 'cherry'] - {print} fruit -- name: Get an item from a list - explanation: To get an item from a list we use [number] so fruit[1] means, get the first fruit from the list! - demo_code: |- - fruit = ['banana', 'apple', 'cherry'] - firstfruit = fruit[1] - {print} firstfruit -- name: Get a random item from a list - explanation: To get a random item from a list we use [random] so fruit[random] means, get a random fruit from the list! - demo_code: |- - fruit = ['banana', 'apple', 'cherry'] - random_fruit = fruit[{random}] - {print} random_fruit +- name: firkantede parenteser + explanation: Lister med firkantede parenteser. + demo_code: |- + frugt = ['æble', 'banan', 'kirsebær'] + {print} frugt +- name: Tilgå et element i en liste + explanation: For at tilgå et element fra en liste bruger vi [tal], så frugt[1] betyder at få den første frugt i listen! + demo_code: |- + frugt = ['banan', 'æble', 'kirsebær'] + første_frugt = frugt[1] + {print} første_frugt +- name: Tilgå et tilfældigt element i en liste + explanation: For at tilgå et tilfældigt element i en liste bruger vi [{random}]], så frugt{random}] betyder at få en tilfældig frugt fra listen! + demo_code: |- + frugt = ['banan', 'æble', 'kirsebær'] + tilfældig_frugt = frugt[{random}] + {print} tilfældig_frugt 17: - name: '{elif}' explanation: '`{elif}`' demo_code: |- a = 2 {if} a == 1: - {print} 'a is 1' + {print} 'a er 1' {elif} a == 2: - {print} 'a is 2' + {print} 'a er 2' {else}: - {print} 'a is not 1 or 2' + {print} 'a er hverken 1 eller 2' - name: '{print}' - explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement! + explanation: Når vi bruger en `{for}`-løkke, skal vi lægge en `:` bag `{for}`-sætningen! demo_code: |- {for} i {in} {range} 1 {to} 12: {print} i - {print} 'Ready or not, here I come!' + {print} 'Klar eller ej, her kommer jeg!' - name: '{if}' - explanation: We need to do the same with all of our `{if}` statements. + explanation: Vi skal gøre det samme med alle vores `{if}` sætninger. demo_code: |- - color = {ask} 'What is your favorite color?' - {if} color == 'green': - {print} 'Your favorite color is green' + farve = {ask} 'Hvad er din yndlingsfarve?' + {if} farve == 'grøn': + {print} 'Din yndlingsfarve er grøn' {else}: - {print} 'Your favorite color is not green' + {print} 'Din yndlingsfarve er ikke grøn' 18: - name: '{print}' - explanation: After `{print}` you need to use parentheses. - demo_code: '{print}(''hi!'')' + explanation: Efter `{print}` skal du bruge parenteser. + demo_code: '{print}(''hej!'')' - name: '{range}' - explanation: After `{range}` you need to use parentheses. + explanation: Efter `{range}` skal du bruge parenteser. demo_code: |- - {for} i {in} {range} (1,10): - {print}('Hello, times ', i) -- name: '{print} with var' - explanation: With `{print}` you need to use parentheses and commas if you print more items. + {for} i {in} {range}(1,10): + {print}('Hej nummer ', i) +- name: '{print} med variabel' + explanation: Med `{print}` skal du bruge parenteser og kommaer hvis du vil udskrive flere elementer. demo_code: |- - name = 'Hedy' - {print}('my name is ', name) -- name: ask something with {input} - explanation: Use `{input}` instead of `{ask}` to ask something. + navn = 'Hedy' + {print}('Jeg hedder ', navn) +- name: spørg om noget med {input} + explanation: Brug `{input}` i stedet for `{ask}` for at spørge om noget. demo_code: |- - name = {input}('What is your name?') - {print}('So your name is ', name) + navn = {input}('Hvad hedder du?') + {print}('Så du hedder ', navn) diff --git a/content/cheatsheets/kab.yaml b/content/cheatsheets/kab.yaml new file mode 100644 index 00000000000..fbb1f4417f8 --- /dev/null +++ b/content/cheatsheets/kab.yaml @@ -0,0 +1,207 @@ +2: +- name: '{is}' + demo_code: "name {is} Hedy\n{print} welcome name" + explanation: Give a word a name to use in the program using `{is}`. You can choose the name yourself. +- name: '{ask}' + demo_code: "color {is} {ask} What is your favorite color?\n{print} color is your favorite!" + explanation: Ask something with `{ask}`. Beware! You need to give the answer a name with `{is}`. +- demo_code: "{print} Let me think for one second...\n{sleep}\n{print} Hmm.. I need 3 more seconds...\n{sleep} 3\n{print} Eureka! Ive got it!" + explanation: With `{sleep}`, you can let Hedy pause for a (couple of) second(s). + name: '{sleep}' +- demo_code: "angle {is} 90\n{turn} angle\n{forward} 100" + explanation: Give a number a name using `{is}`. You can choose the name yourself. + name: '{is} with turtle' +3: +- name: Choose random + explanation: Choose a random word from a group with `{at}` and `{random}`. + demo_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}" +- explanation: '`{add}` an item `{to_list}` a list.' + demo_code: "animals {is} cow, cat\n{add} dog {to_list} animals" + name: '{add}' +- explanation: '`{remove}` an item `{from}` a list.' + demo_code: "animals {is} cat, dog, cow\n{remove} dog {from} animals" + name: '{remove}' +4: +- explanation: Print exactly using quotation marks. + name: '{print}' + demo_code: "{print} 'Hello welcome to Hedy.'" +- demo_code: "name {is} Hedy\n{print} 'my name is ' name" + name: '{is}' + explanation: Give a name to some text and `{print}` without quotation marks. +- name: '{ask}' + explanation: Ask something with `{ask}`. + demo_code: "color {is} {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'" +7: +- explanation: Print exactly using quotation marks. + name: '{print}' + demo_code: "{print} 'Hello welcome to Hedy.'" +- name: '{ask}' + explanation: Ask something with `{ask}`. + demo_code: "color = {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'" +- name: '{if}' + explanation: Make a choice with `{if}`. + demo_code: "color = {ask} 'What is your favorite color?'\n{if} color {is} green {print} 'pretty!' {else} {print} 'meh'" +- demo_code: '{repeat} 3 {times} {forward} 10' + explanation: Repeat a line of code with `{repeat}`. + name: '{repeat} with turtle' +8: +- name: '{print}' + explanation: Print something. Remember to use a quotation mark for literal printing. + demo_code: "{print} '5 times 5 is ' 5 * 5" +- name: '{ask}' + demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'" + explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines. +- explanation: Repeat multiple lines. + name: '{repeat} with turtle' + demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50" +- name: '{pressed}' + explanation: Check whether a given key on the keyboard is `{pressed}`. + demo_code: "{if} a {is} {pressed}\n {print} 'You pressed A!'\n{else}\n {print} 'You pressed another key!'" +13: +- explanation: Two parts both need to be correct. + demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {and} answer2 {is} 4\n {print} 'Both answers are correct!'\n{else}\n {print} 'At least one answer is wrong!'" + name: '{and}' +- demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {or} answer2 {is} 4\n {print} 'At least one answer is correct!'\n{else}\n {print} 'Both answers are wrong!'" + name: '{or}' + explanation: At least 1 of the two parts need to be correct. If both are correct, it is also fine. +14: +- name: Smaller + explanation: We use the `<` to check if the first number is smaller than the second number. + demo_code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'" +- demo_code: "age = {ask} 'How old are you?'\n{if} age > 13\n {print} 'You are older than me!'" + name: Bigger + explanation: We use the `>` to check if the first number is bigger than the second number. +- demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer == 25\n {print} 'That is correct!'" + name: Equal + explanation: We use the `==` to check if two things are the same. +- explanation: We use the `!=` to check if two things are not the same. + name: Not equal + demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer != 25\n {print} 'That is not correct!'" +- demo_code: "age = {ask} 'How old are you?'\n{if} age <= 12\n {print} 'You are younger than me!'" + name: Smaller or equal + explanation: We use the `<=` to check if the first number is smaller than or equal to the second number. +- demo_code: "age = {ask} 'How old are you?'\n{if} age >= 14\n {print} 'You are older than me!'" + explanation: We use the `>=` to check if the first number is bigger than or equal to the second number. + name: Bigger or equal +16: +- name: square brackets + explanation: Lists with square brackets. + demo_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit" +- name: Get an item from a list + explanation: To get an item from a list we use [number] so fruit[1] means, get the first fruit from the list! + demo_code: "fruit = ['banana', 'apple', 'cherry']\nfirstfruit = fruit[1]\n{print} firstfruit" +- name: Get a random item from a list + explanation: To get a random item from a list we use [{random}] so fruit[{random}] means, get a random fruit from the list! + demo_code: "fruit = ['banana', 'apple', 'cherry']\nrandom_fruit = fruit[{random}]\n{print} random_fruit" +17: +- explanation: '`{elif}`' + demo_code: "a = 2\n{if} a == 1:\n {print} 'a is 1'\n{elif} a == 2:\n {print} 'a is 2'\n{else}:\n {print} 'a is not 1 or 2'" + name: '{elif}' +- name: '{print}' + demo_code: "{for} i {in} {range} 1 {to} 12:\n {print} i\n{print} 'Ready or not, here I come!'" + explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement! +- name: '{if}' + explanation: We need to do the same with all of our `{if}` statements. + demo_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'Your favorite color is green'\n{else}:\n {print} 'Your favorite color is not green'" +18: +- explanation: After `{print}` you need to use parentheses. + demo_code: "{print}('hi!')" + name: '{print}' +- name: '{range}' + explanation: After `{range}` you need to use parentheses. + demo_code: "{for} i {in} {range} (1,10):\n {print}('Hello, times ', i)" +- demo_code: "name = 'Hedy'\n{print}('my name is ', name)" + explanation: With `{print}` you need to use parentheses and commas if you print more items. + name: '{print} with var' +- name: ask something with {input} + explanation: Use `{input}` instead of `{ask}` to ask something. + demo_code: "name = {input}('What is your name?')\n{print}('So your name is ', name)" +5: +- explanation: Print exactly using quotation marks. + name: '{print}' + demo_code: "{print} 'Hello welcome to Hedy.'" +- name: '{ask}' + demo_code: "color {is} {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'" + explanation: Ask something with `{ask}`. +- demo_code: "color {is} {ask} 'What is your favorite color?'\n{if} color {is} green {print} 'pretty!' {else} {print} 'meh'" + explanation: Make a choice with `{if}`. + name: '{if}' +- name: '{if} with turtle' + explanation: Make a choice with `{if}`. + demo_code: "answer {is} {ask} 'How far should I walk?'\n{if} answer {is} far {forward} 100 {else} {forward} 5" +- demo_code: "pretty_colors {is} green, yellow\ncolor {is} {ask} 'What is your favorite color?'\n{if} color {in} pretty_colors {print} 'pretty!' {else} {print} 'meh'" + explanation: Check elements with `{in}`. + name: '{in}' +- demo_code: "{if} a {is} {pressed} {print} 'You pressed A!' {else} {print} 'You pressed another key!'" + explanation: Check whether a given key on the keyboard is `{pressed}`. + name: '{pressed}' +9: +- name: '{if} with multiple lines' + demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20\n {print} 'Well done!!'\n {print} 'The answer is indeed' answer\n{else}\n {print} 'Wrong'\n {print} 'The answer is 20'" + explanation: The answer of a sum of questions with `{ask}` and see if it is correct. Now we print out two lines. +- explanation: Repeat multiple lines. + name: '{repeat} with turtle' + demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50" +12: +- explanation: Decimal numbers. + demo_code: "{print} 'Calculate away!'\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5" + name: float directly +- demo_code: "name = 'Hedy the Robot'\n{print} 'Hello ' name" + explanation: Text with quotation marks after `=` + name: assign text +- explanation: Text with quotation marks after `{if}`. + name: quotes after `{if}` comparison + demo_code: "name = {ask} 'Who are you?'\n{if} name = 'Hedy'\n {print} 'Hi there!'" +- demo_code: "superheroes = 'Iron Man', 'Batman', 'Superman'\n{print} superheroes {at} {random}" + explanation: A list with quotation marks. + name: quotes in list +1: +- demo_code: '{print} Hello welcome to Hedy!' + name: '{print}' + explanation: Print something with `{print}`. +- name: '{ask}' + demo_code: '{ask} What is your favorite color?' + explanation: Ask something with `{ask}`. +- demo_code: "{ask} What is your favorite color?\n{echo} so your favorite color is" + name: '{echo}' + explanation: Repeat something using `{echo}`. +- name: '{print} emojis' + demo_code: '{print} 🙋 🌍 ❗' + explanation: Print an emoji with `{print}`. +- demo_code: '{forward} 100' + explanation: Draw a line with `{forward}`. + name: '{forward}' +- demo_code: "{forward} 25\n{turn} {left}\n{forward} 25\n{turn} {right}" + explanation: Turn the drawing turtle with `{turn}`. + name: '{turn}' +15: +- demo_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'" + explanation: We can use the `{while}` loop with not equal. + name: '{while}' +- name: Smaller {while} + demo_code: "count = 1\n{while} count < 3\n {print} 'We do this ' 3 - count ' more times'\n count = count + 1\n{print} 'We are done'" + explanation: We can also use the `{while}` loop with `<` and `>`. +6: +- demo_code: "{print} '5 times 5 is ' 5 * 5" + explanation: Print exactly using quotation marks. + name: '{print}' +- name: '{ask}' + demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20 {print} 'Yes!' {else} {print} 'Oops'" + explanation: Ask for a calculation and check whether it is correct. +- name: '`{ask}` and `{if}` with turtle' + explanation: Ask the user how many angles they want. + demo_code: "angles = {ask} 'How many angles?'\nangle = 360 / angles\n{forward} 50" +10: +- name: '{print}' + demo_code: "{print} '5 times 5 is ' 5 * 5" + explanation: Print something. Remember to use a quotation mark for literal printing. +- explanation: Print all things in a list. + name: '{for} with a list' + demo_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal" +11: +- demo_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter" + explanation: We can use `{for}` with a `{range}`. + name: '{for} loop' +- name: '{ask}' + demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'" + explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines. diff --git a/content/cheatsheets/ne.yaml b/content/cheatsheets/ne.yaml new file mode 100644 index 00000000000..2a99a863c06 --- /dev/null +++ b/content/cheatsheets/ne.yaml @@ -0,0 +1,207 @@ +2: +- name: '{is}' + demo_code: "name {is} Hedy\n{print} welcome name" + explanation: Give a word a name to use in the program using `{is}`. You can choose the name yourself. +- demo_code: "color {is} {ask} What is your favorite color?\n{print} color is your favorite!" + name: '{ask}' + explanation: Ask something with `{ask}`. Beware! You need to give the answer a name with `{is}`. +- demo_code: "{print} Let me think for one second...\n{sleep}\n{print} Hmm.. I need 3 more seconds...\n{sleep} 3\n{print} Eureka! Ive got it!" + explanation: With `{sleep}`, you can let Hedy pause for a (couple of) second(s). + name: '{sleep}' +- demo_code: "angle {is} 90\n{turn} angle\n{forward} 100" + explanation: Give a number a name using `{is}`. You can choose the name yourself. + name: '{is} with turtle' +1: +- demo_code: '{print} Hello welcome to Hedy!' + name: '{print}' + explanation: Print something with `{print}`. +- name: '{ask}' + demo_code: '{ask} What is your favorite color?' + explanation: Ask something with `{ask}`. +- demo_code: "{ask} What is your favorite color?\n{echo} so your favorite color is" + name: '{echo}' + explanation: Repeat something using `{echo}`. +- name: '{print} emojis' + demo_code: '{print} 🙋 🌍 ❗' + explanation: Print an emoji with `{print}`. +- demo_code: '{forward} 100' + explanation: Draw a line with `{forward}`. + name: '{forward}' +- demo_code: "{forward} 25\n{turn} {left}\n{forward} 25\n{turn} {right}" + explanation: Turn the drawing turtle with `{turn}`. + name: '{turn}' +3: +- name: Choose random + explanation: Choose a random word from a group with `{at}` and `{random}`. + demo_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}" +- demo_code: "animals {is} cow, cat\n{add} dog {to_list} animals" + explanation: '`{add}` an item `{to_list}` a list.' + name: '{add}' +- explanation: '`{remove}` an item `{from}` a list.' + demo_code: "animals {is} cat, dog, cow\n{remove} dog {from} animals" + name: '{remove}' +4: +- explanation: Print exactly using quotation marks. + name: '{print}' + demo_code: "{print} 'Hello welcome to Hedy.'" +- demo_code: "name {is} Hedy\n{print} 'my name is ' name" + name: '{is}' + explanation: Give a name to some text and `{print}` without quotation marks. +- explanation: Ask something with `{ask}`. + demo_code: "color {is} {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'" + name: '{ask}' +5: +- explanation: Print exactly using quotation marks. + name: '{print}' + demo_code: "{print} 'Hello welcome to Hedy.'" +- name: '{ask}' + demo_code: "color {is} {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'" + explanation: Ask something with `{ask}`. +- demo_code: "color {is} {ask} 'What is your favorite color?'\n{if} color {is} green {print} 'pretty!' {else} {print} 'meh'" + explanation: Make a choice with `{if}`. + name: '{if}' +- name: '{if} with turtle' + explanation: Make a choice with `{if}`. + demo_code: "answer {is} {ask} 'How far should I walk?'\n{if} answer {is} far {forward} 100 {else} {forward} 5" +- demo_code: "pretty_colors {is} green, yellow\ncolor {is} {ask} 'What is your favorite color?'\n{if} color {in} pretty_colors {print} 'pretty!' {else} {print} 'meh'" + explanation: Check elements with `{in}`. + name: '{in}' +- demo_code: "{if} a {is} {pressed} {print} 'You pressed A!' {else} {print} 'You pressed another key!'" + explanation: Check whether a given key on the keyboard is `{pressed}`. + name: '{pressed}' +6: +- demo_code: "{print} '5 times 5 is ' 5 * 5" + explanation: Print exactly using quotation marks. + name: '{print}' +- name: '{ask}' + demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20 {print} 'Yes!' {else} {print} 'Oops'" + explanation: Ask for a calculation and check whether it is correct. +- name: '`{ask}` and `{if}` with turtle' + explanation: Ask the user how many angles they want. + demo_code: "angles = {ask} 'How many angles?'\nangle = 360 / angles\n{forward} 50" +7: +- explanation: Print exactly using quotation marks. + name: '{print}' + demo_code: "{print} 'Hello welcome to Hedy.'" +- name: '{ask}' + explanation: Ask something with `{ask}`. + demo_code: "color = {ask} 'What is your favorite color?'\n{print} color ' is your favorite!'" +- explanation: Make a choice with `{if}`. + name: '{if}' + demo_code: "color = {ask} 'What is your favorite color?'\n{if} color {is} green {print} 'pretty!' {else} {print} 'meh'" +- demo_code: '{repeat} 3 {times} {forward} 10' + explanation: Repeat a line of code with `{repeat}`. + name: '{repeat} with turtle' +9: +- name: '{if} with multiple lines' + demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20\n {print} 'Well done!!'\n {print} 'The answer is indeed' answer\n{else}\n {print} 'Wrong'\n {print} 'The answer is 20'" + explanation: The answer of a sum of questions with `{ask}` and see if it is correct. Now we print out two lines. +- explanation: Repeat multiple lines. + name: '{repeat} with turtle' + demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50" +8: +- name: '{print}' + explanation: Print something. Remember to use a quotation mark for literal printing. + demo_code: "{print} '5 times 5 is ' 5 * 5" +- name: '{ask}' + demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'" + explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines. +- explanation: Repeat multiple lines. + name: '{repeat} with turtle' + demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50" +- name: '{pressed}' + explanation: Check whether a given key on the keyboard is `{pressed}`. + demo_code: "{if} a {is} {pressed}\n {print} 'You pressed A!'\n{else}\n {print} 'You pressed another key!'" +10: +- demo_code: "{print} '5 times 5 is ' 5 * 5" + name: '{print}' + explanation: Print something. Remember to use a quotation mark for literal printing. +- explanation: Print all things in a list. + name: '{for} with a list' + demo_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal" +11: +- explanation: We can use `{for}` with a `{range}`. + demo_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter" + name: '{for} loop' +- name: '{ask}' + demo_code: "answer = {ask} 'What is 5 plus 5?'\n{if} answer {is} 10\n {print} 'Well done!'\n {print} 'Indeed, the answer was ' answer\n{else}\n {print} 'Oops!'\n {print} 'The answer is 10'" + explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines. +12: +- name: float directly + explanation: Decimal numbers. + demo_code: "{print} 'Calculate away!'\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5" +- demo_code: "name = 'Hedy the Robot'\n{print} 'Hello ' name" + explanation: Text with quotation marks after `=` + name: assign text +- explanation: Text with quotation marks after `{if}`. + name: quotes after `{if}` comparison + demo_code: "name = {ask} 'Who are you?'\n{if} name = 'Hedy'\n {print} 'Hi there!'" +- demo_code: "superheroes = 'Iron Man', 'Batman', 'Superman'\n{print} superheroes {at} {random}" + explanation: A list with quotation marks. + name: quotes in list +13: +- explanation: Two parts both need to be correct. + demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {and} answer2 {is} 4\n {print} 'Both answers are correct!'\n{else}\n {print} 'At least one answer is wrong!'" + name: '{and}' +- name: '{or}' + demo_code: "answer1 = {ask} 'What is 3+2?'\nanswer2 = {ask} 'What is 2+2?'\n{if} answer1 {is} 5 {or} answer2 {is} 4\n {print} 'At least one answer is correct!'\n{else}\n {print} 'Both answers are wrong!'" + explanation: At least 1 of the two parts need to be correct. If both are correct, it is also fine. +14: +- explanation: We use the `<` to check if the first number is smaller than the second number. + demo_code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'" + name: Smaller +- demo_code: "age = {ask} 'How old are you?'\n{if} age > 13\n {print} 'You are older than me!'" + explanation: We use the `>` to check if the first number is bigger than the second number. + name: Bigger +- demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer == 25\n {print} 'That is correct!'" + name: Equal + explanation: We use the `==` to check if two things are the same. +- explanation: We use the `!=` to check if two things are not the same. + name: Not equal + demo_code: "answer = {ask} 'What is 5 * 5?'\n{if} answer != 25\n {print} 'That is not correct!'" +- demo_code: "age = {ask} 'How old are you?'\n{if} age <= 12\n {print} 'You are younger than me!'" + name: Smaller or equal + explanation: We use the `<=` to check if the first number is smaller than or equal to the second number. +- name: Bigger or equal + demo_code: "age = {ask} 'How old are you?'\n{if} age >= 14\n {print} 'You are older than me!'" + explanation: We use the `>=` to check if the first number is bigger than or equal to the second number. +16: +- name: square brackets + explanation: Lists with square brackets. + demo_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit" +- name: Get an item from a list + explanation: To get an item from a list we use [number] so fruit[1] means, get the first fruit from the list! + demo_code: "fruit = ['banana', 'apple', 'cherry']\nfirstfruit = fruit[1]\n{print} firstfruit" +- name: Get a random item from a list + explanation: To get a random item from a list we use [{random}] so fruit[{random}] means, get a random fruit from the list! + demo_code: "fruit = ['banana', 'apple', 'cherry']\nrandom_fruit = fruit[{random}]\n{print} random_fruit" +15: +- demo_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'" + explanation: We can use the `{while}` loop with not equal. + name: '{while}' +- name: Smaller {while} + demo_code: "count = 1\n{while} count < 3\n {print} 'We do this ' 3 - count ' more times'\n count = count + 1\n{print} 'We are done'" + explanation: We can also use the `{while}` loop with `<` and `>`. +18: +- explanation: After `{print}` you need to use parentheses. + demo_code: "{print}('hi!')" + name: '{print}' +- name: '{range}' + explanation: After `{range}` you need to use parentheses. + demo_code: "{for} i {in} {range} (1,10):\n {print}('Hello, times ', i)" +- demo_code: "name = 'Hedy'\n{print}('my name is ', name)" + explanation: With `{print}` you need to use parentheses and commas if you print more items. + name: '{print} with var' +- explanation: Use `{input}` instead of `{ask}` to ask something. + name: ask something with {input} + demo_code: "name = {input}('What is your name?')\n{print}('So your name is ', name)" +17: +- explanation: '`{elif}`' + demo_code: "a = 2\n{if} a == 1:\n {print} 'a is 1'\n{elif} a == 2:\n {print} 'a is 2'\n{else}:\n {print} 'a is not 1 or 2'" + name: '{elif}' +- name: '{print}' + demo_code: "{for} i {in} {range} 1 {to} 12:\n {print} i\n{print} 'Ready or not, here I come!'" + explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement! +- explanation: We need to do the same with all of our `{if}` statements. + name: '{if}' + demo_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'Your favorite color is green'\n{else}:\n {print} 'Your favorite color is not green'" diff --git a/content/cheatsheets/ta.yaml b/content/cheatsheets/ta.yaml new file mode 100644 index 00000000000..4618f42c21a --- /dev/null +++ b/content/cheatsheets/ta.yaml @@ -0,0 +1,367 @@ +1: +- name: '{print}' + explanation: Print something with `{print}`. + demo_code: '{print} Hello welcome to Hedy!' +- name: '{ask}' + explanation: Ask something with `{ask}`. + demo_code: '{ask} What is your favorite color?' +- name: '{echo}' + explanation: Repeat something using `{echo}`. + demo_code: |- + {ask} What is your favorite color? + {echo} so your favorite color is +- name: '{print} emojis' + explanation: Print an emoji with `{print}`. + demo_code: '{print} 🙋 🌍 ❗' +- name: '{forward}' + explanation: Draw a line with `{forward}`. + demo_code: '{forward} 100' +- name: '{turn}' + explanation: Turn the drawing turtle with `{turn}`. + demo_code: |- + {forward} 25 + {turn} {left} + {forward} 25 + {turn} {right} +2: +- name: '{is}' + explanation: Give a word a name to use in the program using `{is}`. You can choose the name yourself. + demo_code: |- + name {is} Hedy + {print} welcome name +- name: '{ask}' + explanation: Ask something with `{ask}`. Beware! You need to give the answer a name with `{is}`. + demo_code: |- + color {is} {ask} What is your favorite color? + {print} color is your favorite! +- name: '{sleep}' + explanation: With `{sleep}`, you can let Hedy pause for a (couple of) second(s). + demo_code: |- + {print} Let me think for one second... + {sleep} + {print} Hmm.. I need 3 more seconds... + {sleep} 3 + {print} Eureka! Ive got it! +- name: '{is} with turtle' + explanation: Give a number a name using `{is}`. You can choose the name yourself. + demo_code: |- + angle {is} 90 + {turn} angle + {forward} 100 +3: +- name: Choose random + explanation: Choose a random word from a group with `{at}` and `{random}`. + demo_code: |- + animals {is} dog, cat, kangaroo + {print} animals {at} {random} +- name: '{add}' + explanation: '`{add}` an item `{to_list}` a list.' + demo_code: |- + animals {is} cow, cat + {add} dog {to_list} animals +- name: '{remove}' + explanation: '`{remove}` an item `{from}` a list.' + demo_code: |- + animals {is} cat, dog, cow + {remove} dog {from} animals +4: +- name: '{print}' + explanation: Print exactly using quotation marks. + demo_code: '{print} ''Hello welcome to Hedy.''' +- name: '{is}' + explanation: Give a name to some text and `{print}` without quotation marks. + demo_code: |- + name {is} Hedy + {print} 'my name is ' name +- name: '{ask}' + explanation: Ask something with `{ask}`. + demo_code: |- + color {is} {ask} 'What is your favorite color?' + {print} color ' is your favorite!' +5: +- name: '{print}' + explanation: Print exactly using quotation marks. + demo_code: '{print} ''Hello welcome to Hedy.''' +- name: '{ask}' + explanation: Ask something with `{ask}`. + demo_code: |- + color {is} {ask} 'What is your favorite color?' + {print} color ' is your favorite!' +- name: '{if}' + explanation: Make a choice with `{if}`. + demo_code: |- + color {is} {ask} 'What is your favorite color?' + {if} color {is} green {print} 'pretty!' {else} {print} 'meh' +- name: '{if} with turtle' + explanation: Make a choice with `{if}`. + demo_code: |- + answer {is} {ask} 'How far should I walk?' + {if} answer {is} far {forward} 100 {else} {forward} 5 +- name: '{in}' + explanation: Check elements with `{in}`. + demo_code: |- + pretty_colors {is} green, yellow + color {is} {ask} 'What is your favorite color?' + {if} color {in} pretty_colors {print} 'pretty!' {else} {print} 'meh' +- name: '{pressed}' + explanation: Check whether a given key on the keyboard is `{pressed}`. + demo_code: '{if} a {is} {pressed} {print} ''You pressed A!'' {else} {print} ''You pressed another key!''' +6: +- name: '{print}' + explanation: Print exactly using quotation marks. + demo_code: '{print} ''5 times 5 is '' 5 * 5' +- name: '{ask}' + explanation: Ask for a calculation and check whether it is correct. + demo_code: |- + answer = {ask} 'What is 10 plus 10?' + {if} answer {is} 20 {print} 'Yes!' {else} {print} 'Oops' +- name: '`{ask}` and `{if}` with turtle' + explanation: Ask the user how many angles they want. + demo_code: |- + angles = {ask} 'How many angles?' + angle = 360 / angles + {forward} 50 +7: +- name: '{print}' + explanation: Print exactly using quotation marks. + demo_code: '{print} ''Hello welcome to Hedy.''' +- name: '{ask}' + explanation: Ask something with `{ask}`. + demo_code: |- + color = {ask} 'What is your favorite color?' + {print} color ' is your favorite!' +- name: '{if}' + explanation: Make a choice with `{if}`. + demo_code: |- + color = {ask} 'What is your favorite color?' + {if} color {is} green {print} 'pretty!' {else} {print} 'meh' +- name: '{repeat} with turtle' + explanation: Repeat a line of code with `{repeat}`. + demo_code: '{repeat} 3 {times} {forward} 10' +8: +- name: '{print}' + explanation: Print something. Remember to use a quotation mark for literal printing. + demo_code: '{print} ''5 times 5 is '' 5 * 5' +- name: '{ask}' + explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines. + demo_code: |- + answer = {ask} 'What is 5 plus 5?' + {if} answer {is} 10 + {print} 'Well done!' + {print} 'Indeed, the answer was ' answer + {else} + {print} 'Oops!' + {print} 'The answer is 10' +- name: '{repeat} with turtle' + explanation: Repeat multiple lines. + demo_code: |- + {repeat} 4 {times} + {turn} 90 + {forward} 50 +- name: '{pressed}' + explanation: Check whether a given key on the keyboard is `{pressed}`. + demo_code: |- + {if} a {is} {pressed} + {print} 'You pressed A!' + {else} + {print} 'You pressed another key!' +9: +- name: '{if} with multiple lines' + explanation: The answer of a sum of questions with `{ask}` and see if it is correct. Now we print out two lines. + demo_code: |- + answer = {ask} 'What is 10 plus 10?' + {if} answer {is} 20 + {print} 'Well done!!' + {print} 'The answer is indeed' answer + {else} + {print} 'Wrong' + {print} 'The answer is 20' +- name: '{repeat} with turtle' + explanation: Repeat multiple lines. + demo_code: |- + {repeat} 4 {times} + {turn} 90 + {forward} 50 +10: +- name: '{print}' + explanation: Print something. Remember to use a quotation mark for literal printing. + demo_code: '{print} ''5 times 5 is '' 5 * 5' +- name: '{for} with a list' + explanation: Print all things in a list. + demo_code: |- + animals {is} dog, cat, blobfish + {for} animal {in} animals + {print} 'I love ' animal +11: +- name: '{for} loop' + explanation: We can use `{for}` with a `{range}`. + demo_code: |- + {for} counter {in} {range} 1 {to} 5 + {print} counter +- name: '{ask}' + explanation: Ask for the answer to a sum and check if it is correct. We can now print 2 lines. + demo_code: |- + answer = {ask} 'What is 5 plus 5?' + {if} answer {is} 10 + {print} 'Well done!' + {print} 'Indeed, the answer was ' answer + {else} + {print} 'Oops!' + {print} 'The answer is 10' +12: +- name: float directly + explanation: Decimal numbers. + demo_code: |- + {print} 'Calculate away!' + {print} 'Two and a half plus two and a half is...' + {print} 2.5 + 2.5 +- name: assign text + explanation: Text with quotation marks after `=` + demo_code: |- + name = 'Hedy the Robot' + {print} 'Hello ' name +- name: quotes after `{if}` comparison + explanation: Text with quotation marks after `{if}`. + demo_code: |- + name = {ask} 'Who are you?' + {if} name = 'Hedy' + {print} 'Hi there!' +- name: quotes in list + explanation: A list with quotation marks. + demo_code: |- + superheroes = 'Iron Man', 'Batman', 'Superman' + {print} superheroes {at} {random} +13: +- name: '{and}' + explanation: Two parts both need to be correct. + demo_code: |- + answer1 = {ask} 'What is 3+2?' + answer2 = {ask} 'What is 2+2?' + {if} answer1 {is} 5 {and} answer2 {is} 4 + {print} 'Both answers are correct!' + {else} + {print} 'At least one answer is wrong!' +- name: '{or}' + explanation: At least 1 of the two parts need to be correct. If both are correct, it is also fine. + demo_code: |- + answer1 = {ask} 'What is 3+2?' + answer2 = {ask} 'What is 2+2?' + {if} answer1 {is} 5 {or} answer2 {is} 4 + {print} 'At least one answer is correct!' + {else} + {print} 'Both answers are wrong!' +14: +- name: Smaller + explanation: We use the `<` to check if the first number is smaller than the second number. + demo_code: |- + age = {ask} 'How old are you?' + {if} age < 13 + {print} 'You are younger than me!' +- name: Bigger + explanation: We use the `>` to check if the first number is bigger than the second number. + demo_code: |- + age = {ask} 'How old are you?' + {if} age > 13 + {print} 'You are older than me!' +- name: Equal + explanation: We use the `==` to check if two things are the same. + demo_code: |- + answer = {ask} 'What is 5 * 5?' + {if} answer == 25 + {print} 'That is correct!' +- name: Not equal + explanation: We use the `!=` to check if two things are not the same. + demo_code: |- + answer = {ask} 'What is 5 * 5?' + {if} answer != 25 + {print} 'That is not correct!' +- name: Smaller or equal + explanation: We use the `<=` to check if the first number is smaller than or equal to the second number. + demo_code: |- + age = {ask} 'How old are you?' + {if} age <= 12 + {print} 'You are younger than me!' +- name: Bigger or equal + explanation: We use the `>=` to check if the first number is bigger than or equal to the second number. + demo_code: |- + age = {ask} 'How old are you?' + {if} age >= 14 + {print} 'You are older than me!' +15: +- name: '{while}' + explanation: We can use the `{while}` loop with not equal. + demo_code: |- + answer = 0 + {while} answer != 25 + answer = {ask} 'What is 5 times 5?' + {print} 'A correct answer has been given' +- name: Smaller {while} + explanation: We can also use the `{while}` loop with `<` and `>`. + demo_code: |- + count = 1 + {while} count < 3 + {print} 'We do this ' 3 - count ' more times' + count = count + 1 + {print} 'We are done' +16: +- name: square brackets + explanation: Lists with square brackets. + demo_code: |- + fruit = ['apple', 'banana', 'cherry'] + {print} fruit +- name: Get an item from a list + explanation: To get an item from a list we use [number] so fruit[1] means, get the first fruit from the list! + demo_code: |- + fruit = ['banana', 'apple', 'cherry'] + firstfruit = fruit[1] + {print} firstfruit +- name: Get a random item from a list + explanation: To get a random item from a list we use [{random}] so fruit[{random}] means, get a random fruit from the list! + demo_code: |- + fruit = ['banana', 'apple', 'cherry'] + random_fruit = fruit[{random}] + {print} random_fruit +17: +- name: '{elif}' + explanation: '`{elif}`' + demo_code: |- + a = 2 + {if} a == 1: + {print} 'a is 1' + {elif} a == 2: + {print} 'a is 2' + {else}: + {print} 'a is not 1 or 2' +- name: '{print}' + explanation: When we use a `{for}`, we need to put a `:` behind the `{for}` statement! + demo_code: |- + {for} i {in} {range} 1 {to} 12: + {print} i + {print} 'Ready or not, here I come!' +- name: '{if}' + explanation: We need to do the same with all of our `{if}` statements. + demo_code: |- + color = {ask} 'What is your favorite color?' + {if} color == 'green': + {print} 'Your favorite color is green' + {else}: + {print} 'Your favorite color is not green' +18: +- name: '{print}' + explanation: After `{print}` you need to use parentheses. + demo_code: '{print}(''hi!'')' +- name: '{range}' + explanation: After `{range}` you need to use parentheses. + demo_code: |- + {for} i {in} {range} (1,10): + {print}('Hello, times ', i) +- name: '{print} with var' + explanation: With `{print}` you need to use parentheses and commas if you print more items. + demo_code: |- + name = 'Hedy' + {print}('my name is ', name) +- name: ask something with {input} + explanation: Use `{input}` instead of `{ask}` to ask something. + demo_code: |- + name = {input}('What is your name?') + {print}('So your name is ', name) diff --git a/content/client-messages/da.yaml b/content/client-messages/da.yaml index 6acd7b0a47e..5ee2cb1f655 100644 --- a/content/client-messages/da.yaml +++ b/content/client-messages/da.yaml @@ -1,21 +1,21 @@ -CheckInternet: Check whether your Internet connection is working. -Connection_error: We couldn't reach the server. -Empty_output: This code works but does not print anything. Add a print command to your code or use the turtle to get output. -Errors_found: You made a mistake! Don't worry, Hedy is trying to find the mistakes -Execute_error: Something went wrong while running the program. -Other_error: Oops! Maybe we made a little mistake. -Program_repair: This could be the correct code, can you fix it? -Program_too_long: Your program takes too long to run. -ServerError: You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at hello@hedy.org. In the meantime, try something a little different and take another look at the examples. Thanks! -Transpile_error: We can't run your program. +CheckInternet: Tjek om du er forbundet til internettet. +Connection_error: Vi kunne ikke nå serveren. +Empty_output: Denne kode fungerer, men udskriver ikke noget. Tilføj en udskriftskommando til din kode eller brug skildpadden til at få et output. +Errors_found: Du lavede en fejl! Bare rolig, vi kørte stadig programmet +Execute_error: Noget gik galt da programmet kørte. +Other_error: Ups! Vi har måske lavet en lille fejl. +Program_repair: Dette kunne være den korrekte kode; kan du løse det? +Program_too_long: Dit program tager for lang tid at køre. +ServerError: Du skrev et program, vi ikke havde forventet. Hvis du ønsker at hjælpe, sende os en e-mail med niveauet og dit program på hello@hedy.org. I mellemtiden, prøv at test et lidt anderledes program og tage et ekstra kig på eksemplerne. Tak! +Transpile_error: Vi kan ikke køre dit program. Transpile_success: -- Good job! -- Amazing! -- Well done! -- Excellent! -- You did great! -Transpile_warning: Warning! -Unsaved_Changes: You have an unsaved program. Do you want to leave without saving it? +- Godt arbejde! +- Fantastisk! +- Godt klaret! +- Fremragende! +- Flot gjort! +Transpile_warning: Advarsel! +Unsaved_Changes: Dit program er ikke gemt. Vil du afslutte uden at gemme det? dice: 🎲 fortune: 🔮, ✨ haunted: 🦇, 👻, 🎃 diff --git a/content/client-messages/kab.yaml b/content/client-messages/kab.yaml new file mode 100644 index 00000000000..3cb1129058f --- /dev/null +++ b/content/client-messages/kab.yaml @@ -0,0 +1,25 @@ +haunted: 🦇, 👻, 🎃 +turtle: 🐢 +Program_too_long: Ahil-ik yettaṭṭaf aṭas n wakud i wakken ad yekker. +Errors_found: Tgiḍ tuccḍa ! Ur ttagad, nselkem ahil +ServerError: You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at hello@hedy.org. In the meantime, try something a little different and take another look at the examples. Thanks! +restaurant: 🍣, 🍕, 🍔 +Execute_error: Yella wayen ur neddi ara akken ilaq lawan n uselkem n wahil. +CheckInternet: Senqed tuqqna-k ɣer Internet tetteddu akken iwata. +Transpile_success: +- Igerrez! +- Gedha! +- Yelha! +- Izad! +- D amahil izaden! +Program_repair: Yezmer wagi d tangalt tameɣtut, tzemreḍ ad t-tṣeggmeḍ ? +Other_error: Ihuh! Waqil nga tuccḍa tamecṭuḥt. +Connection_error: Ur nessaweḍ ara ɣer uqeddac. +Transpile_warning: Ɣur-k! +Transpile_error: Ur nezmir ara ad nseddu ahil-ik. +songs: 🎵,🎶 +Unsaved_Changes: Ahil-a ur yettwasekles ara. Tebɣiḍ ad teffɣeḍ war ma teskelseḍ-t? +rock: ✂️, 📜, 🗻 +dice: 🎲 +Empty_output: This code works but does not print anything. Add a print command to your code or use the turtle to get output. +fortune: 🔮, ✨ diff --git a/content/client-messages/ne.yaml b/content/client-messages/ne.yaml new file mode 100644 index 00000000000..415b3fc8b17 --- /dev/null +++ b/content/client-messages/ne.yaml @@ -0,0 +1,25 @@ +Other_error: Oops! Maybe we made a little mistake. +ServerError: You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at hello@hedy.org. In the meantime, try something a little different and take another look at the examples. Thanks! +Transpile_success: +- Good job! +- Amazing! +- Well done! +- Excellent! +- You did great! +haunted: 🦇, 👻, 🎃 +Program_too_long: Your program takes too long to run. +Errors_found: You made a mistake! Don't worry, we still ran the program +turtle: 🐢 +restaurant: 🍣, 🍕, 🍔 +Execute_error: Something went wrong while running the program. +CheckInternet: Check whether your Internet connection is working. +Program_repair: This could be the correct code, can you fix it? +Connection_error: We couldn't reach the server. +Transpile_warning: Warning! +Transpile_error: We can't run your program. +songs: 🎵,🎶 +Unsaved_Changes: You have an unsaved program. Do you want to leave without saving it? +rock: ✂️, 📜, 🗻 +dice: 🎲 +Empty_output: This code works but does not print anything. Add a print command to your code or use the turtle to get output. +fortune: 🔮, ✨ diff --git a/content/client-messages/ta.yaml b/content/client-messages/ta.yaml new file mode 100644 index 00000000000..c8943d84a57 --- /dev/null +++ b/content/client-messages/ta.yaml @@ -0,0 +1,25 @@ +haunted: 🦇, 👻, 🎃 +Program_too_long: Your program takes too long to run. +Errors_found: உங்கள் நிரலில் பிழைகள் இருக்கின்றன! எனினும் கவலையுற வேண்டாம். இருப்பினும் உங்கள் நிரலை இயக்க முடிந்தது +turtle: 🐢 +ServerError: You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at hello@hedy.org. In the meantime, try something a little different and take another look at the examples. Thanks! +restaurant: 🍣, 🍕, 🍔 +Execute_error: Something went wrong while running the program. +CheckInternet: உங்கள் இணைய இணைப்பு செயல்படுகிறதா என சரிபார்க்கவும். +Transpile_success: +- Good job! +- Amazing! +- Well done! +- Excellent! +- You did great! +Program_repair: This could be the correct code, can you fix it? +Other_error: Oops! Maybe we made a little mistake. +Connection_error: எங்களால் சேவையகத்தை அடைய முடியவில்லை. +Transpile_warning: Warning! +Transpile_error: We can't run your program. +songs: 🎵,🎶 +Unsaved_Changes: You have an unsaved program. Do you want to leave without saving it? +rock: ✂️, 📜, 🗻 +dice: 🎲 +Empty_output: This code works but does not print anything. Add a print command to your code or use the turtle to get output. +fortune: 🔮, ✨ diff --git a/content/keywords/da.yaml b/content/keywords/da.yaml index 85fd124cb64..535b367447d 100644 --- a/content/keywords/da.yaml +++ b/content/keywords/da.yaml @@ -5,7 +5,7 @@ at: ved black: sort blue: blå brown: brun -call: call +call: kald clear: rens color: farve comma: ',' @@ -22,46 +22,46 @@ d9: '9' def: def define: definer echo: ekko -elif: elif +elif: ellers hvis else: ellers -'false': 'false' -'False': 'False' +'false': 'falsk' +'False': 'Falsk' for: for forward: fremad -from: from +from: fra gray: grå green: grøn -if: if -in: in +if: hvis +in: i input: input -is: is -left: left -length: length -not_in: not in -or: or +is: er +left: venstre +length: længde +not_in: ikke i +or: eller orange: orange pink: lyserød -play: play -pressed: pressed -print: print +play: spil +pressed: trykket ned +print: skriv purple: lila quote: '''' -random: random -range: range -red: red -remove: remove -repeat: repeat -return: return -right: right -sleep: sleep -step: step -times: times -to: to -to_list: to -'true': 'true' -'True': 'True' +random: tilfældighed +range: interval +red: rød +remove: fjern +repeat: gentag +return: returner +right: højre +sleep: sov +step: skridt +times: gange +to: til +to_list: til +'true': 'sand' +'True': 'Sand' turn: drej -while: while -white: white -with: with -yellow: yellow +while: mens +white: hvid +with: med +yellow: gul diff --git a/content/keywords/kab.yaml b/content/keywords/kab.yaml new file mode 100644 index 00000000000..18b2cd72378 --- /dev/null +++ b/content/keywords/kab.yaml @@ -0,0 +1,67 @@ +is: d +in: deg +input: sekcem +'True': 'True' +define: sbadu +turn: zzi +if: ma yella +d2: '2' +brown: aqehwi +from: seg +and: akked +remove: kkes +d7: '7' +'false': 'false' +d5: '5' +for: i +clear: sfeḍ +gray: gray +pink: axuxi +'False': 'False' +ask: ssuter +right: ayeffus +while: imi +white: amellal +or: neɣ +range: range +with: akked +repeat: ales +to: ɣer +'true': 'true' +not_in: mačči deg +d6: '6' +return: uɣal ɣer deffir +quote: "'" +at: ar +times: tikkal +forward: welleh +orange: aččinawi +d4: '4' +green: azegzaw +yellow: awreɣ +left: ayeffus +d1: '1' +elif: neɣ ma yella +red: azeggaɣ +random: random +black: aberkan +print: siggez +call: asiwel +d8: '8' +def: def +d9: '9' +pressed: pressed +play: urar +to_list: ɣer +d3: '3' +comma: ',' +add: rnu +echo: yerra-d +length: teɣzi +else: neɣ +d0: '0' +color: ini +purple: purple +blue: amidadi +step: takkayt +sleep: gen diff --git a/content/keywords/ne.yaml b/content/keywords/ne.yaml new file mode 100644 index 00000000000..f8d587eb01c --- /dev/null +++ b/content/keywords/ne.yaml @@ -0,0 +1,67 @@ +d2: '2' +brown: brown +and: and +d5: '5' +clear: clear +ask: ask +define: define +d7: '7' +'false': 'false' +for: for +'False': 'False' +forward: forward +elif: elif +d8: '8' +def: def +d9: '9' +echo: echo +if: if +from: from +gray: gray +is: is +or: or +in: in +input: input +not_in: not in +orange: orange +green: green +left: left +'True': 'True' +turn: turn +remove: remove +pink: pink +right: right +while: while +white: white +range: range +with: with +repeat: repeat +to: to +'true': 'true' +d6: '6' +return: return +quote: "'" +at: at +times: times +d4: '4' +yellow: yellow +d1: '1' +red: red +random: random +black: black +print: print +call: call +pressed: pressed +play: play +to_list: to +d3: '3' +comma: ',' +add: add +length: length +else: else +d0: '0' +color: color +purple: purple +blue: blue +step: step +sleep: sleep diff --git a/content/keywords/ta.yaml b/content/keywords/ta.yaml new file mode 100644 index 00000000000..0326d7e4c99 --- /dev/null +++ b/content/keywords/ta.yaml @@ -0,0 +1,67 @@ +add: add +and: and +ask: ask +at: at +black: black +blue: blue +brown: brown +call: call +clear: clear +color: color +comma: ',' +d0: '0' +d1: '1' +d2: '2' +d3: '3' +d4: '4' +d5: '5' +d6: '6' +d7: '7' +d8: '8' +d9: '9' +def: def +define: define +echo: echo +elif: elif +else: else +'false': 'false' +'False': 'False' +for: for +forward: forward +from: from +gray: gray +green: green +if: if +in: in +input: input +is: is +left: left +length: length +not_in: not in +or: or +orange: orange +pink: pink +play: play +pressed: pressed +print: print +purple: purple +quote: '''' +random: random +range: range +red: red +remove: remove +repeat: repeat +return: return +right: right +sleep: sleep +step: step +times: times +to: to +to_list: to +'true': 'true' +'True': 'True' +turn: turn +while: while +white: white +with: with +yellow: yellow diff --git a/content/pages/ar.yaml b/content/pages/ar.yaml index 6ba8475cccb..6fbf7e93f89 100644 --- a/content/pages/ar.yaml +++ b/content/pages/ar.yaml @@ -50,11 +50,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our [Discord server](https://discord.gg/8yY7dEme9r). + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -149,7 +155,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/bg.yaml b/content/pages/bg.yaml index fdd33639b99..33b83e452b5 100644 --- a/content/pages/bg.yaml +++ b/content/pages/bg.yaml @@ -51,13 +51,22 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Включи се в Общността на Хеди +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Виж в детайли! - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! + text: |- + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: + + - title: Хеди по новините text: |- Сайтове и вестници пишат за Хеди от самото начало през ранната 2020. Държим списък тук: @@ -155,7 +164,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/bn.yaml b/content/pages/bn.yaml index 0ec62363e0d..501de458e26 100644 --- a/content/pages/bn.yaml +++ b/content/pages/bn.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Want to help? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -133,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ca.yaml b/content/pages/ca.yaml index fa5f034878c..12fe4dff5cd 100644 --- a/content/pages/ca.yaml +++ b/content/pages/ca.yaml @@ -3,7 +3,7 @@ home-sections: - title: La programació textual feta fàcil! text: "Moltes escoles i professors d'arreu del món volen ensenyar als seus alumnes la programació. Inicialment, sovint això es fa amb eines lúdiques, que van des del robot Beebot fins a \nScratch Junior o Scratch. Després d'utilitzar aquestes eines, els nens sovint volen passar a llenguatges de programació textuals més potents, com Python.\n\nTanmateix, Python és difícil, perquè només està disponible en anglès i requereix que els estudiants aprenguin conceptes i sintaxi de programació complexos alhora.\nHedy és la manera fàcil de començar amb els llenguatges de programació textual! Hedy és d'ús gratuït, de codi obert i, a diferència de qualsevol altre llenguatge de programació textual, és les tres coses:\n\n1. Hedy és multilingüe, pots utilitzar Hedy en el teu propi idioma\n2. Hedy és gradual, de manera que pots aprendre un concepte i la seva sintaxi a la vegada\n3. Hedy està dissenyat per a l'aula, la qual cosa permet als professors personalitzar completament l'experiència dels seus alumnes" - title: Programació multilingüe - text: Tot i que gairebé tots els llenguatges de programació textual tenen paraules clau en anglès, com ara "for" o "while", Hedy es pot utilitzar en qualsevol idioma! Actualment, admetem 39 idiomes diferents, inclosos el català, l'espanyol, l'àrab, el xinès simplificat i l'hindi. Si el vostre idioma no està disponible, sempre podeu començar una traducció nova. + text: Tot i que gairebé tots els llenguatges de programació textual tenen paraules clau en anglès, com ara "for" o "while", Hedy es pot utilitzar en qualsevol idioma! Actualment, admetem 47 idiomes diferents, inclosos l'holandès, l'espanyol, l'àrab, el turc, el xinès i l'hindi. Si el vostre idioma no està disponible, sempre podeu començar una traducció nova. - title: Aprenentatge pas a pas text: Aprendre un llenguatge de programació pot ser aclaparador, ja que els estudiants han d'aprendre conceptes (per exemple, if-else o bucles) i sintaxi (com les cometes o els claudàtors) alhora. A Hedy, els conceptes s'introdueixen primer amb poca sintaxi i després es perfeccionen. Una manera d'aprendre científicament provada! - title: Preparat per l'aula @@ -33,7 +33,7 @@ join-sections: Cerqueu aquests problemes a Github . - title: Traduint Hedy text: |- - No és un programador? Cap problema! Una altra manera de donar suport a Hedy és de traduir paraules clau, missatges d'error, aventures són un altre contingut . + No és un programador? Cap problema! Una altra manera de donar suport a Hedy és traduint paraules clau, missatges d'error, aventures i altre contingut . Aquest és l'estat actual, ajudeu -nos a completar un idioma o a afegir -ne un de nou. Translation status @@ -42,21 +42,26 @@ join-sections: Hedy està dissenyat per donar suport als professors a proporcionar lliçons de programació a classe. Tenim funcions específiques del professor com l’opció de crear una classe, personalitzar -la i veure com estan els vostres estudiants. Si us agrada Hedy, podeu contactar a les escoles que sabeu per ajudar els professors a començar. Us podem ajudar a trobar escoles o professors a través de Discord . learn-more-sections: -- title: Uneix-te a la comunitat Hedy +- title: The Hedy foundation text: |- - Ens encanta sentir-vos! La millor manera de posar-se en contacte amb nosaltres és unir-se al nostre servidor Discord . + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - També podeu [enviar-nos un correu electrònic] (mailto: hello@hedy.org "Sobre Hedy"). + The board of the foundation consists of: - I si voleu estar al corrent de les últimes notícies [subscriviu-vos al nostre butlletí](/subscribe). -- title: Amb profunditat! + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Vols saber més sobre la filosofia i el disseny d'Hedy? Fes una ullada a aquesta xerrada que la Felienne va fer a la conferència StrangeLoop el 2022: + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - title: Hedy a les notícies text: |- Alguns llocs web i diaris han escrit sobre Hedy des del nostre llançament a principis de 2020. En conservem una llista aquí: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) @@ -77,9 +82,9 @@ learn-more-sections: * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: -- title: Getting started with Hedy +- title: Primeres passes amb Hedy text: '*Something about teachers accounts, slides etc*' -- title: What other teachers say +- title: Docents sobre Hedy text: "A while ago we ran a few short Hedy teachers surveys. \nThe questions span between suggestions of improvement and Hedy’s best features. \nBelow is a testimony of their thoughts:\n\nSimple interface and good examples. *Teacher: 3rd - 6th grades (elementary)*\n\nMultilingual programming and just the gradual programming concept itself. - *US: middle school, 6th-8th grade*\n\nThe gradual nature of introducing programming. *Australia: High school*\n\nThe construction is so good. *Netherlands: Lower secondary school HAVO-VWO*\n\nI can keep the pace of the class. *Netherlands: group 7 en 8* \n\nContinues automatically. *Netherlands: 2 HAVO-VWO*\n\nBoth that the explanation can be in Dutch (and the code in English), and that it builds up with more \nand more possibilities. *Netherlands: Plus class group 7*\n\nThe 'realness' of programming, it resembles how it is in reality. *Netherlands: Plus class group 4 to 8*\n\nStep-by-step activities. Fun activities. *Netherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO*\n\nBut Hedy and its gradual levels... what an idea, \nI wanted to personally thank you for creating this. I cannot thank you enough. Also, I have never seen the level of engagement and enthusiasm of my \nstudents, as I have seen with Hedy. We have covered till level 5, and plan to spend one more week on it in classes and labs, \nbefore starting Python. *Pakistan*\n\nI really like Hedy very much and it is also nicely set up, which makes it good to use in primary school. \nHedy's gradual approach works very well. \nThe short explanation at the beginning of each level and the short example programs help to give the children a quick insight into what is new in the chosen level. \nThe different assignments that the children can choose also work very well. \nYou see the children choose assignments that appeal to them and they then get to work with them, \nthrough the levels. Hedy is great fun for children who are good at programming and want to get a \ntaste of a real programming language. It is good preparation for secondary school as soon as more ICT \neducation is given there. *Netherlands: Oegstgeest Montessori school*\n\n" teacher-guide: - title: Introducció @@ -143,7 +148,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- @@ -362,15 +367,13 @@ teacher-guide: - title: Answers to the exercises key: answers intro: |- - The answers to all the exercises can be found on the public profile of the useraccount 'Hedy_answers'. We often encourage students to use their own creativity in their answers, so these answers are merely a guideline as to what a possible correct answer could look like. + Les respostes a tots els exercicis es poden trobar al perfil públic del compte d'usuari 'Hedy_answers'. Sovint animem als estudiants a usar la seva pròpia creativitat en les respostes, així doncs les respostes són simplement una guia sobre com podria ser una possible resposta correcta. - To go to the 'Hedy_answers' profile, please click here. + Per anar al perfil 'Hedy_answers', fes clic aquí. - title: Errors comuns key: errors_comuns intro: |- - Pots aprendre dels teus errors, sobretot en la codificació! - Cometre errors és inevitable i una gran oportunitat per aprendre, però per als professors pot ser un repte trobar la solució correcta per a un error! - Sobretot a mesura que els codis es fan més llargs i més llargs a mesura que avancen els nivells. És per això que hem fet una llista amb els errors freqüents a cada nivell i les seves solucions. + Pots aprendre dels teus errors, sobretot en la programació! Cometre errors és inevitable i una gran oportunitat per aprendre, però per als professors pot ser un repte trobar la solució correcta per a un error! Sobretot mesura que els programes es fan més i més llargs a mesura que els estudiants avancen de nivells. És per això que hem fet una llista amb els errors més freqüents a cada nivell i les seves solucions. levels: - level: '1' sections: @@ -418,7 +421,7 @@ teacher-guide: solution_code: |- {forward} 100 {turn} 90 - - title: "Turtle: Students use the command backward, but that doesn't exist" + - title: "Tortuga: Els estudiants usen l'ordre retrocedir, però no existeix." example: error_text: Backward is not a command. error_code: backward 100 @@ -564,7 +567,7 @@ teacher-guide: your_name {is} {ask} Who are you? {add} your_name {to} names {print} names {at} {random} - - title: Students forget to use to/from in add/remove + - title: Els estudiants obliden utilitzar '{to}'/'{from}' en '{add}'/'{remove}' example: error_text: Without to/from the add/remove command won't work. error_code: |- @@ -594,7 +597,7 @@ teacher-guide: mood {is} {ask} 'How are you?' - title: Students use the wrong quotation marks example: - error_text: It is important to start your lesson by checking if the students know how to type a quotation mark properly. Else they might use the "double quotes" or the skewed one `. + error_text: És important començar la classe comprovant si els estudiants saben com escriure les cometes correctament. A Hedy, els estudiants poden usar cometes simples ('') i dobles (""). Per altra banda, els accents no es consideren cometes vàlides (``). error_code: |- {print} `Welcome to the restaurant` food {is} {ask} "What would you like to order?" @@ -654,19 +657,19 @@ teacher-guide: solution_code: |- {if} name {is} Hedy {print} 'fun' {else} {print} 'meh! - - title: Students use long variable names containing two words + - title: Els estudiants usen noms de variables llargs que contenen dues o més paraules example: - error_text: A variable should be named with one word. You could use an underscore to connect two words. That counts as one. + error_text: Les variables a Hedy no poden contenir espais, així doncs, per tal d'usar diverses paraules juntes, els estudiants han de connectar-les usant guions baixos (_) error_code: chosen door is ask Which door do you pick? solution_text: Add an underscore. solution_code: chosen_door {is} {ask} 'which door do you pick?' - title: Students want multiple answers to be correct example: - error_text: For example this student Hedy to tell all his friends that they are funny, but other classmates would be told that they are not. + error_text: Per exemple, aquest estudiant vol que Hedy li digui tots els seus amics que són divertits, mentre que als altres companys els hauria de dir que no ho són. error_code: "{if} name {is} Jesse, David, Souf print You are funny {else} {print} 'You are not funny'" solution_text: |- - You could use the `in` command for that. It is explained in a higher level, but it does already work in level 5. - Another solution is to use multiple if commands and no else command. The disadvantage is that it won't tell the other classmates that they are not funny. + Pots usar la comanda '{in}' per això. Tot i que s'explica en un nivell superior, ja funciona a partir del nivell 5. + Una altra solució és usar múltiples comandes '{if}' i cap comanda '{else}'. El desavantatge és que no podrà dir als altres companys que no són divertits. solution_code: |- friends {is} Jesse, David, Souf name {is} {ask} 'Who are you?' @@ -942,7 +945,7 @@ teacher-guide: solution_code: '{print} 2.5 + 2.5' - level: '13' sections: - - title: Students confuse `and` with `or` + - title: Els estudiants confonen `{and}` amb `{or}` example: error_text: Both commands might appear similar, but their functions are very different. error_code: |- diff --git a/content/pages/cs.yaml b/content/pages/cs.yaml index de5686ab81b..9117fdf92fb 100644 --- a/content/pages/cs.yaml +++ b/content/pages/cs.yaml @@ -51,13 +51,23 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Líbí se ti Hedy? +- title: The Hedy foundation text: |- - Rádi bychom od tebe slyšeli víc! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! + text: |- + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: + + - [Klikni zde a pošli nám zprávu.](mailto:hello@hedy.org "About Hedy") -- title: Objevil jsi nějaký bug? - text: '[Dej nám vědět na GitHubu.](https://github.com/hedyorg/hedy/issues/new/choose)' - title: Hedy v novinách text: |- Některé weby a noviny psaly o Hedy od našeho vydání na začátku roku 2020. Seznam si můžete prohlédnout zde: @@ -148,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/cy.yaml b/content/pages/cy.yaml index bc0eae3d967..501de458e26 100644 --- a/content/pages/cy.yaml +++ b/content/pages/cy.yaml @@ -52,17 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Code week talk + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Want to know more about Hedy? Check out this talk Felienne gave at the European Code Week 2020: + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -130,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/da.yaml b/content/pages/da.yaml index decb90b5d67..ed2ca87317f 100644 --- a/content/pages/da.yaml +++ b/content/pages/da.yaml @@ -1,67 +1,76 @@ -title: Hedy documentation +title: Dokumentation for Hedy home-sections: -- title: Textual programming made easy! +- title: Tekst-baseret programmering på en enkel måde! text: |- - Many schools and teachers around the world want to teach their students programming. Initially this is often done with playful tools, ranging from the Beebot robot to - Scratch Junior or Scratch. After using such tools, kids often want to move to more powerful, textual programming languages, like Python. + Mange skoler og lærere verden over ønsker at lære deres elever programmering. Dette er ofte gjort med legende værktøjer, lige fra Beebot robotten til + Scratch Junior eller Scratch. Efter brug af sådanne værktøjer ønsker børn ofte at flytte til mere kraftfulde, tekst-baserede programmeringssprog som Python. - Python however is hard, because it is only available in English, and requires learners to learn complex programming concepts and syntax at once. - Hedy is the easy way to get started with textual programming languages! Hedy is free to use, open source, and unlike any other textual programming language in three ways. + Python er dog svært, fordi det kun er tilgængeligt på engelsk, og kræver at eleverne lærer komplekse programmeringskoncepter og syntaks på én gang. + Hedy er den nemme måde at komme i gang med et tekst-baseret programmeringssprog! Hedy er gratis at bruge, har åben kildekode og adskiller sig fra andre tekstsprog på tre måder. - 1. Hedy is multi-lingual, you can use Hedy in your own language - 2. Hedy is gradual, so you can learn one concept and its syntax a time - 3. Hedy is built for the classroom, allowing teachers to fully customize their student's experience -- title: Multi-lingual programming - text: While almost all textual programming language have keywords in English, such as `for` or `repeat`, Hedy can be used in any language! We currently support 39 different languages, including Spanish, Arabic, Simplified Chinese and Hindi. If your language is not available you can always start a a new translation. -- title: Step by step learning - text: Learning a programming language can be overwhelming, since learners have to learn concepts (for example if-else or loops) and syntax (like quotation marks or round brackets) at the same time. In Hedy, concepts are first introduced with little syntax and then refined. A scientifically proven way to learn! -- title: Built for the classroom + 1. Hedy er flersproget, du kan bruge Hedy på dit eget sprog + 2. Hedy er gradvist, så du kan lære et begreb og dens syntaks en tid + 3. Hedy er bygget til klasseværelset, så lærere kan tilpasse deres elevers oplevelse +- title: Flersproget programmering + text: Mens næsten alle tekst-baserede programmeringssprog har nøgleord på engelsk, f.eks. `for` eller `repeat`, så kan Hedy bruges på ethvert sprog! Vi understøtter i øjeblikket 47 forskellige sprog, herunder hollandsk, spansk, arabisk, tyrkisk, kinesisk og hindi. Hvis dit sprog ikke er tilgængeligt, kan du altid starte en ny oversættelse. +- title: Trin for trin læring + text: At lære et programmeringssprog kan være overvældende, da elever skal lære begreber (f.eks. hvis-else eller sløjfer) og syntaks (f.eks. citatmærker eller parenteser) samtidig. I Hedy introduceres begreber først med lidt syntaks og raffineres først senere hen. En videnskabeligt bevist måde at lære! +- title: Bygget til klasseværelset text: |- - Hedy is suitable for kids aged 10 and up and designed for classroom use. - Teachers can use our free, built-in lesson plans, but can also author their own lessons and load these into the Hedy user interface. -- title: Programming in context - text: Hedy shows programming in the broadest way possible, and can be used in variety of exciting ways. Hedy allows for the creation of digital and interactive stories, colorful drawings that can be shown on the screen but also drawn with a pen plotter or embroidered on a shirt, and can be used to create games or apps with buttons and keyboard actions. -- title: Is Hedy free? + Hedy er velegnet til børn fra 10 år og opefter og er designet til brug i klasseværelset. + Undervisere kan bruge vores gratis, indbyggede lektionsplaner, men kan også skabe deres egne lektioner og ligge disse ind i Hedys brugergrænseflade. +- title: Programmering i kontekst + text: Hedy viser programmering på den bredest mulige måde og kan bruges på mange spændende måder. Hedy giver mulighed for oprettelse af digitale og interaktive historier, farverige tegninger, der kan vises på skærmen, men også tegnet med en pen plotter eller broderet på en skjorte, og kan bruges til at oprette spil eller apps med knapper og tastaturhandlinger. +- title: Er Hedy gratis? text: |- - Yes! Hedy is 'Open source', which means that everyone can help us make Hedy better. - You can find our code on [GitHub](https://github.com/hedyorg/hedy). - If you like Hedy and want to contribute, we accept (and are very grateful for) [donations](https://github.com/sponsors/hedyorg)! -- title: Do I need to install anything? - text: No. Hedy works in the browser, which is the program you are using to look at this page. Probably Chrome or Edge or Firefox. Hedy also works on phones and tablets. -- title: Do I need programming experience to teach with Hedy? + Ja! Hedy har 'åben kildekode', hvilket betyder at alle kan hjælpe os med at forbedre Hedy. + Du kan finde vores kode på GitHub. + Hvis du kan lide Hedy og gerne vil hjælpe til, så tager vi imod (og er meget taknemmelige for) donationer! +- title: Behøver jeg at installere noget? + text: Nej. Hedy fungerer i din browser, altså det program du bruger til at se den her side. Formodentlig Chrome, Edge eller Firefox. Hedy virker også på telefonen og tablets. +- title: Har jeg brug for programmeringserfaring for at undervise med Hedy? text: |- - No, that is not needed. All concepts are explained in the slides and in the interface for learners. - If you create a free teacher's account, you also get access to the teacher's manual with information on how to teach - and frequently made mistakes. + Nej, det er ikke nødvendigt. Alle begreber forklares i diaserne og i interfacet til elever. + Hvis du opretter en gratis lærerkonto, får du også adgang til lærermanualen med oplysninger om hvordan du lærer + og almindelige fejl. join-sections: -- title: Supporting Hedy - text: '# There are three ways in which you can support Hedy!' -- title: Improving the language +- title: At støtte Hedy + text: '# Der er tre måder at støtte Hedy på!' +- title: Forbedre sproget text: |- - The gradual and multi-lingual nature of Hedy create a lot of interesting technical challenges. - Find those issues on [Github](https://github.com/hedyorg/hedy/issues?q=is%3Aopen+is%3Aissue+label%3Alanguage). -- title: Translating Hedy + Hedys gradvise og flersprogede natur skaber en masse interessante tekniske udfordringer. + Find disse problemer på Github. +- title: Oversætte Hedy text: |- - Not a programmer? No problem! Another way to support Hedy is by [translating keywords, error messages, adventures are other content](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) - - This is the current status, help us complete a language, or add a new one! + Ikke en programmør? Intet problem! En anden måde at støtte Hedy på er ved at oversætte nøgleord, fejlmeddelelser, eventyr og andet indhold. + Dette er den nuværende status; hjælp os med at fuldføre et sprog eller tilføje en ny! Translation status -- title: Help teachers get started +- title: Hjælp undervisere med at komme i gang text: |- - Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. - If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). + Hedy er designet til at støtte undervisere i at give programmeringsundervisning i klasse. Vi har særlige lærerfunktioner, så som mulighed for at oprette en klasse, tilpasse den og se hvordan dine elever klarer sig. + Hvis du kan lide Hedy, kan du række ud til skoler som du kender og at hjælpe deres lærere/undervisere med at komme i gang! Vi kan hjælpe dig med at finde skoler eller lærere via Discord. learn-more-sections: -- title: Join the Hedy Community - text: "We love to hear from you! The best way to get in touch with us is by joining our [Discord server](https://discord.gg/8yY7dEme9r). \n\nYou can also [send us an email](mailto:hello@hedy.org \"About Hedy\")." -- title: A deep dive! +- title: Hedy-fonden + text: |- + Hedy styres og organiseres af Hedy-fonden (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + Fondens bestyrelse består af: + + * Felienne Hermans, præsident + * Eelko Huizing, finansiering + * Renée Merbis, sekretær + + Hedys bestyrelse får ikke nogen økonomisk kompensation for deres opgaver. +- title: Dyk dybere! text: |- - Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: + Vil du vide mere om Hedys filosofi og design? Se dette foredrag Felienne holdt på StrangeLoop-konferencen i 2022: -- title: Hedy in the news +- title: Hedy i nyhederne text: |- - Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + Nogle hjemmesider and nyhedsmedier har skrevet om Hedy siden vores udgivelse i starten af 2020. En ufuldstændig liste er: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) @@ -82,27 +91,43 @@ learn-more-sections: * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: -- title: Getting started with Hedy - text: '*Something about teachers accounts, slides etc*' -- title: What other teachers say - text: "A while ago we ran a few short Hedy teachers surveys. \nThe questions span between suggestions of improvement and Hedy’s best features. \nBelow is a testimony of their thoughts:\n\nSimple interface and good examples. *Teacher: 3rd - 6th grades (elementary)*\n\nMultilingual programming and just the gradual programming concept itself. - *US: middle school, 6th-8th grade*\n\nThe gradual nature of introducing programming. *Australia: High school*\n\nThe construction is so good. *Netherlands: Lower secondary school HAVO-VWO*\n\nI can keep the pace of the class. *Netherlands: group 7 en 8* \n\nContinues automatically. *Netherlands: 2 HAVO-VWO*\n\nBoth that the explanation can be in Dutch (and the code in English), and that it builds up with more \nand more possibilities. *Netherlands: Plus class group 7*\n\nThe 'realness' of programming, it resembles how it is in reality. *Netherlands: Plus class group 4 to 8*\n\nStep-by-step activities. Fun activities. *Netherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO*\n\nBut Hedy and its gradual levels... what an idea, \nI wanted to personally thank you for creating this. I cannot thank you enough. Also, I have never seen the level of engagement and enthusiasm of my \nstudents, as I have seen with Hedy. We have covered till level 5, and plan to spend one more week on it in classes and labs, \nbefore starting Python. *Pakistan*\n\nI really like Hedy very much and it is also nicely set up, which makes it good to use in primary school. \nHedy's gradual approach works very well. \nThe short explanation at the beginning of each level and the short example programs help to give the children a quick insight into what is new in the chosen level. \nThe different assignments that the children can choose also work very well. \nYou see the children choose assignments that appeal to them and they then get to work with them, \nthrough the levels. Hedy is great fun for children who are good at programming and want to get a \ntaste of a real programming language. It is good preparation for secondary school as soon as more ICT \neducation is given there. *Netherlands: Oegstgeest Montessori school*\n\n" +- title: Kom i gang med Hedy + text: 'Velkommen til Hedy, vi er glade for at hjælpe dig med at komme i gang med Hedy. + + + Vores [Lærerhåndbog](https://www.hedy.org/for-teachers/manual) har en oversigt over alle funktioner i detaljer, men denne side har et kort overblik, så du ved, hvad du bevæger dig ind i før du dykker dybere. + + + Et par højdepunkter, der er vigtigt at vide: + + * Hedy er et værktøj designet til at hjælpe med at styre et klasseværelse af børn der skal lære at programmere! Du kan oprette dine egne klasser, lektionsplaner og følge, hvordan dine elever klarer sig. + + * Du behøver ikke at vide en masse om programmering når du begynder, Hedy arbejder trin for trin, også for dig! + + * Du kan bruge Hedy på dit modersmål, fordi det er blevet oversat til mange andre sprog! + + * Alle børn kan programmere!! Hedy er især nyttigt for børn, der har synsproblemer, fordi det kan læse materialet højt uden behov for en mus. + + * Vi er her for at hjælpe, du kan finde os for eksempel på [Discord](https://discord.gg/8yY7dEme9r) eller du kan [sende os en mail](hello@hedy.org).' +- title: Undervisere siger om Hedy + text: "Various teachers worldwide have expressed their passion for Hedy, as some have shared with us:\n\n*Incredibly inspiring! Super good way to make programming a lot more accessible for yourself, but also for students. Very fun to play with and a lot of potential to use with the students. I think it is a very nice tool! I believe this is a valuable way for children to start learning programming. Python and coding have always been very exciting, because the barrier to learning is very high. Now everything is a bit lower and it was explained that it can actually be very easy. I enjoyed seeing how Hedy tries to make programming as accessible as possible for users!*\nNetherlands: Mathematics teachers in training (secondary school)\n\n*Simple interface and good examples.* Teacher: 3rd - 6th grades (elementary)\n\n*Multilingual programming and just the gradual programming concept itself.* US: middle school, 6th-8th grade\n\n*The gradual nature of introducing programming.* Australia: High school\n\n*Continues automatically.* Netherlands: 2 HAVO-VWO\n\n*Both that the explanation can be in Dutch (and the code in English), and that it builds up with more and more possibilities.* Netherlands: Plus class group\n\n*But Hedy and its gradual levels...what an idea, I wanted to personally thank you for creating this. I cannot thank you enough. Also, I have never seen the level of engagement and enthusiasm of my students, as I have seen with Hedy. We have covered till level 5, and plan to spend one more week on it in classes and labs, before starting Python.* Pakistan\n\n*The 'realness' of programming, it resembles how it is in reality.* Netherlands: Plus class group 4 to 8\n\n*Step-by-step activities. Fun activities.* Netherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\n\n*I really like Hedy very much and it is also nicely set up, which makes it good to use in primary school. Hedy's gradual approach works very well. The short explanation at the beginning of each level and the short example programs help to give the children a quick insight into what is new in the chosen level. The different assignments that the children can choose also work very well. You see the children choose assignments that appeal to them and they then get to work with them, through the levels. Hedy is great fun for children who are good at programming and want to get a taste of a real programming language. It is good preparation for secondary school as soon as more ICT education is given there.* Netherlands: Oegstgeest Montessori school\n\n*The construction is so good.* Netherlands: Lower secondary school HAVO-VWO\n\n*I can keep the pace of the class.* Netherlands: group 7 en 8\n\n![Felienne teaching kids](/images/teacherfeedback/Fkids1.JPG) *Felienne teaching kids*\n\n\n![Kids learning about Hedy](/images/teacherfeedback/Fkids2.JPG) *Kids learning about Hedy*" teacher-guide: -- title: Introduction +- title: Indledning key: intro subsections: - - title: What's Hedy? + - title: Hvad er Hedy? text: |- - Hedy is a textual programming language, specifically developed for (pre-)teens (10 to 15 years old). - In contrast to programming languages for kids, like Scratch, Hedy doesn't use code blocks but textual code. - So with Hedy you'll learn how to type code like the real programmers do, but in small steps with playful exercises. - This way Hedy can function as a stepping stone to real programming languages like Python in an accessible and mostly fun way! - If you want to know more, you can watch this video about the development of Hedy as a programming language. - - title: Target audience + Hedy er et tekst-baseret programmeringssprog, specielt udviklet for børn mellem 10 og 15 år. + I modsætning til programmeringssprog til børn så som Scratch, der bruger Hedy ikke kodeblokke, men i stedet tekstuel kode. + Så med Hedy lærer man, hvordan du skriver kode som de rigtige programmører gør, men i små trin med legende øvelser. + På denne måde kan Hedy fungere som et skridt på vejen til rigtige programmeringssprog som Python, på en tilgængelig og for det meste sjov måde! + Hvis du vil vide mere, kan du se denne video om udviklingen af Hedy som programmeringssprog. + - title: Målgruppe text: |- - Hedy is developed with middle school and junior high school students in mind (ages 10 - 15). - It's important for the students to be able to read well. We recommend not to start with Hedy before the students have achieved at least a 3rd grade reading level. - Students (and teachers!) don't need any programming experience before starting with Hedy. - - title: How does Hedy work? + Hedy er udviklet med mellemtrins- og udskolingselever i tankerne, altså børn i alderen 10 til 15 år. + Det er vigtigt at eleverne kan læse godt. Vi anbefaler ikke at starte med Hedy, før eleverne har opnået mindst tredjeklasses læseniveau. + Elever (og lærere!) behøver dog ikke nogen programmeringserfaring, før de starter med Hedy. + - title: Hvordan fungerer Hedy? text: |- Hedy is divided into levels, in which new commands are taught. Each level contains a variety of adventures to practice the newly learned commands. As a teacher, you get to decide which adventures are available for your students. Will they be making a restaurant, a calculator or a haunted house this level? Within each level, the adventures are arranged from easiest to hardest. @@ -113,14 +138,14 @@ teacher-guide: After programming all the adventures of a certain level, your students can test their knowledge in the quiz. You can track your students' work and their progress on the class page. - - title: Devices + - title: Enheder text: |- - Hedy is webbased, which means it works on any device with a browser (Google Chrome, Firefox, Edge etc), so laptops, chromebooks, tablets and even smartphones are suitable to use Hedy. + Hedy is web-based, which means it works on any device with a browser (Google Chrome, Firefox, Edge etc), so laptops, Chromebooks, tablets and even smartphones are suitable to use Hedy. There's no need to download anything before working with Hedy, just go to the website and you're all set! - title: The Hedy Community text: |- - All Hedy teachers, programmers and other fans are welcome to join our [Discord server](https://discord.gg/8yY7dEme9r). This is the ideal place to chat about Hedy: we have channels where you can show your cool projects and lessons, channels to report bugs, and channels to chat with other teachers and with the Hedy team. - [Here](https://www.youtube.com/watch?v=Lyz_Lnd-_aI) you can find a video on how to join the dicord community. + All Hedy teachers, programmers and other fans are welcome to join our Discord server. This is the ideal place to chat about Hedy: we have channels where you can show your cool projects and lessons, channels to report bugs, and channels to chat with other teachers and with the Hedy team. + Here you can find a video on how to join the Discord Community. - title: Hedy and the GDPR text: |- Organizations in the EU have to comply with the GDPR (General Data Protection Regulation) when processing personal data. @@ -135,7 +160,7 @@ teacher-guide: key: tutorial subsections: - title: Tutorial - text: Do you want to follow the tutorial (again)? Click [here](https://hedy.org/tutorial) + text: Do you want to follow the tutorial (again)? Click here. - title: Teaching preparations key: preparations subsections: @@ -148,7 +173,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- @@ -197,7 +222,7 @@ teacher-guide: **You create accounts for your students** The easiest way to add students to your class is by creating an account for them. This can be done by clicking the 'create student accounts' button and filling in the usernames and passwords for them. The students can login with the username and password that you chose. Afterwards, they can change their username or password if they'd like and they'll still remain in your class. - This [video](https://www.youtube.com/watch?v=eEQvik-Ce5M) shows how to add students to your class in the quickest and easiest way. + This video shows how to add students to your class in the quickest and easiest way. **Students make their own accounts** Your students can also go to the Hedy website and create their own accounts, just like you did. To get them into your class, they simply have to click the invite link. @@ -208,7 +233,6 @@ teacher-guide: When students create profiles they are supposed to choose a 'preferred language'. Hedy will always be loaded in this selected language. Changing this language can always be done later on by navigating to 'My account' and 'My personal settings' again. - **For non-English speakers** Not only can you change the language of the adventures to your own language. You can also choose which language the keywords (for example 'print' or 'ask') should be in. This way you can teach your students to code with English keywords, but you can also let them program in their own language. For example, Dutch students can use the command 'vraag' instead of 'ask'. @@ -217,7 +241,7 @@ teacher-guide: **Video** - This [video](https://www.youtube.com/watch?v=QrVZETj4oLM) show you how to set a preferred language and change the keywords to you preferred language as well. + This video show you how to set a preferred language and change the keywords to you preferred language as well. - title: Storing programs text: |- When you are logged in, you'll see My programs next to your profile icon. @@ -238,7 +262,7 @@ teacher-guide: text: |- Hedy contains a lot of different levels that each teach a different new skill. We recommend to teach one level per lesson. This gives your students the time to fully grasp a new command or concept and practice with it, before moving on to the next level. - We use this structure in our lessons: Introduction, New concepts and commands, let's get to work, puzzels and quizzes. + We use this structure in our lessons: Introduction, New concepts and commands, let's get to work, puzzles and quizzes. - title: Slides text: |- When giving instructions you might want to use our slides. Our slides are available on the 'For teachers' page. There is a set of slides for each level. In the slides all the new commands for that level are explained. We have aimed to explain why these changes are nessecary or how the new commands come in handy. @@ -251,7 +275,7 @@ teacher-guide: text: |- The new concepts and commands can be very hard for some students to fully understand. That's why it's of importance to model the proper use of the new commands to your students. - Especially in the lower levels, where some students have no experience whith programming at all, it can be hard for them to understand the new abstract concepts. + Especially in the lower levels, where some students have no experience with programming at all, it can be hard for them to understand the new abstract concepts. Showing a lot of examples makes an abstract concept (for instance: 'What is a variable?') more recognizable and easier to understand ('Look, the variable pet changed into dog'). Our slides could help you with that. - title: Let's get to work text: |- @@ -262,19 +286,19 @@ teacher-guide: They don't always have to make every adventure. Every adventure contains an example code, that the students can try out with the green button. The example code gets copied to the workfield, where the students can try out the code and adjust it to make it their own. Stimulate your students to turn the example code into their own projects by adding their own ideas and making their own variation of the adventure. - - title: Quizzes and puzzels + - title: Quizzes and puzzles text: |- - To test whether your students have picked up all the new info in the level, you can let them make the quiz. + To test whether your students have picked up all the new info in the level, you can let them take the quiz. The quiz contains 10 multiple choice questions about the new concepts and command to that level. Not every level has a quiz yet, as we are still building the quizzes. - Some levels also contain puzzels. Puzzels show the students a couple of line of code that the students have to put in the right order. + Some levels also contain puzzles. Puzzles show the students a couple of line of code that the students have to put in the right order. - This [video](https://www.youtube.com/watch?v=lNh5EdZVUwc) shows the quizzes and puzzels. + This video shows the quizzes and puzzles. - title: Evaluation text: |- Round up your lesson by having a brief evaluation. What did the students learn? Which hardships did they come across? How did they learn from their mistakes? And of course: What did they create? - Students are often very proud of their own creations, so it's nice to save a little time and gove your students the opportunity to show their work to their classmates. + Students are often very proud of their own creations, so it's nice to save a little time and give your students the opportunity to show their work to their classmates. - title: Teacher Statistics key: teacher_statistics subsections: @@ -304,7 +328,7 @@ teacher-guide: It is important to notice that the blue dots means that a students 'attempted' the adventure. This means that they ran a code in this adventure and went on to the next adventure, so this does not automatically mean that they did a good job! If you want to see how an individual student is getting along, you can click their name in this overview. This is what you see if you click on marleen_h3a for example: - You see that Marleen is having some trouble programming. She tried to run a program that contains blanks multiple times, so she probably doesn't know that she has to change something in the example code before running it. + You see that Marleen is having some trouble programming. She tried to run a program that contains blanks multiple times, so she might not realize that she has to change the code examples before running them. In this way this overview can give you a better understanding of what a student is struggling with. - title: Common Errors text: |- @@ -322,26 +346,26 @@ teacher-guide: key: features subsections: - title: Make your own adventure - text: It is also possible for teachers to create your own adventure. [This video](https://www.youtube.com/watch?v=A0zbXpxX4q4) shows you how to create your own adventure as a teacher and add it to your class(es). + text: It is also possible for teachers to create your own adventure. This video shows you how to create your own adventure as a teacher and add it to your class(es). - title: Explore page text: |- - On the [explore](https://hedy.org/explore) page you can view the work of other Hedy users. You can try out their programs and use them as inspiration to create something cool yourself. + On the explore page you can view the work of other Hedy users. You can try out their programs and use them as inspiration to create something cool yourself. You can also add a program you've made to the explore page yourself by clicking 'Save and share code' in the coding screen or go to My Programs and click 'Share'. Don't want to share your work anymore? Simply go to 'My Programs' and click 'Unshare'. - If you want more information about the explore page, check out this [video](https://www.youtube.com/watch?v=26boFjqvS5Q). + If you want more information about the explore page, check out this video. - title: My achievements text: |- - If you click on your username in the topright corner of your screen, you can go to [My achievements](https://hedy.org/my-achievements). On this page you achievements are collected. Your students have such a page as well. + If you click on your username in the topright corner of your screen, you can go to My achievements. On this page you achievements are collected. Your students have such a page as well. When you hover over the badge with your mouse, you'll see how to earn the badge. There are hidden badges too, of which you'll have to find out yourself how to earn them. - If you want more information on the achievements, check out this [video](https://www.youtube.com/watch?v=-FjmKejukCs). + If you want more information on the achievements, check out this video. - title: High Scores text: |- - On [this page](https://hedy.org/highscores) you can see the high scores of all Hedy users. - In this [video](https://www.youtube.com/watch?v=IqTiUkBVTo8) you can learn some more about the high scores. + On this page you can see the high scores of all Hedy users. + In this videoyou can learn some more about the high scores. - title: Debugger text: |- Is your (student's) code not working? There must be a bug (coding mistake) in it! You can use the debugger to find the mistake. - The debugger is the ladybig button in your coding screen. If you press it, you can run your code line by line to find your mistake. + The debugger is the ladybug button in your coding screen. If you press it, you can run your code line by line to find your mistake. Have you found the mistake? Press the red stop button and the debugger will shut off. - title: Read aloud text: Do you want the output of your program to be read aloud? Then you can use the read aloud function that is found under the 'run code' button in your coding screen. @@ -353,14 +377,14 @@ teacher-guide: text: |- In every level there is a button with this emoji 🤔. You and your students can find the "cheat sheets" there. On this cheat sheet, you can find all the commands that are usable in this level in their correct form. So if you've forgotten how a command works, simply take a peek at the cheat sheet! - - title: Other useful features - text: This [video](https://www.youtube.com/watch?v=c4MntPPgl1Y) shows you even more features of Hedy, like the cheatsheets and the keyword switcher. + - title: Video + text: This video shows you even more features of Hedy, like the cheatsheets and the keyword switcher. - title: After Hedy key: after subsections: - title: What to do after Hedy? text: |- - Congratulations on reaching the end of Hedy! Your students have now learned how to create their own basic code in the Python programming language. + Congratulations on reaching the end of Hedy! Your students have now learned how to create their own basic programs in the Python programming language. Of course, you could keep programming in our Hedy compiler, but it might be more exciting for your students to transfer to a "real" Python interface. Would you like to continue teaching Python? Then please visit the Python website to learn how to get started in another compiler. @@ -374,9 +398,7 @@ teacher-guide: - title: Common mistakes key: common_mistakes intro: |- - You can learn from your mistakes, especially in coding! - Making mistakes is unavoidable, and a great opportunity to learn, but for teachers it can be a challenge to find the correct fix for a mistake! - Especially as the programs get longer and longer as the levels progress. That's why we've made a list with frequently made mistakes in each level, and their solutions. + You can learn from your mistakes, especially in coding! Making mistakes is unavoidable, and a great opportunity to learn, but for teachers, it can be a challenge to find the correct fix for a mistake! Especially as the programs get longer and longer as the students progress through the levels. That's why we've made a list with frequently made mistakes in each level, and their solutions. levels: - level: '1' sections: @@ -420,11 +442,11 @@ teacher-guide: error_code: |- {forward} 300 {turn} 90 - solution_text: In the example, students tend to think that the turn command doesn't work. Even though it does work, you can't see it happening off screen. Use smaller numbers to prevent this from happening. + solution_text: In the example, students tend to think that the turn command failed; even though it did what it what supossed to. What happened is the turtle walked past the screen limits. Use smaller numbers to prevent this from happening. solution_code: |- {forward} 100 {turn} 90 - - title: "Turtle: Students use the command backward, but that doesn't exist" + - title: "Skildpadde: Eleverne bruger kommandoen {backward}, men kommandoen findes ikke." example: error_text: Backward is not a command. error_code: backward 100 @@ -570,7 +592,7 @@ teacher-guide: your_name {is} {ask} Who are you? {add} your_name {to} names {print} names {at} {random} - - title: Students forget to use to/from in add/remove + - title: Elever glemmer at bruge `{to}`/`{from}` i `{add}`/`{remove}` example: error_text: Without to/from the add/remove command won't work. error_code: |- @@ -660,16 +682,16 @@ teacher-guide: solution_code: |- {if} name {is} Hedy {print} 'fun' {else} {print} 'meh! - - title: Students use long variable names containing two words + - title: Elever bruger lange variabelnavne der indeholder to eller flere ord example: - error_text: A variable should be named with one word. You could use an underscore to connect two words. That counts as one. + error_text: Variables in Hedy can't contain spaces, so, in order to use together several words, students need to connect them using underscores (_) error_code: chosen door is ask Which door do you pick? solution_text: Add an underscore. solution_code: chosen_door {is} {ask} 'which door do you pick?' - title: Students want multiple answers to be correct example: error_text: For example this student Hedy to tell all his friends that they are funny, but other classmates would be told that they are not. - error_code: "{if} name {is} Jesse, David, Souf print You are funny {else} {print} 'You are not funny'" + error_code: "{if} name {is} Jesse, David, Souf {print} 'You are funny' {else} {print} 'You are not funny'" solution_text: |- You could use the `in` command for that. It is explained in a higher level, but it does already work in level 5. Another solution is to use multiple if commands and no else command. The disadvantage is that it won't tell the other classmates that they are not funny. @@ -748,15 +770,15 @@ teacher-guide: {print} drink - title: Students make programs that take too long to run example: - error_text: In this level it's very easy to make long-running programs. The students aren't allowed to make programs that take to long to load (to save our servers). + error_text: In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine. error_code: "{repeat} 100 {times} {print} 'How many times can I repeat this?'" - solution_text: Make sure the programs aren't too long + solution_text: Make sure the code doesn't take too long to execute solution_code: "{repeat} 20 {times} {print} 'This is enough'" - level: '8' sections: - title: Students use the indentation wrong example: - error_text: Indentation is a new concept in this level, that is hard to use for some students. Make sure they practise some simple snippets before making a whole program with it. + error_text: Indentation is a new concept in this level, and for some students it might be hard to learn. Make sure they practise some simple examples before making a whole program with it. error_code: |- {repeat} 3 {times} {print} 'hello' @@ -797,18 +819,18 @@ teacher-guide: {print} 'Hip Hip Hooray!' - title: Students make programs that take too long to run example: - error_text: In this level it's very easy to make long-running programs. The students aren't allowed to make programs that take to long to load (to save our servers). + error_text: In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine. error_code: |- {repeat} 100 {times} {print} 'How many times can I repeat this?' - solution_text: Make sure the programs aren't too long + solution_text: Make sure the code doesn't take too long to execute solution_code: |- {repeat} 20 {times} {print} 'This is enough' - title: Students use the `{if}` command to check if the variable value is the same as the variable name example: error_text: |- - We have seen this mistake by some of our students. They make a password for their computer, but they make the password 'password'. + We've noticed a common error among our students: they try to create a program that checks for a password, but they make the password 'password'. In line 2 the computer is asked to check whether the variable password is the same as the variable password, so itself. Which means the answer is always yes. So with this code the answer will always be 'You can come in' no matter what the player fills in. error_code: |- @@ -858,7 +880,7 @@ teacher-guide: {print} 'Robin goes home' - level: '10' sections: - - title: Students do not use the for command correctly + - title: Students do not use the `{for}` command correctly example: error_text: We often see that students try to print the list (in the example animals) instead of the items of the list. error_code: |- @@ -948,7 +970,7 @@ teacher-guide: solution_code: '{print} 2.5 + 2.5' - level: '13' sections: - - title: Students confuse `and` with `or` + - title: Elever forveksler `{and}` med `{or}` example: error_text: Both commands might appear similar, but their functions are very different. error_code: |- diff --git a/content/pages/de.yaml b/content/pages/de.yaml index a6ae41bffcf..1699cb1ccaa 100644 --- a/content/pages/de.yaml +++ b/content/pages/de.yaml @@ -51,13 +51,17 @@ join-sections: Hedy wurde gestaltet, um Lehrpersonen dabei zu unterstützen Programmierlektionen im Unterricht durchzuführen. Wir haben spezifische Lehrpersonen-Features, wie die Option Klassen zu erstellen, anzupassen und zu sehen wie deine Schülerinnen und Schüler sich machen. Falls du Hedy magst, kannst du Schulen ansprechen, um Lehrpersonen zu helfen anzufangen! Wir können dir helfen Schulen oder Lehrpersonen über unseren Discord zu finden. learn-more-sections: -- title: Komm in die Hedy-Gemeinschaft +- title: The Hedy foundation text: |- - Wir hören gern von dir! Die beste Kontaktmöglichkeit ist unser Discord-Server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - Du kannst uns auch eine [E-Mail schicken](mailto:hello@hedy.org "Über Hedy"). - - Um über die neuesten Nachrichten auf dem Laufenden zu bleiben, [abonniere unseren Newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: Ein tiefes Eintauchen! text: |- Möchtest du mehr über Hedys Philosophie und Design erfahren? Schau dir den Vortrag von Felienne bei der StrangeLoop Conference 2022 an: @@ -201,7 +205,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/el.yaml b/content/pages/el.yaml index 2554496051b..501de458e26 100644 --- a/content/pages/el.yaml +++ b/content/pages/el.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Σου αρέσει η Hedy? +- title: The Hedy foundation text: |- - Θα θέλαμε να μάθουμε τα νέα σου! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Κάνε κλικ εδώ για να μας στείλεις ένα μήνυμα](mailto:hello@hedy.org "About Hedy") -- title: Βρήκες ένα bug; - text: '[Γνωστοποίησέ το μας στο GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Θα ήθελες να βοηθήσεις; + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Ο πλέον εύκολος τρόπος είναι να βοηθήσεις [μεταφράζοντας Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Κάτω από την τρέχουσα κατάσταση, βοηθήστε μας να ολοκληρώσουμε μια γλώσσα ή να προσθέσουμε μια νέα. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -133,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/en.yaml b/content/pages/en.yaml index 06bf94a63ab..74434afb1fd 100644 --- a/content/pages/en.yaml +++ b/content/pages/en.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -194,7 +198,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/eo.yaml b/content/pages/eo.yaml index 519590a6638..69edcc72178 100644 --- a/content/pages/eo.yaml +++ b/content/pages/eo.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Ĉu Hedy plaĉas al vi? +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Ĉu vi trovis cimon? - text: "[Sciigu nin ĉe GitHub](https://github.com/hedyorg/hedy/issues/new/choose)" -- title: Ĉu vi volas helpi? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: "*Something about teachers accounts, slides etc*" @@ -168,7 +193,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/es.yaml b/content/pages/es.yaml index 937f7eb850c..1cc2ca4c99b 100644 --- a/content/pages/es.yaml +++ b/content/pages/es.yaml @@ -51,16 +51,20 @@ join-sections: Hedy está diseñado para ayudar a los profesores a enseñar lecciones de programación en clase. Tenemos funciones específicas para profesores como la opción para crear una clase, personalizarla y ver el progreso de los estudiantes. Si te gusta Hedy, puedes contactar a los colegios que conoces ¡para ayudar a los profesores a empezar! Nosotros podemos ayudar en la búsqueda de escuelas o profesores vía Discord. learn-more-sections: -- title: Únete a la comunidad de Hedy +- title: The Hedy foundation text: |- - ¡Nos encantaría saber de ti! La mejor forma de ponerte en contacto con nosotros es uniéndose a nuestro Servidor Discord. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - También puede [enviarnos un correo electrónico](mailto:hello@hedy.org "Acerca de Hedy"). + The board of the foundation consists of: - Para estar al tanto de las últimas noticias, [suscribirte a nuestro boletín](/suscribirse). -- title: ¡En profundidad! + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - ¿Quieres saber más sobre el diseño y filosofía de Hedy? Echa un vistazo a esta charla que dio Felienne en la Conferencia StrangeLoop en 2022: + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - title: Hedy en las noticias @@ -194,7 +198,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/et.yaml b/content/pages/et.yaml index e1b91d823a8..0764a6e2f55 100644 --- a/content/pages/et.yaml +++ b/content/pages/et.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Want to help? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -131,7 +156,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/fa.yaml b/content/pages/fa.yaml index 6b25ef0d6a3..178a9ee3278 100644 --- a/content/pages/fa.yaml +++ b/content/pages/fa.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: هِدی رو دوست داری؟ +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Want to help? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -133,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/fi.yaml b/content/pages/fi.yaml index bc0eae3d967..501de458e26 100644 --- a/content/pages/fi.yaml +++ b/content/pages/fi.yaml @@ -52,17 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Code week talk + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Want to know more about Hedy? Check out this talk Felienne gave at the European Code Week 2020: + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -130,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/fr.yaml b/content/pages/fr.yaml index f20ad0fb6ff..bd0ec4a8228 100644 --- a/content/pages/fr.yaml +++ b/content/pages/fr.yaml @@ -50,17 +50,45 @@ join-sections: Hedy a été crée pour apporter un support pour les enseignants voulant offrir des leçons de programmations durant leurs cours . Nous avons des options spécifiques pour les enseignants , comme l'option pour créer des classes, customisez les et observez la progression de vos élèves . Si vous aimez Hedy , Vous pouvez en parler aux écoles que vous connaissez pour aider les enseignants! Nous pouvons vous aider à trouver des écoles ou des enseignants via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Appréciez vous Hedy ? +- title: The Hedy foundation text: |- - Nous aimerions en apprendre plus sur votre expérience ! - [Cliquez ici pour nous envoyer un message](mailto :hello@hedy.org "About Hedy") -- title: Vous avez trouvé une erreur ? - text: "[Remontez-la sur GitHub](https://github.com/hedyorg/hedy/issues/new/choose)" -- title: Semaine européenne du code 2020 + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Vous voulez en savoir plus sur Hedy ? Consultez cette conférence que Felienne a donnée à la Semaine européenne du code 2020 : + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Commencez avec Hedy text: "*Quelque chose a propos des comptes Enseignants, présentation etc*" @@ -166,7 +194,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/fr_CA.yaml b/content/pages/fr_CA.yaml index 415a48d0c62..252bf50a3b2 100644 --- a/content/pages/fr_CA.yaml +++ b/content/pages/fr_CA.yaml @@ -50,13 +50,18 @@ join-sections: Si vous aimez Hedy, vous pouvez contacter les écoles que vous connaissez pour aider les enseignants à démarrer! Nous pouvons vous aider à trouver des écoles ou des enseignants via Discord. learn-more-sections: -- title: Rejoignez la communauté Hedy +- title: The Hedy foundation text: |- - Nous adorons avoir de vos nouvelles ! Le meilleur moyen de nous contacter est de rejoindre notre Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - Vous pouvez également [nous envoyer un courriel](mailto:hello@hedy.org "About Hedy"). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - Pour rester informés des dernières nouvelles, [abonnez-vous à notre infolettre](/subscribe). - title: Une plongée approfondie! text: 'Pour en savoir plus sur la philosophie et la conception de Hedy, regardez cette conférence donnée par Felienne lors de la conférence StrangeLoop en 2022: diff --git a/content/pages/fy.yaml b/content/pages/fy.yaml index c138ae0aa4e..f32d84651f2 100644 --- a/content/pages/fy.yaml +++ b/content/pages/fy.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -194,7 +198,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/he.yaml b/content/pages/he.yaml index f55476e0848..86af15a5b1e 100644 --- a/content/pages/he.yaml +++ b/content/pages/he.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: הצטרף לקהילת הידי +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: צלילה לעומק! - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: הידי בחדשות + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: להתחיל עם הידי text: '*Something about teachers accounts, slides etc*' @@ -131,7 +156,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/hi.yaml b/content/pages/hi.yaml index 26d9e638a03..d90e751bbcc 100644 --- a/content/pages/hi.yaml +++ b/content/pages/hi.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Want to help? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -133,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/hr.yaml b/content/pages/hr.yaml index 8d7b72d0442..3deedce35eb 100644 --- a/content/pages/hr.yaml +++ b/content/pages/hr.yaml @@ -51,7 +51,7 @@ teacher-guide: title: For teachers - title: Creating a Class text: "As a teacher, you can create a class for your students. In this class you can see the students' accounts and their programs and you could monitor their progress.\nThis video shows you how to quickly create a class in Hedy." - - text: "Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see \"Customize your Class\" to learn how) and then duplicate this class as many times as you want.\nYou can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well.\nThe student accounts and second teacher accounts in your class will not be duplicated into the new class." + - text: "Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see \"Customize your Class\" to learn how) and then duplicate this class as many times as you want.\nYou can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well.\nThe student accounts and second teacher accounts in your class will not be duplicated into the new class." title: Duplicate a class - text: "Are you not the only teacher that teaches your class? Then you can now add another teacher to the class. Go to the 'For teachers' page and click on the class. Then choose 'Invite a teacher' and fill in the username of your colleague.\nYour colleague will get an invitation on their account to join your class. They can see that invitation message by clicking on their username in the upper right corner of the screen and selecting 'My account'.\nOnce the other teacher accepts the invitation they can customize the class as well.\nTo remove a second teacher from your class, go to the class page and remove the second teacher. The teacher who's created the class cannot be removed." title: Add a second teacher @@ -545,8 +545,17 @@ teacher-guide: title: Common mistakes intro: "You can learn from your mistakes, especially in coding!\nMaking mistakes is unavoidable, and a great opportunity to learn, but for teachers it can be a challenge to find the correct fix for a mistake!\nEspecially as the programs get longer and longer as the levels progress. That's why we've made a list with frequently made mistakes in each level, and their solutions." learn-more-sections: -- title: Join the Hedy Community - text: "We love to hear from you! The best way to get in touch with us is by joining our Discord server.\n\nYou can also [send us an email](mailto:hello@hedy.org \"About Hedy\").\n\nTo stay on top of the latest news, [subscribe to our newsletter](/subscribe)." +- title: The Hedy foundation + text: |- + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: "Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022:\n\n" - title: Hedy in the news diff --git a/content/pages/hu.yaml b/content/pages/hu.yaml index 24dcb576c2a..380d120e3a2 100644 --- a/content/pages/hu.yaml +++ b/content/pages/hu.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Csatlakozz a Hedy közösségéhez +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Hedy a hírekben + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -131,7 +156,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ia.yaml b/content/pages/ia.yaml index 9ee17ac6eda..447c9ab3901 100644 --- a/content/pages/ia.yaml +++ b/content/pages/ia.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -194,7 +198,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/iba.yaml b/content/pages/iba.yaml index c138ae0aa4e..f32d84651f2 100644 --- a/content/pages/iba.yaml +++ b/content/pages/iba.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -194,7 +198,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/id.yaml b/content/pages/id.yaml index d46cc2ba874..2a36d1790fe 100644 --- a/content/pages/id.yaml +++ b/content/pages/id.yaml @@ -48,13 +48,22 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Gabunglah dalam Komunitas Hedy +- title: The Hedy foundation text: |- - Kami ingin mendengarnya dari kamu! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Klik disini untuk mengirimkan pesan](mailto:hello@hedy.org "About Hedy") -- title: Penjelasan Mendalam! - text: '[Beritahu kami di GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! + text: |- + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: + + - title: Berita tentang Hedy text: |- Beberapa situs web dan surat kabar telah menulis tentang Hedy sejak kami dirilis pada awal tahun 2020. Kami menyimpan daftarnya di sini: @@ -141,7 +150,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/it.yaml b/content/pages/it.yaml index 1a3c6820c1d..6d64b3e966c 100644 --- a/content/pages/it.yaml +++ b/content/pages/it.yaml @@ -51,11 +51,17 @@ join-sections: Hedy è progettato per supportare gli insegnanti nel fornire lezioni di programmazione in classe. Abbiamo funzionalità specifiche per gli insegnanti, come l'opzione per creare una classe, personalizzarla e vedere come i tuoi studenti stanno andando. Se ti piace Hedy, puoi proporlo alle scuole che conosci e aiutare gl insegnanti a muovere i primi passi! Ti possiamo aiutare a trovare scuole o insegnanti tramite Discord. learn-more-sections: -- title: Unisciti alla community Hedy +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our [Discord server](https://discord.gg/8yY7dEme9r). + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -198,7 +204,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ja.yaml b/content/pages/ja.yaml index a333ea640dd..ac814540f83 100644 --- a/content/pages/ja.yaml +++ b/content/pages/ja.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Want to help? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -133,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/kab.yaml b/content/pages/kab.yaml new file mode 100644 index 00000000000..b50d7e217ce --- /dev/null +++ b/content/pages/kab.yaml @@ -0,0 +1,558 @@ +teacher-guide: +- subsections: + - title: What's Hedy? + text: "Hedy is a textual programming language, specifically developed for (pre-)teens (10 to 15 years old).\nIn contrast to programming languages for kids, like Scratch, Hedy doesn't use code blocks but textual code.\nSo with Hedy you'll learn how to type code like the real programmers do, but in small steps with playful exercises.\nThis way Hedy can function as a stepping stone to real programming languages like Python in an accessible and mostly fun way!\nIf you want to know more, you can watch this video about the development of Hedy as a programming language." + - title: Target audience + text: "Hedy is developed with middle school and junior high school students in mind (ages 10 - 15).\nIt's important for the students to be able to read well. We recommend not to start with Hedy before the students have achieved at least a 3rd grade reading level.\nStudents (and teachers!) don't need any programming experience before starting with Hedy." + - title: How does Hedy work? + text: "Hedy is divided into levels, in which new commands are taught. Each level contains a variety of adventures to practice the newly learned commands.\nAs a teacher, you get to decide which adventures are available for your students. Will they be making a restaurant, a calculator or a haunted house this level? Within each level, the adventures are arranged from easiest to hardest.\nSo your students keep getting challenged. The adventures can be done by the students individually, or you can use them in a classical instruction.\n\nThe adventures also include a code example, to make sure the less digitally informed teachers are able to use Hedy too!\nOf course Hedy also caters to the creative teachers that love to make their own lessonplans and adventures!\n\nAfter programming all the adventures of a certain level, your students can test their knowledge in the quiz.\nYou can track your students' work and their progress on the class page." + - text: "Hedy is web-based, which means it works on any device with a browser (Google Chrome, Firefox, Edge etc), so laptops, Chromebooks, tablets and even smartphones are suitable to use Hedy.\nThere's no need to download anything before working with Hedy, just go to the website and you're all set!" + title: Devices + - title: The Hedy Community + text: "All Hedy teachers, programmers and other fans are welcome to join our Discord server. This is the ideal place to chat about Hedy: we have channels where you can show your cool projects and lessons, channels to report bugs, and channels to chat with other teachers and with the Hedy team.\nHere you can find a video on how to join the Discord Community." + - title: Hedy and the GDPR + text: "Organizations in the EU have to comply with the GDPR (General Data Protection Regulation) when processing personal data.\nBecause this is a complex issue for many schools, you can use all Hedy programming functionalities without sharing personal data.\nThe easiest way to do this is to use Hedy without creating accounts for the teacher and students. Without accounts, all functionality is available, with the exception of personalizing levels, saving students' programs and viewing their progress. That is limiting, but there are schools that use Hedy in that way.\n\nA second way is for a teacher to create an account with an email address without personal data, for example \"docent25@email.com\". Apart from an email address, which is only required to reset your password, you do not need to share any information when you create a teacher account.\nWith a teacher account, you can create anonymous accounts for students, e.g. rainbow-student1, rainbow-student2, etc (See 'Teaching preparations' for a detailed manual). This way you can use all functionality of Hedy, including saving progress, without sharing personal data of yourself or your students.\n\nIf the above is not sufficient for your context, we can sign a processing agreement for the processing of your personal data." + title: Introduction + key: intro +- title: Tutorial + subsections: + - text: Do you want to follow the tutorial (again)? Click here. + title: Tutorial + key: tutorial +- subsections: + - text: You can prepare your classes at the For Teachers page. On this page you'll find everything you'll need to teach with Hedy, like your classes, your adventures and slides. All the functionalities of the for teachers page are explained below. + title: For teachers + - title: Creating a Class + text: "As a teacher, you can create a class for your students. In this class you can see the students' accounts and their programs and you could monitor their progress.\nThis video shows you how to quickly create a class in Hedy." + - text: "Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see \"Customize your Class\" to learn how) and then duplicate this class as many times as you want.\nYou can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well.\nThe student accounts and second teacher accounts in your class will not be duplicated into the new class." + title: Duplicate a class + - title: Add a second teacher + text: "Are you not the only teacher that teaches your class? Then you can now add another teacher to the class. Go to the 'For teachers' page and click on the class. Then choose 'Invite a teacher' and fill in the username of your colleague.\nYour colleague will get an invitation on their account to join your class. They can see that invitation message by clicking on their username in the upper right corner of the screen and selecting 'My account'.\nOnce the other teacher accepts the invitation they can customize the class as well.\nTo remove a second teacher from your class, go to the class page and remove the second teacher. The teacher who's created the class cannot be removed." + - text: "You can customize your class and choose which adventures are available for your students. This way your students won't be overwhelmed by the amount of adventures and levels, and they can specifically focus on the adventures you'd like them to practice with.\nClick on your class on the for teachers page and choose 'customize class'. On this page you can select levels, set opening dates, unlock level thresholds and more.\n\n**Select and order adventures**\n\nIn this section you can select and order adventures. The pink tabs are adventures with new commands. The gray tabs are regular adventures. To rearrange the order of the adventures, you can drag the tabs. However, we do advise you to use the regular order of adventures as the Hedy team made sure the adventures go from easiest to hardest.\nIf you want to remove an adventure for your students, simply click the cross on the adventure's tab.\n\nIf you want to add adventures, for instance your own adventure or an adventure you accidentally removed, use this menu to add the adventure to your students' adventures. Simply click the adventure you want to add and it (re)appears in the line of adventures. To undo all your changes to the adventures, click 'Reset'.\n\n**Opening dates**\n\nWith this feature you can set opening dates for the levels. This way you can make a lesson plan before your course begins and not worry about opening new levels each week. In the image above the first level is opened directly, the second will open the 23th of september, and the 3rd level the week after. The other levels are closed.\nDon't want to set opening dates? No problem, just leave this section blank.\n\n**Unlock level thresholds**\n\nThis featue allows you to set a threshold for your students' quiz grade, before they can continue to the next level. For example, if you enter \"80\" your students have to score at least 80% on the quiz before they are allowed to go to the next level. If they haven't met the threshold, they are not allowed to continue and have to retake the quiz.\nDon't want to use the threshold? No worries, just keep this section blank.\n\n\n**Other settings**\n\nThere are some other setting that could be usefu to you aswell. Our first extra setting is 'Mandatory developer's mode'. In developers mode the students only see their input and output screens and the run button. The adventures are hidden and there are no cheatsheets available. This might come in handy in a test situation.\nIf this option is not selected the developer's mode is available for students too as a voluntary option.\n\nIf you want all your students to be visible in de class highscore, you can select the second option.\nWith all the other options you can choose to hide some functions or content for your students, this might help them focus more.\n\n**Save**\n\nDon't forget to save your changes when you're done customizing your class." + title: Customize your Class + - text: "To add students to your class go to the class page by clicking in the class name on the 'for teachers' page. Then click 'add students'. There are 2 ways to let your students join your class: You can create accounts for them, or they could create their own accounts.\n\n**You create accounts for your students**\nThe easiest way to add students to your class is by creating an account for them. This can be done by clicking the 'create student accounts' button and filling in the usernames and passwords for them.\nThe students can login with the username and password that you chose. Afterwards, they can change their username or password if they'd like and they'll still remain in your class.\nThis video shows how to add students to your class in the quickest and easiest way.\n\n**Students make their own accounts**\nYour students can also go to the Hedy website and create their own accounts, just like you did. To get them into your class, they simply have to click the invite link.\nYou can find the invite link on the class page and send it to your students. Mind that your students have to be logged in to Hedy when they click the link, in order to make it work smoothly.\nYou can also manually invite a student to your class with the button 'Invite by username'." + title: Student Accounts + - title: Setting preferred language + text: "When students create profiles they are supposed to choose a 'preferred language'. Hedy will always be loaded in this selected language.\nChanging this language can always be done later on by navigating to 'My account' and 'My personal settings' again.\n\n**For non-English speakers**\nNot only can you change the language of the adventures to your own language. You can also choose which language the keywords (for example 'print' or 'ask') should be in.\nThis way you can teach your students to code with English keywords, but you can also let them program in their own language. For example, Dutch students can use the command 'vraag' instead of 'ask'.\nIf a student wants to switch languages, they can click the keyword switcher. It will switch the keywords from English to the preferred language and back.\nFun fact! Students are allowed program in both English and their own language at the same time! So, if they have trouble remembering some keywords in English, but easily remember other ones they can use both at the same time.\n\n\n**Video**\nThis video show you how to set a preferred language and change the keywords to you preferred language as well." + - text: "When you are logged in, you'll see My programs next to your profile icon.\nThis option exists for your students too. In My programs you can find all the programs that you've worked on.\nBy default, programs will be saved to 'My programs' when you run the code, and every 10 seconds, under their default name\nand their level (for example: Story 5). If you want to store a program under a new name, just type the new name in the name bar.\nCurrently, only one program can be saved per level, per tab.\n\nYou (and your students) can also share programs using the share button next to program names.\nThese programs will be posted on our explore page, for everybody to see and use.\nIf you want to unshare your program, go to 'My programs' and click 'Unshare'.\n\nThe paper plane icon can be used to hand in programs to the teacher of a class. Programs that have been handed is will no longer be editable." + title: Storing programs + key: preparations + title: Teaching preparations +- subsections: + - title: Teaching with Hedy + text: "Hedy contains a lot of different levels that each teach a different new skill. We recommend to teach one level per lesson.\nThis gives your students the time to fully grasp a new command or concept and practice with it, before moving on to the next level.\nWe use this structure in our lessons: Introduction, New concepts and commands, let's get to work, puzzles and quizzes." + - title: Slides + text: "When giving instructions you might want to use our slides. Our slides are available on the 'For teachers' page. There is a set of slides for each level. In the slides all the new commands for that level are explained. We have aimed to explain why these changes are nessecary or how the new commands come in handy.\nWe also give some examples of how the new commands can be used. You could of course also use your own slides, or just open Hedy and show your students around the website. Whichever you prefer to give the best Hedy lessons!" + - title: Introduction + text: "You can start your lessons by activating your students' prior knowledge: What do they already know about the subject, what did they learn in the previous lesson and which mistakes did they make that they've now learned from?\nThis way all the previously learned commands and frequently made mistakes are fresh in your students' memories, when you start introducing the new lesson." + - title: Introduction of new concepts and commands + text: "The new concepts and commands can be very hard for some students to fully understand.\nThat's why it's of importance to model the proper use of the new commands to your students.\nEspecially in the lower levels, where some students have no experience with programming at all, it can be hard for them to understand the new abstract concepts.\nShowing a lot of examples makes an abstract concept (for instance: 'What is a variable?') more recognizable and easier to understand ('Look, the variable pet changed into dog'). Our slides could help you with that." + - title: Let's get to work + text: "Each level contains different adventures that you can find in the pink tabs. The first pink tab explains the new commands in this level.\nThe following tabs are adventures that the students can try out and make their own.\nThe adventures are arranged from easiest to hardest, so we recommend to start on the left and your your way to the right.\nThe last tab 'what's next' gives a little teaser of what you'll learn in the next level. Of course, you can select the adventures you want your students to do for each level.\nThey don't always have to make every adventure. Every adventure contains an example code, that the students can try out with the green button.\nThe example code gets copied to the workfield, where the students can try out the code and adjust it to make it their own.\nStimulate your students to turn the example code into their own projects by adding their own ideas and making their own variation of the adventure." + - title: Quizzes and puzzles + text: "To test whether your students have picked up all the new info in the level, you can let them take the quiz.\nThe quiz contains 10 multiple choice questions about the new concepts and command to that level.\nNot every level has a quiz yet, as we are still building the quizzes.\nSome levels also contain puzzles. Puzzles show the students a couple of line of code that the students have to put in the right order.\n\nThis video shows the quizzes and puzzles." + - title: Evaluation + text: "Round up your lesson by having a brief evaluation. What did the students learn? Which hardships did they come across?\nHow did they learn from their mistakes? And of course: What did they create?\nStudents are often very proud of their own creations, so it's nice to save a little time and give your students the opportunity to show their work to their classmates." + title: Teaching with Hedy + key: teaching +- key: teacher_statistics + title: Teacher Statistics + subsections: + - title: Live Dashboard + text: "If you would like to keep track of your students' progress, you can make use of the live dashboard. You can find the live dashboard by clicking 'Live statistics' on your class page.\n\nAll the features of this dashboard are explained below." + - title: Level Selection + text: "\nFirstly, you can select the levels you'd like to see on the dahsboard. Select the levels your students are currently working on by clicking on the number of that level. Deselect levels that you do not want to see by clicking them again.\nIn this example level 1 and 2 are selected. You can click on refresh to refresh the dashboard and get the most current stats." + - title: Class Overview + text: "\nIn the class overview you can see which adventure your students are working on right now. You can see that one student is working on the 'Rock, Paper, Scissors' adventure in level 1, one is working on the 'Fortune Teller' in level 1 and one student is working on the 'Rock, Paper, Scissors' adventure in level 2.\nIf you'd like to know which of your students is working on the adventure, simply click the number and their accountnames will appear.\nYou can also see how many of your students have finished the quiz. In this case, one student finished the quiz in level 1. Again, you can click the 1 to see which of your students it is.\n\nYou can also see one of the students is 'missing' from this overview. That's because he's working on an adventure in level 4, which is not selected." + - title: Student List + text: "\nHere you can find a list of your students and you can see their individual progress. The blue ring shows you what your students are currently working on.\n\nIt is important to notice that the blue dots means that a students 'attempted' the adventure. This means that they ran a code in this adventure and went on to the next adventure, so this does not automatically mean that they did a good job!\nIf you want to see how an individual student is getting along, you can click their name in this overview. This is what you see if you click on marleen_h3a for example:\n\nYou see that Marleen is having some trouble programming. She tried to run a program that contains blanks multiple times, so she might not realize that she has to change the code examples before running them.\nIn this way this overview can give you a better understanding of what a student is struggling with." + - title: Common Errors + text: "\nIf you're not only interested in individual struggles of your students, but you'd like to know what the whole class seems to be doing wrong, you can use this oversight of common errors.\nThe most common error messages that your students are recieving will appear in this oversight for you, so you could give some more instructions to the whole class if needed.\nBy clicking the error, you can see which students are having trouble with this error. By clicking resolve, you'll remove this error from the list." + - text: "\nAnother useful overview of all the programs your students made in a level can be found on your class page. Go to the class page and click 'Overview of programs per adventure'. Here you'll find this overview.\nYou could use this overview to check your students' work. If they have made a program in an adventure, an eye appears in your overview. Click the eye to view their work. Did you like it? Then you can check the box and a green tick will appear.\nThis way you create a nice overview for yourself of your students' results." + title: Overview of programs per adventure +- subsections: + - title: Make your own adventure + text: It is also possible for teachers to create your own adventure. This video shows you how to create your own adventure as a teacher and add it to your class(es). + - text: "On the explore page you can view the work of other Hedy users. You can try out their programs and use them as inspiration to create something cool yourself.\nYou can also add a program you've made to the explore page yourself by clicking 'Save and share code' in the coding screen or go to My Programs and click 'Share'.\nDon't want to share your work anymore? Simply go to 'My Programs' and click 'Unshare'.\nIf you want more information about the explore page, check out this video." + title: Explore page + - title: My achievements + text: "If you click on your username in the topright corner of your screen, you can go to My achievements. On this page you achievements are collected. Your students have such a page as well.\nWhen you hover over the badge with your mouse, you'll see how to earn the badge. There are hidden badges too, of which you'll have to find out yourself how to earn them.\nIf you want more information on the achievements, check out this video." + - title: High Scores + text: "On this page you can see the high scores of all Hedy users.\nIn this videoyou can learn some more about the high scores." + - text: "Is your (student's) code not working? There must be a bug (coding mistake) in it! You can use the debugger to find the mistake.\nThe debugger is the ladybug button in your coding screen. If you press it, you can run your code line by line to find your mistake.\nHave you found the mistake? Press the red stop button and the debugger will shut off." + title: Debugger + - title: Read aloud + text: Do you want the output of your program to be read aloud? Then you can use the read aloud function that is found under the 'run code' button in your coding screen. + - title: Programmers mode + text: "Distracted by all the adventures, or do you want to make a long program? Then check out the 'Programmers Mode' switch at the bottom of your coding screen.\nProgrammers mode allows you and your students to use a bigger coding screen." + - title: Cheat sheets + text: "In every level there is a button with this emoji 🤔. You and your students can find the \"cheat sheets\" there. On this cheat sheet, you can find all the commands that are usable in this level in their correct form.\nSo if you've forgotten how a command works, simply take a peek at the cheat sheet!" + - title: Video + text: This video shows you even more features of Hedy, like the cheatsheets and the keyword switcher. + title: Extra Hedy features + key: features +- subsections: + - title: What to do after Hedy? + text: "Congratulations on reaching the end of Hedy! Your students have now learned how to create their own basic programs in the Python programming language.\nOf course, you could keep programming in our Hedy compiler, but it might be more exciting for your students to transfer to a \"real\" Python interface.\nWould you like to continue teaching Python? Then please visit the Python website to learn how to get started in another compiler.\n\nNow that your students have a basic knowledge of programming in general, you could also show them around in other textual programming languages. The language might change but the concepts do not, so Hedy will still give them a big advantage." + title: After Hedy + key: after +- title: Answers to the exercises + key: answers + intro: "The answers to all the exercises can be found on the public profile of the useraccount 'Hedy_answers'. We often encourage students to use their own creativity in their answers, so these answers are merely a guideline as to what a possible correct answer could look like.\n\nTo go to the 'Hedy_answers' profile, please click here." +- levels: + - sections: + - example: + error_code: Hedy can't print this + error_text: For example they type a sentence without using print. + solution_text: Teach your students to always start a line of code with a command. + solution_code: '{print} Hedy can print this!' + title: Students forget to type commands + - example: + solution_code: "{ask} Why does my code work now?\n{print} Because I removed the capitals!" + error_text: Commands won't work if they are in capitals. + error_code: "Ask Why does my code fail?\nPrint Because I'm using capitals." + solution_text: Remove the capitals. + title: Students use capitals when typing commands + - example: + solution_code: "{ask} What's your name?\n{echo} Your name is" + error_code: '{echo} Your name is' + solution_text: Add an ask command to make it work. + error_text: Echo is made to repeat an answer after an ask command. Without ask echo won't do anything. + title: Students use echo without ask + - example: + solution_text: 'In level 1 we have to keep it at this:' + solution_code: "{ask} Which programming language is the most fun?\n{echo} The best is..." + error_code: "{ask} Which programming language is the most fun?\n{echo} is the best!" + error_text: And they are right! That's why they will learn to use proper variables in the next level. + title: Students want their echo word (variable) to be in the middle of a sentence + - title: 'Turtle: Students let the turtle walk off of the screen' + example: + solution_code: "{forward} 100\n{turn} 90" + solution_text: In the example, students tend to think that the turn command failed; even though it did what it what supossed to. What happened is the turtle walked past the screen limits. Use smaller numbers to prevent this from happening. + error_text: Often students love to try out big numbers when using the turtle, which causes the arrow to walk off the screen. + error_code: "{forward} 300\n{turn} 90" + - example: + error_text: Backward is not a command. + error_code: backward 100 + solution_text: 'To make the turtle go backwards, you use the forward command and a negative number. For example:' + solution_code: '{forward} -100' + title: "Turtle: Students use the command backward, but there's no such command." + level: '1' + - sections: + - title: Students make typos in their commands + example: + error_code: prinnt Don't make typos + error_text: Hedy can't recognize a command with a typo. + solution_text: Teach your students to read the error messages. This way they can find out themselves what went wrong. + solution_code: "{print} Don't make typos" + - example: + solution_code: order {is} {ask} What would you like to eat + error_text: In this level students learn about variables. The ask command requires a variable as well, but students forget this. + solution_text: In this level you have to tell Hedy where to save your answer, so it can be used later on. This is called a variable. + error_code: ask what would you like to eat + title: Students forget that the ask command has changed + - example: + error_code: "answer {is} {ask} Why doesn't {echo} work anymore?!\n{echo}" + solution_code: "answer {is} {ask} Why doens't {echo} work anymore?!\n{print} answer" + solution_text: Use a variable instead. + error_text: For some students it might be frustrating to learn that the `{echo}` command doesn't work anymore. That's why it's very important to explain the advantages of using variables. For example you can use multiple variables in a code, and you can put them anywhere you like in a sentence! + title: Students try to use the `{echo}` command + - example: + solution_code: "name {is} Hedy\n{print} Hi I'm name" + solution_text: So don't use a word you want to use in the text as a variable name. In level 4 this is solved with quotation marks. + error_text: In the example below the word 'name' is used as a variable, but also as a normal text. The output of this code will be 'Hi my Hedy is Hedy'. + error_code: "name {is} Hedy\n{print} Hi my name is name" + title: Students use a variable name or as a normal word + - example: + solution_text: Add an underscore. + error_text: A variable should be named with one word. You could use an underscore to connect two words. That counts as one. + error_code: chosen door is ask Which door do you pick + solution_code: chosen_door {is} {ask} which door do you pick + title: Students use long variable names containing two words. + - example: + error_code: "horse {is} {ask} What is your horse called\n{print} Your horse is called name" + solution_code: "name {is} {ask} What is your horse called\n{print} Your horse is called name" + solution_text: Always check whether the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code. + error_text: In this example the student has used 'horse' and 'name' for the same variables. + title: Students might use two different names for the same variable + level: '2' + - sections: + - example: + error_code: "groceries {is} apples, milk, chocolate\n{print} groceries" + solution_text: To print a list of all the groceries, you simply need to put them after a `{print}` command. Else you can use the list to print one item with `{at}` `{random}`. + solution_code: "{print} apples, milk, chocolate\n\n# or\n\ngroceries {is} apples, milk, chocolate\n{print} groceries {at} {random}" + error_text: A list can't be printed. You can only print one item from the list with {at} {random}. + title: Students try to print whole lists + - example: + solution_text: Don't use the names of variables or lists in regular text to print. In level 4 this problem is solved with quotation marks. + solution_code: "name {is} Hedy\n{print} Hi I'm name\n\n# or\n\nanimals {is} rhino, bee, swan\n{print} The best animal is... animals {at} {random}" + error_code: "name {is} Hedy\n{print} Hi my name is name\n\n# or\n\nanimal {is} rhino, bee, swan\n{print} The best animal is... animal {at} {random}" + error_text: This problem probably occured in level 2 as well. Now it can happen with lists too. + title: Students use the name of a variable or list as regular text + - example: + error_text: Like in the example + error_code: "birds {is} sparrow, seagull, robin\n{print} birds random" + solution_code: "birds {is} sparrow, seagull, robin\n{print} birds {at} {random}" + solution_text: This problem is solved by adding the word at. + title: Students forget `{at}` in `{at}` `{random}` + - example: + solution_text: Emphasize to your students that you always need a print to print text. + error_code: "fruit {is} apple, cherry, banana\nfruit {at} {random}" + error_text: Or they will sometimes put `{at}` `{random}` at the beginning of the line. + solution_code: "fruit {is} apple, cherry, banana\n{print} fruit {at} {random}" + title: Students forget to use the `{print}` command when also using the `{at}` `{random}` command + - title: Students forget to use commas in their lists + example: + error_text: In a list items are seperated with a comma. + solution_code: "pizzas {is} funghi, tonno, quattro stagioni\n{print} pizzas {at} {random}" + solution_text: After each item on your list, there should be a comma + error_code: "pizzas {is} funghi tonno quattro stagioni\n{print} pizzas {at} {random}" + - example: + solution_code: "clubs {is} Manchester United, Bayrn Munchen, FC Barcelona\n{print} clubs {at} {random}" + solution_text: Hedy can't print anything at random, because there is no list to choose from. + error_code: "clubs {is} Manchester United\n{print} clubs {at} {random}" + error_text: For example + title: Students try to use `{at}` `{random}` without a list + - example: + error_text: In the example below 'names' is not a list, but a variable. You cannot add anything to it. + solution_code: "names {is} Jake, Amy\nyour_name {is} {ask} Who are you?\n{add} your_name {to} names\n{print} names {at} {random}" + error_code: "names {is} Jake\nyour_name {is} {ask} Who are you?\n{add} your_name {to} names\n{print} names {at} {random}" + solution_text: There has to be a list first, so you have to add a second name to turn names into a list, for example Amy. If you don't want amy on your list, you can use remove to remove it after. + title: Students try to use add/remove without a list + - example: + solution_text: Hedy has to know which list the item should be added to/removed from. + solution_code: "adventures {is} story, parrot, dice\nchoice {is} Which adventure do you like best?\n{add} choice {to_list} adventures\n{remove} dice {from} adventures\n{print} I love adventures {at} {random}" + error_code: "adventures {is} story, parrot, dice\nchoice {is} Which adventure do you like best?\n{add} choice\n{remove} dice\n{print} I love adventures {at} {random}" + error_text: Without to/from the add/remove command won't work. + title: Students forget to use `{to}`/`{from}` in `{add}`/`{remove}` + level: '3' + - level: '4' + sections: + - title: Students forget to use quotation marks on both sides of the text + example: + solution_text: Add the correct quotation marks. + error_text: In this level print and ask need a set of quotation marks. One before of the text and one after. + error_code: "{print} Hello\nmood {is} {ask} 'How are you?" + solution_code: "{print} 'Hello'\nmood {is} {ask} 'How are you?'" + - example: + solution_code: "{print} 'Welcome to the restaurant'\nfood {is} {ask} 'What would you like to order?'" + solution_text: 'These are the correct quotation marks:' + error_code: "{print} `Welcome to the restaurant`\nfood {is} {ask} \"What would you like to order?\"" + error_text: It is important to start your lesson by checking if the students know how to type a quotation mark properly. On Hedy, students might use single quotes ('') and double quotes (""). Backticks on the other hand, are not considered valid quotes (``). + title: Students use the wrong quotation marks + - title: Students use an apostrophe in their text + example: + error_text: From this level on apostrophes are not allowed. They are often used in English when typing contractions like you're, don't or what's. + error_code: "{print} 'You're not allowed to type this'" + solution_text: You can choose to use the wrong grammar and just leave the apostrophe out. Or you could use the ` as an apostrophe. + solution_code: "{print} 'Youre allowed to type this'\n{print} 'And you`re able to do this'" + - level: '5' + sections: + - example: + error_text: After students use `{if}` or `{else}` they forget to use a second command like `{print}` or `{ask}`. + solution_text: Add the print command to fix it. + solution_code: "{if} name {is} Hedy {print} 'Great!'\n{else} {print} 'Hedy is better!'" + error_code: "{if} name {is} Hedy 'Great!'\n{else} Hedy {is} better!" + title: Students forget to use `{print}` in an `{if}` command + - example: + error_code: "horse {is} {ask} 'What is your horse called?'\n{if} name {is} Bonfire {print} 'cool'\n{else} {print} 'less cool!'" + solution_code: "horse {is} {ask} 'What is your horse called'\n{if} horse {is} Bonfire {print} 'cool!'\n{else} {print} 'less cool!'" + solution_text: Always check whether the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code. + error_text: In this example the student has used 'horse' and 'name' for the same variables. + title: Students might use two different names for the same variable + - example: + error_text: Using the `if` command can make the code lines very long and students tend to forget to use quotes. + solution_text: Always use 2 quotes in a print command. + error_code: "{if} name {is} Hedy {print} fun\n{else} {print} 'meh!" + solution_code: "{if} name {is} Hedy {print} 'fun'\n{else} {print} 'meh!'" + title: Students still forget the quotes on both sides + - example: + solution_text: Remove the quotes to get the code to work. + error_text: In this level there are no quotes around variable names. + solution_code: "{if} name {is} Hedy {print} 'fun'\n{else} {print} 'meh!" + error_code: "{if} name {is} 'Hedy' {print} 'fun'\n{else} {print} 'meh!'" + title: Students use quotes around variable names + - example: + solution_text: Add an underscore. + solution_code: chosen_door {is} {ask} 'which door do you pick?' + error_code: chosen door is ask Which door do you pick? + error_text: Variables in Hedy can't contain spaces, so, in order to use together several words, students need to connect them using underscores (_) + title: Students use long variable names containing two or more words + - example: + solution_code: "friends {is} Jesse, David, Souf\nname {is} {ask} 'Who are you?'\n{if} name {in} friends {print} 'You are funny'\n{else} {print} 'You are not funny'\n\n# or\n\nname {is} {ask} 'Who are you?'\n{if} naam {is} Jesse {print} 'You are funny'\n{if} naam {is} David {print} 'You are funny'\n{if} naam {is} Souf {print} 'You are funny'" + error_text: For example this student wants Hedy to tell all his friends that they are funny, while other classmates should be told that they are not. + solution_text: "You could use the `{in}` command for that. While it is explained in a higher level, it does already work in level 5.\nAnother solution is to use multiple `{if}` commands and no `{else}` command. The disadvantage is that it won't tell the other classmates that they are not funny." + error_code: "{if} name {is} Jesse, David, Souf {print} 'You are funny' {else} {print} 'You are not funny'" + title: Students want multiple answers to be correct + - example: + error_text: In the example below the password is 'password'. This will result in it always being correct. + solution_text: Pick a different name for your variable. + solution_code: "secret_password {is} {ask} 'What is the password'\n{if} secret_password {is} password {print} 'Access granted!'\n{else} {print} 'Access denied!'" + error_code: "password {is} {ask} 'What is the password?'\n{if} password {is} password {print} 'Access granted'\n{else} {print} 'Acces denied!'" + title: The students make the variable name the same as the value in the `{if}` statement + - sections: + - example: + error_text: Some students struggle with adding quotation marks or not. If you add quotation marks, the output screen will literally show '5+5'. + solution_code: '{print} 5 + 5' + error_code: "{print} '5 + 5'" + solution_text: In this code the output screen will print '10'. + title: Students struggle with quotation marks + - example: + solution_text: Or take it a step further like this. + error_text: 'Some students will find it hard to do maths with variables. Try to show them very simple examples, like:' + solution_code: "price = 0\n{print} 'Welcome to our burger restaurant'\nburger = {ask} 'Would you like a burger?'\n{if} burger = yes price = price + 10\ndrink = {ask} 'Would you like a drink?'\n{if} drink = yes price = price + 4\n{print} 'That will be ' price ' euros please'" + error_code: "age = {ask} 'How old are you?'\n{print} 'Next year you will be ' age + 1" + title: Students struggle with the concept of doing maths with a variable + level: '6' + - level: '7' + sections: + - example: + solution_text: 'This is the correct code:' + error_code: "{repeat} 3 {times} For he`s a jolly good fellow\n{repeat} 3 print" + solution_code: "{repeat} 3 {times} {print} 'For he`s a jolly good fellow'\n{repeat} 3 {times} {print} 'Which nobody can deny!'" + error_text: Make sure that the students know to use both the full repeat command and the print command. + title: Students forget one of the word of the repeat command, or they forget the print command + - example: + error_text: In this level you can only repeat one line of code multiple times. In this code the student wanted to print 3 different drinks, but it won't work. It will ask the question 3 times and only print the last answer. + error_code: "{repeat} 3 {times} drink = {ask} 'What would you like to drink?'\n{print} drink" + solution_text: You should go to the next level to be able to repeat multiple lines. So on this level you'll have to print everything seperately. + solution_code: "drink = {ask} 'What would you like to drink?'\n{print} drink\ndrink = {ask} 'What would you like to drink?'\n{print} drink\ndrink = {ask} 'What would you like to drink?'\n{print} drink" + title: Students try to repeat multiple lines + - title: Students make programs that take too long to run + example: + solution_text: Make sure the code doesn't take too long to execute + error_text: In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine. + error_code: "{repeat} 100 {times} {print} 'How many times can I repeat this?'" + solution_code: "{repeat} 20 {times} {print} 'This is enough'" + - sections: + - example: + error_code: "{repeat} 3 {times}\n{print} 'hello'" + solution_text: 'This is the correct code:' + solution_code: "{repeat} 3 {times}\n {print} 'hello'" + error_text: Indentation is a new concept in this level, and for some students it might be hard to learn. Make sure they practise some simple examples before making a whole program with it. + title: Students use the indentation wrong + - example: + error_text: For instance, in the code below the student wanted to take the drinks order of 3 people. But instead the program asked 3 times, but only wrote down one order. + solution_code: "{repeat} 3 {times}\n drink = {ask} 'What would you like to drink?'\n {print} drink" + solution_text: "In the correct code the third line starts with indentation too. This way it belongs to the repeat block and therefore it will be repeated 3 times.\nShowing your students these differences can help them understand why we need indentation to make our programs work." + error_code: "{repeat} 3 {times}\n drink = {ask} 'What would you like to drink?'\n{print} drink" + title: Students only repeat 1 line when they wanted to repeat multiple lines + - example: + error_code: "birthday = {ask} 'Is it you birthday?'\n{if} birthday = yes\n {repeat} 3 {times}\n {print} 'Hip Hip Hooray!'" + solution_text: 'This is the correct code for this level:' + error_text: "In this level students aren't allowed yet to put `{if}` statements inside other `{if}` statements or inside repeat loops.\nIn the next level this is allowed." + solution_code: "birthday = {ask} 'Is it you birthday?'\n{if} birthday = yes\n {print} 'Hip Hip Hooray!'\n {print} 'Hip Hip Hooray!'\n {print} 'Hip Hip Hooray!'" + title: Students want to nest `{if}` statements, or put `{if}` statements inside a loop + - example: + error_text: In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine. + solution_code: "{repeat} 20 {times}\n {print} 'This is enough'" + error_code: "{repeat} 100 {times}\n {print} 'How many times can I repeat this?'" + solution_text: Make sure the code doesn't take too long to execute + title: Students make programs that take too long to run + - title: Students use the `{if}` command to check if the variable value is the same as the variable name + example: + solution_text: You can fix this mistake by adding quotation marks. This way the computer knows that the second password in `{if} password {is} 'password'` is a string value (so normal text) and not the variable name. + error_code: "password {is} {ask} 'What is the password?'\n{if} password {is} password\n {print} 'You can come in'\n{else}\n {print} 'You are not allowed'" + solution_code: "password {is} {ask} 'What is the password?'\n{if} password {is} 'password'\n {print} 'You can come in'\n{else}\n {print} 'You are not allowed'" + error_text: "We've noticed a common error among our students: they try to create a program that checks for a password, but they make the password 'password'.\nIn line 2 the computer is asked to check whether the variable password is the same as the variable password, so itself. Which means the answer is always yes.\nSo with this code the answer will always be 'You can come in' no matter what the player fills in." + level: '8' + - level: '9' + sections: + - title: Students make mistakes with indentation + example: + error_text: The hardest part about this level is getting the indentation right. Students love nesting `{if}` statements, sometimes even inside other nested `{if}` statements. Keeping track of indentation can get pretty tough. + solution_text: This is the correct code. Try to keep track of all the different constructions when putting `{if}` statements inside other `{if}` statements. + error_code: "{print} 'Robin is walking downtown'\nlocation = {ask} 'Is Robin going into a shop, or does she go home?'\n{if} location {is} shop\n {print} 'She enters the shop.'\n {print} 'Robin sees an interesting looking book'\n book = {ask} 'Does Robin buy the book?'\n {if} book {is} yes\n{print} 'Robin buys the book and goes home'\n{else}\n {print} 'Robin leaves the shop and goes home'\n{else}\n {print} 'Robin goes home'" + solution_code: "{print} 'Robin is walking downtown'\nlocation = {ask} 'Is Robin going into a shop, or does she go home?'\n{if} location {is} shop\n {print} 'She enters the shop.'\n {print} 'Robin sees an interesting looking book'\n book = {ask} 'Does Robin buy the book?'\n {if} book {is} yes\n {print} 'Robin buys the book and goes home'\n {else}\n {print} 'Robin leaves the shop and goes home'\n{else}\n {print} 'Robin goes home'" + - sections: + - example: + solution_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal" + error_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animals" + error_text: We often see that students try to print the list (in the example animals) instead of the items of the list. + solution_text: The word animals in the last line should be changed into animal. + title: Students do not use the `{for}` command correctly + - example: + error_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n{print} 'I love ' animals" + error_text: Students tend to forget to use indentation after a for command. + solution_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal" + solution_text: You should use indentation after a for command. + title: Students forget the indentation + level: '10' + - sections: + - example: + solution_code: "{for} i {in} {range} 1 {to} 5\n {print} i" + solution_text: 'This is the correct code:' + error_text: Make sure that the students use indentation. + error_code: "{for} i {in} {range} 1 {to} 5\n{print} i" + title: Students forget to use indentation + - example: + error_text: "Some students don't understand that i is a variable. i is chosen, because it is used in Python programming, but you could just as easily use a different variable name.\nFor example, this code:" + solution_text: Could just as well be replaced with this code. It works the same. + solution_code: "{for} banana {in} {range} 1 {to} 5\n {print} banana" + error_code: "{for} i {in} {range} 1 {to} 5\n{print} i" + title: Students don't understand the i + level: '11' + - sections: + - title: Students forget quotation marks + example: + error_text: Students need more quotation marks now than in the previous levels. In this example quotation marks were forgotten in the list and in the `{if}` command. + solution_code: "superheroes = 'Spiderman', 'Batman', 'Iron Man'\nsuperhero = superheroes {at} {random}\n{if} superhero {is} 'Batman'\n {print} 'IM BATMAN!'" + error_code: "superheroes = Spiderman, Batman, Iron Man\nsuperhero = superheroes {at} {random}\n{if} superhero = Batman\n {print} 'IM BATMAN!'" + solution_text: 'This is the correct code:' + - example: + solution_text: 'This is the correct code:' + solution_code: "score = 25\nanswer {is} {ask} 'Do you want a point?'\n{if} answer {is} 'yes'\n score = score + 1\n {print} score" + error_text: "You can use quotation marks on numbers, but only if you want the computer to think of them as text. This means you can't do calculations with the number.\nIn the example below, you can't do maths with the number 25, because it's in quotation marks." + error_code: "score = '25'\nanswer {is} {ask} 'Do you want a point?'\n{if} answer {is} 'yes'\n score = score + 1\n {print} score" + title: Students use quotation marks on numbers they want to use for calculations + - example: + solution_code: '{print} 2.5 + 2.5' + error_code: '{print} 2,5 + 2,5' + error_text: Decimal numbers can be used from this level on, but you can't use commas. + solution_text: 'This is the correct code:' + title: Students use commas instead of periods in decimal numbers + level: '12' + - level: '13' + sections: + - example: + error_text: Both commands might appear similar, but their functions are very different. + solution_text: In this case, the person should answer yes on both questions, so you should use `and`. + solution_code: "game {is} {ask} 'Do you want to play a game?'\ntime {is} {ask} 'Do you have time to play?'\n{if} game {is} 'yes' {and} time {is} 'yes'\n {print} 'Lets play!'" + error_code: "game {is} {ask} 'Do you want to play a game?'\ntime {is} {ask} 'Do you have time to play?'\n{if} game {is} 'yes' {or} time {is} 'yes'\n {print} 'Lets play!'" + title: Students confuse `{and}` with `{or}` + - sections: + - example: + solution_text: 'This is the correct code:' + error_code: "age = {ask} 'How old are you?'\n{if} age < 12\n {print} 'You are older than I am!'" + solution_code: "age = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'" + error_text: Often, students are already familiar with these signs from maths class. But if your students don't know these signs yet, they might have a challenge with it. + title: Students confuse the < and > signs + - title: Students use the wrong signs for `!=` `<=` and `>=` + example: + error_text: These signs are probably new for most students. Make sure to explain these signs to your students. + solution_code: "name = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'" + error_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy'\n {print} 'You are not Hedy'" + solution_text: 'This is the correct code:' + - title: Students forget to use the == sign + example: + error_text: In this level, students are still allowed to use = or is. But on other levels, or in python, they might get in trouble for that. So it is best to train them to use it. + solution_code: "name = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'" + solution_text: 'This is the correct code:' + error_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy'\n {print} 'You are cool!'" + level: '14' + - level: '15' + sections: + - example: + solution_text: 'This is the correct code:' + solution_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'" + error_text: Indentation is often hard for students. + error_code: "answer = 0\n{while} answer != 25\nanswer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'" + title: Students forget indentation in the while loop + - sections: + - example: + error_code: "icecream = 'starwberry', 'chocolate'\n{print} 'I love ' icecream[{random}] ' icecream'" + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + solution_text: 'This is the correct code:' + error_text: From this level on lists should be in brackets. + title: Students forget the brackets + - example: + error_text: From this level on lists should be in brackets. + solution_text: 'This is the correct code:' + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + error_code: "icecream = ('starwberry', 'chocolate')\n{print} 'I love ' icecream[{random}] ' icecream'" + title: Students use the wrong brackets + - title: Students forget the quotation marks while focussing on the brackets + example: + solution_text: 'This is the correct code:' + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + error_code: "icecream = [starwberry, chocolate]\n{print} 'I love ' icecream[{random}] ' icecream'" + - example: + error_code: "icecream = [starwberry, chocolate]\n{print} 'I love ' icecream at random ' icecream'" + solution_text: 'This is the correct code:' + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + title: Students still use the old at random command + - example: + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + error_code: "icecream = [starwberry, chocolate]\n{print} 'I love ' icecream[{random}] ' icecream'" + solution_text: 'This is the correct code:' + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + title: Students forget the quotation marks while focussing on the brackets + level: '16' + - level: '17' + sections: + - example: + solution_text: 'This is the correct code:' + error_text: The `{elif}` command needs a condition behind it. It cannot be used like `{else}`, without a condition. + solution_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'green is nice'\n{elif} color == yellow:\n {print} 'yellow is alright'\n{else}:\n {print} 'I like green'" + error_code: "color = ask 'What is your favorite color?'\n{if} color == 'green':\n {print} 'green is nice'\n{elif}:\n {print} 'I like green'" + title: Students use `{elif}` like `{else}`, so without a condition + - example: + error_text: After each command that requires indentation, a colon should be used. + solution_code: "answer = {ask} 'How are you doing?'\n{if} answer {is} 'great':\n {print} 'Me too!'\n{elif} answer {is} 'bad':\n {print} 'Let me cheer you up!'\n{else}:\n {print} 'Im great!'" + solution_text: 'This is the correct code:' + error_code: "answer = ask 'How are you doing?'\n{if} answer {is} 'great'\n {print} 'Me too!'\n{elif} answer {is} 'bad'\n {print} 'Let me cheer you up!'\n{else}\n {print} 'Im great!'" + title: Students forget the colon + - sections: + - example: + error_text: Students will forget to put brackets around their text. + error_code: "{print} 'my name is Hedy!'" + solution_code: "{print}('my name is Hedy!')" + solution_text: 'This is the correct code:' + title: Students forget to use the brackets + - example: + solution_code: "{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)" + error_code: "{print}('My name is Hedy!')\nname = ask('What is your name?')\n{print}('So your name is ', name)" + solution_text: 'This is the correct code:' + error_text: The ask command has been used since level 1. So it might be hard for the students to switch to input instead of ask. + title: Students will still use the ask command + - title: Students might use the brackets as quotation marks + example: + solution_code: "temperature = 25\n{print}('It is ', temperature, 'degrees outside')" + error_text: They have learned to keep the variables outside of the quotation marks, so they might do the same with the brackets. Which is not the correct way to use them. + error_code: "temperature = 25\n{print}('It is ') temperature ('degrees outside')" + solution_text: 'This is the correct code:' + level: '18' + key: common_mistakes + title: Common mistakes + intro: You can learn from your mistakes, especially in coding! Making mistakes is unavoidable, and a great opportunity to learn, but for teachers, it can be a challenge to find the correct fix for a mistake! Especially as the programs get longer and longer as the students progress through the levels. That's why we've made a list with frequently made mistakes in each level, and their solutions. +home-sections: +- text: "Many schools and teachers around the world want to teach their students programming. Initially this is often done with playful tools, ranging from the Beebot robot to\nScratch Junior or Scratch. After using such tools, kids often want to move to more powerful, textual programming languages, like Python.\n\nPython however is hard, because it is only available in English, and requires learners to learn complex programming concepts and syntax at once.\nHedy is the easy way to get started with textual programming languages! Hedy is free to use, open source, and unlike any other textual programming language in three ways.\n\n1. Hedy is multi-lingual, you can use Hedy in your own language\n2. Hedy is gradual, so you can learn one concept and its syntax a time\n3. Hedy is built for the classroom, allowing teachers to fully customize their student's experience" + title: Textual programming made easy! +- text: While almost all textual programming language have keywords in English, such as `for` or `repeat`, Hedy can be used in any language! We currently support 47 different languages, including Dutch, Spanish, Arabic, Turkish, Chinese and Hindi. If your language is not available you can always start a new translation. + title: Multi-lingual programming +- text: Learning a programming language can be overwhelming, since learners have to learn concepts (for example if-else or loops) and syntax (like quotation marks or round brackets) at the same time. In Hedy, concepts are first introduced with little syntax and then refined. A scientifically proven way to learn! + title: Step by step learning +- text: "Hedy is suitable for kids aged 10 and up and designed for classroom use.\nTeachers can use our free, built-in lesson plans, but can also author their own lessons and load these into the Hedy user interface." + title: Built for the classroom +- title: Programming in context + text: Hedy shows programming in the broadest way possible, and can be used in variety of exciting ways. Hedy allows for the creation of digital and interactive stories, colorful drawings that can be shown on the screen but also drawn with a pen plotter or embroidered on a shirt, and can be used to create games or apps with buttons and keyboard actions. +- text: "Yes! Hedy is 'Open source', which means that everyone can help us make Hedy better.\nYou can find our code on Github.\nIf you like Hedy and want to contribute, we accept (and are very grateful for) donations!" + title: Is Hedy free? +- title: Do I need to install anything? + text: No. Hedy works in the browser, which is the program you are using to look at this page. Probably Chrome or Edge or Firefox. Hedy also works on phones and tablets. +- text: "No, that is not needed. All concepts are explained in the slides and in the interface for learners.\nIf you create a free teacher's account, you also get access to the teacher's manual with information on how to teach\nand frequently made mistakes." + title: Do I need programming experience to teach with Hedy? +join-sections: +- text: '# There are three ways in which you can support Hedy!' + title: Supporting Hedy +- title: Improving the language + text: "The gradual and multi-lingual nature of Hedy create a lot of interesting technical challenges.\nFind those issues on Github." +- title: Translating Hedy + text: "Not a programmer? No problem! Another way to support Hedy is by translating keywords, error messages, adventures and other content.\nThis is the current status, help us complete a language, or add a new one!\n\n\"Translation" +- text: "Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing.\nIf you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord." + title: Help teachers get started +start-sections: +- text: "Welcome to Hedy, we are happy to help you get started with Hedy.\n\nOur [Teacher Manual](https://www.hedy.org/for-teachers/manual) has an overview of all features in detail, but this page has a brief overview so you know what it what before you dive in.\n\nA few highlights that are important to know:\n* Hedy is a tool designed to help manage a classroom of kids programming! You can create your own classes, lesson plans and follow how kids are doing.\n* You do not need to know a lot of programming if you begin, Hedy works step by step, also for you!\n* You can use Hedy in your native tongue because it has been translated into many other languages!\n* Every kid can programme!! Hedy is especially helpful for kids who have vision problems because it can read material aloud to you without the need for a mouse.\n* We are here to help, you can find us for example on [Discord](https://discord.gg/8yY7dEme9r) or you can [email-us](hello@hedy.org)." + title: Getting started with Hedy +- title: Teachers about Hedy + text: "Various teachers worldwide have expressed their passion for Hedy, as some have shared with us:\n\n*Incredibly inspiring! Super good way to make programming a lot more accessible for yourself, but also for students. Very fun to play with and a lot of potential to use with the students. I think it is a very nice tool! I believe this is a valuable way for children to start learning programming. Python and coding have always been very exciting, because the barrier to learning is very high. Now everything is a bit lower and it was explained that it can actually be very easy. I enjoyed seeing how Hedy tries to make programming as accessible as possible for users!*\nNetherlands: Mathematics teachers in training (secondary school)\n\n*Simple interface and good examples.* Teacher: 3rd - 6th grades (elementary)\n\n*Multilingual programming and just the gradual programming concept itself.* US: middle school, 6th-8th grade\n\n*The gradual nature of introducing programming.* Australia: High school\n\n*Continues automatically.* Netherlands: 2 HAVO-VWO\n\n*Both that the explanation can be in Dutch (and the code in English), and that it builds up with more and more possibilities.* Netherlands: Plus class group\n\n*But Hedy and its gradual levels...what an idea, I wanted to personally thank you for creating this. I cannot thank you enough. Also, I have never seen the level of engagement and enthusiasm of my students, as I have seen with Hedy. We have covered till level 5, and plan to spend one more week on it in classes and labs, before starting Python.* Pakistan\n\n*The 'realness' of programming, it resembles how it is in reality.* Netherlands: Plus class group 4 to 8\n\n*Step-by-step activities. Fun activities.* Netherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\n\n*I really like Hedy very much and it is also nicely set up, which makes it good to use in primary school. Hedy's gradual approach works very well. The short explanation at the beginning of each level and the short example programs help to give the children a quick insight into what is new in the chosen level. The different assignments that the children can choose also work very well. You see the children choose assignments that appeal to them and they then get to work with them, through the levels. Hedy is great fun for children who are good at programming and want to get a taste of a real programming language. It is good preparation for secondary school as soon as more ICT education is given there.* Netherlands: Oegstgeest Montessori school\n\n*The construction is so good.* Netherlands: Lower secondary school HAVO-VWO\n\n*I can keep the pace of the class.* Netherlands: group 7 en 8\n\n![Felienne teaching kids](/images/teacherfeedback/Fkids1.JPG) *Felienne teaching kids*\n\n\n![Kids learning about Hedy](/images/teacherfeedback/Fkids2.JPG) *Kids learning about Hedy*" +learn-more-sections: +- title: The Hedy foundation + text: "Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985.\n\nThe board of the foundation consists of:\n\n * Felienne Hermans, president\n * Eelko Huizing, finance\n * Renée Merbis, secretary\n\nThe board of Stichting Hedy does not get any financial compensation for their tasks. " +- title: A deep dive! + text: "Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022:\n\n" +- title: Hedy in the news + text: "Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here:\n* [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf)\n* [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/)\n* [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26)\n* [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html)\n* [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/)\n* [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf)\n* [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house)\n* [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code)\n* [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf)\n* [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/)\n* [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf)\n* [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/)\n* [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021)\n* [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python)\n* [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles)\n* [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/)\n* [Vives (Dutch), October 2020](images/artikel_vives.pdf) \"Met Hedy stap voor stap leren programmeren\"\n* [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming)\n* [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/)\n* [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy)" +title: Tasemlkt n Hedy diff --git a/content/pages/kmr.yaml b/content/pages/kmr.yaml index 9168f6a7f21..7567230d08e 100644 --- a/content/pages/kmr.yaml +++ b/content/pages/kmr.yaml @@ -52,8 +52,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Join the Hedy Community - text: "We love to hear from you! The best way to get in touch with us is by joining our [Discord server](https://discord.gg/8yY7dEme9r). \n\nYou can also [send us an email](mailto:hello@hedy.org \"About Hedy\")." +- title: The Hedy foundation + text: |- + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -146,7 +155,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ko.yaml b/content/pages/ko.yaml index 369c74e3753..7a812e79835 100644 --- a/content/pages/ko.yaml +++ b/content/pages/ko.yaml @@ -50,11 +50,17 @@ join-sections: Hedy는 수업시간에 프로그래밍 수업을 제공할 때 선생님들을 지원하기 위해 고안되었습니다. 우리는 수업을 만들고, 수업을 맞춤화하고, 선생님의 학생들이 어떻게 하는지 볼 수 있는 옵션과 같은 구체적인 선생님 특징들을 가지고 있습니다. 만약 여러분이 Hedy를 좋아한다면, 선생님들이 시작하는 것을 돕기 위해 여러분이 알고 있는 학교에 연락할 수 있습니다! 우리는 discord를 통해 여러분이 학교나 선생님을 찾는 것을 도울 수 있습니다. learn-more-sections: -- title: Hedy 커뮤니티 참여하기 +- title: The Hedy foundation text: |- - 소식을 들으니 정말 기쁘네요! 저희와 연락할 수 있는 가장 좋은 방법은 디스코드 서버에 가입하는 것입니다. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: 더 자세히 알아보기! text: |- Hedy의 철학과 디자인에 대해 더 알고 싶으신가요? 2022년 Felienne가 StrangeLoop Conference에서 한 강연을 확인해보세요:: @@ -187,7 +193,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/mi.yaml b/content/pages/mi.yaml index e3e1387e2d5..149fab91da3 100644 --- a/content/pages/mi.yaml +++ b/content/pages/mi.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -153,7 +157,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ms.yaml b/content/pages/ms.yaml index 3113142d2d3..89232e39209 100644 --- a/content/pages/ms.yaml +++ b/content/pages/ms.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -194,7 +198,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/nb_NO.yaml b/content/pages/nb_NO.yaml index 5fa80c9ff3d..56eaf7b9109 100644 --- a/content/pages/nb_NO.yaml +++ b/content/pages/nb_NO.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Liker du Hedy? +- title: The Hedy foundation text: |- - Vi vil gjerne høre fra deg! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Klikk her for å sende oss en epost](mailto:hello@hedy.org "About Hedy") -- title: Har du funnet en feil? - text: '[Fortell oss om det på GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Har du lyst til å hjelpe? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Den letteste måten er ved å hjelpe til med [oversettelse av Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Her er nåværende status, hjelp oss å ferdigstille et språk, eller legg til et nytt et. - - Oversettelse-status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -130,7 +155,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ne.yaml b/content/pages/ne.yaml new file mode 100644 index 00000000000..a7f58270399 --- /dev/null +++ b/content/pages/ne.yaml @@ -0,0 +1,567 @@ +title: Hedy documentation +home-sections: +- title: Textual programming made easy! + text: "Many schools and teachers around the world want to teach their students programming. Initially this is often done with playful tools, ranging from the Beebot robot to\nScratch Junior or Scratch. After using such tools, kids often want to move to more powerful, textual programming languages, like Python.\n\nPython however is hard, because it is only available in English, and requires learners to learn complex programming concepts and syntax at once.\nHedy is the easy way to get started with textual programming languages! Hedy is free to use, open source, and unlike any other textual programming language in three ways.\n\n1. Hedy is multi-lingual, you can use Hedy in your own language\n2. Hedy is gradual, so you can learn one concept and its syntax a time\n3. Hedy is built for the classroom, allowing teachers to fully customize their student's experience" +- text: While almost all textual programming language have keywords in English, such as `for` or `repeat`, Hedy can be used in any language! We currently support 47 different languages, including Dutch, Spanish, Arabic, Turkish, Chinese and Hindi. If your language is not available you can always start a new translation. + title: Multi-lingual programming +- text: Learning a programming language can be overwhelming, since learners have to learn concepts (for example if-else or loops) and syntax (like quotation marks or round brackets) at the same time. In Hedy, concepts are first introduced with little syntax and then refined. A scientifically proven way to learn! + title: Step by step learning +- text: "Hedy is suitable for kids aged 10 and up and designed for classroom use.\nTeachers can use our free, built-in lesson plans, but can also author their own lessons and load these into the Hedy user interface." + title: Built for the classroom +- title: Programming in context + text: Hedy shows programming in the broadest way possible, and can be used in variety of exciting ways. Hedy allows for the creation of digital and interactive stories, colorful drawings that can be shown on the screen but also drawn with a pen plotter or embroidered on a shirt, and can be used to create games or apps with buttons and keyboard actions. +- title: Is Hedy free? + text: "Yes! Hedy is 'Open source', which means that everyone can help us make Hedy better.\nYou can find our code on Github.\nIf you like Hedy and want to contribute, we accept (and are very grateful for) donations!" +- title: Do I need to install anything? + text: No. Hedy works in the browser, which is the program you are using to look at this page. Probably Chrome or Edge or Firefox. Hedy also works on phones and tablets. +- title: Do I need programming experience to teach with Hedy? + text: "No, that is not needed. All concepts are explained in the slides and in the interface for learners.\nIf you create a free teacher's account, you also get access to the teacher's manual with information on how to teach\nand frequently made mistakes." +join-sections: +- text: '# There are three ways in which you can support Hedy!' + title: Supporting Hedy +- title: Improving the language + text: "The gradual and multi-lingual nature of Hedy create a lot of interesting technical challenges.\nFind those issues on Github." +- title: Translating Hedy + text: "Not a programmer? No problem! Another way to support Hedy is by translating keywords, error messages, adventures and other content.\nThis is the current status, help us complete a language, or add a new one!\n\n\"Translation" +- title: Help teachers get started + text: "Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing.\nIf you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord." +learn-more-sections: +- title: The Hedy foundation + text: |- + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! + text: "Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022:\n\n" +- title: Hedy in the news + text: "Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here:\n* [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf)\n* [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/)\n* [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26)\n* [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html)\n* [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/)\n* [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf)\n* [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house)\n* [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code)\n* [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf)\n* [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/)\n* [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf)\n* [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/)\n* [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021)\n* [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python)\n* [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles)\n* [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/)\n* [Vives (Dutch), October 2020](images/artikel_vives.pdf) \"Met Hedy stap voor stap leren programmeren\"\n* [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming)\n* [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/)\n* [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy)" +start-sections: +- title: Getting started with Hedy + text: "Welcome to Hedy, we are happy to help you get started with Hedy.\n\nOur [Teacher Manual](https://www.hedy.org/for-teachers/manual) has an overview of all features in detail, but this page has a brief overview so you know what it what before you dive in.\n\nA few highlights that are important to know:\n* Hedy is a tool designed to help manage a classroom of kids programming! You can create your own classes, lesson plans and follow how kids are doing.\n* You do not need to know a lot of programming if you begin, Hedy works step by step, also for you!\n* You can use Hedy in your native tongue because it has been translated into many other languages!\n* Every kid can programme!! Hedy is especially helpful for kids who have vision problems because it can read material aloud to you without the need for a mouse.\n* We are here to help, you can find us for example on [Discord](https://discord.gg/8yY7dEme9r) or you can [email-us](hello@hedy.org)." +- title: Teachers about Hedy + text: "Various teachers worldwide have expressed their passion for Hedy, as some have shared with us:\n\n*Incredibly inspiring! Super good way to make programming a lot more accessible for yourself, but also for students. Very fun to play with and a lot of potential to use with the students. I think it is a very nice tool! I believe this is a valuable way for children to start learning programming. Python and coding have always been very exciting, because the barrier to learning is very high. Now everything is a bit lower and it was explained that it can actually be very easy. I enjoyed seeing how Hedy tries to make programming as accessible as possible for users!*\nNetherlands: Mathematics teachers in training (secondary school)\n\n*Simple interface and good examples.* Teacher: 3rd - 6th grades (elementary)\n\n*Multilingual programming and just the gradual programming concept itself.* US: middle school, 6th-8th grade\n\n*The gradual nature of introducing programming.* Australia: High school\n\n*Continues automatically.* Netherlands: 2 HAVO-VWO\n\n*Both that the explanation can be in Dutch (and the code in English), and that it builds up with more and more possibilities.* Netherlands: Plus class group\n\n*But Hedy and its gradual levels...what an idea, I wanted to personally thank you for creating this. I cannot thank you enough. Also, I have never seen the level of engagement and enthusiasm of my students, as I have seen with Hedy. We have covered till level 5, and plan to spend one more week on it in classes and labs, before starting Python.* Pakistan\n\n*The 'realness' of programming, it resembles how it is in reality.* Netherlands: Plus class group 4 to 8\n\n*Step-by-step activities. Fun activities.* Netherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\n\n*I really like Hedy very much and it is also nicely set up, which makes it good to use in primary school. Hedy's gradual approach works very well. The short explanation at the beginning of each level and the short example programs help to give the children a quick insight into what is new in the chosen level. The different assignments that the children can choose also work very well. You see the children choose assignments that appeal to them and they then get to work with them, through the levels. Hedy is great fun for children who are good at programming and want to get a taste of a real programming language. It is good preparation for secondary school as soon as more ICT education is given there.* Netherlands: Oegstgeest Montessori school\n\n*The construction is so good.* Netherlands: Lower secondary school HAVO-VWO\n\n*I can keep the pace of the class.* Netherlands: group 7 en 8\n\n![Felienne teaching kids](/images/teacherfeedback/Fkids1.JPG) *Felienne teaching kids*\n\n\n![Kids learning about Hedy](/images/teacherfeedback/Fkids2.JPG) *Kids learning about Hedy*" +teacher-guide: +- subsections: + - title: What's Hedy? + text: "Hedy is a textual programming language, specifically developed for (pre-)teens (10 to 15 years old).\nIn contrast to programming languages for kids, like Scratch, Hedy doesn't use code blocks but textual code.\nSo with Hedy you'll learn how to type code like the real programmers do, but in small steps with playful exercises.\nThis way Hedy can function as a stepping stone to real programming languages like Python in an accessible and mostly fun way!\nIf you want to know more, you can watch this video about the development of Hedy as a programming language." + - text: "Hedy is developed with middle school and junior high school students in mind (ages 10 - 15).\nIt's important for the students to be able to read well. We recommend not to start with Hedy before the students have achieved at least a 3rd grade reading level.\nStudents (and teachers!) don't need any programming experience before starting with Hedy." + title: Target audience + - title: How does Hedy work? + text: "Hedy is divided into levels, in which new commands are taught. Each level contains a variety of adventures to practice the newly learned commands.\nAs a teacher, you get to decide which adventures are available for your students. Will they be making a restaurant, a calculator or a haunted house this level? Within each level, the adventures are arranged from easiest to hardest.\nSo your students keep getting challenged. The adventures can be done by the students individually, or you can use them in a classical instruction.\n\nThe adventures also include a code example, to make sure the less digitally informed teachers are able to use Hedy too!\nOf course Hedy also caters to the creative teachers that love to make their own lessonplans and adventures!\n\nAfter programming all the adventures of a certain level, your students can test their knowledge in the quiz.\nYou can track your students' work and their progress on the class page." + - text: "Hedy is web-based, which means it works on any device with a browser (Google Chrome, Firefox, Edge etc), so laptops, Chromebooks, tablets and even smartphones are suitable to use Hedy.\nThere's no need to download anything before working with Hedy, just go to the website and you're all set!" + title: Devices + - title: The Hedy Community + text: "All Hedy teachers, programmers and other fans are welcome to join our Discord server. This is the ideal place to chat about Hedy: we have channels where you can show your cool projects and lessons, channels to report bugs, and channels to chat with other teachers and with the Hedy team.\nHere you can find a video on how to join the Discord Community." + - title: Hedy and the GDPR + text: "Organizations in the EU have to comply with the GDPR (General Data Protection Regulation) when processing personal data.\nBecause this is a complex issue for many schools, you can use all Hedy programming functionalities without sharing personal data.\nThe easiest way to do this is to use Hedy without creating accounts for the teacher and students. Without accounts, all functionality is available, with the exception of personalizing levels, saving students' programs and viewing their progress. That is limiting, but there are schools that use Hedy in that way.\n\nA second way is for a teacher to create an account with an email address without personal data, for example \"docent25@email.com\". Apart from an email address, which is only required to reset your password, you do not need to share any information when you create a teacher account.\nWith a teacher account, you can create anonymous accounts for students, e.g. rainbow-student1, rainbow-student2, etc (See 'Teaching preparations' for a detailed manual). This way you can use all functionality of Hedy, including saving progress, without sharing personal data of yourself or your students.\n\nIf the above is not sufficient for your context, we can sign a processing agreement for the processing of your personal data." + title: Introduction + key: intro +- title: Tutorial + subsections: + - text: Do you want to follow the tutorial (again)? Click here. + title: Tutorial + key: tutorial +- subsections: + - text: You can prepare your classes at the For Teachers page. On this page you'll find everything you'll need to teach with Hedy, like your classes, your adventures and slides. All the functionalities of the for teachers page are explained below. + title: For teachers + - title: Creating a Class + text: "As a teacher, you can create a class for your students. In this class you can see the students' accounts and their programs and you could monitor their progress.\nThis video shows you how to quickly create a class in Hedy." + - title: Duplicate a class + text: "Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see \"Customize your Class\" to learn how) and then duplicate this class as many times as you want.\nYou can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well.\nThe student accounts and second teacher accounts in your class will not be duplicated into the new class." + - title: Add a second teacher + text: "Are you not the only teacher that teaches your class? Then you can now add another teacher to the class. Go to the 'For teachers' page and click on the class. Then choose 'Invite a teacher' and fill in the username of your colleague.\nYour colleague will get an invitation on their account to join your class. They can see that invitation message by clicking on their username in the upper right corner of the screen and selecting 'My account'.\nOnce the other teacher accepts the invitation they can customize the class as well.\nTo remove a second teacher from your class, go to the class page and remove the second teacher. The teacher who's created the class cannot be removed." + - title: Customize your Class + text: "You can customize your class and choose which adventures are available for your students. This way your students won't be overwhelmed by the amount of adventures and levels, and they can specifically focus on the adventures you'd like them to practice with.\nClick on your class on the for teachers page and choose 'customize class'. On this page you can select levels, set opening dates, unlock level thresholds and more.\n\n**Select and order adventures**\n\nIn this section you can select and order adventures. The pink tabs are adventures with new commands. The gray tabs are regular adventures. To rearrange the order of the adventures, you can drag the tabs. However, we do advise you to use the regular order of adventures as the Hedy team made sure the adventures go from easiest to hardest.\nIf you want to remove an adventure for your students, simply click the cross on the adventure's tab.\n\nIf you want to add adventures, for instance your own adventure or an adventure you accidentally removed, use this menu to add the adventure to your students' adventures. Simply click the adventure you want to add and it (re)appears in the line of adventures. To undo all your changes to the adventures, click 'Reset'.\n\n**Opening dates**\n\nWith this feature you can set opening dates for the levels. This way you can make a lesson plan before your course begins and not worry about opening new levels each week. In the image above the first level is opened directly, the second will open the 23th of september, and the 3rd level the week after. The other levels are closed.\nDon't want to set opening dates? No problem, just leave this section blank.\n\n**Unlock level thresholds**\n\nThis featue allows you to set a threshold for your students' quiz grade, before they can continue to the next level. For example, if you enter \"80\" your students have to score at least 80% on the quiz before they are allowed to go to the next level. If they haven't met the threshold, they are not allowed to continue and have to retake the quiz.\nDon't want to use the threshold? No worries, just keep this section blank.\n\n\n**Other settings**\n\nThere are some other setting that could be usefu to you aswell. Our first extra setting is 'Mandatory developer's mode'. In developers mode the students only see their input and output screens and the run button. The adventures are hidden and there are no cheatsheets available. This might come in handy in a test situation.\nIf this option is not selected the developer's mode is available for students too as a voluntary option.\n\nIf you want all your students to be visible in de class highscore, you can select the second option.\nWith all the other options you can choose to hide some functions or content for your students, this might help them focus more.\n\n**Save**\n\nDon't forget to save your changes when you're done customizing your class." + - title: Student Accounts + text: "To add students to your class go to the class page by clicking in the class name on the 'for teachers' page. Then click 'add students'. There are 2 ways to let your students join your class: You can create accounts for them, or they could create their own accounts.\n\n**You create accounts for your students**\nThe easiest way to add students to your class is by creating an account for them. This can be done by clicking the 'create student accounts' button and filling in the usernames and passwords for them.\nThe students can login with the username and password that you chose. Afterwards, they can change their username or password if they'd like and they'll still remain in your class.\nThis video shows how to add students to your class in the quickest and easiest way.\n\n**Students make their own accounts**\nYour students can also go to the Hedy website and create their own accounts, just like you did. To get them into your class, they simply have to click the invite link.\nYou can find the invite link on the class page and send it to your students. Mind that your students have to be logged in to Hedy when they click the link, in order to make it work smoothly.\nYou can also manually invite a student to your class with the button 'Invite by username'." + - title: Setting preferred language + text: "When students create profiles they are supposed to choose a 'preferred language'. Hedy will always be loaded in this selected language.\nChanging this language can always be done later on by navigating to 'My account' and 'My personal settings' again.\n\n**For non-English speakers**\nNot only can you change the language of the adventures to your own language. You can also choose which language the keywords (for example 'print' or 'ask') should be in.\nThis way you can teach your students to code with English keywords, but you can also let them program in their own language. For example, Dutch students can use the command 'vraag' instead of 'ask'.\nIf a student wants to switch languages, they can click the keyword switcher. It will switch the keywords from English to the preferred language and back.\nFun fact! Students are allowed program in both English and their own language at the same time! So, if they have trouble remembering some keywords in English, but easily remember other ones they can use both at the same time.\n\n\n**Video**\nThis video show you how to set a preferred language and change the keywords to you preferred language as well." + - title: Storing programs + text: "When you are logged in, you'll see My programs next to your profile icon.\nThis option exists for your students too. In My programs you can find all the programs that you've worked on.\nBy default, programs will be saved to 'My programs' when you run the code, and every 10 seconds, under their default name\nand their level (for example: Story 5). If you want to store a program under a new name, just type the new name in the name bar.\nCurrently, only one program can be saved per level, per tab.\n\nYou (and your students) can also share programs using the share button next to program names.\nThese programs will be posted on our explore page, for everybody to see and use.\nIf you want to unshare your program, go to 'My programs' and click 'Unshare'.\n\nThe paper plane icon can be used to hand in programs to the teacher of a class. Programs that have been handed is will no longer be editable." + key: preparations + title: Teaching preparations +- subsections: + - title: Teaching with Hedy + text: "Hedy contains a lot of different levels that each teach a different new skill. We recommend to teach one level per lesson.\nThis gives your students the time to fully grasp a new command or concept and practice with it, before moving on to the next level.\nWe use this structure in our lessons: Introduction, New concepts and commands, let's get to work, puzzles and quizzes." + - text: "When giving instructions you might want to use our slides. Our slides are available on the 'For teachers' page. There is a set of slides for each level. In the slides all the new commands for that level are explained. We have aimed to explain why these changes are nessecary or how the new commands come in handy.\nWe also give some examples of how the new commands can be used. You could of course also use your own slides, or just open Hedy and show your students around the website. Whichever you prefer to give the best Hedy lessons!" + title: Slides + - text: "You can start your lessons by activating your students' prior knowledge: What do they already know about the subject, what did they learn in the previous lesson and which mistakes did they make that they've now learned from?\nThis way all the previously learned commands and frequently made mistakes are fresh in your students' memories, when you start introducing the new lesson." + title: Introduction + - title: Introduction of new concepts and commands + text: "The new concepts and commands can be very hard for some students to fully understand.\nThat's why it's of importance to model the proper use of the new commands to your students.\nEspecially in the lower levels, where some students have no experience with programming at all, it can be hard for them to understand the new abstract concepts.\nShowing a lot of examples makes an abstract concept (for instance: 'What is a variable?') more recognizable and easier to understand ('Look, the variable pet changed into dog'). Our slides could help you with that." + - title: Let's get to work + text: "Each level contains different adventures that you can find in the pink tabs. The first pink tab explains the new commands in this level.\nThe following tabs are adventures that the students can try out and make their own.\nThe adventures are arranged from easiest to hardest, so we recommend to start on the left and your your way to the right.\nThe last tab 'what's next' gives a little teaser of what you'll learn in the next level. Of course, you can select the adventures you want your students to do for each level.\nThey don't always have to make every adventure. Every adventure contains an example code, that the students can try out with the green button.\nThe example code gets copied to the workfield, where the students can try out the code and adjust it to make it their own.\nStimulate your students to turn the example code into their own projects by adding their own ideas and making their own variation of the adventure." + - title: Quizzes and puzzles + text: "To test whether your students have picked up all the new info in the level, you can let them take the quiz.\nThe quiz contains 10 multiple choice questions about the new concepts and command to that level.\nNot every level has a quiz yet, as we are still building the quizzes.\nSome levels also contain puzzles. Puzzles show the students a couple of line of code that the students have to put in the right order.\n\nThis video shows the quizzes and puzzles." + - title: Evaluation + text: "Round up your lesson by having a brief evaluation. What did the students learn? Which hardships did they come across?\nHow did they learn from their mistakes? And of course: What did they create?\nStudents are often very proud of their own creations, so it's nice to save a little time and give your students the opportunity to show their work to their classmates." + title: Teaching with Hedy + key: teaching +- key: teacher_statistics + subsections: + - title: Live Dashboard + text: "If you would like to keep track of your students' progress, you can make use of the live dashboard. You can find the live dashboard by clicking 'Live statistics' on your class page.\n\nAll the features of this dashboard are explained below." + - title: Level Selection + text: "\nFirstly, you can select the levels you'd like to see on the dahsboard. Select the levels your students are currently working on by clicking on the number of that level. Deselect levels that you do not want to see by clicking them again.\nIn this example level 1 and 2 are selected. You can click on refresh to refresh the dashboard and get the most current stats." + - title: Class Overview + text: "\nIn the class overview you can see which adventure your students are working on right now. You can see that one student is working on the 'Rock, Paper, Scissors' adventure in level 1, one is working on the 'Fortune Teller' in level 1 and one student is working on the 'Rock, Paper, Scissors' adventure in level 2.\nIf you'd like to know which of your students is working on the adventure, simply click the number and their accountnames will appear.\nYou can also see how many of your students have finished the quiz. In this case, one student finished the quiz in level 1. Again, you can click the 1 to see which of your students it is.\n\nYou can also see one of the students is 'missing' from this overview. That's because he's working on an adventure in level 4, which is not selected." + - title: Student List + text: "\nHere you can find a list of your students and you can see their individual progress. The blue ring shows you what your students are currently working on.\n\nIt is important to notice that the blue dots means that a students 'attempted' the adventure. This means that they ran a code in this adventure and went on to the next adventure, so this does not automatically mean that they did a good job!\nIf you want to see how an individual student is getting along, you can click their name in this overview. This is what you see if you click on marleen_h3a for example:\n\nYou see that Marleen is having some trouble programming. She tried to run a program that contains blanks multiple times, so she might not realize that she has to change the code examples before running them.\nIn this way this overview can give you a better understanding of what a student is struggling with." + - title: Common Errors + text: "\nIf you're not only interested in individual struggles of your students, but you'd like to know what the whole class seems to be doing wrong, you can use this oversight of common errors.\nThe most common error messages that your students are recieving will appear in this oversight for you, so you could give some more instructions to the whole class if needed.\nBy clicking the error, you can see which students are having trouble with this error. By clicking resolve, you'll remove this error from the list." + - text: "\nAnother useful overview of all the programs your students made in a level can be found on your class page. Go to the class page and click 'Overview of programs per adventure'. Here you'll find this overview.\nYou could use this overview to check your students' work. If they have made a program in an adventure, an eye appears in your overview. Click the eye to view their work. Did you like it? Then you can check the box and a green tick will appear.\nThis way you create a nice overview for yourself of your students' results." + title: Overview of programs per adventure + title: Teacher Statistics +- subsections: + - text: It is also possible for teachers to create your own adventure. This video shows you how to create your own adventure as a teacher and add it to your class(es). + title: Make your own adventure + - text: "On the explore page you can view the work of other Hedy users. You can try out their programs and use them as inspiration to create something cool yourself.\nYou can also add a program you've made to the explore page yourself by clicking 'Save and share code' in the coding screen or go to My Programs and click 'Share'.\nDon't want to share your work anymore? Simply go to 'My Programs' and click 'Unshare'.\nIf you want more information about the explore page, check out this video." + title: Explore page + - title: My achievements + text: "If you click on your username in the topright corner of your screen, you can go to My achievements. On this page you achievements are collected. Your students have such a page as well.\nWhen you hover over the badge with your mouse, you'll see how to earn the badge. There are hidden badges too, of which you'll have to find out yourself how to earn them.\nIf you want more information on the achievements, check out this video." + - title: High Scores + text: "On this page you can see the high scores of all Hedy users.\nIn this videoyou can learn some more about the high scores." + - title: Debugger + text: "Is your (student's) code not working? There must be a bug (coding mistake) in it! You can use the debugger to find the mistake.\nThe debugger is the ladybug button in your coding screen. If you press it, you can run your code line by line to find your mistake.\nHave you found the mistake? Press the red stop button and the debugger will shut off." + - title: Read aloud + text: Do you want the output of your program to be read aloud? Then you can use the read aloud function that is found under the 'run code' button in your coding screen. + - title: Programmers mode + text: "Distracted by all the adventures, or do you want to make a long program? Then check out the 'Programmers Mode' switch at the bottom of your coding screen.\nProgrammers mode allows you and your students to use a bigger coding screen." + - text: "In every level there is a button with this emoji 🤔. You and your students can find the \"cheat sheets\" there. On this cheat sheet, you can find all the commands that are usable in this level in their correct form.\nSo if you've forgotten how a command works, simply take a peek at the cheat sheet!" + title: Cheat sheets + - title: Video + text: This video shows you even more features of Hedy, like the cheatsheets and the keyword switcher. + title: Extra Hedy features + key: features +- subsections: + - title: What to do after Hedy? + text: "Congratulations on reaching the end of Hedy! Your students have now learned how to create their own basic programs in the Python programming language.\nOf course, you could keep programming in our Hedy compiler, but it might be more exciting for your students to transfer to a \"real\" Python interface.\nWould you like to continue teaching Python? Then please visit the Python website to learn how to get started in another compiler.\n\nNow that your students have a basic knowledge of programming in general, you could also show them around in other textual programming languages. The language might change but the concepts do not, so Hedy will still give them a big advantage." + title: After Hedy + key: after +- title: Answers to the exercises + key: answers + intro: "The answers to all the exercises can be found on the public profile of the useraccount 'Hedy_answers'. We often encourage students to use their own creativity in their answers, so these answers are merely a guideline as to what a possible correct answer could look like.\n\nTo go to the 'Hedy_answers' profile, please click here." +- key: common_mistakes + levels: + - sections: + - example: + error_code: Hedy can't print this + error_text: For example they type a sentence without using print. + solution_text: Teach your students to always start a line of code with a command. + solution_code: '{print} Hedy can print this!' + title: Students forget to type commands + - example: + solution_code: "{ask} Why does my code work now?\n{print} Because I removed the capitals!" + error_text: Commands won't work if they are in capitals. + error_code: "Ask Why does my code fail?\nPrint Because I'm using capitals." + solution_text: Remove the capitals. + title: Students use capitals when typing commands + - example: + solution_code: "{ask} What's your name?\n{echo} Your name is" + error_code: '{echo} Your name is' + solution_text: Add an ask command to make it work. + error_text: Echo is made to repeat an answer after an ask command. Without ask echo won't do anything. + title: Students use echo without ask + - example: + solution_text: 'In level 1 we have to keep it at this:' + solution_code: "{ask} Which programming language is the most fun?\n{echo} The best is..." + error_code: "{ask} Which programming language is the most fun?\n{echo} is the best!" + error_text: And they are right! That's why they will learn to use proper variables in the next level. + title: Students want their echo word (variable) to be in the middle of a sentence + - example: + solution_text: In the example, students tend to think that the turn command failed; even though it did what it what supossed to. What happened is the turtle walked past the screen limits. Use smaller numbers to prevent this from happening. + solution_code: "{forward} 100\n{turn} 90" + error_text: Often students love to try out big numbers when using the turtle, which causes the arrow to walk off the screen. + error_code: "{forward} 300\n{turn} 90" + title: 'Turtle: Students let the turtle walk off of the screen' + - example: + error_text: Backward is not a command. + error_code: backward 100 + solution_text: 'To make the turtle go backwards, you use the forward command and a negative number. For example:' + solution_code: '{forward} -100' + title: "Turtle: Students use the command backward, but there's no such command." + level: '1' + - sections: + - title: Students make typos in their commands + example: + error_code: prinnt Don't make typos + error_text: Hedy can't recognize a command with a typo. + solution_text: Teach your students to read the error messages. This way they can find out themselves what went wrong. + solution_code: "{print} Don't make typos" + - example: + solution_code: order {is} {ask} What would you like to eat + error_text: In this level students learn about variables. The ask command requires a variable as well, but students forget this. + solution_text: In this level you have to tell Hedy where to save your answer, so it can be used later on. This is called a variable. + error_code: ask what would you like to eat + title: Students forget that the ask command has changed + - example: + error_code: "answer {is} {ask} Why doesn't {echo} work anymore?!\n{echo}" + solution_code: "answer {is} {ask} Why doens't {echo} work anymore?!\n{print} answer" + solution_text: Use a variable instead. + error_text: For some students it might be frustrating to learn that the `{echo}` command doesn't work anymore. That's why it's very important to explain the advantages of using variables. For example you can use multiple variables in a code, and you can put them anywhere you like in a sentence! + title: Students try to use the `{echo}` command + - example: + solution_code: "name {is} Hedy\n{print} Hi I'm name" + solution_text: So don't use a word you want to use in the text as a variable name. In level 4 this is solved with quotation marks. + error_text: In the example below the word 'name' is used as a variable, but also as a normal text. The output of this code will be 'Hi my Hedy is Hedy'. + error_code: "name {is} Hedy\n{print} Hi my name is name" + title: Students use a variable name or as a normal word + - example: + solution_text: Add an underscore. + error_text: A variable should be named with one word. You could use an underscore to connect two words. That counts as one. + error_code: chosen door is ask Which door do you pick + solution_code: chosen_door {is} {ask} which door do you pick + title: Students use long variable names containing two words. + - example: + error_code: "horse {is} {ask} What is your horse called\n{print} Your horse is called name" + solution_code: "name {is} {ask} What is your horse called\n{print} Your horse is called name" + solution_text: Always check whether the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code. + error_text: In this example the student has used 'horse' and 'name' for the same variables. + title: Students might use two different names for the same variable + level: '2' + - sections: + - example: + error_code: "groceries {is} apples, milk, chocolate\n{print} groceries" + solution_text: To print a list of all the groceries, you simply need to put them after a `{print}` command. Else you can use the list to print one item with `{at}` `{random}`. + solution_code: "{print} apples, milk, chocolate\n\n# or\n\ngroceries {is} apples, milk, chocolate\n{print} groceries {at} {random}" + error_text: A list can't be printed. You can only print one item from the list with {at} {random}. + title: Students try to print whole lists + - example: + solution_text: Don't use the names of variables or lists in regular text to print. In level 4 this problem is solved with quotation marks. + solution_code: "name {is} Hedy\n{print} Hi I'm name\n\n# or\n\nanimals {is} rhino, bee, swan\n{print} The best animal is... animals {at} {random}" + error_code: "name {is} Hedy\n{print} Hi my name is name\n\n# or\n\nanimal {is} rhino, bee, swan\n{print} The best animal is... animal {at} {random}" + error_text: This problem probably occured in level 2 as well. Now it can happen with lists too. + title: Students use the name of a variable or list as regular text + - example: + solution_code: "birds {is} sparrow, seagull, robin\n{print} birds {at} {random}" + error_text: Like in the example + error_code: "birds {is} sparrow, seagull, robin\n{print} birds random" + solution_text: This problem is solved by adding the word at. + title: Students forget `{at}` in `{at}` `{random}` + - title: Students forget to use the `{print}` command when also using the `{at}` `{random}` command + example: + error_code: "fruit {is} apple, cherry, banana\nfruit {at} {random}" + solution_text: Emphasize to your students that you always need a print to print text. + error_text: Or they will sometimes put `{at}` `{random}` at the beginning of the line. + solution_code: "fruit {is} apple, cherry, banana\n{print} fruit {at} {random}" + - title: Students forget to use commas in their lists + example: + solution_code: "pizzas {is} funghi, tonno, quattro stagioni\n{print} pizzas {at} {random}" + error_text: In a list items are seperated with a comma. + solution_text: After each item on your list, there should be a comma + error_code: "pizzas {is} funghi tonno quattro stagioni\n{print} pizzas {at} {random}" + - example: + solution_code: "clubs {is} Manchester United, Bayrn Munchen, FC Barcelona\n{print} clubs {at} {random}" + solution_text: Hedy can't print anything at random, because there is no list to choose from. + error_code: "clubs {is} Manchester United\n{print} clubs {at} {random}" + error_text: For example + title: Students try to use `{at}` `{random}` without a list + - example: + error_text: In the example below 'names' is not a list, but a variable. You cannot add anything to it. + solution_code: "names {is} Jake, Amy\nyour_name {is} {ask} Who are you?\n{add} your_name {to} names\n{print} names {at} {random}" + error_code: "names {is} Jake\nyour_name {is} {ask} Who are you?\n{add} your_name {to} names\n{print} names {at} {random}" + solution_text: There has to be a list first, so you have to add a second name to turn names into a list, for example Amy. If you don't want amy on your list, you can use remove to remove it after. + title: Students try to use add/remove without a list + - example: + solution_text: Hedy has to know which list the item should be added to/removed from. + solution_code: "adventures {is} story, parrot, dice\nchoice {is} Which adventure do you like best?\n{add} choice {to_list} adventures\n{remove} dice {from} adventures\n{print} I love adventures {at} {random}" + error_code: "adventures {is} story, parrot, dice\nchoice {is} Which adventure do you like best?\n{add} choice\n{remove} dice\n{print} I love adventures {at} {random}" + error_text: Without to/from the add/remove command won't work. + title: Students forget to use `{to}`/`{from}` in `{add}`/`{remove}` + level: '3' + - sections: + - title: Students forget to use quotation marks on both sides of the text + example: + solution_text: Add the correct quotation marks. + error_text: In this level print and ask need a set of quotation marks. One before of the text and one after. + error_code: "{print} Hello\nmood {is} {ask} 'How are you?" + solution_code: "{print} 'Hello'\nmood {is} {ask} 'How are you?'" + - example: + solution_code: "{print} 'Welcome to the restaurant'\nfood {is} {ask} 'What would you like to order?'" + solution_text: 'These are the correct quotation marks:' + error_code: "{print} `Welcome to the restaurant`\nfood {is} {ask} \"What would you like to order?\"" + error_text: It is important to start your lesson by checking if the students know how to type a quotation mark properly. On Hedy, students might use single quotes ('') and double quotes (""). Backticks on the other hand, are not considered valid quotes (``). + title: Students use the wrong quotation marks + - example: + error_text: From this level on apostrophes are not allowed. They are often used in English when typing contractions like you're, don't or what's. + error_code: "{print} 'You're not allowed to type this'" + solution_text: You can choose to use the wrong grammar and just leave the apostrophe out. Or you could use the ` as an apostrophe. + solution_code: "{print} 'Youre allowed to type this'\n{print} 'And you`re able to do this'" + title: Students use an apostrophe in their text + level: '4' + - sections: + - example: + error_text: After students use `{if}` or `{else}` they forget to use a second command like `{print}` or `{ask}`. + solution_text: Add the print command to fix it. + solution_code: "{if} name {is} Hedy {print} 'Great!'\n{else} {print} 'Hedy is better!'" + error_code: "{if} name {is} Hedy 'Great!'\n{else} Hedy {is} better!" + title: Students forget to use `{print}` in an `{if}` command + - example: + error_code: "horse {is} {ask} 'What is your horse called?'\n{if} name {is} Bonfire {print} 'cool'\n{else} {print} 'less cool!'" + solution_code: "horse {is} {ask} 'What is your horse called'\n{if} horse {is} Bonfire {print} 'cool!'\n{else} {print} 'less cool!'" + solution_text: Always check whether the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code. + error_text: In this example the student has used 'horse' and 'name' for the same variables. + title: Students might use two different names for the same variable + - example: + error_text: Using the `if` command can make the code lines very long and students tend to forget to use quotes. + solution_text: Always use 2 quotes in a print command. + error_code: "{if} name {is} Hedy {print} fun\n{else} {print} 'meh!" + solution_code: "{if} name {is} Hedy {print} 'fun'\n{else} {print} 'meh!'" + title: Students still forget the quotes on both sides + - example: + solution_text: Remove the quotes to get the code to work. + error_text: In this level there are no quotes around variable names. + solution_code: "{if} name {is} Hedy {print} 'fun'\n{else} {print} 'meh!" + error_code: "{if} name {is} 'Hedy' {print} 'fun'\n{else} {print} 'meh!'" + title: Students use quotes around variable names + - example: + solution_text: Add an underscore. + solution_code: chosen_door {is} {ask} 'which door do you pick?' + error_code: chosen door is ask Which door do you pick? + error_text: Variables in Hedy can't contain spaces, so, in order to use together several words, students need to connect them using underscores (_) + title: Students use long variable names containing two or more words + - example: + solution_code: "friends {is} Jesse, David, Souf\nname {is} {ask} 'Who are you?'\n{if} name {in} friends {print} 'You are funny'\n{else} {print} 'You are not funny'\n\n# or\n\nname {is} {ask} 'Who are you?'\n{if} naam {is} Jesse {print} 'You are funny'\n{if} naam {is} David {print} 'You are funny'\n{if} naam {is} Souf {print} 'You are funny'" + error_text: For example this student wants Hedy to tell all his friends that they are funny, while other classmates should be told that they are not. + solution_text: "You could use the `{in}` command for that. While it is explained in a higher level, it does already work in level 5.\nAnother solution is to use multiple `{if}` commands and no `{else}` command. The disadvantage is that it won't tell the other classmates that they are not funny." + error_code: "{if} name {is} Jesse, David, Souf {print} 'You are funny' {else} {print} 'You are not funny'" + title: Students want multiple answers to be correct + - example: + error_text: In the example below the password is 'password'. This will result in it always being correct. + solution_text: Pick a different name for your variable. + solution_code: "secret_password {is} {ask} 'What is the password'\n{if} secret_password {is} password {print} 'Access granted!'\n{else} {print} 'Access denied!'" + error_code: "password {is} {ask} 'What is the password?'\n{if} password {is} password {print} 'Access granted'\n{else} {print} 'Acces denied!'" + title: The students make the variable name the same as the value in the `{if}` statement + level: '5' + - sections: + - example: + error_text: Some students struggle with adding quotation marks or not. If you add quotation marks, the output screen will literally show '5+5'. + solution_code: '{print} 5 + 5' + error_code: "{print} '5 + 5'" + solution_text: In this code the output screen will print '10'. + title: Students struggle with quotation marks + - example: + error_text: 'Some students will find it hard to do maths with variables. Try to show them very simple examples, like:' + solution_code: "price = 0\n{print} 'Welcome to our burger restaurant'\nburger = {ask} 'Would you like a burger?'\n{if} burger = yes price = price + 10\ndrink = {ask} 'Would you like a drink?'\n{if} drink = yes price = price + 4\n{print} 'That will be ' price ' euros please'" + error_code: "age = {ask} 'How old are you?'\n{print} 'Next year you will be ' age + 1" + solution_text: Or take it a step further like this. + title: Students struggle with the concept of doing maths with a variable + level: '6' + - sections: + - example: + solution_text: 'This is the correct code:' + error_code: "{repeat} 3 {times} For he`s a jolly good fellow\n{repeat} 3 print" + solution_code: "{repeat} 3 {times} {print} 'For he`s a jolly good fellow'\n{repeat} 3 {times} {print} 'Which nobody can deny!'" + error_text: Make sure that the students know to use both the full repeat command and the print command. + title: Students forget one of the word of the repeat command, or they forget the print command + - example: + error_text: In this level you can only repeat one line of code multiple times. In this code the student wanted to print 3 different drinks, but it won't work. It will ask the question 3 times and only print the last answer. + error_code: "{repeat} 3 {times} drink = {ask} 'What would you like to drink?'\n{print} drink" + solution_text: You should go to the next level to be able to repeat multiple lines. So on this level you'll have to print everything seperately. + solution_code: "drink = {ask} 'What would you like to drink?'\n{print} drink\ndrink = {ask} 'What would you like to drink?'\n{print} drink\ndrink = {ask} 'What would you like to drink?'\n{print} drink" + title: Students try to repeat multiple lines + - title: Students make programs that take too long to run + example: + solution_text: Make sure the code doesn't take too long to execute + error_text: In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine. + error_code: "{repeat} 100 {times} {print} 'How many times can I repeat this?'" + solution_code: "{repeat} 20 {times} {print} 'This is enough'" + level: '7' + - sections: + - example: + error_code: "{repeat} 3 {times}\n{print} 'hello'" + solution_text: 'This is the correct code:' + solution_code: "{repeat} 3 {times}\n {print} 'hello'" + error_text: Indentation is a new concept in this level, and for some students it might be hard to learn. Make sure they practise some simple examples before making a whole program with it. + title: Students use the indentation wrong + - example: + error_text: For instance, in the code below the student wanted to take the drinks order of 3 people. But instead the program asked 3 times, but only wrote down one order. + solution_code: "{repeat} 3 {times}\n drink = {ask} 'What would you like to drink?'\n {print} drink" + solution_text: "In the correct code the third line starts with indentation too. This way it belongs to the repeat block and therefore it will be repeated 3 times.\nShowing your students these differences can help them understand why we need indentation to make our programs work." + error_code: "{repeat} 3 {times}\n drink = {ask} 'What would you like to drink?'\n{print} drink" + title: Students only repeat 1 line when they wanted to repeat multiple lines + - example: + error_code: "birthday = {ask} 'Is it you birthday?'\n{if} birthday = yes\n {repeat} 3 {times}\n {print} 'Hip Hip Hooray!'" + solution_text: 'This is the correct code for this level:' + error_text: "In this level students aren't allowed yet to put `{if}` statements inside other `{if}` statements or inside repeat loops.\nIn the next level this is allowed." + solution_code: "birthday = {ask} 'Is it you birthday?'\n{if} birthday = yes\n {print} 'Hip Hip Hooray!'\n {print} 'Hip Hip Hooray!'\n {print} 'Hip Hip Hooray!'" + title: Students want to nest `{if}` statements, or put `{if}` statements inside a loop + - example: + error_text: In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine. + solution_code: "{repeat} 20 {times}\n {print} 'This is enough'" + error_code: "{repeat} 100 {times}\n {print} 'How many times can I repeat this?'" + solution_text: Make sure the code doesn't take too long to execute + title: Students make programs that take too long to run + - example: + solution_text: You can fix this mistake by adding quotation marks. This way the computer knows that the second password in `{if} password {is} 'password'` is a string value (so normal text) and not the variable name. + error_code: "password {is} {ask} 'What is the password?'\n{if} password {is} password\n {print} 'You can come in'\n{else}\n {print} 'You are not allowed'" + solution_code: "password {is} {ask} 'What is the password?'\n{if} password {is} 'password'\n {print} 'You can come in'\n{else}\n {print} 'You are not allowed'" + error_text: "We've noticed a common error among our students: they try to create a program that checks for a password, but they make the password 'password'.\nIn line 2 the computer is asked to check whether the variable password is the same as the variable password, so itself. Which means the answer is always yes.\nSo with this code the answer will always be 'You can come in' no matter what the player fills in." + title: Students use the `{if}` command to check if the variable value is the same as the variable name + level: '8' + - sections: + - example: + solution_text: This is the correct code. Try to keep track of all the different constructions when putting `{if}` statements inside other `{if}` statements. + error_text: The hardest part about this level is getting the indentation right. Students love nesting `{if}` statements, sometimes even inside other nested `{if}` statements. Keeping track of indentation can get pretty tough. + error_code: "{print} 'Robin is walking downtown'\nlocation = {ask} 'Is Robin going into a shop, or does she go home?'\n{if} location {is} shop\n {print} 'She enters the shop.'\n {print} 'Robin sees an interesting looking book'\n book = {ask} 'Does Robin buy the book?'\n {if} book {is} yes\n{print} 'Robin buys the book and goes home'\n{else}\n {print} 'Robin leaves the shop and goes home'\n{else}\n {print} 'Robin goes home'" + solution_code: "{print} 'Robin is walking downtown'\nlocation = {ask} 'Is Robin going into a shop, or does she go home?'\n{if} location {is} shop\n {print} 'She enters the shop.'\n {print} 'Robin sees an interesting looking book'\n book = {ask} 'Does Robin buy the book?'\n {if} book {is} yes\n {print} 'Robin buys the book and goes home'\n {else}\n {print} 'Robin leaves the shop and goes home'\n{else}\n {print} 'Robin goes home'" + title: Students make mistakes with indentation + level: '9' + - level: '10' + sections: + - title: Students do not use the `{for}` command correctly + example: + solution_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal" + error_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animals" + error_text: We often see that students try to print the list (in the example animals) instead of the items of the list. + solution_text: The word animals in the last line should be changed into animal. + - example: + error_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n{print} 'I love ' animals" + error_text: Students tend to forget to use indentation after a for command. + solution_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal" + solution_text: You should use indentation after a for command. + title: Students forget the indentation + - sections: + - example: + solution_code: "{for} i {in} {range} 1 {to} 5\n {print} i" + solution_text: 'This is the correct code:' + error_text: Make sure that the students use indentation. + error_code: "{for} i {in} {range} 1 {to} 5\n{print} i" + title: Students forget to use indentation + - example: + error_text: "Some students don't understand that i is a variable. i is chosen, because it is used in Python programming, but you could just as easily use a different variable name.\nFor example, this code:" + solution_text: Could just as well be replaced with this code. It works the same. + solution_code: "{for} banana {in} {range} 1 {to} 5\n {print} banana" + error_code: "{for} i {in} {range} 1 {to} 5\n{print} i" + title: Students don't understand the i + level: '11' + - sections: + - title: Students forget quotation marks + example: + error_text: Students need more quotation marks now than in the previous levels. In this example quotation marks were forgotten in the list and in the `{if}` command. + solution_code: "superheroes = 'Spiderman', 'Batman', 'Iron Man'\nsuperhero = superheroes {at} {random}\n{if} superhero {is} 'Batman'\n {print} 'IM BATMAN!'" + error_code: "superheroes = Spiderman, Batman, Iron Man\nsuperhero = superheroes {at} {random}\n{if} superhero = Batman\n {print} 'IM BATMAN!'" + solution_text: 'This is the correct code:' + - example: + solution_code: "score = 25\nanswer {is} {ask} 'Do you want a point?'\n{if} answer {is} 'yes'\n score = score + 1\n {print} score" + error_text: "You can use quotation marks on numbers, but only if you want the computer to think of them as text. This means you can't do calculations with the number.\nIn the example below, you can't do maths with the number 25, because it's in quotation marks." + solution_text: 'This is the correct code:' + error_code: "score = '25'\nanswer {is} {ask} 'Do you want a point?'\n{if} answer {is} 'yes'\n score = score + 1\n {print} score" + title: Students use quotation marks on numbers they want to use for calculations + - title: Students use commas instead of periods in decimal numbers + example: + solution_code: '{print} 2.5 + 2.5' + error_code: '{print} 2,5 + 2,5' + error_text: Decimal numbers can be used from this level on, but you can't use commas. + solution_text: 'This is the correct code:' + level: '12' + - sections: + - example: + error_text: Both commands might appear similar, but their functions are very different. + solution_text: In this case, the person should answer yes on both questions, so you should use `and`. + solution_code: "game {is} {ask} 'Do you want to play a game?'\ntime {is} {ask} 'Do you have time to play?'\n{if} game {is} 'yes' {and} time {is} 'yes'\n {print} 'Lets play!'" + error_code: "game {is} {ask} 'Do you want to play a game?'\ntime {is} {ask} 'Do you have time to play?'\n{if} game {is} 'yes' {or} time {is} 'yes'\n {print} 'Lets play!'" + title: Students confuse `{and}` with `{or}` + level: '13' + - sections: + - title: Students confuse the < and > signs + example: + error_code: "age = {ask} 'How old are you?'\n{if} age < 12\n {print} 'You are older than I am!'" + solution_text: 'This is the correct code:' + solution_code: "age = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'" + error_text: Often, students are already familiar with these signs from maths class. But if your students don't know these signs yet, they might have a challenge with it. + - title: Students use the wrong signs for `!=` `<=` and `>=` + example: + error_text: These signs are probably new for most students. Make sure to explain these signs to your students. + solution_code: "name = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'" + error_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy'\n {print} 'You are not Hedy'" + solution_text: 'This is the correct code:' + - title: Students forget to use the == sign + example: + error_text: In this level, students are still allowed to use = or is. But on other levels, or in python, they might get in trouble for that. So it is best to train them to use it. + solution_code: "name = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'" + solution_text: 'This is the correct code:' + error_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy'\n {print} 'You are cool!'" + level: '14' + - sections: + - example: + solution_text: 'This is the correct code:' + solution_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'" + error_text: Indentation is often hard for students. + error_code: "answer = 0\n{while} answer != 25\nanswer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'" + title: Students forget indentation in the while loop + level: '15' + - sections: + - example: + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + solution_text: 'This is the correct code:' + error_code: "icecream = 'starwberry', 'chocolate'\n{print} 'I love ' icecream[{random}] ' icecream'" + error_text: From this level on lists should be in brackets. + title: Students forget the brackets + - example: + error_text: From this level on lists should be in brackets. + solution_text: 'This is the correct code:' + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + error_code: "icecream = ('starwberry', 'chocolate')\n{print} 'I love ' icecream[{random}] ' icecream'" + title: Students use the wrong brackets + - title: Students forget the quotation marks while focussing on the brackets + example: + solution_text: 'This is the correct code:' + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + error_code: "icecream = [starwberry, chocolate]\n{print} 'I love ' icecream[{random}] ' icecream'" + - example: + error_code: "icecream = [starwberry, chocolate]\n{print} 'I love ' icecream at random ' icecream'" + solution_text: 'This is the correct code:' + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + title: Students still use the old at random command + - example: + solution_code: "icecream = ['starwberry', 'chocolate']\n{print} 'I love ' icecream[{random}] ' icecream'" + error_code: "icecream = [starwberry, chocolate]\n{print} 'I love ' icecream[{random}] ' icecream'" + solution_text: 'This is the correct code:' + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + title: Students forget the quotation marks while focussing on the brackets + level: '16' + - level: '17' + sections: + - example: + solution_text: 'This is the correct code:' + error_text: The `{elif}` command needs a condition behind it. It cannot be used like `{else}`, without a condition. + solution_code: "color = {ask} 'What is your favorite color?'\n{if} color == 'green':\n {print} 'green is nice'\n{elif} color == yellow:\n {print} 'yellow is alright'\n{else}:\n {print} 'I like green'" + error_code: "color = ask 'What is your favorite color?'\n{if} color == 'green':\n {print} 'green is nice'\n{elif}:\n {print} 'I like green'" + title: Students use `{elif}` like `{else}`, so without a condition + - example: + solution_code: "answer = {ask} 'How are you doing?'\n{if} answer {is} 'great':\n {print} 'Me too!'\n{elif} answer {is} 'bad':\n {print} 'Let me cheer you up!'\n{else}:\n {print} 'Im great!'" + solution_text: 'This is the correct code:' + error_text: After each command that requires indentation, a colon should be used. + error_code: "answer = ask 'How are you doing?'\n{if} answer {is} 'great'\n {print} 'Me too!'\n{elif} answer {is} 'bad'\n {print} 'Let me cheer you up!'\n{else}\n {print} 'Im great!'" + title: Students forget the colon + - sections: + - example: + error_text: Students will forget to put brackets around their text. + error_code: "{print} 'my name is Hedy!'" + solution_code: "{print}('my name is Hedy!')" + solution_text: 'This is the correct code:' + title: Students forget to use the brackets + - example: + solution_code: "{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)" + error_code: "{print}('My name is Hedy!')\nname = ask('What is your name?')\n{print}('So your name is ', name)" + solution_text: 'This is the correct code:' + error_text: The ask command has been used since level 1. So it might be hard for the students to switch to input instead of ask. + title: Students will still use the ask command + - title: Students might use the brackets as quotation marks + example: + solution_code: "temperature = 25\n{print}('It is ', temperature, 'degrees outside')" + error_text: They have learned to keep the variables outside of the quotation marks, so they might do the same with the brackets. Which is not the correct way to use them. + error_code: "temperature = 25\n{print}('It is ') temperature ('degrees outside')" + solution_text: 'This is the correct code:' + level: '18' + title: Common mistakes + intro: You can learn from your mistakes, especially in coding! Making mistakes is unavoidable, and a great opportunity to learn, but for teachers, it can be a challenge to find the correct fix for a mistake! Especially as the programs get longer and longer as the students progress through the levels. That's why we've made a list with frequently made mistakes in each level, and their solutions. diff --git a/content/pages/nl.yaml b/content/pages/nl.yaml index c8e80613768..1b41d0df9e9 100644 --- a/content/pages/nl.yaml +++ b/content/pages/nl.yaml @@ -52,46 +52,47 @@ join-sections: Hedy is gemaakt voor docenten, zodat ze makkelijk programmeerlessen kunnen geven op school. Kan jij al programmeren? Dan kan je misschien een school in de buurt helpen te beginnen met Hedy. Op onze Discord kunnen we je koppelen aan docenten. learn-more-sections: -- title: Kom ons helpen bij Hedy (!) +- title: Stichting Hedy text: |- - We zouden het leuk vinden om iets van jou te horen! De beste manier om met ons te kletsen is op onze [Discord server](https://discord.gg/8yY7dEme9r), + Het Hedy plaform wordt beheerd door de Stichting Hedy, Sportmanstaat 8, 2341 JG Oegstgeest, KvK nummer 94013985. - maar je kan ons ook [een mailtje sturen](mailto:hello@hedy.org "Over Hedy")! + Het bestuur van Stichting Hedy bestaat uit: - Als je op de hoogte wilt blijven van het laatste nieuws, kun jij je [inschrijven voor onze nieuwsbrief](/subscribe). -- title: We duiken dieper! - text: |- - Wil je meer weten over de filosofie en het ontwerp van Hedy? + * Felienne Hermans, voorzitter + * Eelko Huizing, penningmeester + * Renée Merbis, secretaris - Geef het door via Github. -- title: Hedy in het nieuws + Het bestuur voert haar functie op vrijwillige basis uit en ontvangt geen salaris of andere beloning voor de verrichte werkzaamheden. De bestuursleden hebben recht op een onkostenvergoeding die zijn gemaakt voor het uitoefenen van de functie. + +- title: We duiken nog dieper! text: |- Wil je meer weten? Felienne gaf een praatje op de European Code Week 2020 (in het Engels): - +- title: Hedy in het nieuws + text: |- Websites en nieuwsbrieven hebben geschreven over Hedy sinds onze uitgifte in begin 2020. We houden hier een lijst bij: - * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) - * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) - * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) - * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) - * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) - * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) - * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) - * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) - * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) - * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) - * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) - * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) - * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) - * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) - * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) - * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) - * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" - * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) - * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) - * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Beginnen met Hedy text: |- @@ -412,7 +413,7 @@ teacher-guide: subsections: - title: Wat kun je doen na Hedy? text: |- - Gefeliciteerd met het uitspelen van Hedy! Je leerlingen hebben nu geleerd om hun eigen codes te creëren in Python. + Gefeliciteerd met het uitspelen van Hedy! Je leerlingen hebben nu geleerd om hun eigen programma's te creëren in Python. Uiteraard kun je blijven doorgaan in Hedy, maar het is voor de leerlingen misschien interessant om over te stappen op een "echte" Python compiler. Wil je doorgaan in Pyhton? Bekijk dan deze Pythonwebsite om te leren hoe je verder kunt in een andere compiler. @@ -427,9 +428,7 @@ teacher-guide: - title: Veelgemaakte fouten key: common_mistakes intro: |- - Van fouten kun je leren en dat geldt al helemaal bij programmeren! - Fouten maken is onvermijdelijk en helemaal niet erg, maar het kan als leerkracht soms nog knap lastig zijn om foutjes van leerlingen op te sporen en op te lossen. - Vooral als de codes door de levels heen almaar langer worden... Daarom hebben wij hier per level een lijst gemaakt van de meest gemaakte fouten door leerlingen en de oplossingen. + Van fouten kun je leren en dat geldt al helemaal bij programmeren! Fouten maken is onvermijdelijk en helemaal niet erg, maar het kan als leerkrachten soms nog knap lastig zijn om foutjes van leerlingen op te sporen en op te lossen. Vooral als de programma's almaar langer worden, wanneer de leerlingen hogere levels bereiken. Daarom hebben wij hier per level een lijst gemaakt van de meest gemaakte fouten en de oplossingen. levels: - level: "1" sections: @@ -437,14 +436,14 @@ teacher-guide: example: error_text: Zo vergeten leerlingen het print commando vaak. error_code: Hedy kan dit niet printen - solution_text: Leer de leerlingen aan om altijd te beginnen met een commando + solution_text: Leer de leerlingen aan om altijd te beginnen met een commando. solution_code: "{print} Hedy kan dit wel printen!" - title: Leerlingen typen commando's met hoofdletters example: error_text: Commando's werken niet als zij getypt worden met een hoofdletter. error_code: |- Ask Waarom werkt mijn code niet? - Print Er moeten geen hoofdletters bij de commando's + Print Er moeten geen hoofdletters bij de commando's. solution_text: Haal de hoofdletters weg. solution_code: |- {ask} Waarom werkt mijn code nu wel? @@ -466,18 +465,18 @@ teacher-guide: solution_text: "In level 1 moeten we het hier op houden:" solution_code: |- {ask} Wat is de leukste programmeertaal? - {echo} De beste is + {echo} De beste is... - title: "Tekenschildpad: Leerlingen laten het pijltje uit beeld lopen" example: error_text: Vaak vinden leerlingen het leuk om hoge getallen uit te testen in de turtle, waardoor het pijltje uit beeld loopt. error_code: |- {forward} 300 {turn} 90 - solution_text: Ze denken dat het turn commando niet werkt, terwijl het pijltje al buiten beeld is. + solution_text: Leerlingen denken dat het turn commando niet werkt, ondanks dat het doet wat het moest doen. Wat er gebeurde is dat het pijltje al buiten het beeld is gekomen. Gebruik kleinere getallen om dat te voorkomen. solution_code: |- {forward} 100 {turn} 90 - - title: "Tekenschildpad: Leerlingen weten niet hoe de schildpad achteruit moet lopen" + - title: "Tekenschildpad: Leerlingen gebruiken het commando \"backward\", maar er is helemaal niet zo'n commando." example: error_text: Achteruit lopen doet de turtle met mingetallen. Dit kan verwarrend zijn voor leerlingen. error_code: backward 100 @@ -551,7 +550,7 @@ teacher-guide: boodschappen {is} appels, melk, chocolade {print} boodschappen {at} {random} - - title: Leerlingen gebruiken de naam van een variabele of lijstje in een printcommando als woord. + - title: Leerlingen gebruiken de naam van een variabele of lijstje in een printcommando als woord example: error_text: In het voorbeeld hieronder wordt 'naam' gebruikt als variabele, maar ook als gewone tekst. De uitveor van deze code wordt 'hoi mijn Hedy is Hedy', wat natuurlijk niet de bedoeling is. error_code: |- @@ -573,15 +572,15 @@ teacher-guide: {print} het leukste dier is... dieren {at} {random} - title: Leerlingen maken spelfouten in at random of vergeten een van de twee woorden example: - error_text: Zo worden add en at soms verward. Of wordt at vergeten. + error_text: Zo worden add en at soms verward. Of wordt at vergeten error_code: |- dieren {is} hond, koe, meeuw {print} dieren add random - solution_text: Dit probleem wordt opgelost door de correcte spelling te gebruiken + solution_text: Dit probleem wordt opgelost door de correcte spelling te gebruiken. solution_code: |- dieren {is} hond, koe, meeuw {print} dieren {at} {random} - - title: Leerlingen vergeten het print commando te gebruiken bij een at random. + - title: Leerlingen vergeten het print commando te gebruiken bij een at random example: error_text: Soms zetten leerlingen at random aan het begin van de zin, of ze vergeten het print commando. error_code: |- @@ -597,11 +596,11 @@ teacher-guide: error_code: |- pizzas {is} funghi tonno quattro stagioni {print} pizzas {at} {random} - solution_text: Na elk item in een lijst komt een komma. + solution_text: Na elk item in een lijst, komt er een komma solution_code: |- pizzas {is} funghi, tonno, quattro stagioni {print} pizzas {at} {random} - - title: Leerlingen proberen het at random commando te gebruiken zonder lijst. + - title: Leerlingen proberen het `{at}` `{random}` commando te gebruiken zonder een lijst example: error_text: Zoals in het voorbeeld hieronder error_code: |- @@ -625,7 +624,7 @@ teacher-guide: jouw_naam {is} {ask} Hoe heet jij? {add} jouw_naam {to_list} namen {print} namen {at} {random} - - title: Leerlingen vergeten het to en from gedeelte van add en remove. + - title: Leerlingen vergeten het `{to}` of `{from}` gedeelte van `{add}` of `{remove}` example: error_text: Bij add hoort to en bij remove hoort from. error_code: |- @@ -655,7 +654,7 @@ teacher-guide: naam {is} {ask} 'Hoe heet jij?' - title: Leerlingen gebruiken de verkeerde aanhalingstekens example: - error_text: Het is van belang om aan het begin van de les te demonstreren hoe je het correcte aanhalingsteken typt. Veel leerlingen weten dit teken namelijk nog niet te vinden op hun toetsenbord en kiezen dan een schuin aanhalingsteken of de dubbele aanhalingstekens. + error_text: Het is van belang om aan het begin van de les te demonstreren hoe je het correcte aanhalingsteken typt. Veel leerlingen weten dit teken namelijk nog niet te vinden op hun toetsenbord en kiezen dan een enkele aanhalingsteken ('') of de dubbele aanhalingstekens (""). Enkele schuine aanhalingstekens (``) zijn geen geldige aanhalingstekens op Hedy. error_code: |- {print} `Welkom in het restaurant` eten {is} {ask} "Wat wil je bestellen?" @@ -678,7 +677,7 @@ teacher-guide: error_text: Nadat de leerlingen een if of else hebben gebruikt, vergeten ze vaak dat print nog steeds nodig is. error_code: |- {if} naam {is} Hedy 'Mooi!' - {else} 'Lelijk!' + {else} Hedy {is} Lelijk! solution_text: Voeg print toe om de code kloppend te maken. solution_code: |- {if} naam {is} Hedy {print} 'Mooi!' @@ -695,7 +694,7 @@ teacher-guide: paard {is} {ask} 'Hoe heet jouw paard?' {if} paard {is} Bonfire {print} 'leuk' {else} {print} 'minder leuk!' - - title: Leerlingen vergeten beide aanhalingstekens bij de print commando's. + - title: Leerlingen vergeten beide aanhalingstekens bij een print commando example: error_text: Leerlingen vergeten vaak een aanhalingsteken aan het einde van hun tekst bij een print commando, vooral als dat print commando in een if commando staat. error_code: |- @@ -705,7 +704,7 @@ teacher-guide: solution_code: |- {if} naam {is} Hedy {print} 'leuk' {else} {print} 'minder leuk!' - - title: Leerlingen gebruiken aanhalingstekens rond de naam van de variabele. + - title: Leerlingen gebruiken aanhalingstekens rond de naam van de variabele example: error_text: Er moeten (in dit level) geen aanhalingstekens om een variabele. error_code: |- @@ -715,21 +714,20 @@ teacher-guide: solution_code: |- {if} naam {is} Hedy {print} 'leuk' {else} {print} 'minder leuk! - - title: Leerlingen geven variabelen namen met meerdere woorden. + - title: Leerlingen geven variabelen namen bestaande uit meerdere woorden example: error_text: |- - Je mag variabelen geen naam geven met twee woorden. Het moet altijd één woord zijn. - In het voorbeeld hieronder heeft een leerling de variabele bijvoorbeeld 'gekozen deur' genoemd. Dit is fout. + In Hedy mag variabelen geen naam geven met spaties er in, of uit meerdere woorden. Een variabele moet altijd uit één woord bestaan. Leerlingen kunnen wel meerdere woorden verbinden met een liggend streepje (_), het underscore teken. Bijvoorbeeld 'gekozen_deur' (_) error_code: gekozen deur is ask Welke deur kies jij? solution_text: Voeg een laag streepje toe aan de variabelenaam. Zo wordt het gerekend als één woord. solution_code: gekozen_deur {is} {ask} 'Welke deur kies jij?' - title: Leerlingen willen dat bij de if meerdere antwoorden goed zijn example: error_text: Leerlingen willen vaak graag dat er meerdere antwoorden 'goed' zijn. In het voorbeeld hieronder wil de leerling bijvoorbeeld dat Hedy tegen hem en zijn vrienden zegt dat ze grappig zijn en tegen alle andere leerlingen dat ze niet grappig zijn. - error_code: "{if} naam {is} Jesse, David, Souf print jij bent grappig {else} {print} 'jij bent niet grappig'" + error_code: "{if} naam {is} Jesse, David, Souf {print} 'jij bent grappig' {else} {print} 'jij bent niet grappig'" solution_text: |- - Je kunt hierbij het `in` commando uitleggen. Dit wordt pas in hogere levels aangeleerd, maar werkt op level 5 wel al. - Een andere oplossing is om alleen if commando's te gebruiken. Het nadeel is dat Hedy zonder else commando natuurlijk geen antwoord geeft als je een andere naam hebt dan Jesse, David of Souf. + Je kunt hierbij het `{in}` commando uitleggen. Dit wordt pas in latere hogere levels aangeleerd, maar werkt op level 5 wel al. + Een andere oplossing is om alleen `{if}` commando's te gebruiken, zonder een `{else}` commando. Het nadeel is dat Hedy zonder else commando natuurlijk geen antwoord geeft als je een andere naam hebt dan Jesse, David of Souf. solution_code: |- vrienden {is} Jesse, David, Souf naam {is} {ask} 'Wie ben jij?' @@ -865,9 +863,9 @@ teacher-guide: - title: Students use the if command to check if the variable value is the same as the variable name example: error_text: |- - We have seen this mistake by some of our students. They make a password for their computer, but they make the password 'password'. - In line 2 the computer is asked to check wheter the variable password is the same as the variable password, so itself. Which means the answer is alway yes. - So with this code the answer will always be 'You can come in' no matter what the player fills in. + We hebben een gemeenschappelijke fout onder onze studenten gemerkt, ze proberen een programma te creëren dat een wachtwoord controleert, maar ze maken het wachtwoord 'password'. + In lijn 2 wordt de computer gevraagd te controleren of het variabele wachtwoord hetzelfde is als het variabele wachtwoord, dus zelf. Wat betekent dat het antwoord altijd ja is. + Dus met deze code is het antwoord altijd 'je kunt binnenkomen' wat de speler ook invult. error_code: |- password {is} {ask} 'What is the password?' {if} password {is} password @@ -915,7 +913,7 @@ teacher-guide: {print} 'Robin goes home' - level: "10" sections: - - title: Students so not use the for command correctly + - title: Leerlingen gebruiken het `{for}` commando niet correct example: error_text: We often see that students try to print the list (in the example animals) instead of the items of the list. error_code: |- @@ -1005,7 +1003,7 @@ teacher-guide: solution_code: "{print} 2.5 + 2.5" - level: "13" sections: - - title: Students confuse `and` with `or` + - title: Leerlingen verwarren`{and}` met `{or}` example: error_text: Both commands might appear similar, but their functions are very different. error_code: |- diff --git a/content/pages/pa_PK.yaml b/content/pages/pa_PK.yaml index bc0eae3d967..69ab96143d2 100644 --- a/content/pages/pa_PK.yaml +++ b/content/pages/pa_PK.yaml @@ -52,22 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Code week talk + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Want to know more about Hedy? Check out this talk Felienne gave at the European Code Week 2020: + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - -start-sections: -- title: Getting started with Hedy - text: '*Something about teachers accounts, slides etc*' -- title: What other teachers say - text: "A while ago we ran a few short Hedy teachers surveys. \nThe questions span between suggestions of improvement and Hedy’s best features. \nBelow is a testimony of their thoughts:\n\nSimple interface and good examples. *Teacher: 3rd - 6th grades (elementary)*\n\nMultilingual programming and just the gradual programming concept itself. - *US: middle school, 6th-8th grade*\n\nThe gradual nature of introducing programming. *Australia: High school*\n\nThe construction is so good. *Netherlands: Lower secondary school HAVO-VWO*\n\nI can keep the pace of the class. *Netherlands: group 7 en 8* \n\nContinues automatically. *Netherlands: 2 HAVO-VWO*\n\nBoth that the explanation can be in Dutch (and the code in English), and that it builds up with more \nand more possibilities. *Netherlands: Plus class group 7*\n\nThe 'realness' of programming, it resembles how it is in reality. *Netherlands: Plus class group 4 to 8*\n\nStep-by-step activities. Fun activities. *Netherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO*\n\nBut Hedy and its gradual levels... what an idea, \nI wanted to personally thank you for creating this. I cannot thank you enough. Also, I have never seen the level of engagement and enthusiasm of my \nstudents, as I have seen with Hedy. We have covered till level 5, and plan to spend one more week on it in classes and labs, \nbefore starting Python. *Pakistan*\n\nI really like Hedy very much and it is also nicely set up, which makes it good to use in primary school. \nHedy's gradual approach works very well. \nThe short explanation at the beginning of each level and the short example programs help to give the children a quick insight into what is new in the chosen level. \nThe different assignments that the children can choose also work very well. \nYou see the children choose assignments that appeal to them and they then get to work with them, \nthrough the levels. Hedy is great fun for children who are good at programming and want to get a \ntaste of a real programming language. It is good preparation for secondary school as soon as more ICT \neducation is given there. *Netherlands: Oegstgeest Montessori school*\n\n" + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy)start-sections: teacher-guide: - title: Introduction key: intro @@ -130,7 +153,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- @@ -1120,3 +1143,8 @@ teacher-guide: solution_code: |- temperature = 25 {print}('It is ', temperature, 'degrees outside') +start-sections: +- title: Getting started with Hedy + text: "Welcome to Hedy, we are happy to help you get started with Hedy.\n\nOur [Teacher Manual](https://www.hedy.org/for-teachers/manual) has an overview of all features in detail, but this page has a brief overview so you know what it what before you dive in.\n\nA few highlights that are important to know:\n* Hedy is a tool designed to help manage a classroom of kids programming! You can create your own classes, lesson plans and follow how kids are doing.\n* You do not need to know a lot of programming if you begin, Hedy works step by step, also for you!\n* You can use Hedy in your native tongue because it has been translated into many other languages!\n* Every kid can programme!! Hedy is especially helpful for kids who have vision problems because it can read material aloud to you without the need for a mouse.\n* We are here to help, you can find us for example on [Discord](https://discord.gg/8yY7dEme9r) or you can [email-us](hello@hedy.org)." +- title: Teachers about Hedy + text: "Various teachers worldwide have expressed their passion for Hedy, as some have shared with us:\n\n*Incredibly inspiring! Super good way to make programming a lot more accessible for yourself, but also for students. Very fun to play with and a lot of potential to use with the students. I think it is a very nice tool! I believe this is a valuable way for children to start learning programming. Python and coding have always been very exciting, because the barrier to learning is very high. Now everything is a bit lower and it was explained that it can actually be very easy. I enjoyed seeing how Hedy tries to make programming as accessible as possible for users!*\nNetherlands: Mathematics teachers in training (secondary school)\n\n*Simple interface and good examples.* Teacher: 3rd - 6th grades (elementary)\n\n*Multilingual programming and just the gradual programming concept itself.* US: middle school, 6th-8th grade\n\n*The gradual nature of introducing programming.* Australia: High school\n\n*Continues automatically.* Netherlands: 2 HAVO-VWO\n\n*Both that the explanation can be in Dutch (and the code in English), and that it builds up with more and more possibilities.* Netherlands: Plus class group\n\n*But Hedy and its gradual levels...what an idea, I wanted to personally thank you for creating this. I cannot thank you enough. Also, I have never seen the level of engagement and enthusiasm of my students, as I have seen with Hedy. We have covered till level 5, and plan to spend one more week on it in classes and labs, before starting Python.* Pakistan\n\n*The 'realness' of programming, it resembles how it is in reality.* Netherlands: Plus class group 4 to 8\n\n*Step-by-step activities. Fun activities.* Netherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\n\n*I really like Hedy very much and it is also nicely set up, which makes it good to use in primary school. Hedy's gradual approach works very well. The short explanation at the beginning of each level and the short example programs help to give the children a quick insight into what is new in the chosen level. The different assignments that the children can choose also work very well. You see the children choose assignments that appeal to them and they then get to work with them, through the levels. Hedy is great fun for children who are good at programming and want to get a taste of a real programming language. It is good preparation for secondary school as soon as more ICT education is given there.* Netherlands: Oegstgeest Montessori school\n\n*The construction is so good.* Netherlands: Lower secondary school HAVO-VWO\n\n*I can keep the pace of the class.* Netherlands: group 7 en 8\n\n![Felienne teaching kids](/images/teacherfeedback/Fkids1.JPG) *Felienne teaching kids*\n\n\n![Kids learning about Hedy](/images/teacherfeedback/Fkids2.JPG) *Kids learning about Hedy*" diff --git a/content/pages/pap.yaml b/content/pages/pap.yaml index e3e1387e2d5..149fab91da3 100644 --- a/content/pages/pap.yaml +++ b/content/pages/pap.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -153,7 +157,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/peo.yaml b/content/pages/peo.yaml index c138ae0aa4e..f32d84651f2 100644 --- a/content/pages/peo.yaml +++ b/content/pages/peo.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -194,7 +198,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/pl.yaml b/content/pages/pl.yaml index fbd5f92e47d..1ef748de710 100644 --- a/content/pages/pl.yaml +++ b/content/pages/pl.yaml @@ -52,17 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Czy lubisz Hedy? +- title: The Hedy foundation text: |- - Podziel się z nami swoją opinią! - [Kliknij tutaj aby wysłać do nas wiadomość](mailto:hello@hedy.org "O Hedy") -- title: Found a bug? - text: "[Daj nam znać na GitHubie](https://github.com/hedyorg/hedy/issues/new/choose)" -- title: Co tygodniowa pogadanka nad kodem + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Chcesz się dowiedzieć więcej o Hedy? Zobacz wystąpienie Felienne na "European Code Week 2020" (po Angielsku): + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: "*Something about teachers accounts, slides etc*" @@ -168,7 +196,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/pt_BR.yaml b/content/pages/pt_BR.yaml index 98256cdd1a1..124d7143f1e 100644 --- a/content/pages/pt_BR.yaml +++ b/content/pages/pt_BR.yaml @@ -47,13 +47,22 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Junte-se à comunidade Hedy +- title: The Hedy foundation text: |- - Adoraríamos ouvir de você! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Clique aqui para nos enviar uma mensagem](mailto:hello@hedy.org "Hedy") -- title: Um mergulho profundo! - text: '[Passe adiante via GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! + text: |- + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: + + - title: Hedy nas notícias text: |- Alguns sites e jornais escreveram sobre Hedy desde nosso lançamento no início de 2020. Mantemos uma lista aqui: @@ -152,7 +161,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/pt_PT.yaml b/content/pages/pt_PT.yaml index d09079f2993..d1f7c473429 100644 --- a/content/pages/pt_PT.yaml +++ b/content/pages/pt_PT.yaml @@ -51,18 +51,19 @@ join-sections: Hedy está desenhada para apoiar professores na tarefa de ensinar programação na sala de aula. Temos funcionalidades específicas para professores, tais como a opção de criar uma turma, customizá-la e acompanhar a evolução dos seus alunos. Se gostas da Hedy, podes contactar escolas que conheces e oferecer-te para ajudar os professores a começar! Nós também te podemos ajudar a encontrar escolas ou professores através do Discord. learn-more-sections: -- title: Junta-te à comunidade Hedy +- title: The Hedy foundation text: |- - Queremos saber o que pensas! A melhor forma para nos contactares é através do Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - Também podes enviar-nos um email(mailto:hello@hedy.org "About Hedy"). - - Para te manteres informado(a), [subscreve a nossa newsletter](/subscribe). -- title: Um mergulho profundo! - text: 'Queres saber mais sobre a filosofia de Hedy e o seu design? Aproveita para dar uma vista de olhos por esta conferência que a Felienne deu no StrangeLoop em 2022. + The board of the foundation consists of: + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary - ' + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: Um mergulho profundo! + text: 'Queres saber mais sobre a filosofia de Hedy e o seu design? Aproveita para dar uma vista de olhos por esta conferência que a Felienne deu no StrangeLoop em 2022. ' - title: Hedy nas notícias text: |- Algumas páginas de internet e jornais escreveram sobre a Hedy desde o nosso lançamento no início de 2020. Mantemos uma lista aqui: diff --git a/content/pages/ro.yaml b/content/pages/ro.yaml index 568c03fb82a..123bbca3c58 100644 --- a/content/pages/ro.yaml +++ b/content/pages/ro.yaml @@ -52,8 +52,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Join the Hedy Community - text: "We love to hear from you! The best way to get in touch with us is by joining our [Discord server](https://discord.gg/8yY7dEme9r). \n\nYou can also [send us an email](mailto:hello@hedy.org \"About Hedy\")." +- title: The Hedy foundation + text: |- + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -148,7 +157,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ru.yaml b/content/pages/ru.yaml index c11cfd8a128..0b089ec5bc6 100644 --- a/content/pages/ru.yaml +++ b/content/pages/ru.yaml @@ -49,13 +49,17 @@ join-sections: Hedy предназначен для поддержки учителей при проведении уроков программирования в классе. У нас есть специальные функции для учителей, например, возможность создать класс, настроить его и посмотреть, что делают ваши ученики. Если вам нравится Hedy, вы можете обратиться в школы, которые вы знаете, чтобы помочь учителям начать работу! Мы можем помочь вам найти школы или учителей через [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Присоединяйтесь к сообществу Hedy +- title: The Hedy foundation text: |- - Мы любим получать от вас новости! Лучший способ связаться с нами — это присоединиться к нашему серверу в Discord + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - Вы также можете [отправить нам электронное письмо](mailto:hello@hedy.org «О Хеди»). + The board of the foundation consists of: - Чтобы быть в курсе последних новостей, [подпишитесь на нашу рассылку](/subscribe). + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: Глубокое погружение! text: |- Хотите узнать больше о философии и дизайне Hedy? Посмотрите выступление Фелиенн на конференции StrangeLoop в 2022 году: diff --git a/content/pages/sl.yaml b/content/pages/sl.yaml index ece4fba5307..3ef0df08e74 100644 --- a/content/pages/sl.yaml +++ b/content/pages/sl.yaml @@ -26,8 +26,17 @@ join-sections: - title: Help teachers get started text: "Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing.\nIf you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord." learn-more-sections: -- title: Join the Hedy Community - text: "We love to hear from you! The best way to get in touch with us is by joining our Discord server.\n\nYou can also [send us an email](mailto:hello@hedy.org \"About Hedy\").\n\nTo stay on top of the latest news, [subscribe to our newsletter](/subscribe)." +- title: The Hedy foundation + text: |- + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: "Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022:\n\n" - title: Hedy in the news @@ -66,7 +75,7 @@ teacher-guide: - title: Creating a Class text: "As a teacher, you can create a class for your students. In this class you can see the students' accounts and their programs and you could monitor their progress.\nThis video shows you how to quickly create a class in Hedy." - title: Duplicate a class - text: "Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see \"Customize your Class\" to learn how) and then duplicate this class as many times as you want.\nYou can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well.\nThe student accounts and second teacher accounts in your class will not be duplicated into the new class." + text: "Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see \"Customize your Class\" to learn how) and then duplicate this class as many times as you want.\nYou can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well.\nThe student accounts and second teacher accounts in your class will not be duplicated into the new class." - title: Add a second teacher text: "Are you not the only teacher that teaches your class? Then you can now add another teacher to the class. Go to the 'For teachers' page and click on the class. Then choose 'Invite a teacher' and fill in the username of your colleague.\nYour colleague will get an invitation on their account to join your class. They can see that invitation message by clicking on their username in the upper right corner of the screen and selecting 'My account'.\nOnce the other teacher accepts the invitation they can customize the class as well.\nTo remove a second teacher from your class, go to the class page and remove the second teacher. The teacher who's created the class cannot be removed." - title: Customize your Class diff --git a/content/pages/sq.yaml b/content/pages/sq.yaml index bc0eae3d967..501de458e26 100644 --- a/content/pages/sq.yaml +++ b/content/pages/sq.yaml @@ -52,17 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Code week talk + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Want to know more about Hedy? Check out this talk Felienne gave at the European Code Week 2020: + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -130,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/sr.yaml b/content/pages/sr.yaml index 2a07a344b09..84e58901f9d 100644 --- a/content/pages/sr.yaml +++ b/content/pages/sr.yaml @@ -51,8 +51,17 @@ join-sections: Hedy је дизајниран да подржи наставнике у пружању часова програмирања у учионици. Имамо специфичне функције за наставнике као што је опција за креирање разреда, прилагођавање и праћење напретка ученика. Ако вам се свиђа Hedy, можете контактирати школе које познајете да помогнете наставницима да започну! Можемо вам помоћи да пронађете школе или наставнике преко Discord-а. learn-more-sections: -- title: Придружите се Hedy заједници - text: "Волимо да чујемо ваше мишљење! Најбољи начин да нас контактирате је придруживањем нашем Discord серверу.\n\nТакође нам можете [послати имејл](mailto:hello@hedy.org \"О Hedy\").\n\nДа бисте били у току са најновијим вестима, [претплатите се на наш билтен](/subscribe)." +- title: The Hedy foundation + text: |- + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: Дубинско истраживање! text: |- Желите да сазнате више о Hedy филозофији и дизајну? Погледајте овај говор који је Felienne одржала на StrangeLoop конференцији 2022. године: @@ -163,9 +172,9 @@ teacher-guide: Овај видео вам показује како брзо креирати разред у Хедију. - title: Дуплирање разреда text: |- - Да ли предајете више разреда? Тада не морате прилагођавати сваки разред појединачно. Једноставно направите разред, прилагодите разред (погледајте "Прилагоди свој разред" да бисте сазнали како) и затим дуплирајте овај разред колико год пута желите. - Можете дуплирати разред на страници 'За наставнике'. Ако дуплирате разред, сва подешавања разреда ће бити дуплирана. То значи да ће сви нивои и авантуре које сте учинили недоступним за први разред сада бити недоступни и за нови разред(е). - Налози ученика и други наставнички налози у вашем разреду неће бити дуплирани у нови разред. + Да ли предајете више часова? Онда не морате да прилагодите сваки час појединачно. Једноставно направите час, прилагодите час (погледајте "Прилагодите вашу класу" да научите како) и затим дуплирајте овај час колико год пута желите. + Можете дуплирати час укључено на 'За наставнике' страницу. Ако дуплирате час, сва подешавања часа су такође дуплирана. То значи да сви нивои и авантуре које сте учинили недоступним за први час ће сада бити недоступни и за нови час(ове). + Налози ученика и налози другог учитеља у вашој класи неће бити дуплирани у нови час. - title: Додавање другог наставника text: |- Да ли нисте једини наставник који предаје ваш разред? Сада можете додати још једног наставника у разред. Идите на страницу 'За наставнике' и кликните на разред. Затим изаберите 'Позови наставника' и унесите корисничко име вашег колеге. diff --git a/content/pages/sv.yaml b/content/pages/sv.yaml index 7a89e9fe3bc..511a568a57e 100644 --- a/content/pages/sv.yaml +++ b/content/pages/sv.yaml @@ -51,11 +51,17 @@ join-sections: Hedy är utformat för att hjälpa lärare att ge programmeringslektioner i klassrummet. Vi har särskilda lärarfunktioner som möjligheten att skapa en klass, anpassa den och följa dina elever. Om du gillar Hedy kan du nå ut till skolor som du känner för att hjälpa lärare att komma igång! Vi kan hjälpa dig att hitta skolor eller lärare via Discord. learn-more-sections: -- title: Gå med i Hedy-gemenskapen +- title: The Hedy foundation text: |- - Vi vill gärna höra från dig! Det bästa sättet att komma i kontakt med oss är att gå med i vår Discord-server . + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - Du kan också [skicka ett mejl till oss] (mailto:hello@hedy.org "Om Hedy"). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: En djupdykning! text: |- Vill du veta mer om Hedys filosofi och design? Kolla in det här föredraget som Felienne höll på StrangeLoop-konferensen 2022: @@ -188,7 +194,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/sw.yaml b/content/pages/sw.yaml index 0ec62363e0d..0c1d9ad2b36 100644 --- a/content/pages/sw.yaml +++ b/content/pages/sw.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Want to help? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -133,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ta.yaml b/content/pages/ta.yaml new file mode 100644 index 00000000000..74434afb1fd --- /dev/null +++ b/content/pages/ta.yaml @@ -0,0 +1,1187 @@ +title: Hedy documentation +home-sections: +- title: Textual programming made easy! + text: |- + Many schools and teachers around the world want to teach their students programming. Initially this is often done with playful tools, ranging from the Beebot robot to + Scratch Junior or Scratch. After using such tools, kids often want to move to more powerful, textual programming languages, like Python. + + Python however is hard, because it is only available in English, and requires learners to learn complex programming concepts and syntax at once. + Hedy is the easy way to get started with textual programming languages! Hedy is free to use, open source, and unlike any other textual programming language in three ways. + + 1. Hedy is multi-lingual, you can use Hedy in your own language + 2. Hedy is gradual, so you can learn one concept and its syntax a time + 3. Hedy is built for the classroom, allowing teachers to fully customize their student's experience +- title: Multi-lingual programming + text: While almost all textual programming language have keywords in English, such as `for` or `repeat`, Hedy can be used in any language! We currently support 47 different languages, including Dutch, Spanish, Arabic, Turkish, Chinese and Hindi. If your language is not available you can always start a new translation. +- title: Step by step learning + text: Learning a programming language can be overwhelming, since learners have to learn concepts (for example if-else or loops) and syntax (like quotation marks or round brackets) at the same time. In Hedy, concepts are first introduced with little syntax and then refined. A scientifically proven way to learn! +- title: Built for the classroom + text: |- + Hedy is suitable for kids aged 10 and up and designed for classroom use. + Teachers can use our free, built-in lesson plans, but can also author their own lessons and load these into the Hedy user interface. +- title: Programming in context + text: Hedy shows programming in the broadest way possible, and can be used in variety of exciting ways. Hedy allows for the creation of digital and interactive stories, colorful drawings that can be shown on the screen but also drawn with a pen plotter or embroidered on a shirt, and can be used to create games or apps with buttons and keyboard actions. +- title: Is Hedy free? + text: |- + Yes! Hedy is 'Open source', which means that everyone can help us make Hedy better. + You can find our code on Github. + If you like Hedy and want to contribute, we accept (and are very grateful for) donations! +- title: Do I need to install anything? + text: No. Hedy works in the browser, which is the program you are using to look at this page. Probably Chrome or Edge or Firefox. Hedy also works on phones and tablets. +- title: Do I need programming experience to teach with Hedy? + text: |- + No, that is not needed. All concepts are explained in the slides and in the interface for learners. + If you create a free teacher's account, you also get access to the teacher's manual with information on how to teach + and frequently made mistakes. +join-sections: +- title: Supporting Hedy + text: '# There are three ways in which you can support Hedy!' +- title: Improving the language + text: |- + The gradual and multi-lingual nature of Hedy create a lot of interesting technical challenges. + Find those issues on Github. +- title: Translating Hedy + text: |- + Not a programmer? No problem! Another way to support Hedy is by translating keywords, error messages, adventures and other content. + This is the current status, help us complete a language, or add a new one! + + Translation status +- title: Help teachers get started + text: |- + Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. + If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. +learn-more-sections: +- title: The Hedy foundation + text: |- + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! + text: |- + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: + + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) +start-sections: +- title: Getting started with Hedy + text: |- + Welcome to Hedy, we are happy to help you get started with Hedy. + + Our [Teacher Manual](https://www.hedy.org/for-teachers/manual) has an overview of all features in detail, but this page has a brief overview so you know what it what before you dive in. + + A few highlights that are important to know: + * Hedy is a tool designed to help manage a classroom of kids programming! You can create your own classes, lesson plans and follow how kids are doing. + * You do not need to know a lot of programming if you begin, Hedy works step by step, also for you! + * You can use Hedy in your native tongue because it has been translated into many other languages! + * Every kid can programme!! Hedy is especially helpful for kids who have vision problems because it can read material aloud to you without the need for a mouse. + * We are here to help, you can find us for example on [Discord](https://discord.gg/8yY7dEme9r) or you can [email-us](hello@hedy.org). +- title: Teachers about Hedy + text: |- + Various teachers worldwide have expressed their passion for Hedy, as some have shared with us: + + *Incredibly inspiring! Super good way to make programming a lot more accessible for yourself, but also for students. Very fun to play with and a lot of potential to use with the students. I think it is a very nice tool! I believe this is a valuable way for children to start learning programming. Python and coding have always been very exciting, because the barrier to learning is very high. Now everything is a bit lower and it was explained that it can actually be very easy. I enjoyed seeing how Hedy tries to make programming as accessible as possible for users!* + Netherlands: Mathematics teachers in training (secondary school) + + *Simple interface and good examples.* Teacher: 3rd - 6th grades (elementary) + + *Multilingual programming and just the gradual programming concept itself.* US: middle school, 6th-8th grade + + *The gradual nature of introducing programming.* Australia: High school + + *Continues automatically.* Netherlands: 2 HAVO-VWO + + *Both that the explanation can be in Dutch (and the code in English), and that it builds up with more and more possibilities.* Netherlands: Plus class group + + *But Hedy and its gradual levels...what an idea, I wanted to personally thank you for creating this. I cannot thank you enough. Also, I have never seen the level of engagement and enthusiasm of my students, as I have seen with Hedy. We have covered till level 5, and plan to spend one more week on it in classes and labs, before starting Python.* Pakistan + + *The 'realness' of programming, it resembles how it is in reality.* Netherlands: Plus class group 4 to 8 + + *Step-by-step activities. Fun activities.* Netherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO + + *I really like Hedy very much and it is also nicely set up, which makes it good to use in primary school. Hedy's gradual approach works very well. The short explanation at the beginning of each level and the short example programs help to give the children a quick insight into what is new in the chosen level. The different assignments that the children can choose also work very well. You see the children choose assignments that appeal to them and they then get to work with them, through the levels. Hedy is great fun for children who are good at programming and want to get a taste of a real programming language. It is good preparation for secondary school as soon as more ICT education is given there.* Netherlands: Oegstgeest Montessori school + + *The construction is so good.* Netherlands: Lower secondary school HAVO-VWO + + *I can keep the pace of the class.* Netherlands: group 7 en 8 + + ![Felienne teaching kids](/images/teacherfeedback/Fkids1.JPG) *Felienne teaching kids* + + + ![Kids learning about Hedy](/images/teacherfeedback/Fkids2.JPG) *Kids learning about Hedy* +teacher-guide: +- title: Introduction + key: intro + subsections: + - title: What's Hedy? + text: |- + Hedy is a textual programming language, specifically developed for (pre-)teens (10 to 15 years old). + In contrast to programming languages for kids, like Scratch, Hedy doesn't use code blocks but textual code. + So with Hedy you'll learn how to type code like the real programmers do, but in small steps with playful exercises. + This way Hedy can function as a stepping stone to real programming languages like Python in an accessible and mostly fun way! + If you want to know more, you can watch this video about the development of Hedy as a programming language. + - title: Target audience + text: |- + Hedy is developed with middle school and junior high school students in mind (ages 10 - 15). + It's important for the students to be able to read well. We recommend not to start with Hedy before the students have achieved at least a 3rd grade reading level. + Students (and teachers!) don't need any programming experience before starting with Hedy. + - title: How does Hedy work? + text: |- + Hedy is divided into levels, in which new commands are taught. Each level contains a variety of adventures to practice the newly learned commands. + As a teacher, you get to decide which adventures are available for your students. Will they be making a restaurant, a calculator or a haunted house this level? Within each level, the adventures are arranged from easiest to hardest. + So your students keep getting challenged. The adventures can be done by the students individually, or you can use them in a classical instruction. + + The adventures also include a code example, to make sure the less digitally informed teachers are able to use Hedy too! + Of course Hedy also caters to the creative teachers that love to make their own lessonplans and adventures! + + After programming all the adventures of a certain level, your students can test their knowledge in the quiz. + You can track your students' work and their progress on the class page. + - title: Devices + text: |- + Hedy is web-based, which means it works on any device with a browser (Google Chrome, Firefox, Edge etc), so laptops, Chromebooks, tablets and even smartphones are suitable to use Hedy. + There's no need to download anything before working with Hedy, just go to the website and you're all set! + - title: The Hedy Community + text: |- + All Hedy teachers, programmers and other fans are welcome to join our Discord server. This is the ideal place to chat about Hedy: we have channels where you can show your cool projects and lessons, channels to report bugs, and channels to chat with other teachers and with the Hedy team. + Here you can find a video on how to join the Discord Community. + - title: Hedy and the GDPR + text: |- + Organizations in the EU have to comply with the GDPR (General Data Protection Regulation) when processing personal data. + Because this is a complex issue for many schools, you can use all Hedy programming functionalities without sharing personal data. + The easiest way to do this is to use Hedy without creating accounts for the teacher and students. Without accounts, all functionality is available, with the exception of personalizing levels, saving students' programs and viewing their progress. That is limiting, but there are schools that use Hedy in that way. + + A second way is for a teacher to create an account with an email address without personal data, for example "docent25@email.com". Apart from an email address, which is only required to reset your password, you do not need to share any information when you create a teacher account. + With a teacher account, you can create anonymous accounts for students, e.g. rainbow-student1, rainbow-student2, etc (See 'Teaching preparations' for a detailed manual). This way you can use all functionality of Hedy, including saving progress, without sharing personal data of yourself or your students. + + If the above is not sufficient for your context, we can sign a processing agreement for the processing of your personal data. +- title: Tutorial + key: tutorial + subsections: + - title: Tutorial + text: Do you want to follow the tutorial (again)? Click here. +- title: Teaching preparations + key: preparations + subsections: + - title: For teachers + text: You can prepare your classes at the For Teachers page. On this page you'll find everything you'll need to teach with Hedy, like your classes, your adventures and slides. All the functionalities of the for teachers page are explained below. + - title: Creating a Class + text: |- + As a teacher, you can create a class for your students. In this class you can see the students' accounts and their programs and you could monitor their progress. + This video shows you how to quickly create a class in Hedy. + - title: Duplicate a class + text: |- + Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. + The student accounts and second teacher accounts in your class will not be duplicated into the new class. + - title: Add a second teacher + text: |- + Are you not the only teacher that teaches your class? Then you can now add another teacher to the class. Go to the 'For teachers' page and click on the class. Then choose 'Invite a teacher' and fill in the username of your colleague. + Your colleague will get an invitation on their account to join your class. They can see that invitation message by clicking on their username in the upper right corner of the screen and selecting 'My account'. + Once the other teacher accepts the invitation they can customize the class as well. + To remove a second teacher from your class, go to the class page and remove the second teacher. The teacher who's created the class cannot be removed. + - title: Customize your Class + text: |- + You can customize your class and choose which adventures are available for your students. This way your students won't be overwhelmed by the amount of adventures and levels, and they can specifically focus on the adventures you'd like them to practice with. + Click on your class on the for teachers page and choose 'customize class'. On this page you can select levels, set opening dates, unlock level thresholds and more. + + **Select and order adventures** + + In this section you can select and order adventures. The pink tabs are adventures with new commands. The gray tabs are regular adventures. To rearrange the order of the adventures, you can drag the tabs. However, we do advise you to use the regular order of adventures as the Hedy team made sure the adventures go from easiest to hardest. + If you want to remove an adventure for your students, simply click the cross on the adventure's tab. + + If you want to add adventures, for instance your own adventure or an adventure you accidentally removed, use this menu to add the adventure to your students' adventures. Simply click the adventure you want to add and it (re)appears in the line of adventures. To undo all your changes to the adventures, click 'Reset'. + + **Opening dates** + + With this feature you can set opening dates for the levels. This way you can make a lesson plan before your course begins and not worry about opening new levels each week. In the image above the first level is opened directly, the second will open the 23th of september, and the 3rd level the week after. The other levels are closed. + Don't want to set opening dates? No problem, just leave this section blank. + + **Unlock level thresholds** + + This featue allows you to set a threshold for your students' quiz grade, before they can continue to the next level. For example, if you enter "80" your students have to score at least 80% on the quiz before they are allowed to go to the next level. If they haven't met the threshold, they are not allowed to continue and have to retake the quiz. + Don't want to use the threshold? No worries, just keep this section blank. + + + **Other settings** + + There are some other setting that could be usefu to you aswell. Our first extra setting is 'Mandatory developer's mode'. In developers mode the students only see their input and output screens and the run button. The adventures are hidden and there are no cheatsheets available. This might come in handy in a test situation. + If this option is not selected the developer's mode is available for students too as a voluntary option. + + If you want all your students to be visible in de class highscore, you can select the second option. + With all the other options you can choose to hide some functions or content for your students, this might help them focus more. + + **Save** + + Don't forget to save your changes when you're done customizing your class. + - title: Student Accounts + text: |- + To add students to your class go to the class page by clicking in the class name on the 'for teachers' page. Then click 'add students'. There are 2 ways to let your students join your class: You can create accounts for them, or they could create their own accounts. + + **You create accounts for your students** + The easiest way to add students to your class is by creating an account for them. This can be done by clicking the 'create student accounts' button and filling in the usernames and passwords for them. + The students can login with the username and password that you chose. Afterwards, they can change their username or password if they'd like and they'll still remain in your class. + This video shows how to add students to your class in the quickest and easiest way. + + **Students make their own accounts** + Your students can also go to the Hedy website and create their own accounts, just like you did. To get them into your class, they simply have to click the invite link. + You can find the invite link on the class page and send it to your students. Mind that your students have to be logged in to Hedy when they click the link, in order to make it work smoothly. + You can also manually invite a student to your class with the button 'Invite by username'. + - title: Setting preferred language + text: |- + When students create profiles they are supposed to choose a 'preferred language'. Hedy will always be loaded in this selected language. + Changing this language can always be done later on by navigating to 'My account' and 'My personal settings' again. + + **For non-English speakers** + Not only can you change the language of the adventures to your own language. You can also choose which language the keywords (for example 'print' or 'ask') should be in. + This way you can teach your students to code with English keywords, but you can also let them program in their own language. For example, Dutch students can use the command 'vraag' instead of 'ask'. + If a student wants to switch languages, they can click the keyword switcher. It will switch the keywords from English to the preferred language and back. + Fun fact! Students are allowed program in both English and their own language at the same time! So, if they have trouble remembering some keywords in English, but easily remember other ones they can use both at the same time. + + + **Video** + This video show you how to set a preferred language and change the keywords to you preferred language as well. + - title: Storing programs + text: |- + When you are logged in, you'll see My programs next to your profile icon. + This option exists for your students too. In My programs you can find all the programs that you've worked on. + By default, programs will be saved to 'My programs' when you run the code, and every 10 seconds, under their default name + and their level (for example: Story 5). If you want to store a program under a new name, just type the new name in the name bar. + Currently, only one program can be saved per level, per tab. + + You (and your students) can also share programs using the share button next to program names. + These programs will be posted on our explore page, for everybody to see and use. + If you want to unshare your program, go to 'My programs' and click 'Unshare'. + + The paper plane icon can be used to hand in programs to the teacher of a class. Programs that have been handed is will no longer be editable. +- title: Teaching with Hedy + key: teaching + subsections: + - title: Teaching with Hedy + text: |- + Hedy contains a lot of different levels that each teach a different new skill. We recommend to teach one level per lesson. + This gives your students the time to fully grasp a new command or concept and practice with it, before moving on to the next level. + We use this structure in our lessons: Introduction, New concepts and commands, let's get to work, puzzles and quizzes. + - title: Slides + text: |- + When giving instructions you might want to use our slides. Our slides are available on the 'For teachers' page. There is a set of slides for each level. In the slides all the new commands for that level are explained. We have aimed to explain why these changes are nessecary or how the new commands come in handy. + We also give some examples of how the new commands can be used. You could of course also use your own slides, or just open Hedy and show your students around the website. Whichever you prefer to give the best Hedy lessons! + - title: Introduction + text: |- + You can start your lessons by activating your students' prior knowledge: What do they already know about the subject, what did they learn in the previous lesson and which mistakes did they make that they've now learned from? + This way all the previously learned commands and frequently made mistakes are fresh in your students' memories, when you start introducing the new lesson. + - title: Introduction of new concepts and commands + text: |- + The new concepts and commands can be very hard for some students to fully understand. + That's why it's of importance to model the proper use of the new commands to your students. + Especially in the lower levels, where some students have no experience with programming at all, it can be hard for them to understand the new abstract concepts. + Showing a lot of examples makes an abstract concept (for instance: 'What is a variable?') more recognizable and easier to understand ('Look, the variable pet changed into dog'). Our slides could help you with that. + - title: Let's get to work + text: |- + Each level contains different adventures that you can find in the pink tabs. The first pink tab explains the new commands in this level. + The following tabs are adventures that the students can try out and make their own. + The adventures are arranged from easiest to hardest, so we recommend to start on the left and your your way to the right. + The last tab 'what's next' gives a little teaser of what you'll learn in the next level. Of course, you can select the adventures you want your students to do for each level. + They don't always have to make every adventure. Every adventure contains an example code, that the students can try out with the green button. + The example code gets copied to the workfield, where the students can try out the code and adjust it to make it their own. + Stimulate your students to turn the example code into their own projects by adding their own ideas and making their own variation of the adventure. + - title: Quizzes and puzzles + text: |- + To test whether your students have picked up all the new info in the level, you can let them take the quiz. + The quiz contains 10 multiple choice questions about the new concepts and command to that level. + Not every level has a quiz yet, as we are still building the quizzes. + Some levels also contain puzzles. Puzzles show the students a couple of line of code that the students have to put in the right order. + + This video shows the quizzes and puzzles. + - title: Evaluation + text: |- + Round up your lesson by having a brief evaluation. What did the students learn? Which hardships did they come across? + How did they learn from their mistakes? And of course: What did they create? + Students are often very proud of their own creations, so it's nice to save a little time and give your students the opportunity to show their work to their classmates. +- title: Teacher Statistics + key: teacher_statistics + subsections: + - title: Live Dashboard + text: |- + If you would like to keep track of your students' progress, you can make use of the live dashboard. You can find the live dashboard by clicking 'Live statistics' on your class page. + + All the features of this dashboard are explained below. + - title: Level Selection + text: |- + + Firstly, you can select the levels you'd like to see on the dahsboard. Select the levels your students are currently working on by clicking on the number of that level. Deselect levels that you do not want to see by clicking them again. + In this example level 1 and 2 are selected. You can click on refresh to refresh the dashboard and get the most current stats. + - title: Class Overview + text: |- + + In the class overview you can see which adventure your students are working on right now. You can see that one student is working on the 'Rock, Paper, Scissors' adventure in level 1, one is working on the 'Fortune Teller' in level 1 and one student is working on the 'Rock, Paper, Scissors' adventure in level 2. + If you'd like to know which of your students is working on the adventure, simply click the number and their accountnames will appear. + You can also see how many of your students have finished the quiz. In this case, one student finished the quiz in level 1. Again, you can click the 1 to see which of your students it is. + + You can also see one of the students is 'missing' from this overview. That's because he's working on an adventure in level 4, which is not selected. + - title: Student List + text: |- + + Here you can find a list of your students and you can see their individual progress. The blue ring shows you what your students are currently working on. + + It is important to notice that the blue dots means that a students 'attempted' the adventure. This means that they ran a code in this adventure and went on to the next adventure, so this does not automatically mean that they did a good job! + If you want to see how an individual student is getting along, you can click their name in this overview. This is what you see if you click on marleen_h3a for example: + + You see that Marleen is having some trouble programming. She tried to run a program that contains blanks multiple times, so she might not realize that she has to change the code examples before running them. + In this way this overview can give you a better understanding of what a student is struggling with. + - title: Common Errors + text: |- + + If you're not only interested in individual struggles of your students, but you'd like to know what the whole class seems to be doing wrong, you can use this oversight of common errors. + The most common error messages that your students are recieving will appear in this oversight for you, so you could give some more instructions to the whole class if needed. + By clicking the error, you can see which students are having trouble with this error. By clicking resolve, you'll remove this error from the list. + - title: Overview of programs per adventure + text: |- + + Another useful overview of all the programs your students made in a level can be found on your class page. Go to the class page and click 'Overview of programs per adventure'. Here you'll find this overview. + You could use this overview to check your students' work. If they have made a program in an adventure, an eye appears in your overview. Click the eye to view their work. Did you like it? Then you can check the box and a green tick will appear. + This way you create a nice overview for yourself of your students' results. +- title: Extra Hedy features + key: features + subsections: + - title: Make your own adventure + text: It is also possible for teachers to create your own adventure. This video shows you how to create your own adventure as a teacher and add it to your class(es). + - title: Explore page + text: |- + On the explore page you can view the work of other Hedy users. You can try out their programs and use them as inspiration to create something cool yourself. + You can also add a program you've made to the explore page yourself by clicking 'Save and share code' in the coding screen or go to My Programs and click 'Share'. + Don't want to share your work anymore? Simply go to 'My Programs' and click 'Unshare'. + If you want more information about the explore page, check out this video. + - title: My achievements + text: |- + If you click on your username in the topright corner of your screen, you can go to My achievements. On this page you achievements are collected. Your students have such a page as well. + When you hover over the badge with your mouse, you'll see how to earn the badge. There are hidden badges too, of which you'll have to find out yourself how to earn them. + If you want more information on the achievements, check out this video. + - title: High Scores + text: |- + On this page you can see the high scores of all Hedy users. + In this videoyou can learn some more about the high scores. + - title: Debugger + text: |- + Is your (student's) code not working? There must be a bug (coding mistake) in it! You can use the debugger to find the mistake. + The debugger is the ladybug button in your coding screen. If you press it, you can run your code line by line to find your mistake. + Have you found the mistake? Press the red stop button and the debugger will shut off. + - title: Read aloud + text: Do you want the output of your program to be read aloud? Then you can use the read aloud function that is found under the 'run code' button in your coding screen. + - title: Programmers mode + text: |- + Distracted by all the adventures, or do you want to make a long program? Then check out the 'Programmers Mode' switch at the bottom of your coding screen. + Programmers mode allows you and your students to use a bigger coding screen. + - title: Cheat sheets + text: |- + In every level there is a button with this emoji 🤔. You and your students can find the "cheat sheets" there. On this cheat sheet, you can find all the commands that are usable in this level in their correct form. + So if you've forgotten how a command works, simply take a peek at the cheat sheet! + - title: Video + text: This video shows you even more features of Hedy, like the cheatsheets and the keyword switcher. +- title: After Hedy + key: after + subsections: + - title: What to do after Hedy? + text: |- + Congratulations on reaching the end of Hedy! Your students have now learned how to create their own basic programs in the Python programming language. + Of course, you could keep programming in our Hedy compiler, but it might be more exciting for your students to transfer to a "real" Python interface. + Would you like to continue teaching Python? Then please visit the Python website to learn how to get started in another compiler. + + Now that your students have a basic knowledge of programming in general, you could also show them around in other textual programming languages. The language might change but the concepts do not, so Hedy will still give them a big advantage. +- title: Answers to the exercises + key: answers + intro: |- + The answers to all the exercises can be found on the public profile of the useraccount 'Hedy_answers'. We often encourage students to use their own creativity in their answers, so these answers are merely a guideline as to what a possible correct answer could look like. + + To go to the 'Hedy_answers' profile, please click here. +- title: Common mistakes + key: common_mistakes + intro: |- + You can learn from your mistakes, especially in coding! Making mistakes is unavoidable, and a great opportunity to learn, but for teachers, it can be a challenge to find the correct fix for a mistake! Especially as the programs get longer and longer as the students progress through the levels. That's why we've made a list with frequently made mistakes in each level, and their solutions. + levels: + - level: '1' + sections: + - title: Students forget to type commands + example: + error_text: For example they type a sentence without using print. + error_code: Hedy can't print this + solution_text: Teach your students to always start a line of code with a command. + solution_code: '{print} Hedy can print this!' + - title: Students use capitals when typing commands + example: + error_text: Commands won't work if they are in capitals. + error_code: |- + Ask Why does my code fail? + Print Because I'm using capitals. + solution_text: Remove the capitals. + solution_code: |- + {ask} Why does my code work now? + {print} Because I removed the capitals! + - title: Students use echo without ask + example: + error_text: Echo is made to repeat an answer after an ask command. Without ask echo won't do anything. + error_code: '{echo} Your name is' + solution_text: Add an ask command to make it work. + solution_code: |- + {ask} What's your name? + {echo} Your name is + - title: Students want their echo word (variable) to be in the middle of a sentence + example: + error_text: And they are right! That's why they will learn to use proper variables in the next level. + error_code: |- + {ask} Which programming language is the most fun? + {echo} is the best! + solution_text: 'In level 1 we have to keep it at this:' + solution_code: |- + {ask} Which programming language is the most fun? + {echo} The best is... + - title: 'Turtle: Students let the turtle walk off of the screen' + example: + error_text: Often students love to try out big numbers when using the turtle, which causes the arrow to walk off the screen. + error_code: |- + {forward} 300 + {turn} 90 + solution_text: In the example, students tend to think that the turn command failed; even though it did what it what supossed to. What happened is the turtle walked past the screen limits. Use smaller numbers to prevent this from happening. + solution_code: |- + {forward} 100 + {turn} 90 + - title: "Turtle: Students use the command backward, but there's no such command." + example: + error_text: Backward is not a command. + error_code: backward 100 + solution_text: 'To make the turtle go backwards, you use the forward command and a negative number. For example:' + solution_code: '{forward} -100' + - level: '2' + sections: + - title: Students make typos in their commands + example: + error_text: Hedy can't recognize a command with a typo. + error_code: prinnt Don't make typos + solution_text: Teach your students to read the error messages. This way they can find out themselves what went wrong. + solution_code: "{print} Don't make typos" + - title: Students forget that the ask command has changed + example: + error_text: In this level students learn about variables. The ask command requires a variable as well, but students forget this. + error_code: ask what would you like to eat + solution_text: In this level you have to tell Hedy where to save your answer, so it can be used later on. This is called a variable. + solution_code: order {is} {ask} What would you like to eat + - title: Students try to use the `{echo}` command + example: + error_text: For some students it might be frustrating to learn that the `{echo}` command doesn't work anymore. That's why it's very important to explain the advantages of using variables. For example you can use multiple variables in a code, and you can put them anywhere you like in a sentence! + error_code: |- + answer {is} {ask} Why doesn't {echo} work anymore?! + {echo} + solution_text: Use a variable instead. + solution_code: |- + answer {is} {ask} Why doens't {echo} work anymore?! + {print} answer + - title: Students use a variable name or as a normal word + example: + error_text: In the example below the word 'name' is used as a variable, but also as a normal text. The output of this code will be 'Hi my Hedy is Hedy'. + error_code: |- + name {is} Hedy + {print} Hi my name is name + solution_text: So don't use a word you want to use in the text as a variable name. In level 4 this is solved with quotation marks. + solution_code: |- + name {is} Hedy + {print} Hi I'm name + - title: Students use long variable names containing two words. + example: + error_text: A variable should be named with one word. You could use an underscore to connect two words. That counts as one. + error_code: chosen door is ask Which door do you pick + solution_text: Add an underscore. + solution_code: chosen_door {is} {ask} which door do you pick + - title: Students might use two different names for the same variable + example: + error_text: In this example the student has used 'horse' and 'name' for the same variables. + error_code: |- + horse {is} {ask} What is your horse called + {print} Your horse is called name + solution_text: Always check whether the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code. + solution_code: |- + name {is} {ask} What is your horse called + {print} Your horse is called name + - level: '3' + sections: + - title: Students try to print whole lists + example: + error_text: A list can't be printed. You can only print one item from the list with {at} {random}. + error_code: |- + groceries {is} apples, milk, chocolate + {print} groceries + solution_text: To print a list of all the groceries, you simply need to put them after a `{print}` command. Else you can use the list to print one item with `{at}` `{random}`. + solution_code: |- + {print} apples, milk, chocolate + + # or + + groceries {is} apples, milk, chocolate + {print} groceries {at} {random} + - title: Students use the name of a variable or list as regular text + example: + error_text: This problem probably occured in level 2 as well. Now it can happen with lists too. + error_code: |- + name {is} Hedy + {print} Hi my name is name + + # or + + animal {is} rhino, bee, swan + {print} The best animal is... animal {at} {random} + solution_text: Don't use the names of variables or lists in regular text to print. In level 4 this problem is solved with quotation marks. + solution_code: |- + name {is} Hedy + {print} Hi I'm name + + # or + + animals {is} rhino, bee, swan + {print} The best animal is... animals {at} {random} + - title: Students forget `{at}` in `{at}` `{random}` + example: + error_text: Like in the example + error_code: |- + birds {is} sparrow, seagull, robin + {print} birds random + solution_text: This problem is solved by adding the word at. + solution_code: |- + birds {is} sparrow, seagull, robin + {print} birds {at} {random} + - title: Students forget to use the `{print}` command when also using the `{at}` `{random}` command + example: + error_text: Or they will sometimes put `{at}` `{random}` at the beginning of the line. + error_code: |- + fruit {is} apple, cherry, banana + fruit {at} {random} + solution_text: Emphasize to your students that you always need a print to print text. + solution_code: |- + fruit {is} apple, cherry, banana + {print} fruit {at} {random} + - title: Students forget to use commas in their lists + example: + error_text: In a list items are seperated with a comma. + error_code: |- + pizzas {is} funghi tonno quattro stagioni + {print} pizzas {at} {random} + solution_text: After each item on your list, there should be a comma + solution_code: |- + pizzas {is} funghi, tonno, quattro stagioni + {print} pizzas {at} {random} + - title: Students try to use `{at}` `{random}` without a list + example: + error_text: For example + error_code: |- + clubs {is} Manchester United + {print} clubs {at} {random} + solution_text: Hedy can't print anything at random, because there is no list to choose from. + solution_code: |- + clubs {is} Manchester United, Bayrn Munchen, FC Barcelona + {print} clubs {at} {random} + - title: Students try to use add/remove without a list + example: + error_text: In the example below 'names' is not a list, but a variable. You cannot add anything to it. + error_code: |- + names {is} Jake + your_name {is} {ask} Who are you? + {add} your_name {to} names + {print} names {at} {random} + solution_text: There has to be a list first, so you have to add a second name to turn names into a list, for example Amy. If you don't want amy on your list, you can use remove to remove it after. + solution_code: |- + names {is} Jake, Amy + your_name {is} {ask} Who are you? + {add} your_name {to} names + {print} names {at} {random} + - title: Students forget to use `{to}`/`{from}` in `{add}`/`{remove}` + example: + error_text: Without to/from the add/remove command won't work. + error_code: |- + adventures {is} story, parrot, dice + choice {is} Which adventure do you like best? + {add} choice + {remove} dice + {print} I love adventures {at} {random} + solution_text: Hedy has to know which list the item should be added to/removed from. + solution_code: |- + adventures {is} story, parrot, dice + choice {is} Which adventure do you like best? + {add} choice {to_list} adventures + {remove} dice {from} adventures + {print} I love adventures {at} {random} + - level: '4' + sections: + - title: Students forget to use quotation marks on both sides of the text + example: + error_text: In this level print and ask need a set of quotation marks. One before of the text and one after. + error_code: |- + {print} Hello + mood {is} {ask} 'How are you? + solution_text: Add the correct quotation marks. + solution_code: |- + {print} 'Hello' + mood {is} {ask} 'How are you?' + - title: Students use the wrong quotation marks + example: + error_text: It is important to start your lesson by checking if the students know how to type a quotation mark properly. On Hedy, students might use single quotes ('') and double quotes (""). Backticks on the other hand, are not considered valid quotes (``). + error_code: |- + {print} `Welcome to the restaurant` + food {is} {ask} "What would you like to order?" + solution_text: 'These are the correct quotation marks:' + solution_code: |- + {print} 'Welcome to the restaurant' + food {is} {ask} 'What would you like to order?' + - title: Students use an apostrophe in their text + example: + error_text: From this level on apostrophes are not allowed. They are often used in English when typing contractions like you're, don't or what's. + error_code: "{print} 'You're not allowed to type this'" + solution_text: You can choose to use the wrong grammar and just leave the apostrophe out. Or you could use the ` as an apostrophe. + solution_code: |- + {print} 'Youre allowed to type this' + {print} 'And you`re able to do this' + - level: '5' + sections: + - title: Students forget to use `{print}` in an `{if}` command + example: + error_text: After students use `{if}` or `{else}` they forget to use a second command like `{print}` or `{ask}`. + error_code: |- + {if} name {is} Hedy 'Great!' + {else} Hedy {is} better! + solution_text: Add the print command to fix it. + solution_code: |- + {if} name {is} Hedy {print} 'Great!' + {else} {print} 'Hedy is better!' + - title: Students might use two different names for the same variable + example: + error_text: In this example the student has used 'horse' and 'name' for the same variables. + error_code: |- + horse {is} {ask} 'What is your horse called?' + {if} name {is} Bonfire {print} 'cool' + {else} {print} 'less cool!' + solution_text: Always check whether the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code. + solution_code: |- + horse {is} {ask} 'What is your horse called' + {if} horse {is} Bonfire {print} 'cool!' + {else} {print} 'less cool!' + - title: Students still forget the quotes on both sides + example: + error_text: Using the `if` command can make the code lines very long and students tend to forget to use quotes. + error_code: |- + {if} name {is} Hedy {print} fun + {else} {print} 'meh! + solution_text: Always use 2 quotes in a print command. + solution_code: |- + {if} name {is} Hedy {print} 'fun' + {else} {print} 'meh!' + - title: Students use quotes around variable names + example: + error_text: In this level there are no quotes around variable names. + error_code: |- + {if} name {is} 'Hedy' {print} 'fun' + {else} {print} 'meh!' + solution_text: Remove the quotes to get the code to work. + solution_code: |- + {if} name {is} Hedy {print} 'fun' + {else} {print} 'meh! + - title: Students use long variable names containing two or more words + example: + error_text: Variables in Hedy can't contain spaces, so, in order to use together several words, students need to connect them using underscores (_) + error_code: chosen door is ask Which door do you pick? + solution_text: Add an underscore. + solution_code: chosen_door {is} {ask} 'which door do you pick?' + - title: Students want multiple answers to be correct + example: + error_text: For example this student wants Hedy to tell all his friends that they are funny, while other classmates should be told that they are not. + error_code: "{if} name {is} Jesse, David, Souf {print} 'You are funny' {else} {print} 'You are not funny'" + solution_text: |- + You could use the `{in}` command for that. While it is explained in a higher level, it does already work in level 5. + Another solution is to use multiple `{if}` commands and no `{else}` command. The disadvantage is that it won't tell the other classmates that they are not funny. + solution_code: |- + friends {is} Jesse, David, Souf + name {is} {ask} 'Who are you?' + {if} name {in} friends {print} 'You are funny' + {else} {print} 'You are not funny' + + # or + + name {is} {ask} 'Who are you?' + {if} naam {is} Jesse {print} 'You are funny' + {if} naam {is} David {print} 'You are funny' + {if} naam {is} Souf {print} 'You are funny' + - title: The students make the variable name the same as the value in the `{if}` statement + example: + error_text: In the example below the password is 'password'. This will result in it always being correct. + error_code: |- + password {is} {ask} 'What is the password?' + {if} password {is} password {print} 'Access granted' + {else} {print} 'Acces denied!' + solution_text: Pick a different name for your variable. + solution_code: |- + secret_password {is} {ask} 'What is the password' + {if} secret_password {is} password {print} 'Access granted!' + {else} {print} 'Access denied!' + - level: '6' + sections: + - title: Students struggle with quotation marks + example: + error_text: Some students struggle with adding quotation marks or not. If you add quotation marks, the output screen will literally show '5+5'. + error_code: "{print} '5 + 5'" + solution_text: In this code the output screen will print '10'. + solution_code: '{print} 5 + 5' + - title: Students struggle with the concept of doing maths with a variable + example: + error_text: 'Some students will find it hard to do maths with variables. Try to show them very simple examples, like:' + error_code: |- + age = {ask} 'How old are you?' + {print} 'Next year you will be ' age + 1 + solution_text: Or take it a step further like this. + solution_code: |- + price = 0 + {print} 'Welcome to our burger restaurant' + burger = {ask} 'Would you like a burger?' + {if} burger = yes price = price + 10 + drink = {ask} 'Would you like a drink?' + {if} drink = yes price = price + 4 + {print} 'That will be ' price ' euros please' + - level: '7' + sections: + - title: Students forget one of the word of the repeat command, or they forget the print command + example: + error_text: Make sure that the students know to use both the full repeat command and the print command. + error_code: |- + {repeat} 3 {times} For he`s a jolly good fellow + {repeat} 3 print + solution_text: 'This is the correct code:' + solution_code: |- + {repeat} 3 {times} {print} 'For he`s a jolly good fellow' + {repeat} 3 {times} {print} 'Which nobody can deny!' + - title: Students try to repeat multiple lines + example: + error_text: In this level you can only repeat one line of code multiple times. In this code the student wanted to print 3 different drinks, but it won't work. It will ask the question 3 times and only print the last answer. + error_code: |- + {repeat} 3 {times} drink = {ask} 'What would you like to drink?' + {print} drink + solution_text: You should go to the next level to be able to repeat multiple lines. So on this level you'll have to print everything seperately. + solution_code: |- + drink = {ask} 'What would you like to drink?' + {print} drink + drink = {ask} 'What would you like to drink?' + {print} drink + drink = {ask} 'What would you like to drink?' + {print} drink + - title: Students make programs that take too long to run + example: + error_text: In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine. + error_code: "{repeat} 100 {times} {print} 'How many times can I repeat this?'" + solution_text: Make sure the code doesn't take too long to execute + solution_code: "{repeat} 20 {times} {print} 'This is enough'" + - level: '8' + sections: + - title: Students use the indentation wrong + example: + error_text: Indentation is a new concept in this level, and for some students it might be hard to learn. Make sure they practise some simple examples before making a whole program with it. + error_code: |- + {repeat} 3 {times} + {print} 'hello' + solution_text: 'This is the correct code:' + solution_code: |- + {repeat} 3 {times} + {print} 'hello' + - title: Students only repeat 1 line when they wanted to repeat multiple lines + example: + error_text: For instance, in the code below the student wanted to take the drinks order of 3 people. But instead the program asked 3 times, but only wrote down one order. + error_code: |- + {repeat} 3 {times} + drink = {ask} 'What would you like to drink?' + {print} drink + solution_text: |- + In the correct code the third line starts with indentation too. This way it belongs to the repeat block and therefore it will be repeated 3 times. + Showing your students these differences can help them understand why we need indentation to make our programs work. + solution_code: |- + {repeat} 3 {times} + drink = {ask} 'What would you like to drink?' + {print} drink + - title: Students want to nest `{if}` statements, or put `{if}` statements inside a loop + example: + error_text: |- + In this level students aren't allowed yet to put `{if}` statements inside other `{if}` statements or inside repeat loops. + In the next level this is allowed. + error_code: |- + birthday = {ask} 'Is it you birthday?' + {if} birthday = yes + {repeat} 3 {times} + {print} 'Hip Hip Hooray!' + solution_text: 'This is the correct code for this level:' + solution_code: |- + birthday = {ask} 'Is it you birthday?' + {if} birthday = yes + {print} 'Hip Hip Hooray!' + {print} 'Hip Hip Hooray!' + {print} 'Hip Hip Hooray!' + - title: Students make programs that take too long to run + example: + error_text: In this level it's very easy to make programs that take a lot of time to complete. If the program takes too long, it'll be stopped, this with the intention to prevent straining the student's machine. + error_code: |- + {repeat} 100 {times} + {print} 'How many times can I repeat this?' + solution_text: Make sure the code doesn't take too long to execute + solution_code: |- + {repeat} 20 {times} + {print} 'This is enough' + - title: Students use the `{if}` command to check if the variable value is the same as the variable name + example: + error_text: |- + We've noticed a common error among our students: they try to create a program that checks for a password, but they make the password 'password'. + In line 2 the computer is asked to check whether the variable password is the same as the variable password, so itself. Which means the answer is always yes. + So with this code the answer will always be 'You can come in' no matter what the player fills in. + error_code: |- + password {is} {ask} 'What is the password?' + {if} password {is} password + {print} 'You can come in' + {else} + {print} 'You are not allowed' + solution_text: You can fix this mistake by adding quotation marks. This way the computer knows that the second password in `{if} password {is} 'password'` is a string value (so normal text) and not the variable name. + solution_code: |- + password {is} {ask} 'What is the password?' + {if} password {is} 'password' + {print} 'You can come in' + {else} + {print} 'You are not allowed' + - level: '9' + sections: + - title: Students make mistakes with indentation + example: + error_text: The hardest part about this level is getting the indentation right. Students love nesting `{if}` statements, sometimes even inside other nested `{if}` statements. Keeping track of indentation can get pretty tough. + error_code: |- + {print} 'Robin is walking downtown' + location = {ask} 'Is Robin going into a shop, or does she go home?' + {if} location {is} shop + {print} 'She enters the shop.' + {print} 'Robin sees an interesting looking book' + book = {ask} 'Does Robin buy the book?' + {if} book {is} yes + {print} 'Robin buys the book and goes home' + {else} + {print} 'Robin leaves the shop and goes home' + {else} + {print} 'Robin goes home' + solution_text: This is the correct code. Try to keep track of all the different constructions when putting `{if}` statements inside other `{if}` statements. + solution_code: |- + {print} 'Robin is walking downtown' + location = {ask} 'Is Robin going into a shop, or does she go home?' + {if} location {is} shop + {print} 'She enters the shop.' + {print} 'Robin sees an interesting looking book' + book = {ask} 'Does Robin buy the book?' + {if} book {is} yes + {print} 'Robin buys the book and goes home' + {else} + {print} 'Robin leaves the shop and goes home' + {else} + {print} 'Robin goes home' + - level: '10' + sections: + - title: Students do not use the `{for}` command correctly + example: + error_text: We often see that students try to print the list (in the example animals) instead of the items of the list. + error_code: |- + animals {is} dog, cat, blobfish + {for} animal {in} animals + {print} 'I love ' animals + solution_text: The word animals in the last line should be changed into animal. + solution_code: |- + animals {is} dog, cat, blobfish + {for} animal {in} animals + {print} 'I love ' animal + - title: Students forget the indentation + example: + error_text: Students tend to forget to use indentation after a for command. + error_code: |- + animals {is} dog, cat, blobfish + {for} animal {in} animals + {print} 'I love ' animals + solution_text: You should use indentation after a for command. + solution_code: |- + animals {is} dog, cat, blobfish + {for} animal {in} animals + {print} 'I love ' animal + - level: '11' + sections: + - title: Students forget to use indentation + example: + error_text: Make sure that the students use indentation. + error_code: |- + {for} i {in} {range} 1 {to} 5 + {print} i + solution_text: 'This is the correct code:' + solution_code: |- + {for} i {in} {range} 1 {to} 5 + {print} i + - title: Students don't understand the i + example: + error_text: |- + Some students don't understand that i is a variable. i is chosen, because it is used in Python programming, but you could just as easily use a different variable name. + For example, this code: + error_code: |- + {for} i {in} {range} 1 {to} 5 + {print} i + solution_text: Could just as well be replaced with this code. It works the same. + solution_code: |- + {for} banana {in} {range} 1 {to} 5 + {print} banana + - level: '12' + sections: + - title: Students forget quotation marks + example: + error_text: Students need more quotation marks now than in the previous levels. In this example quotation marks were forgotten in the list and in the `{if}` command. + error_code: |- + superheroes = Spiderman, Batman, Iron Man + superhero = superheroes {at} {random} + {if} superhero = Batman + {print} 'IM BATMAN!' + solution_text: 'This is the correct code:' + solution_code: |- + superheroes = 'Spiderman', 'Batman', 'Iron Man' + superhero = superheroes {at} {random} + {if} superhero {is} 'Batman' + {print} 'IM BATMAN!' + - title: Students use quotation marks on numbers they want to use for calculations + example: + error_text: |- + You can use quotation marks on numbers, but only if you want the computer to think of them as text. This means you can't do calculations with the number. + In the example below, you can't do maths with the number 25, because it's in quotation marks. + error_code: |- + score = '25' + answer {is} {ask} 'Do you want a point?' + {if} answer {is} 'yes' + score = score + 1 + {print} score + solution_text: 'This is the correct code:' + solution_code: |- + score = 25 + answer {is} {ask} 'Do you want a point?' + {if} answer {is} 'yes' + score = score + 1 + {print} score + - title: Students use commas instead of periods in decimal numbers + example: + error_text: Decimal numbers can be used from this level on, but you can't use commas. + error_code: '{print} 2,5 + 2,5' + solution_text: 'This is the correct code:' + solution_code: '{print} 2.5 + 2.5' + - level: '13' + sections: + - title: Students confuse `{and}` with `{or}` + example: + error_text: Both commands might appear similar, but their functions are very different. + error_code: |- + game {is} {ask} 'Do you want to play a game?' + time {is} {ask} 'Do you have time to play?' + {if} game {is} 'yes' {or} time {is} 'yes' + {print} 'Lets play!' + solution_text: In this case, the person should answer yes on both questions, so you should use `and`. + solution_code: |- + game {is} {ask} 'Do you want to play a game?' + time {is} {ask} 'Do you have time to play?' + {if} game {is} 'yes' {and} time {is} 'yes' + {print} 'Lets play!' + - level: '14' + sections: + - title: Students confuse the < and > signs + example: + error_text: Often, students are already familiar with these signs from maths class. But if your students don't know these signs yet, they might have a challenge with it. + error_code: |- + age = {ask} 'How old are you?' + {if} age < 12 + {print} 'You are older than I am!' + solution_text: 'This is the correct code:' + solution_code: |- + age = {ask} 'How old are you?' + {if} age > 12 + {print} 'You are older than I am!' + - title: Students use the wrong signs for `!=` `<=` and `>=` + example: + error_text: These signs are probably new for most students. Make sure to explain these signs to your students. + error_code: |- + name = {ask} 'What is your name?' + {if} name = 'Hedy' + {print} 'You are not Hedy' + solution_text: 'This is the correct code:' + solution_code: |- + name = {ask} 'What is your name?' + {if} name != 'Hedy' + {print} 'You are not Hedy' + - title: Students forget to use the == sign + example: + error_text: In this level, students are still allowed to use = or is. But on other levels, or in python, they might get in trouble for that. So it is best to train them to use it. + error_code: |- + name = {ask} 'What is your name?' + {if} name = 'Hedy' + {print} 'You are cool!' + solution_text: 'This is the correct code:' + solution_code: |- + name = {ask} 'What is your name?' + {if} name == 'Hedy' + {print} 'You are cool!' + - level: '15' + sections: + - title: Students forget indentation in the while loop + example: + error_text: Indentation is often hard for students. + error_code: |- + answer = 0 + {while} answer != 25 + answer = {ask} 'What is 5 times 5?' + {print} 'A correct answer has been given' + solution_text: 'This is the correct code:' + solution_code: |- + answer = 0 + {while} answer != 25 + answer = {ask} 'What is 5 times 5?' + {print} 'A correct answer has been given' + - level: '16' + sections: + - title: Students forget the brackets + example: + error_text: From this level on lists should be in brackets. + error_code: |- + icecream = 'starwberry', 'chocolate' + {print} 'I love ' icecream[{random}] ' icecream' + solution_text: 'This is the correct code:' + solution_code: |- + icecream = ['starwberry', 'chocolate'] + {print} 'I love ' icecream[{random}] ' icecream' + - title: Students use the wrong brackets + example: + error_text: From this level on lists should be in brackets. + error_code: |- + icecream = ('starwberry', 'chocolate') + {print} 'I love ' icecream[{random}] ' icecream' + solution_text: 'This is the correct code:' + solution_code: |- + icecream = ['starwberry', 'chocolate'] + {print} 'I love ' icecream[{random}] ' icecream' + - title: Students forget the quotation marks while focussing on the brackets + example: + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + error_code: |- + icecream = [starwberry, chocolate] + {print} 'I love ' icecream[{random}] ' icecream' + solution_text: 'This is the correct code:' + solution_code: |- + icecream = ['starwberry', 'chocolate'] + {print} 'I love ' icecream[{random}] ' icecream' + - title: Students still use the old at random command + example: + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + error_code: |- + icecream = [starwberry, chocolate] + {print} 'I love ' icecream at random ' icecream' + solution_text: 'This is the correct code:' + solution_code: |- + icecream = ['starwberry', 'chocolate'] + {print} 'I love ' icecream[{random}] ' icecream' + - title: Students forget the quotation marks while focussing on the brackets + example: + error_text: Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks. + error_code: |- + icecream = [starwberry, chocolate] + {print} 'I love ' icecream[{random}] ' icecream' + solution_text: 'This is the correct code:' + solution_code: |- + icecream = ['starwberry', 'chocolate'] + {print} 'I love ' icecream[{random}] ' icecream' + - level: '17' + sections: + - title: Students use `{elif}` like `{else}`, so without a condition + example: + error_text: The `{elif}` command needs a condition behind it. It cannot be used like `{else}`, without a condition. + error_code: |- + color = ask 'What is your favorite color?' + {if} color == 'green': + {print} 'green is nice' + {elif}: + {print} 'I like green' + solution_text: 'This is the correct code:' + solution_code: |- + color = {ask} 'What is your favorite color?' + {if} color == 'green': + {print} 'green is nice' + {elif} color == yellow: + {print} 'yellow is alright' + {else}: + {print} 'I like green' + - title: Students forget the colon + example: + error_text: After each command that requires indentation, a colon should be used. + error_code: |- + answer = ask 'How are you doing?' + {if} answer {is} 'great' + {print} 'Me too!' + {elif} answer {is} 'bad' + {print} 'Let me cheer you up!' + {else} + {print} 'Im great!' + solution_text: 'This is the correct code:' + solution_code: |- + answer = {ask} 'How are you doing?' + {if} answer {is} 'great': + {print} 'Me too!' + {elif} answer {is} 'bad': + {print} 'Let me cheer you up!' + {else}: + {print} 'Im great!' + - level: '18' + sections: + - title: Students forget to use the brackets + example: + error_text: Students will forget to put brackets around their text. + error_code: "{print} 'my name is Hedy!'" + solution_text: 'This is the correct code:' + solution_code: "{print}('my name is Hedy!')" + - title: Students will still use the ask command + example: + error_text: The ask command has been used since level 1. So it might be hard for the students to switch to input instead of ask. + error_code: |- + {print}('My name is Hedy!') + name = ask('What is your name?') + {print}('So your name is ', name) + solution_text: 'This is the correct code:' + solution_code: |- + {print}('My name is Hedy!') + name = {input}('What is your name?') + {print}('So your name is ', name) + - title: Students might use the brackets as quotation marks + example: + error_text: They have learned to keep the variables outside of the quotation marks, so they might do the same with the brackets. Which is not the correct way to use them. + error_code: |- + temperature = 25 + {print}('It is ') temperature ('degrees outside') + solution_text: 'This is the correct code:' + solution_code: |- + temperature = 25 + {print}('It is ', temperature, 'degrees outside') diff --git a/content/pages/te.yaml b/content/pages/te.yaml index 7d74a3cb968..1da9a2facbb 100644 --- a/content/pages/te.yaml +++ b/content/pages/te.yaml @@ -50,15 +50,22 @@ join-sections: Hedy తరగతిలో ప్రోగ్రామింగ్ పాఠాలను అందించడంలో ఉపాధ్యాయులకు మద్దతునిచ్చేలా రూపొందించబడింది. తరగతిని సృష్టించడం, అనుకూలీకరించడం, ఇంకా విధ్యార్ధుల గురించి చూడటం వంటి ఎన్నో నిర్దిష్ట ఉపాధ్యాయ లక్షణాలు ఉన్నాయి. మీరు Hedy ని ఇష్టపడితే, మీకు తెలిసిన పాఠశాలలో ఉపాధ్యాయులకు ప్రారంభించడం లో సహాయపదండి! స్కూల్లను, ఉపాధ్యాయులను కనుగొనడం లో ఇది మీకు సహాయపడవచ్చు Discord. learn-more-sections: -- title: Hedy సమూహం లో చేరండి +- title: The Hedy foundation text: |- - మీ నుండి అభిప్రాయాలను వినడానికి ఇష్టపడతాము! మీరు మా Discord server లో చేరడం ద్వారా మమ్మల్ని సంప్రదించవచ్చు. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - మీరు మాకు [మెయిల్ ని కూడా పంపవచ్చు](mailto:hello@hedy.org "Hedy గురించి"). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! + text: |- + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - తాజావార్తలు అన్నీ తెలుసుకొనుటకు, [మా వర్తలేఖకు సభ్యత్వం తీసుకోవచ్చు](/subscribe). -- title: ఒక లోతైన అన్వేషణ - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' + - title: వార్తల్లో Hedy text: |- Hedy విడుదలైన 2020 నుంచి కొన్ని అంతర్జాల పుటలు ఇంకా వార్తా పత్రికలు ఇలా వ్రాసాయి. ఆ జాబితాను ఇక్కడ పొందుపరిచాము: @@ -149,7 +156,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/th.yaml b/content/pages/th.yaml index f9692a1e27d..c4b600e657e 100644 --- a/content/pages/th.yaml +++ b/content/pages/th.yaml @@ -52,17 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Code week talk + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Want to know more about Hedy? Check out this talk Felienne gave at the European Code Week 2020: + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -130,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/tl.yaml b/content/pages/tl.yaml index bc0eae3d967..501de458e26 100644 --- a/content/pages/tl.yaml +++ b/content/pages/tl.yaml @@ -52,17 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Code week talk + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - Want to know more about Hedy? Check out this talk Felienne gave at the European Code Week 2020: + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -130,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/tn.yaml b/content/pages/tn.yaml index 0ec62363e0d..0c1d9ad2b36 100644 --- a/content/pages/tn.yaml +++ b/content/pages/tn.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Want to help? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -133,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/tr.yaml b/content/pages/tr.yaml index 3e1597e25d5..9a0bf8e9889 100644 --- a/content/pages/tr.yaml +++ b/content/pages/tr.yaml @@ -51,13 +51,17 @@ join-sections: Hedy, öğretmenlerin sınıfta programlama dersleri vermelerini desteklemek için tasarlanmıştır. Bir sınıf oluşturma, onu özelleştirme ve öğrencilerinizin neler yaptığını görme seçeneği gibi belirli öğretmen özelliklerine sahibiz. Hedy'yi beğendiyseniz, öğretmenlerin başlamasına yardımcı olmak için tanıdığınız okullara ulaşabilirsiniz! Discord aracılığı ile okul veya öğretmen bulmanıza yardımcı olabiliriz. learn-more-sections: -- title: Hedy Topluluğuna Katılın +- title: The Hedy foundation text: |- - Sizden haber almak isteriz! Bizimle iletişime geçmenin en iyi yolu Discord sunucumuz 'a katılmaktır. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - Ayrıca bize [e-posta gönderbilirsiniz](mailto:hello@hedy.org "About Hedy"). - - En son haberleri takip etmek için, [haber bültenimize abone olun](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: Derin bir dalış! text: |- Hedy'nin felsefesi ve tasarımı hakkında daha fazla bilgi edinmek ister misiniz? Felienne'in 2022'de StrangeLoop Konferansında yaptığı bu konuşmaya göz atın: @@ -190,7 +194,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/uk.yaml b/content/pages/uk.yaml index fd72c812025..f9a83322bb7 100644 --- a/content/pages/uk.yaml +++ b/content/pages/uk.yaml @@ -52,17 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Приєднатися до Спільноти Hedy +- title: The Hedy foundation text: |- - We love to hear from you! - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Глибоке занурення! - text: "[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)" + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Reneé Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: Hedy у новинах text: |- Want to know more about Hedy? Check out this talk Felienne gave at the European Code Week 2020: +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: "*Something about teachers accounts, slides etc*" @@ -168,7 +196,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/ur.yaml b/content/pages/ur.yaml index 77d6c85ace3..532dcd9743e 100644 --- a/content/pages/ur.yaml +++ b/content/pages/ur.yaml @@ -52,20 +52,45 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' -- title: Want to help? + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. +- title: A deep dive! text: |- - The easiest way is to help with [translating Hedy](https://github.com/hedyorg/hedy/wiki/Hedy-Translation-Tutorial) + Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: - Below the current status, help us complete a language, or add a new one. - - Translation status + +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -133,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/uz.yaml b/content/pages/uz.yaml index 06bf94a63ab..c98ff881993 100644 --- a/content/pages/uz.yaml +++ b/content/pages/uz.yaml @@ -51,13 +51,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via Discord. learn-more-sections: -- title: Join the Hedy Community +- title: The Hedy foundation text: |- - We love to hear from you! The best way to get in touch with us is by joining our Discord server. + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - You can also [send us an email](mailto:hello@hedy.org "About Hedy"). - - To stay on top of the latest news, [subscribe to our newsletter](/subscribe). + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -194,7 +198,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/vi.yaml b/content/pages/vi.yaml index f94d7d0aef1..7f76d2503b0 100644 --- a/content/pages/vi.yaml +++ b/content/pages/vi.yaml @@ -52,17 +52,45 @@ join-sections: Hedy được thiết kể để hỗ trợ giáo viên cung cấp các bài học lập trình trên lớp. Chúng tôi có các tính năng dành riêng cho giáo viên như tùy chọn tạo lớp học, tùy chỉnh lớp học và quan sát quá trình học tập của học sinh. Nếu bạn thích Hedy, bạn có thể liên hệ với những trường học bạn biết để có thể giúp giáo viên ở đó bắt đầu! Chúng tôi có thể giúp bạn tìm trường hoặc giáo viên thông qua [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Do you like Hedy? +- title: The Hedy foundation text: |- - We love to hear from you! - [Click here to send us a message](mailto:hello@hedy.org "About Hedy") -- title: Found a bug? - text: '[Let us know on GitHub](https://github.com/hedyorg/hedy/issues/new/choose)' + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: Code week talk text: |- Nếu bạn muốn biết thêm về Hedy, hãy xem bài thuyết trình của Felienne tại Tuần lễ lập trình Châu Âu 2020 (European Code Week 2020): +- title: Hedy in the news + text: |- + Some websites and newspapers have written about Hedy since our release in early 2020. We keep a list here: + * [Java Magazine 04.2023](images/Hedy_Javamagazine2023.pdf) + * [Tech Optimism - A Solution to the IT Shortage (Dutch), August 2022](https://pom.show/2022/08/12/een-oplossing-voor-het-it-tekort/) + * [Codeweek Podcast, July 2022](https://codeweek.eu/podcast/26) + * [Heise.de (German), Januari 2022](https://www.heise.de/news/Hedy-die-mitwachsende-Programmiersprache-6336264.html) + * [Strumenta, November 2021](https://tomassetti.me/teaching-programming-with-hedy/) + * [Vives (Dutch), CodeWeek Special October 2021](images/Vives-174-Codeweek.pdf) + * [CodeWeek.eu - Haunted House Challenge, September 2021](https://codeweek.eu/2021/challenges/haunted-house) + * [Opensource.com, April 2021](https://opensource.com/article/21/4/hedy-teach-code) + * [IO Magazine, April 2021](https://ict-research.nl/wordpress/wp-content/uploads/2021/04/IO-magazine-NR1-2021_web.pdf) + * [Ingeniería De Software (Spanish), February 2021](https://ingenieriadesoftware.es/hedy-mejor-lenguaje-ensenar-programacion-ninos/) + * [Hello World Magazine, February 2021](images/Hello_World_15_Hedy.pdf) + * [Discoro, January 2021](https://discoro.wordpress.com/2021/01/09/hedy-gradually-learning-a-programming-language/) + * [Felienne wins the Dutch award for ICT research for Hedy, January 2021](https://www.nwo.nl/en/news/felienne-hermans-receives-dutch-prize-ict-research-2021) + * [SlashDot, August 2020](https://news.slashdot.org/story/20/08/17/024248/scientist-proposes-a-new-programming-language-for-teaching-coding-and-python) + * [GenBeta (Spanish), August 2020](https://www.genbeta.com/desarrollo/nuevo-lenguaje-para-ensenar-programacion-a-ninos-como-se-ensena-a-leer-escribir-forma-gradual-niveles) + * [Developpez (French), August 2020](https://programmation.developpez.com/actu/308095/Une-scientifique-propose-un-nouveau-langage-de-programmation-pour-enseigner-aux-enfants-le-codage-informatique-au-travers-d-une-approche-graduelle-implementee-en-Python-sur-13-paliers/) + * [Vives (Dutch), October 2020](images/artikel_vives.pdf) "Met Hedy stap voor stap leren programmeren" + * [Leiden University, April 2020](https://www.universiteitleiden.nl/en/news/2020/03/looking-to-distract-the-kids-while-you-work-from-home-get-them-programming) + * [Mare (Dutch), April 2020](https://www.mareonline.nl/cultuur/computercode-voor-de-kids/) + * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' @@ -130,7 +158,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/pages/zh_Hans.yaml b/content/pages/zh_Hans.yaml index d8ab1623f37..8beeddaec23 100644 --- a/content/pages/zh_Hans.yaml +++ b/content/pages/zh_Hans.yaml @@ -51,13 +51,17 @@ join-sections: 海蒂编程旨在支持教师在课堂上教编程课程。我们有特定的教师功能,例如创建班级、自定义班级和查看学生表现的选项。 如果您喜欢海蒂编程,您可以联系您认识的学校来帮助教师了解和尝试海蒂编程!我们可以通过Discord帮助您找到学校或老师。 learn-more-sections: -- title: 加入海蒂编程社区 +- title: The Hedy foundation text: |- - 我们很高兴收到您的来信!与我们取得联系的最佳方式是加入我们的 Discord 服务器 。 + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. - 您也可以 [给我们发邮件](mailto:hello@hedy.org "About Hedy")。 + The board of the foundation consists of: - 要了解最新消息,请 [订阅我们的时事通讯](/subscribe)。 + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: 深潜! text: |- 想了解更多关于海蒂的理念和设计吗?请看翡丽娜(Felienne)在 2022 年 StrangeLoop 会议上的演讲: @@ -193,9 +197,9 @@ teacher-guide: 此 视频 向您展示了如何在海蒂编程(Hedy )中快速创建一个班级。 - title: 复制班级 text: |- - 你教多门课吗?这样就不必单独定制每个课堂了。简单地创建一个课堂,定制这个课堂(参见“定制你的课堂”了解操作方法),然后按照你要的次数复制这个类。 - 您可以在“For Teachers”(教师专页)页面复制课程。如果复制一个课堂,所有的课堂设置也会复制。这意味着你设置的第一个课堂不可用的所有关卡和冒险现在对新课堂也不可用。 - 您班级的学生账户和第二个老师账户不会被复制到新班级。 + 要教授多个班级吗?那么不必单独定制每个班级。只需创建一个班级,定制班级(请参阅“定制您的班级”以了解如何操作),然后根据需要多次复制该班级。 + 可以在“教师”页面上复制班级。如果复制班级,则所有班级设置也会被复制。这意味着为第一个班级设置不可用的所有级别和冒险现在也将对新班级不可用。 + 班级中的学生帐户和第二个教师帐户将不会复制到新班级中。 - title: 添加第二教师 text: |- 你不是唯一教你们班的老师吗?那么,您现在可以向该课堂添加另一位教师。进入“教师”页面,点击该课程。然后选择“邀请老师”,填写同事的用户名。 diff --git a/content/pages/zh_Hant.yaml b/content/pages/zh_Hant.yaml index decb90b5d67..23848f7a144 100644 --- a/content/pages/zh_Hant.yaml +++ b/content/pages/zh_Hant.yaml @@ -52,8 +52,17 @@ join-sections: Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing. If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r). learn-more-sections: -- title: Join the Hedy Community - text: "We love to hear from you! The best way to get in touch with us is by joining our [Discord server](https://discord.gg/8yY7dEme9r). \n\nYou can also [send us an email](mailto:hello@hedy.org \"About Hedy\")." +- title: The Hedy foundation + text: |- + Hedy is maintained by the Hedy Foundation (Stichting Hedy), Sportmanstaat 8, 2341 JG Oegstgeest, Dutch Chamber of Commerce number 94013985. + + The board of the foundation consists of: + + * Felienne Hermans, president + * Eelko Huizing, finance + * Renée Merbis, secretary + + The board of Stichting Hedy does not get any financial compensation for their tasks. - title: A deep dive! text: |- Want to know more about Hedy's philosophy and design? Check out this talk Felienne gave at the StrangeLoop Conference in 2022: @@ -148,7 +157,7 @@ teacher-guide: - title: Duplicate a class text: |- Are you teaching multiple classes? Then you don't have to customize each class individually. Simply make a class, costumize the class (see "Customize your Class" to learn how) and then duplicate this class as many times as you want. - You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've mande unavailable for the first class will now be unavailable for the new class(es) as well. + You can duplicate the class on the 'For Teachers' page. If you duplicate a class, all the class settings are duplicated as well. This means that all the levels and adventures you've made unavailable for the first class will now be unavailable for the new class(es) as well. The student accounts and second teacher accounts in your class will not be duplicated into the new class. - title: Add a second teacher text: |- diff --git a/content/parsons/da.yaml b/content/parsons/da.yaml index 91dab9aa0ee..53927b79ec6 100644 --- a/content/parsons/da.yaml +++ b/content/parsons/da.yaml @@ -3,6 +3,7 @@ levels: 1: story: |- Puzzels are exercises in which the lines of code are already written for you. You only have to place the lines in the correct order. Drag the lines of code into the input screen and run the code. Can you get the program to work? + You're a customer at bakery Hedy. You walk into the bakery and are welcomed by the baker. He asks what type of pie you want to order. @@ -40,7 +41,7 @@ levels: 3: 1: story: |- - The new school year at Hogwarts is starting! + The new school year at Hogwarts is starting! It is the job of the sorting hat to sort you into one of the houses. Which house will you be sorted into? Are you a Gryffindor, Hufflepuff, Ravenclaw or Slytherin. Before the sorting hat reveals your house, you can tell it to not pick one of the houses. diff --git a/content/parsons/kab.yaml b/content/parsons/kab.yaml new file mode 100644 index 00000000000..efe255da183 --- /dev/null +++ b/content/parsons/kab.yaml @@ -0,0 +1,88 @@ +levels: + 1: + 1: + code: "{print} Welcome to bakery Hedy!\n{ask} What type of pie do you want to order?\n{echo} So you want\n{print} Your order is being prepared!" + story: "Puzzels are exercises in which the lines of code are already written for you. You only have to place the lines in the correct order. Drag the lines of code into the input screen and run the code. Can you get the program to work?\n\nYou're a customer at bakery Hedy.\nYou walk into the bakery and are welcomed by the baker.\nHe asks what type of pie you want to order.\nThen he repeats your answer back to you.\nLastly, your order is being prepared." + 2: + code: "{print} This is DJ Hedy\n{ask} Are you ready to party?\n{ask} What song would you like to hear?\n{echo} Great choice! I love the song" + story: You're at the DJ Booth requesting a song. Create a program that asks if you are ready to party and then asks which song you would like to hear. + 5: + 2: + story: Create a maths game. + code: "{print} 'Solve this problem'\nanswer {is} {ask} '88 - 16 = ?'\n{if} answer {is} 72 {print} 'Correct!'\n{else} {print} 'Wrong! The answer was 72'" + 1: + story: "Make a program that checks if your favourite movie is already in the list of the computer.\nIf so, print that you have great taste, otherwise add the movie to the list." + code: "favorite_movies {is} Batman, Spiderman, The Avengers, Jurassic Park\nmovie {is} {ask} 'What is your favourite movie?'\n{if} movie {in} favorite_movies {print} 'You have great taste!'\n{else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!'\n{add} movie {to_list} favorite_movies" + 6: + 2: + code: "{print} 'It is your birthday!'\npeople = {ask} 'How many people do you want to give a slice of cake?'\ncakes_amount = people/8\n{print} 'You will have to buy ' cakes_amount ' cakes'" + story: Create a program that helps you calculate how many cakes you should buy for your birthday party. + 1: + code: "age = {ask} 'How old are you?'\ndog_age = age * 7\ncat_age = age * 5\n{print} 'In dog years you are ' dog_age ' years old.'\n{print} 'In cat years you are ' cat_age ' years old.'" + story: "Make a program that calculates how old you are in dog and cat years.\nFirst ask the age of the user and start calculating.\nFirst calculate the dogyears then the catyears.\nShow the user the different ages." + 11: + 1: + code: "{for} number {in} {range} 10 {to} 1\n {print} number\n {sleep}\n {clear}\n{print} 'Happy New Year!'" + story: Create the count down clock for New Year's eve! The program should show the numbers from 10 to 1 for a second and then wish you a happy new year. + 2: + story: "Create a program that tells us the final results of the science fair. Firstly define the variable contestants, then the variable place.\n**Hint** Line 5 should be the sleep command, and you should end with saying congratulations." + code: "{print} 'And now we will reveal the results of the science fair'\ncontestants = Vivienne, Paul, Trixy, Bianca, Katya\nplace = 5\n{for} contestant {in} contestants\n {sleep} 2\n {print} 'On number ' place ' has ended... ' contestant\n place = place - 1\n{print} 'Congratulations!'" + 3: + 1: + story: "The new school year at Hogwarts is starting! \nIt is the job of the sorting hat to sort you into one of the houses.\nWhich house will you be sorted into? Are you a Gryffindor, Hufflepuff, Ravenclaw or Slytherin.\nBefore the sorting hat reveals your house, you can tell it to not pick one of the houses." + code: "{print} The sorting hat is ready to sort you into a Hogwarts house.\nhouses {is} Gryffindor, Hufflepuf, Ravenclaw, Slytherin\ndislike {is} {ask} Are there any houses you do not want to be part of?\n{remove} dislike {from} houses\n{print} Not dislike eh? Better be... houses {at} {random}" + 2: + story: Create a program that chooses a random meal for you. Make a list of food and a list of toppings and let the program decide what you'll have! + code: "food {is} pizza, icecream, salad, sandwich\ntoppings {is} chocolate, cheese, tuna, sprinkles\n{print} Your random meal for today is...\n{sleep} 2\n{print} food {at} {random} with toppings {at} {random}" + 3: + story: "In a chess tournament there are three players left.\nCreate a program that decides which two players have to play against each other first.\nStart by printing the two players who play the first match, then print against which player the winner will play." + code: "players {is} Liam, Noah, Sophie\nplayer_1 {is} players {at} {random}\n{remove} player_1 {from} players\nplayer_2 {is} players {at} {random}\n{print} player_1 ' first plays against ' player_2\n{remove} player_2 {from} players\n{print} 'The winner plays against ' players {at} {random}" + 10: + 2: + story: "This make-over robot will decide your new hairstyle for you. If you do not agree with the first choice, you can try again.\n**Mind** The variable people is defined in the first line. The variable hairstyles in the second." + code: "people = Betty, Amanda, Marc\nhairstyles = a bald head, a mohawk, a ponytail, spikes\n{for} person {in} people\n {print} person ' will get ' hairstyles {at} {random}\n happy = {ask} person ', are you happy with this choice?'\n {if} happy {is} yes\n {print} 'Great'\n {else}\n {print} 'Lets try again... Then 'person ' will get ' hairstyles {at} {random}" + 1: + story: "Help this family out by creating a schedule of who is cooking and what they should be making this week. The `{remove}` commands make sure nobody has to cook twice and they have a different dinner every day.\n**Mind!** the variable order should be first days, then people, and lastly dinner_options. This goes for the lines with the `{remove}` commands too." + code: "days = Monday, Tuesday, Wednesday, Thursday, Friday\npeople = mom, dad, Martin, Abby, Jesse\ndinner_options = pizza, tacos, pancakes, a salad, lasagne\n{for} day {in} days\n chosen_person = people {at} {random}\n chosen_dinner = dinner_options {at} {random}\n {print} 'On ' day ' ' chosen_person ' is making ' chosen_dinner\n {remove} chosen_person {from} people\n {remove} chosen_dinner {from} dinner_options" + 4: + 2: + story: Create a lottery that lets you choose an extra prize that you might win. + code: "prizes {is} car, hamster, 1 million euros\nprize {is} {ask} 'What would you like to win?'\n{add} prize {to_list} prizes\n{print} 'You won a ' prizes {at} {random}" + 1: + story: "You are the newest Pokémon trainer from Pallet Town!\nMake a program that selects your first Pokémon.\nLet the program wait a second before revealing your first Pokémon." + code: "pokemons {is} Pikachu, Charmander, Bulbasaur, Squirtle\n{print} 'This is going to be your first Pokémon!'\n{sleep}\n{print} pokemons {at} {random}" + 9: + 2: + story: "This code asks the costumers in a restaurant if they would like to order dessert. If they do, it asks them what kind of dessert. If they order tiramisu they are told that the tiramisu is sold out.\nCan you get the code to work?" + code: "order = {ask} 'Would you like to order dessert?'\n{if} order = yes\n dessert = {ask} 'What kind of dessert would you like?'\n {if} dessert = tiramisu\n {print} 'Sorry, we are out of tiramisu.'\n {else}\n {print} 'One ' dessert ' coming right up!'\n{else}\n {print} 'You dont want a dessert. No problem!'" + 1: + story: This game will give you three maths assignments. Each time the question is different. Can you figure out the order? + code: "numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n{repeat} 3 {times}\n number = numbers {at} {random}\n correct_answer = 5 * number\n answer = {ask} 'What is 5 times' number '?'\n {if} answer = correct_answer\n {print} 'Good job!'\n {else}\n {print} 'No! The correct answer is ' correct_answer" + 2: + 1: + story: "You and your friends are going to watch some Netflix.\nShow which movie you're about to watch and wish the viewers lot of fun!" + code: "{print} It is time for an evening of Netflix\nfilm {is} Sonic the Hedgehog 2\n{print} We're going to watch film\n{print} Have fun!" + 2: + story: This is the webshop of a toy store. Create a program where costumers can add an item to their shopping cart. + code: "{print} Welcome to our toystore\ntoy {is} {ask} What would you like to buy?\n{print} toy is added to your shopping cart.\n{print} Thank you for shopping with us!" + 7: + 1: + code: "{repeat} 3 {times} {print} 'Baby shark tututututudu'\n{print} 'Baby shark'\n{repeat} 3 {times} {print} 'Mommy shark tututututudu'\n{print} 'Mommy shark'\n{repeat} 3 {times} {print} 'Daddy shark tututututudu'\n{print} 'Daddy shark'" + story: Complete the baby shark song. First comes baby shark, then mommy and finally daddy shark. + 2: + code: "{print} 'the wheels on the bus go'\n{repeat} 3 {times} {print} 'round and round'\n{print} 'the wheels of the bus go round and round'\n{print} 'all through the town'" + story: Create the song 'The wheels on the bus go round and round' + 12: + 1: + code: "verses = 'What will we do with the drunken sailor', 'Way hey and up she rises'\n{for} verse {in} verses\n {for} count {in} {range} 1 {to} 3\n {print} verse\n {print} 'Early in the morning'" + story: "Sing the song 'What shall we do with the drunken sailor'. In case you don't know it, the song goed like this:\n\nWhat will we do with the drunken sailor\nWhat will we do with the drunken sailor\nWhat will we do with the drunken sailor\nEarly in the morning\nWay hey and up she rises\nWay hey and up she rises\nWay hey and up she rises\nEarly in the morning" + 2: + story: Play a game of Twister with us! First define the variable people, then limbs, then colors. + code: "people = 'Jess', 'Nick', 'Winston'\nlimbs = 'left hand', 'left foot', 'right hand', 'right foot'\ncolors = 'red', 'blue', 'green', 'yellow'\n{for} person {in} people\n {print} person ', put your ' limbs {at} {random} ' on ' colors {at} {random}" + 8: + 1: + story: "You and four other friends are playing Pokémon Go! Create a program that decides in which team each of you will play.\nEither red, yellow or blue! Take a little pause after announcing a team." + code: "teams = red, yellow, blue\n{print} 'Red, Yellow or Blue?'\n{repeat} 5 {times}\n {print} 'You are selected in team... '\n {print} teams {at} {random}\n {sleep} 2" + 2: + code: "counter = 11\n{repeat} 10 {times}\n counter = counter - 1\n {print} counter\n {sleep} 1\n{print} 'Ready or not here I come!'" + story: Print the countdown for a game of hide and seek. diff --git a/content/parsons/ne.yaml b/content/parsons/ne.yaml new file mode 100644 index 00000000000..fbd4f836430 --- /dev/null +++ b/content/parsons/ne.yaml @@ -0,0 +1,88 @@ +levels: + 3: + 2: + story: Create a program that chooses a random meal for you. Make a list of food and a list of toppings and let the program decide what you'll have! + code: "food {is} pizza, icecream, salad, sandwich\ntoppings {is} chocolate, cheese, tuna, sprinkles\n{print} Your random meal for today is...\n{sleep} 2\n{print} food {at} {random} with toppings {at} {random}" + 3: + story: "In a chess tournament there are three players left.\nCreate a program that decides which two players have to play against each other first.\nStart by printing the two players who play the first match, then print against which player the winner will play." + code: "players {is} Liam, Noah, Sophie\nplayer_1 {is} players {at} {random}\n{remove} player_1 {from} players\nplayer_2 {is} players {at} {random}\n{print} player_1 ' first plays against ' player_2\n{remove} player_2 {from} players\n{print} 'The winner plays against ' players {at} {random}" + 1: + story: "The new school year at Hogwarts is starting! \nIt is the job of the sorting hat to sort you into one of the houses.\nWhich house will you be sorted into? Are you a Gryffindor, Hufflepuff, Ravenclaw or Slytherin.\nBefore the sorting hat reveals your house, you can tell it to not pick one of the houses." + code: "{print} The sorting hat is ready to sort you into a Hogwarts house.\nhouses {is} Gryffindor, Hufflepuf, Ravenclaw, Slytherin\ndislike {is} {ask} Are there any houses you do not want to be part of?\n{remove} dislike {from} houses\n{print} Not dislike eh? Better be... houses {at} {random}" + 4: + 1: + story: "You are the newest Pokémon trainer from Pallet Town!\nMake a program that selects your first Pokémon.\nLet the program wait a second before revealing your first Pokémon." + code: "pokemons {is} Pikachu, Charmander, Bulbasaur, Squirtle\n{print} 'This is going to be your first Pokémon!'\n{sleep}\n{print} pokemons {at} {random}" + 2: + story: Create a lottery that lets you choose an extra prize that you might win. + code: "prizes {is} car, hamster, 1 million euros\nprize {is} {ask} 'What would you like to win?'\n{add} prize {to_list} prizes\n{print} 'You won a ' prizes {at} {random}" + 5: + 2: + code: "{print} 'Solve this problem'\nanswer {is} {ask} '88 - 16 = ?'\n{if} answer {is} 72 {print} 'Correct!'\n{else} {print} 'Wrong! The answer was 72'" + story: Create a maths game. + 1: + story: "Make a program that checks if your favourite movie is already in the list of the computer.\nIf so, print that you have great taste, otherwise add the movie to the list." + code: "favorite_movies {is} Batman, Spiderman, The Avengers, Jurassic Park\nmovie {is} {ask} 'What is your favourite movie?'\n{if} movie {in} favorite_movies {print} 'You have great taste!'\n{else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!'\n{add} movie {to_list} favorite_movies" + 9: + 1: + story: This game will give you three maths assignments. Each time the question is different. Can you figure out the order? + code: "numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n{repeat} 3 {times}\n number = numbers {at} {random}\n correct_answer = 5 * number\n answer = {ask} 'What is 5 times' number '?'\n {if} answer = correct_answer\n {print} 'Good job!'\n {else}\n {print} 'No! The correct answer is ' correct_answer" + 2: + story: "This code asks the costumers in a restaurant if they would like to order dessert. If they do, it asks them what kind of dessert. If they order tiramisu they are told that the tiramisu is sold out.\nCan you get the code to work?" + code: "order = {ask} 'Would you like to order dessert?'\n{if} order = yes\n dessert = {ask} 'What kind of dessert would you like?'\n {if} dessert = tiramisu\n {print} 'Sorry, we are out of tiramisu.'\n {else}\n {print} 'One ' dessert ' coming right up!'\n{else}\n {print} 'You dont want a dessert. No problem!'" + 8: + 2: + code: "counter = 11\n{repeat} 10 {times}\n counter = counter - 1\n {print} counter\n {sleep} 1\n{print} 'Ready or not here I come!'" + story: Print the countdown for a game of hide and seek. + 1: + story: "You and four other friends are playing Pokémon Go! Create a program that decides in which team each of you will play.\nEither red, yellow or blue! Take a little pause after announcing a team." + code: "teams = red, yellow, blue\n{print} 'Red, Yellow or Blue?'\n{repeat} 5 {times}\n {print} 'You are selected in team... '\n {print} teams {at} {random}\n {sleep} 2" + 1: + 1: + code: "{print} Welcome to bakery Hedy!\n{ask} What type of pie do you want to order?\n{echo} So you want\n{print} Your order is being prepared!" + story: "Puzzels are exercises in which the lines of code are already written for you. You only have to place the lines in the correct order. Drag the lines of code into the input screen and run the code. Can you get the program to work?\n\nYou're a customer at bakery Hedy.\nYou walk into the bakery and are welcomed by the baker.\nHe asks what type of pie you want to order.\nThen he repeats your answer back to you.\nLastly, your order is being prepared." + 2: + code: "{print} This is DJ Hedy\n{ask} Are you ready to party?\n{ask} What song would you like to hear?\n{echo} Great choice! I love the song" + story: You're at the DJ Booth requesting a song. Create a program that asks if you are ready to party and then asks which song you would like to hear. + 10: + 2: + story: "This make-over robot will decide your new hairstyle for you. If you do not agree with the first choice, you can try again.\n**Mind** The variable people is defined in the first line. The variable hairstyles in the second." + code: "people = Betty, Amanda, Marc\nhairstyles = a bald head, a mohawk, a ponytail, spikes\n{for} person {in} people\n {print} person ' will get ' hairstyles {at} {random}\n happy = {ask} person ', are you happy with this choice?'\n {if} happy {is} yes\n {print} 'Great'\n {else}\n {print} 'Lets try again... Then 'person ' will get ' hairstyles {at} {random}" + 1: + story: "Help this family out by creating a schedule of who is cooking and what they should be making this week. The `{remove}` commands make sure nobody has to cook twice and they have a different dinner every day.\n**Mind!** the variable order should be first days, then people, and lastly dinner_options. This goes for the lines with the `{remove}` commands too." + code: "days = Monday, Tuesday, Wednesday, Thursday, Friday\npeople = mom, dad, Martin, Abby, Jesse\ndinner_options = pizza, tacos, pancakes, a salad, lasagne\n{for} day {in} days\n chosen_person = people {at} {random}\n chosen_dinner = dinner_options {at} {random}\n {print} 'On ' day ' ' chosen_person ' is making ' chosen_dinner\n {remove} chosen_person {from} people\n {remove} chosen_dinner {from} dinner_options" + 6: + 2: + code: "{print} 'It is your birthday!'\npeople = {ask} 'How many people do you want to give a slice of cake?'\ncakes_amount = people/8\n{print} 'You will have to buy ' cakes_amount ' cakes'" + story: Create a program that helps you calculate how many cakes you should buy for your birthday party. + 1: + code: "age = {ask} 'How old are you?'\ndog_age = age * 7\ncat_age = age * 5\n{print} 'In dog years you are ' dog_age ' years old.'\n{print} 'In cat years you are ' cat_age ' years old.'" + story: "Make a program that calculates how old you are in dog and cat years.\nFirst ask the age of the user and start calculating.\nFirst calculate the dogyears then the catyears.\nShow the user the different ages." + 2: + 1: + story: "You and your friends are going to watch some Netflix.\nShow which movie you're about to watch and wish the viewers lot of fun!" + code: "{print} It is time for an evening of Netflix\nfilm {is} Sonic the Hedgehog 2\n{print} We're going to watch film\n{print} Have fun!" + 2: + story: This is the webshop of a toy store. Create a program where costumers can add an item to their shopping cart. + code: "{print} Welcome to our toystore\ntoy {is} {ask} What would you like to buy?\n{print} toy is added to your shopping cart.\n{print} Thank you for shopping with us!" + 7: + 1: + code: "{repeat} 3 {times} {print} 'Baby shark tututututudu'\n{print} 'Baby shark'\n{repeat} 3 {times} {print} 'Mommy shark tututututudu'\n{print} 'Mommy shark'\n{repeat} 3 {times} {print} 'Daddy shark tututututudu'\n{print} 'Daddy shark'" + story: Complete the baby shark song. First comes baby shark, then mommy and finally daddy shark. + 2: + code: "{print} 'the wheels on the bus go'\n{repeat} 3 {times} {print} 'round and round'\n{print} 'the wheels of the bus go round and round'\n{print} 'all through the town'" + story: Create the song 'The wheels on the bus go round and round' + 12: + 1: + code: "verses = 'What will we do with the drunken sailor', 'Way hey and up she rises'\n{for} verse {in} verses\n {for} count {in} {range} 1 {to} 3\n {print} verse\n {print} 'Early in the morning'" + story: "Sing the song 'What shall we do with the drunken sailor'. In case you don't know it, the song goed like this:\n\nWhat will we do with the drunken sailor\nWhat will we do with the drunken sailor\nWhat will we do with the drunken sailor\nEarly in the morning\nWay hey and up she rises\nWay hey and up she rises\nWay hey and up she rises\nEarly in the morning" + 2: + story: Play a game of Twister with us! First define the variable people, then limbs, then colors. + code: "people = 'Jess', 'Nick', 'Winston'\nlimbs = 'left hand', 'left foot', 'right hand', 'right foot'\ncolors = 'red', 'blue', 'green', 'yellow'\n{for} person {in} people\n {print} person ', put your ' limbs {at} {random} ' on ' colors {at} {random}" + 11: + 1: + story: Create the count down clock for New Year's eve! The program should show the numbers from 10 to 1 for a second and then wish you a happy new year. + code: "{for} number {in} {range} 10 {to} 1\n {print} number\n {sleep}\n {clear}\n{print} 'Happy New Year!'" + 2: + story: "Create a program that tells us the final results of the science fair. Firstly define the variable contestants, then the variable place.\n**Hint** Line 5 should be the sleep command, and you should end with saying congratulations." + code: "{print} 'And now we will reveal the results of the science fair'\ncontestants = Vivienne, Paul, Trixy, Bianca, Katya\nplace = 5\n{for} contestant {in} contestants\n {sleep} 2\n {print} 'On number ' place ' has ended... ' contestant\n place = place - 1\n{print} 'Congratulations!'" diff --git a/content/parsons/nl.yaml b/content/parsons/nl.yaml index 8dd6d3cf664..3828da1d390 100644 --- a/content/parsons/nl.yaml +++ b/content/parsons/nl.yaml @@ -109,10 +109,10 @@ levels: 2: story: Maak een programma dat je helpt berekenen hoeveel taarten je moet kopen voor iemands verjaardag. code: |- - {print} 'It is your birthday!' - people = {ask} 'How many people do you want to give a slice of cake?' - cakes_amount = people/8 - {print} 'You will have to buy ' cakes_amount ' cakes' + {print} 'Het is jouw verjaardag!' + mensen = {ask} 'Hoeveel mensen wil je een stuk taart geven?' + aantal_taarten = mensen/8 + {print} 'Je moet ' aantal_taarten ' taarten kopen.' 7: 1: story: Maak het baby shark liedje compleet. Eerst komt baby, dan mama tot slot papa haai. diff --git a/content/parsons/ta.yaml b/content/parsons/ta.yaml new file mode 100644 index 00000000000..594bfa31eda --- /dev/null +++ b/content/parsons/ta.yaml @@ -0,0 +1,269 @@ +levels: + 1: + 1: + story: |- + Puzzels are exercises in which the lines of code are already written for you. You only have to place the lines in the correct order. Drag the lines of code into the input screen and run the code. Can you get the program to work? + + You're a customer at bakery Hedy. + You walk into the bakery and are welcomed by the baker. + He asks what type of pie you want to order. + Then he repeats your answer back to you. + Lastly, your order is being prepared. + code: |- + {print} Welcome to bakery Hedy! + {ask} What type of pie do you want to order? + {echo} So you want + {print} Your order is being prepared! + 2: + story: You're at the DJ Booth requesting a song. Create a program that asks if you are ready to party and then asks which song you would like to hear. + code: |- + {print} This is DJ Hedy + {ask} Are you ready to party? + {ask} What song would you like to hear? + {echo} Great choice! I love the song + 2: + 1: + story: |- + You and your friends are going to watch some Netflix. + Show which movie you're about to watch and wish the viewers lot of fun! + code: |- + {print} It is time for an evening of Netflix + film {is} Sonic the Hedgehog 2 + {print} We're going to watch film + {print} Have fun! + 2: + story: This is the webshop of a toy store. Create a program where costumers can add an item to their shopping cart. + code: |- + {print} Welcome to our toystore + toy {is} {ask} What would you like to buy? + {print} toy is added to your shopping cart. + {print} Thank you for shopping with us! + 3: + 1: + story: "The new school year at Hogwarts is starting! \nIt is the job of the sorting hat to sort you into one of the houses.\nWhich house will you be sorted into? Are you a Gryffindor, Hufflepuff, Ravenclaw or Slytherin.\nBefore the sorting hat reveals your house, you can tell it to not pick one of the houses." + code: |- + {print} The sorting hat is ready to sort you into a Hogwarts house. + houses {is} Gryffindor, Hufflepuf, Ravenclaw, Slytherin + dislike {is} {ask} Are there any houses you do not want to be part of? + {remove} dislike {from} houses + {print} Not dislike eh? Better be... houses {at} {random} + 2: + story: Create a program that chooses a random meal for you. Make a list of food and a list of toppings and let the program decide what you'll have! + code: |- + food {is} pizza, icecream, salad, sandwich + toppings {is} chocolate, cheese, tuna, sprinkles + {print} Your random meal for today is... + {sleep} 2 + {print} food {at} {random} with toppings {at} {random} + 3: + story: |- + In a chess tournament there are three players left. + Create a program that decides which two players have to play against each other first. + Start by printing the two players who play the first match, then print against which player the winner will play. + code: |- + players {is} Liam, Noah, Sophie + player_1 {is} players {at} {random} + {remove} player_1 {from} players + player_2 {is} players {at} {random} + {print} player_1 ' first plays against ' player_2 + {remove} player_2 {from} players + {print} 'The winner plays against ' players {at} {random} + 4: + 1: + story: |- + You are the newest Pokémon trainer from Pallet Town! + Make a program that selects your first Pokémon. + Let the program wait a second before revealing your first Pokémon. + code: |- + pokemons {is} Pikachu, Charmander, Bulbasaur, Squirtle + {print} 'This is going to be your first Pokémon!' + {sleep} + {print} pokemons {at} {random} + 2: + story: Create a lottery that lets you choose an extra prize that you might win. + code: |- + prizes {is} car, hamster, 1 million euros + prize {is} {ask} 'What would you like to win?' + {add} prize {to_list} prizes + {print} 'You won a ' prizes {at} {random} + 5: + 1: + story: |- + Make a program that checks if your favourite movie is already in the list of the computer. + If so, print that you have great taste, otherwise add the movie to the list. + code: |- + favorite_movies {is} Batman, Spiderman, The Avengers, Jurassic Park + movie {is} {ask} 'What is your favourite movie?' + {if} movie {in} favorite_movies {print} 'You have great taste!' + {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' + {add} movie {to_list} favorite_movies + 2: + story: Create a maths game. + code: |- + {print} 'Solve this problem' + answer {is} {ask} '88 - 16 = ?' + {if} answer {is} 72 {print} 'Correct!' + {else} {print} 'Wrong! The answer was 72' + 6: + 1: + story: |- + Make a program that calculates how old you are in dog and cat years. + First ask the age of the user and start calculating. + First calculate the dogyears then the catyears. + Show the user the different ages. + code: |- + age = {ask} 'How old are you?' + dog_age = age * 7 + cat_age = age * 5 + {print} 'In dog years you are ' dog_age ' years old.' + {print} 'In cat years you are ' cat_age ' years old.' + 2: + story: Create a program that helps you calculate how many cakes you should buy for your birthday party. + code: |- + {print} 'It is your birthday!' + people = {ask} 'How many people do you want to give a slice of cake?' + cakes_amount = people/8 + {print} 'You will have to buy ' cakes_amount ' cakes' + 7: + 1: + story: Complete the baby shark song. First comes baby shark, then mommy and finally daddy shark. + code: |- + {repeat} 3 {times} {print} 'Baby shark tututututudu' + {print} 'Baby shark' + {repeat} 3 {times} {print} 'Mommy shark tututututudu' + {print} 'Mommy shark' + {repeat} 3 {times} {print} 'Daddy shark tututututudu' + {print} 'Daddy shark' + 2: + story: Create the song 'The wheels on the bus go round and round' + code: |- + {print} 'the wheels on the bus go' + {repeat} 3 {times} {print} 'round and round' + {print} 'the wheels of the bus go round and round' + {print} 'all through the town' + 8: + 1: + story: |- + You and four other friends are playing Pokémon Go! Create a program that decides in which team each of you will play. + Either red, yellow or blue! Take a little pause after announcing a team. + code: |- + teams = red, yellow, blue + {print} 'Red, Yellow or Blue?' + {repeat} 5 {times} + {print} 'You are selected in team... ' + {print} teams {at} {random} + {sleep} 2 + 2: + story: Print the countdown for a game of hide and seek. + code: |- + counter = 11 + {repeat} 10 {times} + counter = counter - 1 + {print} counter + {sleep} 1 + {print} 'Ready or not here I come!' + 9: + 1: + story: This game will give you three maths assignments. Each time the question is different. Can you figure out the order? + code: |- + numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + {repeat} 3 {times} + number = numbers {at} {random} + correct_answer = 5 * number + answer = {ask} 'What is 5 times' number '?' + {if} answer = correct_answer + {print} 'Good job!' + {else} + {print} 'No! The correct answer is ' correct_answer + 2: + story: |- + This code asks the costumers in a restaurant if they would like to order dessert. If they do, it asks them what kind of dessert. If they order tiramisu they are told that the tiramisu is sold out. + Can you get the code to work? + code: |- + order = {ask} 'Would you like to order dessert?' + {if} order = yes + dessert = {ask} 'What kind of dessert would you like?' + {if} dessert = tiramisu + {print} 'Sorry, we are out of tiramisu.' + {else} + {print} 'One ' dessert ' coming right up!' + {else} + {print} 'You dont want a dessert. No problem!' + 10: + 1: + story: |- + Help this family out by creating a schedule of who is cooking and what they should be making this week. The `{remove}` commands make sure nobody has to cook twice and they have a different dinner every day. + **Mind!** the variable order should be first days, then people, and lastly dinner_options. This goes for the lines with the `{remove}` commands too. + code: |- + days = Monday, Tuesday, Wednesday, Thursday, Friday + people = mom, dad, Martin, Abby, Jesse + dinner_options = pizza, tacos, pancakes, a salad, lasagne + {for} day {in} days + chosen_person = people {at} {random} + chosen_dinner = dinner_options {at} {random} + {print} 'On ' day ' ' chosen_person ' is making ' chosen_dinner + {remove} chosen_person {from} people + {remove} chosen_dinner {from} dinner_options + 2: + story: |- + This make-over robot will decide your new hairstyle for you. If you do not agree with the first choice, you can try again. + **Mind** The variable people is defined in the first line. The variable hairstyles in the second. + code: |- + people = Betty, Amanda, Marc + hairstyles = a bald head, a mohawk, a ponytail, spikes + {for} person {in} people + {print} person ' will get ' hairstyles {at} {random} + happy = {ask} person ', are you happy with this choice?' + {if} happy {is} yes + {print} 'Great' + {else} + {print} 'Lets try again... Then 'person ' will get ' hairstyles {at} {random} + 11: + 1: + story: Create the count down clock for New Year's eve! The program should show the numbers from 10 to 1 for a second and then wish you a happy new year. + code: |- + {for} number {in} {range} 10 {to} 1 + {print} number + {sleep} + {clear} + {print} 'Happy New Year!' + 2: + story: |- + Create a program that tells us the final results of the science fair. Firstly define the variable contestants, then the variable place. + **Hint** Line 5 should be the sleep command, and you should end with saying congratulations. + code: |- + {print} 'And now we will reveal the results of the science fair' + contestants = Vivienne, Paul, Trixy, Bianca, Katya + place = 5 + {for} contestant {in} contestants + {sleep} 2 + {print} 'On number ' place ' has ended... ' contestant + place = place - 1 + {print} 'Congratulations!' + 12: + 1: + story: |- + Sing the song 'What shall we do with the drunken sailor'. In case you don't know it, the song goed like this: + + What will we do with the drunken sailor + What will we do with the drunken sailor + What will we do with the drunken sailor + Early in the morning + Way hey and up she rises + Way hey and up she rises + Way hey and up she rises + Early in the morning + code: |- + verses = 'What will we do with the drunken sailor', 'Way hey and up she rises' + {for} verse {in} verses + {for} count {in} {range} 1 {to} 3 + {print} verse + {print} 'Early in the morning' + 2: + story: Play a game of Twister with us! First define the variable people, then limbs, then colors. + code: |- + people = 'Jess', 'Nick', 'Winston' + limbs = 'left hand', 'left foot', 'right hand', 'right foot' + colors = 'red', 'blue', 'green', 'yellow' + {for} person {in} people + {print} person ', put your ' limbs {at} {random} ' on ' colors {at} {random} diff --git a/content/quizzes/da.yaml b/content/quizzes/da.yaml index 3f831d1345d..9b1bf1ecf7a 100644 --- a/content/quizzes/da.yaml +++ b/content/quizzes/da.yaml @@ -16,27 +16,19 @@ levels: question_score: '10' 2: question_text: Which need to be filled in on the blanks to make the text Hello! appear? - code: ___ Hello! + code: _ Hej! mp_choice_options: - option: |- - ``` - {echo} - ``` + `{echo}` feedback: '`{echo}` repeats a given answer.' - option: |- - ``` - {print} - ``` + `{print}` feedback: Correct! - option: |- - ``` - hello - ``` + `hello` feedback: Hello isn't a command. - option: |- - ``` - {ask} - ``` + `{ask}` feedback: With `{ask}`, you can ask a question. hint: _?_ Hello world! correct_answer: B @@ -46,22 +38,22 @@ levels: mp_choice_options: - option: |- ``` - {print} What is your favorite color? + {print} Hvad er din yndlingsfarve? ``` feedback: '`{print}` prints text, but it doesn''t ask questions.' - option: |- ``` - {ask} {print} What is your favorite color? + {ask} {print} Hvad er din yndlingsfarve? ``` feedback: You only need one command, not two. - option: |- ``` - {ask} What is your favorite color? + {ask} Hvad er din yndlingsfarve? ``` feedback: Great! - option: |- ``` - {echo} What is your favorite color? + {echo} Hvad er din yndlingsfarve? ``` feedback: '`{echo}` repeats your answer back to you.' hint: You can ask something with the `{ask}` command @@ -92,24 +84,16 @@ levels: _?_ So your favorite pet is... mp_choice_options: - option: |- - ``` - {print} - ``` + `{print}` feedback: No, you would like the answer to be repeated back to you. - option: |- - ``` - Hedy - ``` + `Hedy` feedback: Hedy isn't a command. - option: |- - ``` - {ask} - ``` + `{ask}` feedback: With `{ask}` you can ask a question. - option: |- - ``` - {echo} - ``` + `{echo}` feedback: Right on! hint: You want to see the answer at the end of line 2... correct_answer: D @@ -191,17 +175,17 @@ levels: {echo} {echo} mp_choice_options: - - option: Are you ready to go to level 2? + - option: Er du klar til at gå videre til niveau 2? feedback: There are two echo commands - option: |- - Yes! - Yes! - feedback: Great job! - - option: Yes! + Ja! + Ja! + feedback: Godt klaret! + - option: Ja! feedback: There are two echo commands - option: |- - Are you ready to go to level 2? - Yes! + Er du klar til at gå videre til niveau 2? + Ja! feedback: There are two echo commands hint: Let's go! correct_answer: B @@ -226,22 +210,22 @@ levels: mp_choice_options: - option: |- ``` - name {is} {ask} What is your name? + navn {is} {ask} Hvad hedder du? ``` feedback: Super! - option: |- ``` - {ask} {is} name What is your name + {ask} {is} navn Hvad hedder du ``` feedback: The words are right, the order is not! - option: |- ``` - {ask} What is your name? + {ask} Hvad hedder du? ``` feedback: This worked in level 1, but in level 2 and up it works differently. - option: |- ``` - {ask} What is your name? {is} name + {ask} Hvad hedder du? {is} navn ``` feedback: The words are right, the order isn't! hint: '`{ask}` doesn''t work like in level 1' @@ -303,24 +287,16 @@ levels: {print} Hedy! mp_choice_options: - option: |- - ``` - {sleep} - ``` + `{sleep}` feedback: Perfect! - option: |- - ``` - {echo} - ``` + `{echo}` feedback: There is nothing to repeat back here - option: |- - ``` - {print} - ``` + `{print}` feedback: There is no text there to `{print}` there - option: |- - ``` - {ask} - ``` + `{ask}` feedback: There is no question there to be asked hint: Pause for dramatic effect... correct_answer: A @@ -363,22 +339,22 @@ levels: mp_choice_options: - option: |- ``` - age {ask} {is} How old are you? + alder {ask} {is} Hvor gammel er du? ``` feedback: That is the wrong order - option: |- ``` - {ask} {is} age How old are you? + {ask} {is} alder Hvor gammel er du? ``` feedback: That is the wrong order - option: |- ``` - age {is} {ask} How old are you? + alder {is} {ask} Hvor gammel er du? ``` feedback: You get it! - option: |- ``` - age {is} How old are you? + alder {is} Hvor gammel er du? ``` feedback: Where is the `{ask}` command? hint: The variable name should come first @@ -416,12 +392,12 @@ levels: feedback: You want to know the favorite flavor! - option: |- ``` - {print} strawberries + {print} jordbær ``` feedback: You do not want a `{print}` command at the middle of the line... - option: |- ``` - strawberries, chocolate, vanilla + jordbær, chokolade, vanilje ``` feedback: This way you are making a list. You don't want that now. - option: |- @@ -437,19 +413,13 @@ levels: question_text: What command do you use to let Hedy pick something arbitrarily? mp_choice_options: - option: |- - ``` - {print} - ``` + `{print}` feedback: '`{print}` is used to print text' - option: |- - ``` - {ask} - ``` + `{ask}` feedback: '`{ask}` is used to ask a question' - option: |- - ``` - {is} - ``` + `{is}` feedback: '`{is}` is used to make a list' - option: |- ``` @@ -489,7 +459,7 @@ levels: feedback: You're almost there. The order of the words isn't right yet. - option: |- ``` - {print} rock {at} {random} + {print} sten {at} {random} ``` feedback: you don't always want the Hedy to {print} rock, sometimes you want scissors or paper. - option: |- @@ -510,17 +480,17 @@ levels: mp_choice_options: - option: |- ``` - {print} price + {print} pris ``` feedback: You don't want to `{print}` the word price, but you want to `{print}` one price out of your list `{at} {random}` - option: |- ``` - {print} prices {at} {random} + {print} priser {at} {random} ``` feedback: Great! You've really paid attention. - option: |- ``` - {print} {at} {random} price + {print} {at} {random} pris ``` feedback: '`{at} {random}` is placed behind the variable.' - option: Nothing, this code is alright. @@ -880,24 +850,16 @@ levels: _?_ {print} 'My lucky number is 5!' mp_choice_options: - option: |- - ``` - {print} - ``` + `{print}` feedback: There already is a `{print}` command. - option: |- - ``` - {if} - ``` + `{if}` feedback: The `{if}` command is used in the line above. - option: |- - ``` - {sleep} - ``` + `{sleep}` feedback: That's not it! - option: |- - ``` - {else} - ``` + `{else}` feedback: That's right! hint: Which one goes together with the `{if}` command? correct_answer: D @@ -1014,24 +976,16 @@ levels: {else} _?_ 'Unfortunately... No big money for you.' mp_choice_options: - option: |- - ``` - {if} - ``` + `{if}` feedback: '`{if}` is in the line above.' - option: |- - ``` - {at} {random} - ``` + `{at}` `{random}` feedback: No, you don't need `{at} {random}`. - option: |- - ``` - {else} - ``` + `{else}` feedback: There already is an `{else}` command - option: |- - ``` - {print} - ``` + `{print}` feedback: Awesome! hint: After `{else}` a `{print}` command follows correct_answer: D @@ -1045,23 +999,19 @@ levels: mp_choice_options: - option: |- ``` - favorite animal + yndlingsdyr ``` feedback: That's not the variable name. - option: |- ``` - animal + dyr ``` feedback: Great job! - option: |- - ``` - {if} - ``` + `{if}` feedback: '`{if}` is already there' - option: |- - ``` - {print} - ``` + `{print}` feedback: No, that's not it. hint: What the variable name? correct_answer: B @@ -1314,22 +1264,22 @@ levels: mp_choice_options: - option: |- ``` - {print} 100 {times} 'hello' + {print} 100 {times} 'hej' ``` feedback: '`{repeat}` 100 `{times}` `{print}` ''hello''' - option: |- ``` - {print} {repeat} 100 {times} 'hello' + {print} {repeat} 100 {times} 'hej' ``` feedback: '{repeat} 100 {times} {print} ''hello''' - option: |- ``` - {repeat} 'hello' 100 {times} + {repeat} 'hej' 100 {times} ``` feedback: '{repeat} 100 {times} {print} ''hello''' - option: |- ``` - {repeat} 100 {times} {print} 'hello' + {repeat} 100 {times} {print} 'hej' ``` feedback: That's right! hint: First the repeat command, then the `{print}` command @@ -1362,19 +1312,13 @@ levels: ``` feedback: That's right! - option: |- - ``` - {print} - ``` + `{print}` feedback: '`{print}` is spelled correctly' - option: |- - ``` - {repeat} - ``` + `{repeat}` feedback: '`{repeat}` is spelled correctly' - option: |- - ``` - {times} - ``` + `{times}` feedback: '`{times}` is spelled correctly' hint: I'm is wrong, you can't use apostrophes correct_answer: A @@ -1507,7 +1451,7 @@ levels: - option: |- ``` {print} 'Batman was flying through Gotham. ' - {print} 'When suddenly he heard someone screaming...' + {print} 'When suddenly he heard someone screaming!' {print} 'Help!' {repeat} 3 {times} {print} 'Please help me!' ``` @@ -1515,7 +1459,7 @@ levels: - option: |- ``` {print} 'Batman was flying through Gotham.' - {print} 'When suddenly he heard someone screaming...' + {print} 'When suddenly he heard someone screaming!' {repeat} 3 {times} 'Help!' {print} 'Please help me!' ``` @@ -1523,7 +1467,7 @@ levels: - option: |- ``` {print} Batman was flying through Gotham. - {print} When suddenly he heard someone screaming... + {print} When suddenly he heard someone screaming! {repeat} 3 {times} {print} Help! {print} Please help me! ``` @@ -1531,7 +1475,7 @@ levels: - option: |- ``` {print} 'Batman was flying through Gotham.' - {print} 'When suddenly he heard someone screaming...' + {print} 'When suddenly he heard someone screaming!' {repeat} 3 {times} {print} 'Help!' {print} 'Please help me!' ``` @@ -1570,7 +1514,7 @@ levels: - option: |- ``` {repeat} 4 {times} 'if youre happy and you know it' - {repeat} 2 times 'clap your hands' + {repeat} 2 {times} 'clap your hands' {print} 'and you really want to show it' {print} 'clap your hands' ``` @@ -1587,25 +1531,25 @@ levels: {print} 'Im Hedy!' mp_choice_options: - option: |- - Hello - Im Hedy! + Hej + Jeg hedder Hedy! feedback: Everything is printed twice. - option: |- - Hello - Hello - Im Hedy + Hej + Hej + Jeg hedder Hedy feedback: The second line is repeated twice as well. - option: |- - Hello - Im Hedy! - Hello - Im Hedy! + Hej + Jeg hedder Hedy! + Hej + Jeg hedder Hedy! feedback: Super! - option: |- - Hello - Hello - Im Hedy! - Im Hedy! + Hej + Hej + Jeg hedder Hedy! + Jeg hedder Hedy! feedback: Everything is printed twice hint: Both lines are repeated twice. correct_answer: C @@ -1744,7 +1688,7 @@ levels: Welcome to restaurant Hedy Pancakes Pancakes - feedback: Well done! + feedback: Godt klaret! hint: The first sentence and question will not be repeated correct_answer: D question_score: '10' @@ -1983,24 +1927,24 @@ levels: mp_choice_options: - option: |- ``` - desert = {ask} 'What is your favorite type of desert?' - {if} desert {is} icecream + dessert = {ask} 'What is your favorite type of dessert?' + {if} dessert {is} icecream {repeat} 3 {times} {print} 'Icecream is the best!' ``` feedback: Don't forget the indentation after `{repeat}` commands. - option: |- ``` - desert = {ask} 'What is your favorite type of desert?' - {if} desert {is} icecream + dessert = {ask} 'What is your favorite type of dessert?' + {if} dessert {is} icecream {repeat} 3 {times} {print} 'Icecream is the best!' ``` feedback: Use indentation after an `{if}` command - option: |- ``` - desert = {ask} 'What is your favorite type of desert?' - {if} desert {is} icecream + dessert = {ask} 'What is your favorite type of dessert?' + {if} dessert {is} icecream {repeat} 3 {times} {print} 'Icecream is the best!' ``` @@ -2008,8 +1952,8 @@ levels: - option: |- ``` {repeat} 3 {times} - desert = {ask} 'What is your favorite type of desert?' - {if} desert {is} icecream + dessert = {ask} 'What is your favorite type of dessert?' + {if} dessert {is} icecream {repeat} 3 {times} {print} 'Icecream is the best!' ``` @@ -2044,7 +1988,7 @@ levels: {if} food {is} pizza {if} size {is} medium {if} drink {is} coke - price = price - 2 + price = price - 5 ``` feedback: Amazing! - option: |- @@ -2052,7 +1996,7 @@ levels: {if} food {is} pizza {if} size {is} medium {if} drink {is} coke - price = price - 2 + price = price - 5 ``` feedback: Try again! - option: |- @@ -2060,7 +2004,7 @@ levels: {if} food {is} pizza {if} size {is} medium {if} drink {is} coke - price = price - 2 + price = price - 5 ``` feedback: Try again - option: |- @@ -2068,7 +2012,7 @@ levels: {if} food {is} pizza {if} size {is} medium {if} drink {is} coke - price = price - 2 + price = price - 5 ``` feedback: Try again hint: After each `{if}` command, the line below should indent @@ -2317,7 +2261,7 @@ levels: feedback: You want each name printed. So the first word should not be names but... - option: |- ``` - 'people gets a colors shirt' + people ' gets a colors shirt' ``` feedback: There is no variable named people.. hint: Mind the quotation marks and the names of the variables @@ -2376,19 +2320,13 @@ levels: ``` feedback: 'No' - option: |- - ``` - {range} - ``` + `{range}` feedback: Correct - option: |- - ``` - {if} - ``` + `{if}` feedback: 'No' - option: |- - ``` - {for} - ``` + `{for}` feedback: 'No' hint: What did you learn in this level? correct_answer: B @@ -2654,7 +2592,7 @@ levels: - option: 3.5 + 1.5 feedback: This is not the one! - option: |- - thee and a half plus one and a half is... + three and a half plus one and a half is... five feedback: Take a close look at the second line... - option: |- @@ -2704,7 +2642,7 @@ levels: feedback: Correct! - option: The quotation marks aren't used correctly in line 2 feedback: That's not true - - option: You can't use the = sign when using an ask command + - option: You can't use the = sign when using an {ask} command feedback: That's not true - option: Nothing is wrong. feedback: That's not true @@ -2719,11 +2657,11 @@ levels: if category = high heels print High heels are 50% off now! mp_choice_options: - - option: Line 1 and 2 + - option: Linje 1 og 2 feedback: 'No' - - option: Line 1, 2 and 3 + - option: Linje 1, 2 og 3 feedback: 'No' - - option: Line 1, 2 and 4 + - option: Linje 1, 2 og 4 feedback: 'No' - option: All of the lines feedback: Perfect! @@ -2757,7 +2695,7 @@ levels: correct_answer: B question_score: '10' 6: - question_text: Which line should be filled in at the ??? + question_text: Which line should be filled in at the `_`? code: |- print 'Welcome to McHedy!' order = ask 'Would you like a hamburger or fries?' @@ -2861,10 +2799,10 @@ levels: correct_answer: B question_score: '10' 9: - question_text: Which code should be filled in in line 1 at the ??? + question_text: Which code should be filled in in line 1 at the `_`? code: |- - ??? - print 'You won ' prices at random '!' + _ + {print} 'You won ' prizes {at} {random} '!' mp_choice_options: - option: |- ``` @@ -2890,16 +2828,16 @@ levels: correct_answer: C question_score: '10' 10: - question_text: Which line of code should be filled in at the ??? to complete the song ? + question_text: Which line of code should be filled in at the `_` to complete the song ? code: |- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!' - ??? - for i in range 0 to 1 - 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 + _ + {for} i {in} {range} 0 {to} 1 + {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 mp_choice_options: - option: for i in range 1 to 3 feedback: This is a hard one! All the actions on the list must be in the song. @@ -2960,7 +2898,7 @@ levels: feedback: You don't have to be vegan and muslim - option: or feedback: Great thinking! - - option: + + - option: '`+`' feedback: 'No' - option: print feedback: 'No' @@ -3006,8 +2944,8 @@ levels: 5: question_text: Which statement is true about this code? code: |- - if name = 'Cinderella' and shoe_size = 38 - print 'You are my one true love!' + {if} name = 'Cinderella' {and} shoe_size = 38 + {print} 'You are my one true love!' mp_choice_options: - option: Every person with shoe size 38 is this prince's one true love feedback: The prince is a little more picky than that! @@ -3133,13 +3071,13 @@ levels: ``` feedback: Correct! - option: |- - Line 3 should be: + Line 3 should be: ``` {if} chocolate = 'no' {and} sprinkles = 'no' ``` feedback: This is not what I ordered! - option: |- - Line 5 should be: + Line 5 should be: ``` {if} chocolate = 'yes' {and} sprinkles = 'yes' ``` @@ -3230,7 +3168,7 @@ levels: feedback: That's not it - option: '`<` and `>=`' feedback: You are right - - option: '`+` and `==`' + - option: '`+` og `==`' hint: There are 130 people allowed in the club correct_answer: C question_score: '10' @@ -3241,7 +3179,7 @@ levels: price = 10 money = {ask} How much money do you have? buy = {ask} 'Would you like to buy this teddy bear?' - {if} money >= price and buy == 'yes' + {if} money >= price {and} buy == 'yes' {print} 'You can buy the bear!' {else} {print} 'You cannot buy this bear!' @@ -3262,7 +3200,7 @@ levels: code: |- age = {ask} 'How old are you?' ticket = {ask} 'Do you have a ticket?' - {if} age _ and ticket == 'yes' + {if} age _ {and} ticket == 'yes' {print} 'You can enter the movie theater.' {else} {print} 'You are not allowed to come in!' @@ -3282,7 +3220,7 @@ levels: question_text: How many times do you have to say you are annoyed before this annoying game stops? code: |- lives = 2 - {repeat} 10 times + {repeat} 10 {times} {if} lives != 0 answer = {ask} 'Are you annoyed yet?' {if} answer == 'yes' @@ -3338,14 +3276,14 @@ levels: {print} 'Enjoy the ride' mp_choice_options: - option: You must be taller than 120 cm to go on the roller coaster - feedback: True! + feedback: Det er sandt! - option: You must be taller than 119 cm to go on the roller coaster feedback: If you are 120 cm you won't get in - option: You must be shorter than 120 cm to go on the roller coaster - feedback: '> means greater than' + feedback: '> betyder større end' - option: There are no length restrictions to go on the roller coaster feedback: There are. - hint: '> means greater than' + hint: '> betyder større end' correct_answer: A question_score: '10' 9: @@ -3354,7 +3292,7 @@ levels: chocolate = {ask} 'How many pieces of chocolate have you eaten?' {if} chocolate <= 2 {print} 'That is a healthy amount' - {if} chocolate > 2 and chocolate =< 8 + {if} chocolate > 2 {and} chocolate =< 8 {print} 'That is a bit much' {if} chocolate > 8 {print} 'You will get a stomach ache!' @@ -3393,9 +3331,9 @@ levels: question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.' code: |- answer = 0 - while answer _ 'Amsterdam' - answer = ask 'What is the capital city of the Netherlands?' - print 'You have given the correct answer' + {while} answer _ 'Amsterdam' + answer = {ask} 'What is the capital city of the Netherlands?' + {print} 'You have given the correct answer' mp_choice_options: - option: '`=!`' feedback: That is not right. @@ -3437,8 +3375,8 @@ levels: 3: question_text: Which command should be filled in on the two blanks? code: |- - _ age >= 18 - print 'you are not allowed in this bar' + _ age < 18 + {print} 'you are not allowed in this bar' mp_choice_options: - option: '`{in}`' feedback: That's not it @@ -3455,14 +3393,14 @@ levels: question_text: What's wrong with this code? code: |- options = 1, 2, 3, 4, 5, 6 - print 'Throw 6 as fast as you can!' + {print} 'Throw 6 as fast as you can!' thrown = 0 tries = 0 - while thrown == 6 - thrown = options at random - print 'You threw ' thrown + {while} thrown == 6 + thrown = options {at} {random} + {print} 'You threw ' thrown tries = tries + 1 - print 'Yes! You have thrown 6 in ' tries ' tries.' + {print} 'Yes! You have thrown 6 in ' tries ' tries.' mp_choice_options: - option: In line 1 == should be used instead of = feedback: No that's not it @@ -3479,13 +3417,13 @@ levels: question_text: What should be placed on the blank to make this program work correctly? code: |- wetness = 10 - while wetness != 0 - print 'Your hair is still wet, hair dryer on!' - sleep 1 - clear + {while} wetness != 0 + {print} 'Your hair is still wet, hair dryer on!' + {sleep} 1 + {clear} wetness _ - print 'All dry!' + {print} 'All dry!' mp_choice_options: - option: = wetness feedback: That will not change anything @@ -3504,8 +3442,8 @@ levels: lives = 100 {while} lives != 0 answer = {ask} 'Are you annoyed yet?' - {if} answer == 'yes' - lives = lives - 1 + {if} answer == 'yes' + lives = lives - 1 mp_choice_options: - option: while should be if feedback: No that is not right @@ -3564,16 +3502,16 @@ levels: feedback: It only sprays when you're in there. - option: The lights will always stay on. feedback: That wouldn't be right. - hint: The block after the while command keeps happening while the toilet is occupied. + hint: The block after the {while} command keeps happening while the toilet is occupied. correct_answer: B question_score: '10' 9: question_text: What will the diet app say if you have eaten 1600 calories today? code: |- - chocolate = {ask} 'How many calories have you eaten today?' + calories = {ask} 'How many calories have you eaten today?' {while} calories <= 1000 {print} 'You could eat some more' - {while} calories > 1000 and calories =< 2000 + {while} calories > 1000 {and} calories =< 2000 {print} 'That is alright' {while} calories > 2000 {print} 'You have had enough for today' @@ -3978,7 +3916,7 @@ levels: 🦔 🦔 ``` - feedback: Well done! + feedback: Godt klaret! - option: |- ``` 🦔 @@ -4042,7 +3980,7 @@ levels: 79 97 ``` - feedback: Well done! + feedback: Godt klaret! - option: |- ``` another number @@ -4162,7 +4100,7 @@ levels: - option: In the `{for}` command `insect` should be `insects`. feedback: Not true. - option: Nothing! - feedback: Well done! + feedback: Godt klaret! - option: There is an indentation mistake in the last line. feedback: Nope. hint: Read the code carefully. @@ -4210,7 +4148,7 @@ levels: - option: The `{if}` command is not used correctly. feedback: Not true. - option: Line 3 should be `volume_room = number * number * number`. - feedback: Well done! + feedback: Godt klaret! - option: There is an indentation mistake in the last line. feedback: Nope. hint: Read the code carefully. diff --git a/content/quizzes/kab.yaml b/content/quizzes/kab.yaml new file mode 100644 index 00000000000..844f25a2dc9 --- /dev/null +++ b/content/quizzes/kab.yaml @@ -0,0 +1,2543 @@ +levels: + 13: + 5: + correct_answer: C + mp_choice_options: + - feedback: The prince is a little more picky than that! + option: Every person with shoe size 38 is this prince's one true love + - option: Every person named Cinderella is this prince's one true love + feedback: The prince is a little more picky than that! + - feedback: Fantastic! + option: Every person that is named Cinderella and has shoe size 38 is this prince's one true love + - feedback: The prince is a little more picky than that! + option: Every person that's not named Cinderella and does not have shoe size 38 is this prince's one true love + question_text: Which statement is true about this code? + code: "{if} name = 'Cinderella' {and} shoe_size = 38\n {print} 'You are my one true love!'" + hint: Both statements have to be true + question_score: '10' + 6: + mp_choice_options: + - option: Michael is a boy with glasses + feedback: Try again + - feedback: Try again + option: Marleen is a girl with glasses + - feedback: Try again + option: Wouter is a boy without glasses + - option: Sophie is a girl with glasses + feedback: Great job! + code: "{print} 'Let me guess which family member you are!'\nglasses = {ask} 'Do you wear glasses?'\nfemale = {ask} 'Are you female?'\n{if} glasses = 'yes' {and} female = 'yes'\n {print} 'You must be Sophie!'\n{if} glasses = 'no' {and} female = 'yes'\n {print} 'You must be Marleen!'\n{if} glasses = 'yes' {and} female = 'no'\n {print} 'You must be Wouter!'\n{if} glasses = 'no' {and} female = 'no'\n {print} 'You must be Michael!'" + question_text: Which statement about this code is true? + hint: Take a good look! Or do you need glasses? + correct_answer: D + question_score: '10' + 8: + question_text: What output do you get if you order popcorn but no drink? + mp_choice_options: + - feedback: You have paid too much! + option: "Welcome to the movie theater\nThat will be 8 dollars please\nEnjoy the movie" + - feedback: Amazing! + option: "Welcome to the movie theater\nThat will be 5 dollars please\nEnjoy the movie" + - feedback: That's not enough money! + option: "Welcome to the movie theater\nThat will be 3 dollars please\nEnjoy the movie" + - option: "Welcome to the movie theater\nOk\nEnjoy the movie" + feedback: You have to pay for your popcorn! + correct_answer: B + code: "{print} 'Welcome to the movie theater'\npopcorn = {ask} 'Would you like some popcorn?'\ndrink = {ask} 'Would you like a drink?'\n{if} popcorn = 'yes' {and} drink = 'yes'\n {print} 'That will be 8 dollars please'\n{if} popcorn = 'no' {and} drink = 'yes'\n {print} 'That will be 3 dollars please'\n{if} popcorn = 'yes' {and} drink = 'no'\n {print} 'That will be 5 dollars please'\n{if} popcorn = 'no' {and} drink = 'no'\n {print} 'Ok'\n{print} 'Enjoy the movie'" + hint: popcorn = yes and drink = no + question_score: '10' + 10: + question_text: Which command needs to be in line 8 at the place of the ??? ? + mp_choice_options: + - feedback: There are no items that are both the list of snacks and the list of drinks + option: '`{and}`' + - feedback: Great job! + option: '`{or}`' + - option: '`{in}`' + feedback: No + - feedback: No + option: '`{if}`' + question_score: '10' + code: "{print} 'Welcome to the product finder of this supermarkt'\nitem = {ask} 'What product are you looking for?'\nbakery = 'bread', 'buns', 'muffins'\ndrinks = 'soda', 'water', 'lemonade'\nsnacks = 'chips', 'nuts', 'dips'\nfrozen = 'fries', 'icecream', 'pizza'\nfruit = 'bananas', 'apples', 'oranges'\n{if} item {in} snacks ??? item {in} drinks\n {print} 'This item is in aisle 3'\n{if} item {in} bakery {or} item {in} bakery\n {print} 'This item in in the back of the store'\n{if} item {in} fruit\n {print} 'The fruit is sold near the register'" + correct_answer: B + hint: The item is either in the list of snacks, or in the list of drinks + 1: + mp_choice_options: + - option: "```\n{if} birthday {and} song = 'yes'\n```" + feedback: Almost there + - feedback: Hedy only sings for you if you like to hear a song + option: "```\n{if} birthday = 'yes' {and} name = 'Hedy'\n```" + - option: "```\n{if} song = 'yes' {and} birthday = 'yes'\n```" + feedback: Super! + - feedback: Hedy only sings if both answers are yes + option: "```\n{if} song = 'yes' {or} birthday = 'yes'\n```" + correct_answer: C + question_text: Which code should be filled in at the ??? ? + code: "name = {ask} 'What is your name?'\nsong = {ask} 'Whould you like to hear a song?'\nbirthday = {ask} 'Is today your birthday?'\n???\n {print} 'Happy Birthday to you!'\n {print} 'Happy Birthday to you!'\n {print} 'Happy Birthday dear ' name\n {print} 'Happy Birthday to you!'" + question_score: '10' + hint: Hedy sings if you want to hear a song and it's you birthday + 7: + mp_choice_options: + - option: The grey cat is called Abby + feedback: This is true! + - option: Milo the orange cat eats 4 scoops of cat nibbles + feedback: This is true + - feedback: Great job! + option: The black hamster needs to be fed a piece of carrot + - option: The yellow bird was fed this morning + feedback: This is true + question_text: Which statement is false? + hint: Read the last 4 lines carefully + question_score: '10' + correct_answer: C + code: "{print} 'Thank you for helping me take care of my pets'\n{print} 'Here is a program to help feed them'\nanimal = {ask} 'What kind of animal are they?'\ncolor = {ask} 'What colour are they?'\n{if} animal = 'cat' {and} color = 'grey'\n {print} 'That is Abby. She eats 3 scoops of cat nibbles'\n{if} animal = 'cat' {and} color = 'orange'\n {print} 'That is Milo. He eats 4 scoops of cat nibbles'\n{if} animal = 'bird' {or} color = 'black'\n {print} 'I fed them this moring! They do not need more food today'\n{if} animal = 'hamster' {and} color = 'brown'\n {print} 'You can feed them a piece of carrot'" + 3: + question_text: Which output is given to a member without a discount code? + mp_choice_options: + - option: You get a free apple pie! + feedback: Great job! + - option: That will be 5 dollars please + feedback: That is not true + - option: This code won't work, so there is no output + feedback: There is nothing wrong with the code + - feedback: There is! Read the question carefully + option: There is no way of knowing + code: "member = {ask} 'Do you have a membership card?'\ndiscount = {ask} 'Do you have a discount code?'\n{if} member = 'yes' {or} discount = 'yes'\n {print} 'You get a free apple pie!'\n{else}\n {print} 'That will be 5 dollars please'" + hint: Mind the command `{or}` in line 3 + correct_answer: A + question_score: '10' + 4: + mp_choice_options: + - option: "```\n{print} 'you win'\n```" + feedback: You win! + - feedback: You lose! + option: "```\n{print} 'you lose'\n```" + - option: "```\n{print} 'tie'\n```" + feedback: It's only a tie if both choices are the same + - option: "```\n{print} 'try again'\n```" + feedback: Try again! + code: "{if} computer_choice {is} 'rock' {and} your_choice {is} 'paper'" + question_text: Which line of code should follow this line in rock-paper-scissors game? + correct_answer: A + question_score: '10' + hint: Paper beats rock + 9: + mp_choice_options: + - option: "Line 3 should be:\n```\n{if} chocolate = 'yes' {and} sprinkles = 'yes'\n```" + feedback: Correct! + - option: "Line 3 should be: \n```\n{if} chocolate = 'no' {and} sprinkles = 'no'\n```" + feedback: This is not what I ordered! + - option: "Line 5 should be: \n```\n{if} chocolate = 'yes' {and} sprinkles = 'yes'\n```" + feedback: This is not what I ordered! + - option: "Line 7 should be:\n```\n{if} chocolate = 'yes' {and} sprinkles = 'no'\n```" + feedback: This is not what I ordered! + question_score: '10' + question_text: What is wrong with this code? + code: "1 chocolate = {ask} 'Would you like chocolate sauce on your ice cream?'\n2 sprinkles = {ask} 'Would you like sprinkles on your ice cream?'\n3 {if} chocolate {and} sprinkles = 'yes'\n4 {print} 'Ice cream with chocolate sauce and sprinkles, coming up!'\n5 {if} chocolate = 'yes' {and} sprinkles = 'no'\n6 {print} 'Ice cream with chocolate sauce, coming up!'\n7 {if} chocolate = 'no' {and} sprinkles = 'yes'\n8 {print} 'Ice cream with sprinkles, coming up'\n9 {if} chocolate = 'no' {and} sprinkles = 'no'\n10 {print} 'Just plain icecream, coming up!'" + correct_answer: A + hint: There is a mistake in line 3 + 2: + mp_choice_options: + - option: '`{and}`' + feedback: You don't have to be vegan and muslim + - feedback: Great thinking! + option: '`{or}`' + - feedback: No + option: '`+`' + - feedback: No + option: '`{print}`' + hint: Neither vegans nor muslims can eat sausage rolls. + correct_answer: B + code: "menu = 'cheese', 'sausage rolls', 'cookies'\ndiet = {ask} 'Do you have any dietary restrictions?'\n{if} diet = 'vegan' ??? diet = 'halal'\n {remove} 'sausage rolls' {from} menu" + question_text: Which command is missing in the code at the place of the ??? ? + question_score: '10' + 14: + 1: + mp_choice_options: + - feedback: This is not a symbol. + option: '`=>`' + - option: '`==`' + feedback: We are not comparing anything, just asking. + - option: '`!=`' + feedback: We are not comparing anything, just asking + - feedback: Right! + option: '`=`' + code: "name _ {ask} 'Who are you?'\n{if} name == 'Hedy'\n {print} 'Me too!'" + hint: We are not comparing anything, we are just asking a name. + question_text: Which symbol should be used on the blank? + question_score: '10' + correct_answer: D + 2: + correct_answer: C + mp_choice_options: + - feedback: No + option: '{if} name = Hedy' + - option: '{if} age = 24' + feedback: No + - option: answer = {ask} 'What is your answer' + feedback: Yes! + - feedback: No + option: answer == {ask} 'How are you doing?' + question_score: '10' + hint: When you are comparing two answers you should use == + question_text: Which of these codes has used the correct = or == symbol? + 4: + mp_choice_options: + - option: In line 1 == should be used instead of = + feedback: No that's not it + - option: Line 2 misses quotation marks + feedback: You are correct + - feedback: No that's not it + option: In line 4 = should have been used instead of == + - option: In line 4 <= should have been used instead of >= + feedback: No that's not it + hint: The symbols are right + code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price {and} buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'" + question_text: What's wrong with this code? + correct_answer: B + question_score: '10' + 6: + mp_choice_options: + - feedback: It stops after 2 times + option: 10 times + - option: 0 times + feedback: It stops after 2 times + - option: 1 time + feedback: It stops after 2 times + - feedback: That is correct + option: 2 times + question_score: '10' + correct_answer: D + question_text: How many times do you have to say you are annoyed before this annoying game stops? + code: "lives = 2\n{repeat} 10 {times}\n {if} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n {if} answer == 'yes'\n lives = lives - 1" + hint: "!= means 'is not'" + 7: + mp_choice_options: + - feedback: That's not quite right. + option: "`'Lower'` and `'Higher'` and `'You win!'`" + - option: "`'Higher'` and `'Lower'` and `'You win!'`" + feedback: You win! + - option: "`'You win!'` and `'Lower!'` and `'Higher'`" + feedback: That's not quite right. + - option: "`'Lower!'` and `'You win!'` and `'Higher!'`" + feedback: That's not quite right. + correct_answer: B + hint: The last one should say you win. + question_text: What should be filled in on the three blanks? + question_score: '10' + code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'" + 8: + question_score: '10' + mp_choice_options: + - feedback: True! + option: You must be taller than 120 cm to go on the roller coaster + - feedback: If you are 120 cm you won't get in + option: You must be taller than 119 cm to go on the roller coaster + - feedback: '> means greater than' + option: You must be shorter than 120 cm to go on the roller coaster + - option: There are no length restrictions to go on the roller coaster + feedback: There are. + correct_answer: A + question_text: Which statement is true about this roller coaster? + hint: '> means greater than' + code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'" + 5: + mp_choice_options: + - feedback: 12 year olds are allowed too + option: '`> 12`' + - feedback: Great! + option: '`>= 12`' + - option: '`< 12`' + feedback: These kids are too young! + - feedback: These kids are too young + option: '`<= 12`' + hint: '> means greater than' + code: "age = {ask} 'How old are you?'\nticket = {ask} 'Do you have a ticket?'\n{if} age _ {and} ticket == 'yes'\n {print} 'You can enter the movie theater.'\n{else}\n {print} 'You are not allowed to come in!'" + question_score: '10' + question_text: Which symbol should be filled in on the blanks if the movie is suitable for kids for the age of 12 and up? + correct_answer: B + 10: + correct_answer: B + mp_choice_options: + - feedback: Look at who has the highest score! + option: "'player 1 wins'" + - option: "'player 2 wins'" + feedback: Yes! + - option: "'player 2 loses'" + feedback: Look at who has the highest score! + - feedback: No it's not, one player has a higher score + option: "'It is a tie'" + hint: You win the game by having the most points + code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _" + question_text: What should be filled in in the blanks? + question_score: '10' + 9: + mp_choice_options: + - option: 1 or more + feedback: No + - option: 2 or more + feedback: No + - option: 8 or more + feedback: Almost + - feedback: Great! + option: 9 or more + code: "chocolate = {ask} 'How many pieces of chocolate have you eaten?'\n {if} chocolate <= 2\n {print} 'That is a healthy amount'\n {if} chocolate > 2 {and} chocolate =< 8\n {print} 'That is a bit much'\n {if} chocolate > 8\n {print} 'You will get a stomach ache!'" + hint: '> 8 means more than 8' + question_text: How many pieces of chocolate will give you a stomach ache according to this fitbit? + question_score: '10' + correct_answer: D + 3: + question_score: '10' + mp_choice_options: + - option: '`>` and `<`' + feedback: That's not it + - option: '`=` and `>=`' + feedback: That's not it + - option: '`<` and `>=`' + feedback: You are right + - option: '`+` and `==`' + feedback: That's not it + correct_answer: C + code: "guests = {ask} 'How many people are at the party?'\n{if} guests _ 130\n {print} 'You can come in!'\n{if} guests _ 130\n {print} 'Im sorry, the club is full. '\n {print} 'You have to wait for a guest to leave'" + hint: There are 130 people allowed in the club + question_text: Which symbols should be filled in on the two blanks? + 15: + 2: + question_score: '10' + mp_choice_options: + - feedback: No + option: "```\n{while} name = Hedy\n```" + - option: "```\n{while} age = 24\n```" + feedback: No + - feedback: Yes! + option: "```\n{while} time > 0\n```" + - option: "```\n{while} answer == yes'\n```" + feedback: A quotation mark is missing + question_text: Which of these codes has used the correct symbol(s)? + hint: When you are comparing two answers you should use == + correct_answer: C + 5: + question_text: What should be placed on the blank to make this program work correctly? + hint: wetness should get less each time + mp_choice_options: + - option: "```\n = wetness\n```" + feedback: That will not change anything + - feedback: You can't have two times = in one line + option: "```\n = wetness = 1\n```" + - option: "```\n = wetness - 1\n```" + feedback: You are correct! + - feedback: The program should count down + option: "```\n = wetness + 1\n```" + correct_answer: C + question_score: '10' + code: "wetness = 10\n{while} wetness != 0\n {print} 'Your hair is still wet, hair dryer on!'\n {sleep} 1\n {clear}\n wetness _\n\n{print} 'All dry!'" + 7: + mp_choice_options: + - option: '... change the first `{if}` into a `{while}`' + feedback: Perfect! + - feedback: That's not quite right. + option: '... change the second `{if}` into a `{while}`' + - feedback: That's not quite right. + option: '... change the third `{if}` into a `{while}`' + - feedback: That's not quite right. + option: '... change the fourth `{if}` into a `{while}`' + question_score: '10' + hint: The last one should say you win. + correct_answer: A + question_text: How should this program be changed so that it works? + code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'" + 8: + code: "{while} toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n {sleep} 60\nlights = 'off'\nair_freshener_sprays = 'no'" + question_score: '10' + mp_choice_options: + - option: The lights and air freshener will turn off after 1 minute + feedback: False! + - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet + feedback: Great job + - option: The air freshener sprays once you leave the toilet. + feedback: It only sprays when you're in there. + - feedback: That wouldn't be right. + option: The lights will always stay on. + hint: The block after the {while} command keeps happening while the toilet is occupied. + correct_answer: B + question_text: Which statement is true about this automated toilet system? + 10: + question_score: '10' + hint: You win the game by having the most points. Your name should appear on the screen + correct_answer: A + mp_choice_options: + - option: "```\n name_player_1\n```" + feedback: You are right! + - feedback: No they are losing! + option: "```\n name_player_2\n```" + - feedback: You should fill in a name, not a number + option: "```\n points_player_1\n```" + - feedback: You should fill in a name, not a number + option: "```\n points_player_2\n```" + question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.' + code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'" + 9: + mp_choice_options: + - feedback: No + option: Nothing. 1600 is not programmed into the app. + - feedback: No + option: You could eat some more + - option: That is alright + feedback: Yes! + - option: You have eaten enough for today + feedback: No + hint: 1600 is between 1000 and 2000 + question_score: '10' + correct_answer: C + code: "calories = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 {and} calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'" + question_text: What will the diet app say if you have eaten 1600 calories today? + 1: + mp_choice_options: + - feedback: That is not right. + option: '`=!`' + - option: '`==`' + feedback: You don't have to keep guessing if you've given the right answer. + - feedback: Correct + option: '`!=`' + - feedback: That's not it + option: '`=`' + correct_answer: C + hint: Keep guessing until you say Amsterdam + question_score: '10' + code: "answer = 0\n{while} answer _ 'Amsterdam'\n answer = {ask} 'What is the capital city of the Netherlands?'\n{print} 'You have given the correct answer'" + question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.' + 4: + question_text: What's wrong with this code? + mp_choice_options: + - option: In line 1 `==` should be used instead of `=` + feedback: No that's not it + - option: Line 2 misses quotation marks + feedback: That's not right + - feedback: That's not it + option: In line 5 `{if}` should have been used instead of `{while}` + - feedback: You are correct + option: In line 5 `!=` should have been used instead of `==` + code: "options = 1, 2, 3, 4, 5, 6\n{print} 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\n{while} thrown == 6\n thrown = options {at} {random}\n {print} 'You threw ' thrown\n tries = tries + 1\n{print} 'Yes! You have thrown 6 in ' tries ' tries.'" + hint: There is something wrong in line 5 + question_score: '10' + correct_answer: D + 3: + code: "_ age < 18\n {print} 'you are not allowed in this bar'" + mp_choice_options: + - option: '`{in}`' + feedback: That's not it + - option: '`{while}`' + feedback: You are right + - option: '`{for}`' + feedback: That's not it + - option: '`{range}`' + feedback: That's not it + question_score: '10' + question_text: Which command should be filled in on the blank? + correct_answer: B + hint: You are not allowed in the bar as long as you are 17 or younger + 6: + mp_choice_options: + - option: '`{while}` should be`{if}`' + feedback: No that is not right + - feedback: No that is not right + option: '`{if}` should be `{while}`' + - option: Line 3 should start with more indentation + feedback: No that's not right + - feedback: That is correct + option: Line 2 should start with less indentation + hint: Look closely at the indentation + correct_answer: D + question_text: What is wrong with this code? + question_score: '10' + code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n {if} answer == 'yes'\n lives = lives - 1" + 16: + 2: + mp_choice_options: + - feedback: Mind the spacing. + option: "```\nfriends[i] has to do chores [i]\n```" + - option: "```\nfriends[1] has to do chores[1]\n```" + feedback: It will print 3 times that Wesley has to do the cooking + - feedback: The person has to do the chore, not the other way around + option: "```\nchores[i] ' has to do ' friends[random]\n```" + - option: "```\nfriends[i] ' has to do ' chores[i]\n```" + feedback: Fantastic! + code: "friends = ['Wesley', 'Eric', 'Kaylee']\nchores = ['the cooking', 'the cleaning', 'nothing']\n{for} i {in} {range} 1 {to} 3\n {print} _" + question_text: What should be filled in on the blanks if you want a list of what chores are done by whom? + hint: '`i` tells us what item in the list it is. So friend 1 does chore 1 etc.' + correct_answer: D + question_score: '10' + 3: + correct_answer: A + code: "friends = ['Wesley', 'Eric', 'Kaylee']\nchore = ['the cooking', 'the cleaning', 'nothing']\n{for} i {in} {range} 1 {to} 3\n {print} friends[i] has to do chores[i]" + mp_choice_options: + - feedback: Super! + option: "```\nWesley has to do the cooking\nEric has to do the cleaning\nKaylee has to do nothing\n```" + - option: "```\nKaylee has to do the cooking\nWesley has to do the cleaning\nEric has to do nothing\n```" + feedback: No, it is not random. + - feedback: Poor Wesley! + option: "```\nWesley has to do the cooking\nWesley has to do the cleaning\nWesley has to do the nothing\n```" + - feedback: That's not it + option: "```\nWesley has to do the cooking\nWesley has to do the cooking\nWesley has to do the cooking\n```" + hint: It's not random... + question_score: '10' + question_text: What is a possible output for this program? + 6: + mp_choice_options: + - option: You are not allowed to use the variable o. It should be named i. + feedback: i is the most commonly used variable name in this case, but it's not mandatory to use i. + - feedback: No, he likes minecraft. + option: The output will say that Jaylino likes fortnite. + - feedback: Correct + option: The output will say that Ryan likes fifa + - option: This code will not work. It will give and error. + feedback: No, the code is correct. + question_score: '10' + correct_answer: C + code: "people = ['Chris', 'Jaylino', 'Ryan']\ngames = ['fortnite', 'minecraft', 'fifa']\n{for} o {in} {range} 1 {to} 3\n {print} people[o] ' likes ' games[o]" + hint: There is nothing wrong with this code. + question_text: Which statement is true? + 8: + mp_choice_options: + - feedback: This is not right + option: "```\nteams = ['Macy and Kate', 'Lionell and Raj', 'Kim and Leroy']\nposition = ['first', 'second', 'third']\n{for} i {in} {range} 0 {to} 3\n{print} teams[random] ' get to go ' position[i]\n```" + - option: "```\nteams = ['Macy and Kate', 'Lionell and Raj', 'Kim and Leroy']\nposition = ['first', 'second', 'third']\n{for} i {in} {range} 1 {to} 3\n {print} teams[i] ' get to go ' position[i]\n```" + feedback: Amazing! + - feedback: This is not it. + option: "```\nteams = ['Macy', 'Kate', 'Lionell', 'Raj', 'Kim', 'Leroy']\nposition = ['first', 'second', 'third']\n{for} i {in} {range} 1 {to} 6\n {print} teams[random] ' get to go ' position[random]\n```" + - option: "```\nteams = ['Macy and Kate' 'Lionell and Raj' 'Kim and Leroy']\nposition = ['first' 'second' 'third']\n{for} teams {in} {range} 0 {to} 3\n {print} teams[i] ' get to go ' position[i]\n```" + feedback: This is not going to work! + question_score: '10' + correct_answer: B + code: "Macy and Kate get to go first\nLionell and Raj get to go second\nKim and Leroy get to go third" + hint: If you look carefully at the first line, you'll see that only the first two answers are possibly correct. + question_text: Which of these codes belongs to this output? + 9: + question_score: '10' + code: "countries = ['Canada', 'Zimbabwe', 'New Zealand']\n{for} i {in} {range} 0 {to} 1\n {print} 'I will travel to ' countries[random]" + mp_choice_options: + - option: "```\nI will travel to Canada\nI will travel to Canada\n```" + feedback: Great job! + - feedback: It will be repeated twice + option: "```\nI will travel to Canada\n```" + - feedback: This is not it. + option: "```\nI will travel to Canada, Zimbabwe and New Zealand\n```" + - feedback: It's only repeated twice + option: "```\nI will travel to Canada\nI will travel to Zimbabwe\nI will travel to New Zealand\n```" + hint: Range 0 to 1 is 2 times + question_text: What is a possible output for this code? + correct_answer: A + 7: + mp_choice_options: + - feedback: That is not right. + option: Line 1 needs less quotation marks + - feedback: It should not! + option: Line 3 should start with indentation + - feedback: It should not + option: Line 4 should start without indentation + - feedback: Amazing! + option: Line 4 needs more quotation marks. + question_text: What's wrong with this code? + correct_answer: D + code: "people = ['Savi', 'Senna', 'Fayenne']\ntransportation = ['bike', 'train', 'car']\n{for} i {in} {range} 1 {to} 3\n {print} people[i] goes to school by transportation[i]" + hint: There is a mistake made in the usage of quotation marks. + question_score: '10' + 10: + mp_choice_options: + - feedback: Almost there... but adding the winner to the list makes this raffle unfair + option: "```\nchosen_number = list_of_numbers at random\nprint books[i] ' will go to person number ' chosen_number\n{add} chosen_number {to} list_of_numbers\n```" + - option: "```\nprint person[i] ' wins ' book[i]\n```" + feedback: There is no list called 'person' + - feedback: This is not it. + option: "```\nchosen_number = list_of_numbers[people]\nprint books[people] ' will go to person number ' chosen_number\n{remove} chosen_number {from} list_of_numbers\n```" + - option: "```\nchosen_number = list_of_numbers[random]\nprint books[i] ' will go to person number ' chosen_number\n{remove} chosen_number {from} list_of_numbers\n```" + feedback: Fantastic! + hint: You need to use the {remove} command + correct_answer: D + code: "{print} 'The book raffle will start soon'\n{print} 'Get your tickets now!'\nbooks = ['Narnia', 'The Hobbit', 'Oliver Twist', 'Harry Potter', 'Green eggs and ham']\npeople = {ask} 'How many raffle tickets are sold?'\nlist_of_numbers = [1, 2]\n{for} i {in} {range} 3 {to} people\n {add} i {to} list_of_numbers\n{for} i {in} {range} 1 {to} 5" + question_text: Which 3 lines will complete this code correctly? + question_score: '10' + 5: + mp_choice_options: + - option: "```\n noises = ['moo', 'woof', 'neigh']\n```" + feedback: Mind the variable name and the order of the sounds. + - feedback: Look at line one to see how brackets are supposed to be used. + option: "```\n sounds = '[woof], [moo], [neigh]'\n```" + - feedback: Don't forget the quotation marks! + option: "```\n sounds = [woof, moo, neigh]\n```" + - feedback: Great job! + option: "```\n sounds = ['woof', 'moo', 'neigh']\n```" + hint: Look at line 1 to see proper use of brackets and quotation marks. + question_score: '10' + question_text: Which line should be filled in in the blank? + correct_answer: D + code: "animals = ['dog', 'cow', 'horse']\n_\n{for} i {in} {range} 1 {to} 3\n {print} 'the ' animals[i] ' says ' sounds[i]" + 4: + mp_choice_options: + - option: The variable in line 4 should be `friend[i]`, not `friends[i]` + feedback: That is not right. + - option: Line 3 should say `in range 1 to 3` not `in range 0 to 3` + feedback: Good catch! + - feedback: It's not a variable, it's just text. + option: Line 4 should say 'lucky_number', not 'lucky number + - feedback: That's not it + option: '{in} in line 3 should be removed' + correct_answer: B + hint: There's nothing wrong with line 4 + code: "friends = ['Jaylee', 'Erin', 'Fay']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 0 {to} 3\n print 'the lucky number of ' friends[i]\n print 'is ' lucky_numbers[i]" + question_score: '10' + question_text: What is wrong with this code? + 1: + mp_choice_options: + - feedback: This is the old way. + option: '`snacks {at} {random}`' + - option: '`[{random} snack]`' + feedback: The order is wrong. + - option: '`snacks[{random}]`' + feedback: Correct + - option: '`snacks[{at} {random}]`' + feedback: We do not need `at`anymore + code: "snacks = nachos, chips, cucumber, sweets\n{print} _" + question_score: '10' + correct_answer: C + hint: We no longer use {at} + question_text: Which command should be filled in on the blanks to print a random snack? + 17: + 5: + question_score: '10' + mp_choice_options: + - option: "```\n7\nanother number\nanother number\nanother number\nanother number\n71\n79\n97\n```" + feedback: Well done! + - option: "```\nanother number\n19\n29\n41\n53\n71\n79\n97\n```" + feedback: Try again. + - option: "```\n7\n19\n29\n41\n53\n71\n79\nanother number\n```" + feedback: One more try. + - option: "```\n7\n19\n29\n41\n53\n71\n79\n97\n```" + feedback: That is not it. + code: "numbers = [7, 19, 29, 41, 53, 71, 79, 97]\n{for} prime in numbers:\n {if} prime <= 10:\n {print} prime\n {elif} prime >= 60:\n {print} prime\n {elif} prime >= 90:\n {print} prime\n {else}:\n {print} 'another number'" + question_text: What is the output of this code? + hint: Think about how many times you need repeating and the values of if and elif. + correct_answer: A + 6: + mp_choice_options: + - feedback: Try again. + option: '`{elif}` is missing.' + - option: '`{else}` can only be used once.' + feedback: From now on we can use elif multiple times. + - option: Nothing! + feedback: There is a mistake. Look carefully! + - feedback: Amazing! + option: There is an indentation mistake in the last line. + correct_answer: D + code: "name = {ask} 'What is your name?'\n{if} name == 'Hedy':\n password = {ask} 'What is your password?'\n {if} password =='turtle123':\n {print} 'Yey'\n {else}:\n {print} 'Access denied'\n{else}:\n {print} 'Go fish'" + hint: There is a mistake somewhere... + question_score: '10' + question_text: What is wrong with code? + 9: + mp_choice_options: + - feedback: Try again! + option: "```\n {for} number in range -5 to 3:\n {if} number > 0: \n {print} number ' is positive'\n {elif} number < 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + - feedback: That is not it. + option: "```\n {for} number in range -5 to 3:\n {if} number > 0: \n {print} number ' is positive'\n {elif} number <= 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + - option: "```\n {for} number in range -5 to 3:\n {if} number >= 0: \n {print} number ' is positive'\n {elif} number < 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + feedback: Very good! + - option: "```\n {for} number in range -5 to 3:\n {if} number < 0: \n {print} number ' is positive'\n {elif} number <=0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + feedback: That is not it. + correct_answer: C + question_text: Which one of the codes below gave this output? + code: "-5 is negative\n-4 is negative\n-3 is negative\n-2 is negative\n-1 is negative\n0 is positive\n1 is positive\n2 is positive\n3 is positive" + hint: Read the code carefully. + question_score: '10' + 10: + question_text: What is wrong with this code? + mp_choice_options: + - feedback: Try again. + option: The word num needs quotation marks. + - feedback: Not true. + option: The `{if}` command is not used correctly. + - option: Line 3 should be `volume_room = number * number * number`. + feedback: Well done! + - option: There is an indentation mistake in the last line. + feedback: Nope. + question_score: '10' + hint: Read the code carefully. + code: "{for} number in range 1 to 5:\n volume_room = num * num * num\n {print} volume_room ' cubic meters'\n {if} volume_room > 100:\n {print} 'this is a large room'\n {elif} volume_room < 100:\n {print} 'small room but cosy'\n {else}:\n {print} 'i will look for something else'" + correct_answer: C + 3: + hint: Think about how many times you need repeating. + mp_choice_options: + - option: "```\n🦔\n🦔\n🦔\n```" + feedback: Try again. + - feedback: One more try. + option: "```\n🦔\n🦔\n```" + - option: "```\n🦔\n🦔\n🦔\n🦔\n🦔\n🦔\n```" + feedback: Well done! + - feedback: That is not it. + option: "```\n🦔\n🦔\n🦔\n🦔\n🦔\n```" + code: "{for} x in range 1 to 3:\n {for} y in range 1 to 2:\n {print} 🦔" + correct_answer: C + question_score: '10' + question_text: How many hedgehogs will this code print? + 8: + hint: Read the code carefully. + mp_choice_options: + - option: '`{or}` cannot be used with `{if}`.' + feedback: Try again. + - option: In the `{for}` command `insect` should be `insects`. + feedback: Not true. + - feedback: Well done! + option: Nothing! + - option: There is an indentation mistake in the last line. + feedback: Nope. + question_score: '10' + question_text: What is wrong with code? + correct_answer: C + code: "insects = ['🐝', '🦋', '🕷', '🐞']\nyour_favorite = {ask} 'what is your favorite insect?'\n{for} insect in insects:\n {if} your_favorite == '🐝' {or} your_favorite == '🐞':\n {print} 'very useful'\n {elif} your_favorite == '🕷':\n {print} 'it can catch mosquitoes'\n {else}:\n {print} 'almost all insects can be useful one way or another'" + 4: + correct_answer: D + mp_choice_options: + - feedback: Try again. + option: The first `{elif}` should be used before the `print` command + - feedback: From now on we can use elif multiple times. + option: '`{elif}` can only be used once' + - feedback: Not correct. + option: '`==` used with `{elif}` should be replaced by `=`' + - feedback: Great! + option: '`{elif}` in the last line should be replaced by `{else}`' + question_text: What is wrong with code? + code: "name_color = {ask} 'What is your favorite color?'\n{if} name_color == 'red':\n {print} 'the color of a tomato'\n{elif} name_color == 'green':\n {print} 'the color of an apple'\n{elif} name_color == 'blue':\n {print} 'the color of a blueberry'\n{elif} name_color == 'yellow':\n {print} 'the color of a banana'\n{elif}:\n {print} 'this fruit-color does not exist'" + question_score: '10' + hint: Think about `{if}`, `{elif}`, `{else}`. + 2: + correct_answer: D + hint: Read the code carefully. + mp_choice_options: + - feedback: This is not it. + option: You cannot have so many variables. + - feedback: Not true! + option: The way the variables are multiplied is incorrect. + - feedback: Keep looking for the mistake. + option: One of the variables `noleap_year` does not belong with the `{if}` statement. + - option: The `noleap_year` has to be identical in both cases. + feedback: Correct! + code: "seconds_minute = 60\nminute_hour = 60\nhour_day = 24\nleap_year = 366\nno_leap_year = 365\nyears = ask 'what year is it?'\n{if} years = 2024:\n print seconds_minute * minute_hour * hour_day * leap_year\n{else}:\n print seconds_minute * minute_hour * hour_day * noleap_year" + question_text: What is wrong with this code? + question_score: '10' + 7: + question_score: '10' + mp_choice_options: + - feedback: Try again! + option: "```\n numbers = [1, 2 , 3, 4, 5]\n {for} n in numbers:\n result = n * 1\n {print} 'The result is ' result\n```" + - option: "```\nnumbers = [1, 2, 3, 4, 5]\n {for} u in numbers:\n number = u\n {print} 'The result is ' number\n```" + feedback: That is not it. + - option: "```\nnumbers = [1, 2, 3, 4, 5]\n {for} number in numbers:\n number = 3\n {print} 'The result is ' number\n```" + feedback: Very good! + - option: "```\nnumbers = [1, 2 , 3, 4, 5]\n {for} n in numbers:\n n = result\n {print} 'The result is ' result\n```" + feedback: That is not it. + hint: Think about mathematical symbols. + question_text: Which of the following codes will print five times 'the result is 3' on the screen? + correct_answer: C + 1: + mp_choice_options: + - option: "```\nm i n i o n s\n```" + feedback: This is not it. + - feedback: Correct! + option: "```\nBob\nKevin\nStuart\n```" + - option: "```\nminions\nminions\nminions\n```" + feedback: Take a look at the content of your list. + - option: "```\nB o b K e v i n S t u a r t\n```" + feedback: Do not loop through the letters. + correct_answer: B + question_text: What is the output of this code? + question_score: '10' + hint: Loop through your list. + code: "minions = ['Bob', 'Kevin', 'Stuart']\n{for} x in minions:\n {print} x" + 9: + 4: + mp_choice_options: + - option: Sleeping Beauty with shoe size 38 gets the output 'Ill keep looking' + feedback: No, she gets 'You are not the one!' + - feedback: No, she gets 'Ill keep looking' + option: Cinderella with shoe size 40 gets the output '❤️❤️❤️' + - option: Sleeping Beauty with shoe size 40 gets the output 'Ill keep looking' + feedback: That's right! + - feedback: No she gets '❤️❤️❤️' + option: Cinderella with shoe size 38 gets the output 'Ill keep looking' + code: "name = {ask} 'What is your name?'\nsize = {ask} 'What is your shoe size?'\n{if} size {is} 38\n {if} name {is} Cinderella\n {print} '❤️❤️❤️'\n {else}\n {print} 'You are not the one!'\n{else}\n {print} 'Ill keep looking'" + hint: No matter what your name is, if you have shoe size 40 you will get the message 'Ill keep looking'. + question_text: Which statement is true? + correct_answer: C + question_score: '10' + 6: + mp_choice_options: + - feedback: Don't forget the others + option: '`{if}`' + - feedback: Don't forget `{else}`! + option: '`{if}` `{repeat}`' + - option: '`{if}` `{else}` `{repeat}`' + feedback: Keep it up! + - feedback: Not with `{print}` + option: '`{if}` `{else}` `{repeat}` `{print}`' + question_text: After which command(s) should you use indentation (starting the next line with 4 spaces)? + correct_answer: C + hint: Indentation happens on the line below some commands + question_score: '10' + 2: + mp_choice_options: + - option: "```\nGood job!\nGood job!\n```" + feedback: That's not it! + - feedback: That's not it! + option: "```\nThe computer will explode in 5... 4... 3... 2... 1...\n```" + - feedback: That's not it! + option: "```\nGood job!\nGood job!\nYou can use the computer!\n```" + - option: "```\nGood job!\nYou can use the computer!\nGood job!\nYou can use the computer!\n```" + feedback: Correct! + correct_answer: D + code: "password = {ask} 'What is the password?'\ncorrect_password = Hedy\n{if} password {is} correct_password\n {repeat} 2 {times}\n {print} 'Good job!'\n {print} 'You can use the computer!'\n{else}\n {print} 'The computer will explode in 5... 4... 3... 2... 1...'" + question_text: What will be printed after entering the correct password? + hint: Everything under the `{repeat}` command is repeated twice. + question_score: '10' + 10: + question_score: '10' + mp_choice_options: + - option: All lines should start with 4 spaces + feedback: Only line 2 and 3 start with spaces + - option: Line 2 and 3 should start with 4 spaces + feedback: Line 3 should start with 8 + - option: Line 2 and 3 should start with 8 spaces + feedback: Line 2 should start with 4 + - feedback: You are correct! + option: line 2 should start with 4 spaces and line 3 with 8 + correct_answer: D + hint: The first line doesn't start with any spaces + question_text: Which statement is true? + code: "1 {repeat} 2 {times}\n2 {if} level {is} 9\n3 {print} 'Great job!'" + 1: + mp_choice_options: + - option: Nothing, this code is correct! + feedback: That's right! + - feedback: You are! + option: You're not allowed to use an `{if}` command after an `{ask}` command. + - feedback: You always have to use indentation. + option: You don't have to use indentation twice. + - feedback: It is not the indentation. + option: The indentation is wrong in the last `{if}` command. + correct_answer: A + question_text: What is wrong with this code? + code: "{repeat} 3 {times}\n food = {ask} 'What would you like to eat?'\n {if} food {is} fries\n sauce = {ask} 'What sauce would you like?'\n {print} 'One fries with ' sauce\n {if} food {is} pizza\n topping = {ask} 'What topping would you like?'\n {print} 'One pizza with ' topping\n{print} 'Thank you for your order'" + hint: All the indentation is done correctly. + question_score: '10' + 5: + output: "Icecream is the best!\nIcecream is the best!\nIcecream is the best!" + mp_choice_options: + - option: "```\ndessert = {ask} 'What is your favorite type of dessert?'\n{if} dessert {is} icecream\n {repeat} 3 {times}\n {print} 'Icecream is the best!'\n```" + feedback: Don't forget the indentation after `{repeat}` commands. + - feedback: Use indentation after an `{if}` command + option: "```\ndessert = {ask} 'What is your favorite type of dessert?'\n{if} dessert {is} icecream\n{repeat} 3 {times}\n {print} 'Icecream is the best!'\n```" + - option: "```\ndessert = {ask} 'What is your favorite type of dessert?'\n{if} dessert {is} icecream\n {repeat} 3 {times}\n {print} 'Icecream is the best!'\n```" + feedback: Perfect + - option: "```\n{repeat} 3 {times}\n dessert = {ask} 'What is your favorite type of dessert?'\n {if} dessert {is} icecream\n {repeat} 3 {times}\n {print} 'Icecream is the best!'\n```" + feedback: There are 2 `{repeat}` commands in this code. + question_score: '10' + correct_answer: C + question_text: Which code produced this output? + hint: Watch the indentation + 7: + question_score: '10' + code: "{if} food {is} pizza\n{if} size {is} medium\n{if} drink {is} coke\nprice = price - 5" + hint: After each `{if}` command, the line below should indent + mp_choice_options: + - option: "```\n{if} food {is} pizza\n {if} size {is} medium\n {if} drink {is} coke\n price = price - 5\n```" + feedback: Amazing! + - option: "```\n{if} food {is} pizza\n {if} size {is} medium\n{if} drink {is} coke\n price = price - 5\n```" + feedback: The second `{if}` misses code! + - option: "```\n{if} food {is} pizza\n{if} size {is} medium\n{if} drink {is} coke\n price = price - 5\n```" + feedback: Two consecutive `{if}`s is never correct. + - feedback: Almost right. Take another look at the last line + option: "```\n{if} food {is} pizza\n {if} size {is} medium\n {if} drink {is} coke\n price = price - 5\n```" + correct_answer: A + question_text: You'll get a 5 dollar discount if you order a medium pizza with coke.
But the code has a mistake! How to debug it? + 9: + question_score: '10' + mp_choice_options: + - feedback: You are allowed to + option: None, that is not allowed + - option: Only 1 + feedback: You could use more if you like + - feedback: You could use more if you like + option: '3' + - feedback: That is true + option: Infinite, as long as you keep using indentation correctly + question_text: How many `{if}` commands can be placed inside another `{if}` command? + correct_answer: D + hint: You can put an `{if}` command inside an `{if}` command. + 3: + mp_choice_options: + - feedback: You don't win a million! + option: case 1, sell + - option: case 1, open + feedback: You don't win a million + - feedback: You don't win a million + option: case 2, sell + - option: case 2, open + feedback: Great job! You win! + correct_answer: D + hint: Follow the right path + question_score: '10' + question_text: Which case should you choose to win a million dollars? + code: "{print} 'Choose the right case and win!'\ncase = {ask} 'Which case will you pick? 1 or 2?'\n{if} case {is} 1\n action = {ask} 'Open it or sell it?'\n {if} action {is} sell\n {print} 'You sell your case for 10 dollars'\n {if} action {is} open\n {print} 'You open the case and win an apple pie'\n{if} case {is} 2\n action = {ask} 'Open it or sell it?'\n {if} action {is} sell\n {print} 'You sell the case for 500 dollars'\n {if} action {is} open\n {print} 'You open the case and win a million dollars!'" + 8: + mp_choice_options: + - feedback: Yes you can. + option: You can't put two questions in a row + - feedback: Keen eye! Good job! + option: The variable called 'age' is later on used as 'years' + - option: You're not allowed to start with 8 spaces, like line 5 does + feedback: You actually must start like that. + - feedback: That's not true. + option: A code must always start with a `{print}` command in the first line + code: "age = {ask} 'Happy Birthday! How old are you?'\nsinging = {ask} 'Would you like us to sing?'\n{if} singing {is} yes\n {repeat} years {times}\n {print} 'Hip Hip Hooray'" + correct_answer: B + question_score: '10' + hint: The indentation is done right this time + question_text: What is wrong in this code? + 1: + 1: + mp_choice_options: + - option: Hedy + feedback: Good job! + - option: Heddy + feedback: Not this one! + - option: Haydie + feedback: Not this one! + - feedback: Not this one! + option: Heidi + hint: It's named after Hedy Lamarr. + correct_answer: A + question_score: '10' + question_text: What's this programming language called? + 6: + mp_choice_options: + - feedback: '`{print}` in line 1 is correct.' + option: In line 1 `{print}` should be replaced with `{ask}`. + - option: In line 2, `{print}` should be replaced with `{ask}`. + feedback: Great! You paid attention! + - feedback: '`{echo}` is correct.' + option: Line 3 has to begin with `{print}` instead of `{echo}`. + - feedback: No, there is a mistake somewhere else + option: In line 4, `{print}` is spelled wrong. + code: "{print} Hi im Hedy!\n{print} Which football team do you support?\n{echo} You support...\n{print} Cool! Me too!" + hint: Check the `{print}` commands. + question_score: '10' + correct_answer: B + question_text: What's wrong with this code? + 7: + mp_choice_options: + - option: In line 1 `{print}` needs to be replaced with `{ask}` + feedback: Are you sure something is wrong? + - option: In line 1 `{print}` needs to be replaced with `{echo}` + feedback: Are you sure something's wrong? + - feedback: Are you sure something is wrong? + option: In line 3 `{echo}` needs to be replaced with `{print}` + - option: Nothing! This is a perfect code! + feedback: Correct! + question_text: What's wrong with this code? + code: "{print} Welcome at Hedys restaurant!\n{ask} What would you like to eat?\n{echo} So you want to order ...\n{print} Coming right up! Enjoy!" + question_score: '10' + correct_answer: D + hint: Check the code line by line + 2: + mp_choice_options: + - feedback: '`{echo}` repeats a given answer.' + option: '`{echo}`' + - option: '`{print}`' + feedback: Correct! + - option: '`hello`' + feedback: Hello isn't a command. + - feedback: With `{ask}`, you can ask a question. + option: '`{ask}`' + code: _ Hello! + correct_answer: B + question_score: '10' + hint: _ Hello world! + question_text: Which need to be filled in on the blanks to make the text Hello! appear? + 4: + question_text: What is wrong with this code? + mp_choice_options: + - feedback: Correct! + option: '`{print}` in line 1 is missing.' + - option: The command in line 2 is spelled wrong. + feedback: The command is spelled correctly. + - option: "`{echo}` isn't a command." + feedback: "`{echo}` is a command, there's another mistake." + - option: Nothing! This is a perfect code! + feedback: Wrong, look carefully! + code: "Hi Im Hedy!\n{ask} Who are you?\n{echo} Hi..." + hint: Line 1 doesn't seem right + question_score: '10' + correct_answer: A + 8: + correct_answer: C + question_text: How do you use the `{echo}` command? + mp_choice_options: + - option: You can use it to `{ask}` a question. + feedback: That's what `{ask}` is for! + - feedback: That's what `{print}` is for! + option: You can use it exactly the same way as `{print}`. + - feedback: Good job! + option: You can use it to repeat an answer. + - feedback: That's not right... + option: You can use it to make text disappear. + hint: '`{echo}` is used after an `{ask}` command.' + question_score: '10' + 3: + mp_choice_options: + - feedback: "`{print}` prints text, but it doesn't ask questions." + option: "```\n{print} What is your favorite color?\n```" + - option: "```\n{ask} {print} What is your favorite color?\n```" + feedback: You only need one command, not two. + - option: "```\n{ask} What is your favorite color?\n```" + feedback: Great! + - feedback: '`{echo}` repeats your answer back to you.' + option: "```\n{echo} What is your favorite color?\n```" + hint: You can ask something with the `{ask}` command + correct_answer: C + question_score: '10' + question_text: How do you ask what someone's favorite color is? + 5: + correct_answer: D + mp_choice_options: + - feedback: No, you would like the answer to be repeated back to you. + option: '`{print}`' + - option: '`Hedy`' + feedback: Hedy isn't a command. + - option: '`{ask}`' + feedback: With `{ask}` you can ask a question. + - feedback: Right on! + option: '`{echo}`' + question_text: Which command is missing in line 2? + question_score: '10' + hint: You want to see the answer at the end of line 2... + code: "{ask} What is your favorite pet?\n_ So your favorite pet is..." + 10: + code: "{ask} Are you ready to go to level 2?\n{echo}\n{echo}" + mp_choice_options: + - option: Are you ready to go to level 2? + feedback: There are two `{echo}` commands + - feedback: Great job! + option: "Yes!\nYes!" + - option: Yes! + feedback: There are two `{echo}` commands + - option: "Are you ready to go to level 2?\nYes!" + feedback: There are two `{echo}` commands + question_text: Which output will be in your output screen after you've run this code? + hint: Let's go! + question_score: '10' + correct_answer: B + 9: + correct_answer: B + mp_choice_options: + - feedback: No, `{print}` is right. Where is the question being asked? + option: '`{print}` in line 1 should be `{ask}`' + - feedback: Super! + option: '`{print}` in line 2 should be `{ask}`' + - feedback: No, `{echo}` is right. Where is the question being asked? + option: '`{echo}` in line 3 should be `{ask}`' + - feedback: Look carefully for the mistake... + option: Nothing. This is a perfect code! + code: "{print} Hello!\n{print} How are you doing?\n{echo} So you are doing..." + question_text: What's wrong with this code? + question_score: '10' + hint: '`{ask}` allows you to ask a question' + 12: + 10: + mp_choice_options: + - option: "```\n{for} i {in} {range} 1 {to} 3\n```" + feedback: This is a hard one! All the actions on the list must be in the song. + - option: "```\n{for} action {in} actions\n```" + feedback: You are amazing! + - feedback: This is a hard one! All the actions on the list must be in the song. + option: "```\n{repeat} 3 {times}\n```" + - feedback: This is a hard one! All the actions on the list must be in the song. + option: "```\n{print} actions {at} {random}\n```" + question_score: '10' + hint: This is a hard one! All the actions on the list must be in the song. + question_text: Which line of code should be filled in at the `_` to complete the song ? + correct_answer: B + code: "actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'\n_\n {for} i {in} {range} 0 {to} 1\n {print} 'if youre happy and you know it'\n {print} action\n {print} 'if youre happy and you know it and you really want to show it'\n {print} 'if youre happy and you know it'\n {print} action" + 4: + mp_choice_options: + - feedback: No + option: Line 1 and 2 + - feedback: No + option: Line 1, 2 and 3 + - option: Line 1, 2 and 4 + feedback: No + - feedback: Perfect! + option: All of the lines + hint: Does line 3 need quotation marks too? + code: "{print} Welcome to the online shoe shop\ncategory = {ask} What kind of shoes are you looking for?\n{if} category = high heels\n {print} High heels are 50% off now!" + question_text: In which lines are quotation marks needed to get the code to work? + correct_answer: D + question_score: '10' + 3: + hint: The quotation marks are used correctly + mp_choice_options: + - option: The name of the variable is different in line 1 than in line 2. + feedback: Correct! + - feedback: That's not true + option: The quotation marks aren't used correctly in line 2 + - option: You can't use the = sign when using an {ask} command + feedback: That's not true + - feedback: That's not true + option: Nothing is wrong. + code: "favorite_animal = {ask} 'What is your favorite animal?'\n{print} 'I like ' favoriteanimal ' too!'" + correct_answer: A + question_text: What's wrong with this code? + question_score: '10' + 8: + mp_choice_options: + - feedback: No + option: "```\n{print} '7 / 2'\n```" + - option: "```\n{print} 7 / 2\n```" + feedback: That is right! + - option: "```\n{print} 7 : 2\n```" + feedback: No + - feedback: No + option: "```\n{print} 7 * 2\n```" + hint: 7 devided by 2 is 3.5 + code: '3.5' + question_text: Which code was used to create this output? + question_score: '10' + correct_answer: B + 9: + question_score: '10' + mp_choice_options: + - feedback: You won nothing + option: "```\nprizes = 'one' 'million' 'dollars', 'nothing'\n```" + - feedback: You won nothing + option: "```\nprizes = 'one million dollars, nothing'\n```" + - option: "```\nprizes = 'one million dollars', 'nothing'\n```" + feedback: Winner! + - feedback: You won nothing + option: "```\n'prizes' = 'one million dollars', 'nothing'\n```" + hint: The items on the list should be in quotation marks + correct_answer: C + code: "_\n{print} 'You won ' prizes {at} {random} '!'" + question_text: Which code should be filled in in line 1 at the `_`? + 2: + hint: The second line is the same in each code, pay attention to the first line + mp_choice_options: + - feedback: All the different values of flavors should be in quotation marks. + option: "```\nflavors {is} vanilla, strawberry, chocolate\n{print} 'I would like a ' flavors {at} {random} ' cake.'\n```" + - feedback: All the different values of flavors should be in quotation marks. + option: "```\n'flavors = vanilla, strawberry, chocolate'\n{print} 'I would like a ' flavors {at} {random} ' cake.'\n```" + - option: "```\nflavors = 'vanilla', 'strawberry', 'chocolate'\n{print} 'I would like a ' flavors {at} {random} ' cake.'\n```" + feedback: Alright! + - feedback: All the different values of flavors should be in quotation marks. + option: "```\nflavors = 'vanilla, strawberry, chocolate'\n{print} 'I would like a ' flavors {at} {random} ' cake.'\n```" + correct_answer: C + question_score: '10' + question_text: Which of these codes is correct? + 1: + code: "{print} 'three and a half plus one and a half is...'\n{print} 3.5 + 1.5" + hint: Both lines are printed! + mp_choice_options: + - feedback: Don't forget the first line of code! + option: '5' + - feedback: This is not the one! + option: 3.5 + 1.5 + - option: "three and a half plus one and a half is...\nfive" + feedback: Take a close look at the second line... + - option: "three and a half plus one and a half is...\n5" + feedback: Great job! + question_text: Which output is correct? + correct_answer: D + question_score: '10' + 6: + correct_answer: C + mp_choice_options: + - feedback: What if you only order fries and a drink? + option: "```\nprice = 14\n```" + - option: "```\nprice = '14'\n```" + feedback: What if you only order fries and a drink? + - feedback: Excellent! + option: "```\nprice = price + 2\n```" + - feedback: Almost there! + option: "```\nprice = + 2\n```" + hint: What if you only order fries and a drink? + code: "{print} 'Welcome to McHedy!'\norder = {ask} 'Would you like a hamburger or fries?'\n{if} order = 'hamburger'\n price = 12\n{if} order = 'fries'\n price = 4\ndrinks = {ask} 'Would you like a drink with that for 2 dollars?'\n{if} drinks = 'yes'\n _\n{print} 'That will be ' price ' dollar please'" + question_score: '10' + question_text: Which line should be filled in at the `_`? + 7: + mp_choice_options: + - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ncookies\ngrapes" + feedback: Terrific! + - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ngrapes" + feedback: There's more options than just one + - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ncheese\ngrapes" + feedback: A vegan person can't have cheese + - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ngrapes\ncookies" + feedback: Almost there, but look at the order of snacks in the list + hint: What item is removed from the list when you answer 'vegan'? + code: "menu = 'cookies', 'cheese', 'grapes'\n{print} \"It's my birthday! I`ve brought some snacks!\"\ndiet = {ask} 'Do you have any dietary restrictions?'\n{if} diet = 'gluten free'\n {remove} 'cookies' {from} menu\n{if} diet = 'vegan'\n {remove} 'cheese' {from} menu\n{print} 'For you I have brought: '\n{for} snack {in} menu\n {print} snack" + question_score: '10' + correct_answer: A + question_text: Which output does a vegan get? + 5: + code: "name {is} {ask} 'What is your name?'\n{if} name {is} 'Agent007'\n a {is} 'Go to the airport '\nelse\n a {is} 'Go to the train station '\npassword {is} {ask} 'What is the password?'\n{if} password {is} 'TOPSECRET'\n b {is} 'tomorrow at 02.00'\n{else}\n b {is} 'today at 10.00'\n{print} a + b" + question_text: What output does Agent007 get when they put in the correct password? + mp_choice_options: + - feedback: The agent won't be catching any bad guys here + option: Go to the train station today at 10.00 + - feedback: You've cracked the code! + option: Go to the airport tomorrow at 02.00 + - option: Go to the train station tomorrow at 02.00 + feedback: The agent won't be catching any bad guys here + - option: Go to the airport tomorrow at 10.00 + feedback: The agent won't be catching any bad guys here + question_score: '10' + correct_answer: B + hint: The correct password is TOPSECRET + 5: + 5: + mp_choice_options: + - feedback: Indeed! + option: Because it needs to be in capitals, so SECRET + - feedback: No, this is not the password. + option: Because the password is alarm + - option: Because it's spelled wrong. + feedback: That's not how you spell secret + - option: Because Hedy makes a mistake + feedback: No, Hedy is right + question_score: '10' + code: "password {is} {ask} 'What is the password?'\n{if} password {is} SECRET {print} 'Correct!'\n{else} {print} 'ALARM! INTRUDER!'" + correct_answer: A + hint: The spelling of the word has to be exactly the same. + question_text: Why will Hedy say 'ALARM! INTRUDER' when you type in 'secret'? + 8: + mp_choice_options: + - option: "```\nfavorite animal\n```" + feedback: That's not the variable name. + - option: "```\nanimal\n```" + feedback: Great job! + - option: '`{if}`' + feedback: '`{if}` is already there' + - feedback: No, that's not it. + option: '`{print}`' + question_text: Which word should be on the place of the blank? + code: "animal {is} {ask} 'What is your favorite animal?'\n{if} _ {is} penguin {print} 'Thats my favorite animal too!'\n{else} {print} 'Cool! I like penguins.'" + question_score: '10' + hint: What the variable name? + correct_answer: B + 7: + hint: After `{else}` a `{print}` command follows + mp_choice_options: + - feedback: '`{if}` is in the line above.' + option: '`{if}`' + - option: '`{at}` `{random}`' + feedback: No, you don't need `{at} {random}`. + - feedback: There already is an `{else}` command + option: '`{else}`' + - feedback: Awesome! + option: '`{print}`' + question_score: '10' + question_text: Which word should be in the place of the blank? + correct_answer: D + code: "{print} 'I can predict if you will be a millionair or not!'\nname {is} {ask} 'Whats your name?'\n{if} name {is} Hedy {print} 'You will be a millionair!'\n{else} _ 'Unfortunately... No big money for you.'" + 10: + question_text: Which monster is standing behind door 1? + mp_choice_options: + - feedback: Awesome! + option: Hedy picks a random monster each time. + - feedback: Not always... + option: vampire + - option: werewolf + feedback: Not always... + - feedback: Not always... + option: giant spider + code: "{print} 'Escape from the haunted house!'\n{print} 'There are 3 doors in front of you'\ndoor {is} {ask} 'Which door do you choose?'\nmonsters {is} vampire, werewolf, giant spider\n{if} door {is} 2 {print} 'Yay, you can escape!'\n{else} {print} 'You are being devoured by a... ' monsters {at} {random}" + correct_answer: A + question_score: '10' + hint: Mind the last 3 words... monsters `{at} {random}`... + 2: + mp_choice_options: + - feedback: That's right! + option: fun + - option: less fun + feedback: If the name is Hedy, it will say 'fun'' + - option: Hedy + feedback: No, it doesn't print the name + - option: Error + feedback: Fortunately not! + code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy {print} 'fun' {else} {print} 'less fun'" + question_score: '10' + hint: '`{if}` name `{is}` Hedy `{print}` ...?' + correct_answer: A + question_text: What appears in your output screen when you type in the name Hedy? + 6: + mp_choice_options: + - option: "```\n{if}\n```" + feedback: '`{if}` is already in the line above' + - feedback: No, you need `{else}`. + option: "```\n{at} {random}\n```" + - feedback: Great! + option: "```\n{else}\n```" + - option: "```\n{print}\n```" + feedback: '`{print}` is already there, we need a word before it!' + hint: '`{if}` goes together with...?' + correct_answer: C + question_text: Which word should be on the place of the blank in the last line? + code: "{print} 'Im Hedy the football fortune teller!'\n{print} 'I will predict what place your team will end up!'\nclub is {ask} 'Which club is your favorite?'\n{if} club {is} ajax {print} 'Ajax is going to win of course!'\n_ {print} 'Sorry, your club is gonna be in last place...'" + question_score: '10' + 9: + question_score: '10' + mp_choice_options: + - feedback: Bad choice! You're being eaten + option: '1' + - feedback: Super! You escaped! + option: '2' + - feedback: Bad choice! You're being eaten. + option: '3' + - feedback: Luckily not! + option: It's a trap, you will always be eaten! + hint: One of the doors will keep you safe.. + code: "{print} 'Escape from the haunted house!'\n{print} 'There are 3 doors in front of you'\ndoor {is} {ask} 'Which door do you choose?'\nmonsters {is} vampire, werewolf, giant spider\n{if} door {is} 2 {print} 'Yay, you can escape!'\n{else} {print} 'You are being devoured by a... ' monsters {at} {random}" + question_text: Which door should you choose to escape?? + correct_answer: B + 1: + mp_choice_options: + - feedback: There already is a `{print}` command. + option: '`{print}`' + - option: '`{if}`' + feedback: The `{if}` command is used in the line above. + - option: '`{sleep}`' + feedback: That's not it! + - option: '`{else}`' + feedback: That's right! + question_text: Which command should be filled in on the _? + question_score: '10' + correct_answer: D + code: "number {is} {ask} 'What is your lucky number?'\n{if} number {is} 5 {print} 'Mine too!'\n_ {print} 'My lucky number is 5!'" + hint: Which one goes together with the `{if}` command? + 4: + code: "password {is} {ask} 'What is the password?'\n{if} password {is} SECRET {print} 'Correct!'\n{else} {print} 'ALARM! INTRUDER!'" + mp_choice_options: + - feedback: That's printed if the correct answer is given, not the wrong one... + option: Correct + - feedback: That's not the right answer + option: SECRET + - option: Wrong! + feedback: No, this is not what Hedy will print + - option: ALARM! INTRUDER! + feedback: Great job! + hint: Your computer will sound the alarm for intruders! + correct_answer: D + question_text: What does Hedy print when you type in the wrong password? + question_score: '10' + 3: + mp_choice_options: + - feedback: This is printed when you type in the correct password + option: Correct! + - feedback: That's right!' + option: SECRET + - option: password + feedback: The password isn't password... + - feedback: This is printed when you type in the incorrect password! + option: ALARM INTRUDER + question_score: '10' + question_text: What is the right password? + hint: "`{if}` password `{is}` ... `{print}` 'Correct!'" + correct_answer: B + code: "password {is} {ask} 'What is the password?'\n{if} password {is} SECRET {print} 'Correct!'\n{else} {print} 'ALARM! INTRUDER!'" + 2: + 10: + correct_answer: D + mp_choice_options: + - feedback: You want to know the favorite flavor! + option: "```\n{sleep} 3\n```" + - option: "```\n{print} strawberries\n```" + feedback: You do not want a `{print}` command at the middle of the line... + - option: "```\nstrawberries, chocolate, vanilla\n```" + feedback: This way you are making a list. You don't want that now. + - feedback: That's right! + option: "```\n{ask} What flavor icecream do you like?\n```" + hint: You want to `{ask}` a question + question_text: What command should be used on the line 1? + question_score: '10' + code: "flavor {is} _\n{print} Your favorite icecream is...\n{sleep}\n{print} flavor" + 5: + question_score: '10' + hint: The computer waits for a second at the `{sleep}` command + mp_choice_options: + - feedback: fortunately not! + option: It slows down your computer + - option: It closes down Hedy + feedback: fortunately not! + - feedback: That's right! + option: Your program pauses for a second and then continues + - feedback: No it would be useless at the end of your code + option: You put it at the end so Hedy knows your program is finished + correct_answer: C + question_text: What happens when you use the `{sleep}` command? + 4: + mp_choice_options: + - option: Hi my name is name + feedback: The variable name is replaced with Hedy + - feedback: The variable name is replaced with Hedy + option: Hi my name is Hedy + - option: Hi my Hedy is name + feedback: The variable name is replaced with Hedy + - option: Hi my Hedy is Hedy + feedback: Correct, this mistake will be fixed in level 4! + question_score: '10' + hint: "'name' is being replaced with 'Hedy' in both places" + code: "name {is} Hedy\n{print} Hi my name is name" + question_text: What will you see on the output screen when you run this code? + correct_answer: D + 3: + mp_choice_options: + - feedback: The word name is replaced with Marleen + option: name goes to the market and she buys an apple. + - option: Marleen goes to the market. + feedback: The second part of the sentence isn't left out! + - feedback: Right on! + option: Marleen goes to the market and she buys an apple. + - feedback: She is not replaced with the name + option: Marleen goes to the market and Marleen buys an apple. + correct_answer: C + code: "name {is} Marleen\n{print} name goes to the market and she buys an apple." + question_score: '10' + question_text: What appears on your output screen when you run this code? + hint: The word name is replaced with Marleen + 1: + correct_answer: C + mp_choice_options: + - feedback: That is what `{ask}` is for + option: You can use the `{print}` command to ask questions. + - option: You can use the `{ask}` command to echo answers. + feedback: That is not true + - option: With the `{print}` command you can make text appear + feedback: Good + - option: With the `{sleep}` command, you can remove text from the screen. + feedback: That's not how `{sleep}` works. + hint: '`{print}` still works the same way as in level 1' + question_score: '10' + question_text: Which statement is true? + 7: + hint: You want the computer to wait for 3 seconds + mp_choice_options: + - option: "```\n{print} 3\n```" + feedback: You don't need to `{print}` + - feedback: Perfect! + option: "```\n{sleep} 3\n```" + - feedback: This way the bomb will explode in 1 second + option: "```\n{sleep}\n```" + - feedback: Make it easier on yourself by using the number 3 + option: "```\n{sleep} {sleep} {sleep}\n```" + correct_answer: B + code: "{print} I will explode in 3 seconds!\n_\n{print} BOOM!" + question_text: What command should be used on line 2? + question_score: '10' + 2: + mp_choice_options: + - option: "```\nname {is} {ask} What is your name?\n```" + feedback: Super! + - feedback: The words are right, the order is not! + option: "```\n{ask} {is} name What is your name\n```" + - feedback: This worked in level 1, but in level 2 and up it works differently. + option: "```\n{ask} What is your name?\n```" + - feedback: The words are right, the order isn't! + option: "```\n{ask} What is your name? {is} name\n```" + question_text: Which code is correct? + hint: "`{ask}` doesn't work like in level 1" + question_score: '10' + correct_answer: A + 9: + mp_choice_options: + - feedback: The variable name is animal + option: 'Line 1 should say: dogs `{is}` animals' + - feedback: Great! + option: 'Line 1 should say: animal `{is}` dogs' + - option: 'Line 2 should say: `{print}` I love animals' + feedback: The variable name is animal + - option: 'Line 2 should say: `{sleep}` I love animals' + feedback: Sleep is not used to `{print}` text + question_score: '10' + question_text: What is going wrong in this code? + code: "dogs {is} animal\n{print} I love animal" + hint: You want to `{print}` 'I love dogs' + correct_answer: B + 8: + mp_choice_options: + - option: "```\nage {ask} {is} How old are you?\n```" + feedback: That is the wrong order + - feedback: That is the wrong order + option: "```\n{ask} {is} age How old are you?\n```" + - feedback: You get it! + option: "```\nage {is} {ask} How old are you?\n```" + - feedback: Where is the `{ask}` command? + option: "```\nage {is} How old are you?\n```" + question_text: How would you correct the first line of code? + code: "{ask} {is} How old are you?\n{print} age" + question_score: '10' + hint: The variable name should come first + correct_answer: C + 6: + question_text: What should be on the lines? + code: "{print} And the award for best programming language goes to...\n_\n{print} Hedy!" + hint: Pause for dramatic effect... + mp_choice_options: + - feedback: Perfect! + option: '`{sleep}`' + - feedback: There is nothing to repeat back here + option: '`{echo}`' + - option: '`{print}`' + feedback: There is no text there to `{print}` there + - option: '`{ask}`' + feedback: There is no question there to be asked + correct_answer: A + question_score: '10' + 7: + 2: + hint: First the `{repeat}` command, then the `{print}` command + mp_choice_options: + - option: "```\n{print} 100 {times} 'hello'\n```" + feedback: "`{repeat}` 100 `{times}` `{print}` 'hello'" + - option: "```\n{print} {repeat} 100 {times} 'hello'\n```" + feedback: "{repeat} 100 {times} {print} 'hello'" + - feedback: "{repeat} 100 {times} {print} 'hello'" + option: "```\n{repeat} 'hello' 100 {times}\n```" + - feedback: That's right! + option: "```\n{repeat} 100 {times} {print} 'hello'\n```" + correct_answer: D + question_score: '10' + question_text: Which code is right? + 10: + hint: Mind the order of the sentences. + correct_answer: B + code: "if youre happy and you know it clap your hands\nif youre happy and you know it clap your hands\nif youre happy and you know it and you really want to show it\nif youre happy and you know it clap your hands" + mp_choice_options: + - feedback: Almost! the first line needs an extra word + option: "```\n{repeat} 2 {times} 'if youre happy and you know it clap your hands'\n{print} 'if youre happy and you know it and you really want to show it'\n{print} 'if youre happy and you know it clap your hands'\n```" + - option: "```\n{repeat} 2 {times} {print} 'if youre happy and you know it clap your hands'\n{print} 'if youre happy and you know it and you really want to show it'\n{print} 'if youre happy and you know it clap your hands'\n```" + feedback: Great! + - feedback: This is not in the right order. + option: "```\n{repeat} 3 {times} {print} 'if youre happy and you know it clap your hands'\n{print} 'if youre happy and you know it and you really want to show it'\n```" + - option: "```\n{repeat} 4 {times} 'if youre happy and you know it'\n{repeat} 2 {times} 'clap your hands'\n{print} 'and you really want to show it'\n{print} 'clap your hands'\n```" + feedback: This is not in the right order. + question_score: '10' + question_text: Which code belongs to this output? + 7: + mp_choice_options: + - option: "```\nWe will We will\nROCK YOU!\n```" + feedback: "'We will' won't appear twice in the same line" + - feedback: Great! + option: "```\nWe will\nWe will\nROCK YOU!\n```" + - feedback: ROCK YOU! won't be repeated + option: "```\nWe will\nROCK YOU!\nWe will\nROCK YOU!\n```" + - feedback: Mind the `{repeat}` command + option: "```\nWe will\nROCK YOU!" + hint: Mind the `{repeat}` command. + correct_answer: B + question_text: What will be the output from this code? + code: "{repeat} 2 {times} {print} 'We will'\n{print} 'ROCK YOU!'" + question_score: '10' + 3: + mp_choice_options: + - feedback: No, a word is missing + option: Right + - feedback: The word `{repeat}` is there, another word is missing + option: Wrong, the word `{repeat}` is missing + - option: Wrong, the word `{times}` is missing + feedback: The word `{times}` is there, another word is missing. + - option: Wrong, the word `{print}` is missing + feedback: Correct + correct_answer: D + code: "{repeat} 100 {times} 'Hello!'" + question_score: '10' + hint: "It should be: `{repeat}` 100 `{times}` `{print}` 'Hello'" + question_text: Is this code right or wrong? + 1: + mp_choice_options: + - feedback: No you can repeat a line. + option: '0' + - option: '1' + feedback: Correct, one line at a time + - option: '3' + feedback: In this level only one line at a time + - feedback: In this level you can only repeat one line at a time + option: infinite + correct_answer: B + question_score: '10' + question_text: How many lines can you repeat at once with the repeat command at this level? + hint: You can only repeat one line at a time + 8: + code: "Here comes the sun\nDo do do do\nHere comes the sun\nAnd I say\nIts alright" + mp_choice_options: + - option: "```\n{print} 'Here comes the sun'\n{print} 'Do do do do'\n{print} 'Here comes the sun'\n{print} 'And I say'\n{print} 'Its alright'\n```" + feedback: Awesome, you can't use the `{repeat}` command here. + - option: "```\n{repeat} 2 {times} {print} 'Here comes the sun'\n{print} 'And I say'\n{print} 'Its alright'" + feedback: Where did you leave 'Do do do do'? + - option: "```\n{repeat} 2 {times} {print} 'Here comes the sun'\n{print} 'Do do do do'\n{print} 'And I say'\n{print} 'Its alright'\n```" + feedback: This is not the correct order.. + - option: "```\n{repeat} 2 {times} {print} 'Here comes the sun'\n{repeat} 2 {times} {print} 'Do do'\n{print} 'And I say'\n{print} 'Its alright'\n```" + feedback: This is not the correct order.. + question_text: What Hedy code belongs to this output? + correct_answer: A + hint: '`{repeat}` can only be used if you want to execute the same line multiple times in a row.' + question_score: '10' + 6: + mp_choice_options: + - feedback: Only the second line is repeated 3 times + option: "```\nthe wheels on the bus go\nround and round\n```" + - option: "```\nthe wheels on the bus go\nthe wheels on the bus go\nthe wheels on the bus go\nround and round\n```" + feedback: Only the second line is repeated 3 times + - option: "```\nthe wheels on the bus go\nround and round\nthe wheels on the bus go\nround and round\nthe wheels on the bus go\nround and round\n```" + feedback: Only the second line is repeated 3 times + - option: "```\nthe wheels on the bus go\nround and round\nround and round\nround and round\n```" + feedback: All through the town! Perfect! + hint: Only 'round and round' is repeated 3 times. + question_score: '10' + question_text: What will be the output from this code? + code: "{print} 'The wheels on the bus go'\n{repeat} 3 {times} {print} ' round and round'" + correct_answer: D + 4: + question_score: '10' + mp_choice_options: + - option: "`I'm`" + feedback: That's right! + - feedback: '`{print}` is spelled correctly' + option: '`{print}`' + - feedback: '`{repeat}` is spelled correctly' + option: '`{repeat}`' + - feedback: '`{times}` is spelled correctly' + option: '`{times}`' + code: "{print} 'I'm blue'\n{repeat} 7 {times} {print} 'da ba dee, da ba da'" + hint: I'm is wrong, you can't use apostrophes in a sentence + correct_answer: A + question_text: Which word is wrong in the code? + 9: + mp_choice_options: + - feedback: Your repeated line is incorrect. + option: "```\n{print} 'Batman was flying through Gotham. '\n{print} 'When suddenly he heard someone screaming!'\n{print} 'Help!'\n{repeat} 3 {times} {print} 'Please help me!'\n```" + - option: "```\n{print} 'Batman was flying through Gotham.'\n{print} 'When suddenly he heard someone screaming!'\n{repeat} 3 {times} 'Help!'\n{print} 'Please help me!'\n```" + feedback: The `{print}` command is missing on line 3. + - option: "```\n{print} Batman was flying through Gotham.\n{print} When suddenly he heard someone screaming!\n{repeat} 3 {times} {print} Help!\n{print} Please help me!\n```" + feedback: You're missing the quotation marks + - option: "```\n{print} 'Batman was flying through Gotham.'\n{print} 'When suddenly he heard someone screaming!'\n{repeat} 3 {times} {print} 'Help!'\n{print} 'Please help me!'\n```" + feedback: Perfect + code: "Batman was flying through Gotham.\nWhen suddenly he heard someone screaming...\nHelp!\nHelp!\nHelp!\nPlease help me!" + correct_answer: D + question_score: '10' + question_text: What Hedy code belongs to this output? + hint: "'Help!' is repeated 3 times." + 5: + mp_choice_options: + - option: Correct + feedback: That's right! + - option: Wrong + feedback: That's not it + hint: The code is correct! + question_score: '10' + question_text: Is this code right or wrong? + code: "{repeat} 100 {times} {print} 'Hedy is awesome!'" + correct_answer: A + 8: + 4: + question_text: Which output is correct? + hint: The block under the `{repeat}` command is repeated twice. + mp_choice_options: + - option: "The children went:\nYay!\nWe are going on vacation!" + feedback: Mind the `{repeat}` command! + - option: "The children went:\nYay!\nWe are going on vacation!\nYay!\nWe are going on vacation!" + feedback: Correct! + - option: "The children went:\nYay!\nYay!\nWe are going on vacation!\nWe are going on vacation!" + feedback: This order is incorrect. + - option: "The children went:\nYay!\nYay!\nWe are going on vacation!" + feedback: The last line is repeated too. + correct_answer: B + code: "{print} 'The children went:'\n{repeat} 2 {times}\n {print} 'Yay!'\n {print} 'We are going on vacation!'" + question_score: '10' + 9: + mp_choice_options: + - feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces + option: Line 2 and 4 + - feedback: Not only 3... + option: Only line 3 + - option: Line 3, 4 and 5 + feedback: Line 4 shouldn't + - feedback: Great job! + option: Line 3 and 5 + code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'" + question_score: '10' + hint: The lines after an `{if}` or `{else}` command should start with 4 spaces. + correct_answer: D + question_text: What line(s) in this code should start with 4 spaces? + 6: + mp_choice_options: + - feedback: There is no repetition in this answer. + option: "Welcome to restaurant Hedy\nPancakes" + - option: "Welcome to restaurant Hedy\nWelcome to restaurant Hedy\nPancakes\nPancakes" + feedback: This answer also repeats the welcome message + - option: "Welcome to restaurant Hedy\nWhat do you want to eat?\nWhat do you want to eat?\nPancakes\nPancakes" + feedback: Almost! But look at the question, it is not repeated. + - option: "Welcome to restaurant Hedy\nPancakes\nPancakes" + feedback: Well done! + hint: The first sentence and question will not be repeated + question_text: What will be the output of this code when we enter pancakes? + correct_answer: D + code: "{print} 'Welcome to restaurant Hedy'\n{repeat} 2 {times}\n food {is} {ask} 'What do you want to eat?'\n {print} food" + question_score: '10' + 8: + mp_choice_options: + - feedback: You are wrong! + option: "```\n{if} answer {is} 32\n {print} 'You are...'\n {sleep}\n {print} 'right!'\n {else}\n {print} 'You are wrong!'\n```" + - feedback: You are wrong! + option: "```\n{if} answer {is} 32\n{print} 'You are...'\n{sleep}\n{print} 'right!'\n{else}\n{print} 'You are wrong!'\n```" + - option: "```\n{if} answer {is} 32\n {print} 'You are...'\n {sleep}\n {print} 'right!'\n{else}\n {print} 'You are wrong!'\n```" + feedback: You are... right! + - option: "```\n{if} answer {is} 32\n {print} 'You are...'\n {sleep}\n{print} 'right!'\n{else}\n {print} 'You are wrong!'\n```" + feedback: You are wrong! + hint: What should happen if the person is right? And what else? + question_text: In which of the codes is the indentation done right? + correct_answer: C + question_score: '10' + 3: + mp_choice_options: + - option: "Baby shark tututudutudu\nBaby shark" + feedback: Mind the `{repeat}` command! + - feedback: The last line has no indentation, so it's not repeated. + option: "Baby shark tututudutudu\nBaby shark\nBaby shark tututudutudu\nBaby shark\nBaby shark tututudutudu\nBaby shark" + - feedback: Right! + option: "Baby shark tututudutudu\nBaby shark tututudutudu\nBaby shark tututudutudu\nBaby shark" + - feedback: What is being repeated and what isn't ? + option: "Baby shark tututudutudu\nBaby shark\nBaby shark\nBaby shark" + code: "{repeat} 3 {times}\n {print} 'Baby shark tututudutudu'\n{print} 'Baby shark'" + hint: What is being repeated and what is not? + question_text: What output will be produced when you run this program? + correct_answer: C + question_score: '10' + 2: + correct_answer: D + mp_choice_options: + - feedback: No it should be 2 lines. + option: This should be only one line, not 2. + - option: This `{print}` command has to be removed. + feedback: No, you need it. + - feedback: No, `{repeat}` is the correct spelling + option: There is a spelling mistake in the `{repeat}` command. + - option: The second line needs to start with 4 spaces as indentation. + feedback: Correct! + code: "{repeat} 5 {times}\n{print} 'Hedy is cool!'" + question_score: '10' + hint: Something is missing in the second line? + question_text: What is wrong with this code? + 10: + mp_choice_options: + - feedback: That's not true + option: All lines should start with 4 spaces + - option: Line 2 and 3 should start with 4 spaces + feedback: That's not true + - feedback: That's not true + option: Line 2 should start with 4 spaces + - option: Line 3 should start with 4 spaces + feedback: You are correct! + code: "1 level = {ask} 'What level are you on?'\n2 {if} level {is} 8\n3 {print} 'Great job!'" + question_text: Which statement is true? + hint: Only one line starts with 4 spaces, but which one...? + question_score: '10' + correct_answer: D + 1: + mp_choice_options: + - option: "Hello\nIm Hedy!" + feedback: Everything is printed twice. + - option: "Hello\nHello\nIm Hedy" + feedback: The second line is repeated twice as well. + - option: "Hello\nIm Hedy!\nHello\nIm Hedy!" + feedback: Super! + - feedback: Everything is printed twice + option: "Hello\nHello\nIm Hedy!\nIm Hedy!" + correct_answer: C + question_text: Which output will be produced by this code? + hint: Both lines are repeated twice. + question_score: '10' + code: "{repeat} 2 {times}\n {print} 'Hello'\n {print} 'Im Hedy!'" + 5: + question_score: '10' + mp_choice_options: + - option: The `{print}` commands on the last two lines should start on new lines and start with 4 spaces. + feedback: That's right! + - option: '`{else}` is not a command!' + feedback: It is! + - feedback: That's not true + option: Lines that start with `{if}` should start with 4 spaces + - feedback: That's not true + option: '`{ask}` is no longer a command' + correct_answer: A + code: "end = {ask} 'Do you want a happy or a sad ending?'\n{if} end {is} happy {print} 'They lived happily ever after'\n{else} {print} 'The world exploded. The end.'" + question_text: What is wrong with this code? + hint: Something is wrong with indentation + 7: + mp_choice_options: + - option: Nothing. This code is correct! + feedback: Something is wrong! + - feedback: You are! + option: You're not allowed to use an `{if}` command after an `{ask}` command. + - feedback: You always have to use indentation. + option: You don't have to use indentation twice. Only in the first `{if}` command. + - feedback: That's right. + option: The indentation is wrong in the first `{if}` command. + code: "food = {ask} 'What would you like to eat?'\n{if} food {is} fries\nsauce = {ask} 'What sauce would you like?'\n {print} 'One fries with ' sauce\n{if} food {is} pizza\n topping = {ask} 'What topping would you like?'\n {print} 'One pizza with ' topping\n{print} 'Thank you for your order'" + hint: Take a careful look at the indentation. + question_score: '10' + question_text: What is wrong with this code? + correct_answer: D + 3: + 2: + question_score: '10' + mp_choice_options: + - feedback: Good job! + option: 'You need commas in line 1: dog, cat, cow.' + - feedback: No, you don't need `{print}` + option: Line 1 needs to start with `{print}`. + - feedback: animals is correct. + option: Line 2 needs to say 'animal' instead of 'animals' + - feedback: '`{at} {random}` is the correct spelling' + option: '`{at} {random}` is spelled incorrectly' + correct_answer: A + hint: There's something wrong in line 1 + question_text: What's wrong with this code? + code: "animals {is} dog cat cow\n{print} animals {at} {random}" + 1: + mp_choice_options: + - option: '`{print}`' + feedback: '`{print}` is used to print text' + - feedback: '`{ask}` is used to ask a question' + option: '`{ask}`' + - option: '`{is}`' + feedback: '`{is}` is used to make a list' + - option: '`{at} {random}`' + feedback: Correct! + hint: Arbitrarily means without a plan or randomly. + question_score: '10' + correct_answer: D + question_text: What command(s) do you use to let Hedy pick something arbitrarily? + 5: + question_score: '10' + mp_choice_options: + - feedback: No, that's not wrong. + option: Line 1 needs to say `{print}` instead of `{ask}` + - feedback: No that's not wrong. + option: Line 2 needs to say `{ask}` instead of `{print}` + - feedback: No, that's not wrong. + option: Line 2 needs to say answers `{at} {random}` `{is}` yes, no, maybe + - feedback: That's right! + option: Nothing, this code is perfect + correct_answer: D + hint: Does this code even have a mistake? + code: "question {is} {ask} What do you want to know?\n{print} question\nanswers {is} yes, no, maybe\n{print} answers {at} {random}" + question_text: What is wrong in this code? + 7: + mp_choice_options: + - feedback: The remove command removes, the add command adds + option: The `{add}` command removes a random book from the list + - option: The `{add}` command adds a random book to a list + feedback: It doesn't. It adds your answer to the list! + - feedback: Correct! + option: The `{add}` command adds your favorite book to the list + - option: The `{add}` command prints your favorite book. + feedback: No, it adds your favorite book to the list + correct_answer: C + hint: The `{add}` command adds a book, but which one? + code: "books {is} Harry Potter, The Hobbit, Green Eggs and Ham\nyour_book {is} {ask} What is your favorite book?\n{add} your_book {to} books\n{print} books {at} {random}" + question_text: What does the `{add}` command do? + question_score: '10' + 9: + mp_choice_options: + - feedback: Maybe you want blue hair though! + option: 'Line 3 should say: `{remove}` blue `{from}` colors' + - feedback: You want to remove the chosen color so `{remove}` is right. + option: Line 3 should have an `{add}` command instead of a `{remove}` command + - feedback: Great job! + option: In line 4 the variable should be called colors instead of color + - feedback: Find the mistake! + option: Nothing, this is a correct code! + hint: Look at line 4 + question_score: '10' + correct_answer: C + question_text: What's wrong with this code? + code: "colors {is} blue, purple, green\nchosen_color {is} {ask} Which hair color wouldn't you like to have?\n{remove} chosen_color {from} colors\n{print} I will dye my hair color {at} {random}" + 6: + mp_choice_options: + - option: Line 2 needs to say question instead of answers + feedback: No that's not right + - option: Line 2 needs the `{is}` command + feedback: Correct + - option: Line 3 needs to say answer instead of answers + feedback: No the variable's called answers + - option: Nothing! This code is great! + feedback: Actually, line 2 has a mistake. + code: "question {is} {ask} What do you want to know?\nanswers yes, no, maybe\n{print} answers {at} {random}" + question_text: What's wrong with this code? + hint: There is something wrong with line 2. + question_score: '10' + correct_answer: B + 8: + mp_choice_options: + - option: You can't tell, because Hedy will `{print}` one of the 3 flavors `{at} {random}` + feedback: Take a look at the `{remove}` commands + - option: sea salt + feedback: sea salt is removed from the list + - feedback: Paprika is removed from the list + option: paprika + - option: sour cream + feedback: That's right! + correct_answer: D + question_score: '10' + question_text: What is the output of this code? + code: "crisps {is} sea salt, paprika, sour cream\n{remove} sea salt {from} crisps\n{remove} paprika {from} crisps\n{print} crisps {at} {random}" + hint: There are 3 flavors, bit 2 are removed. Which one remains? + 4: + mp_choice_options: + - option: "```\n{print} price\n```" + feedback: You don't want to `{print}` the word price, but you want to `{print}` one price out of your list `{at} {random}` + - option: "```\n{print} prices {at} {random}\n```" + feedback: Great! You've really paid attention. + - feedback: '`{at} {random}` is placed behind the variable.' + option: "```\n{print} {at} {random} price\n```" + - option: Nothing, this code is alright. + feedback: Look carefully for the mistake you missed! + hint: The variable name is prices + correct_answer: B + question_score: '10' + code: "prices {is} 1 dollar, 100 dollar, 1 million dollar\n{print} price {at} {random}" + question_text: What should change in line 2 to print a random price? + 10: + mp_choice_options: + - option: "```\n{remove} walked_yesterday {from} walkers\n```" + feedback: Super! + - option: "```\n{remove} walked_yesterday {to} walkers\n```" + feedback: '`{remove} {from}` or `{add} {to}`, not `{remove} {to}`' + - option: "```\n{remove} walkers {from} yesterday\n```" + feedback: yesterday is not a variable + - option: "```\n{add} walked_yesterday {to} walkers\n```" + feedback: This increased the chance that the person who walked yesterday now has to do it again. That's mean. + question_text: What should be on the _? + hint: The person who walked the dogs yesterday should be removed from the list. + code: "walkers {is} dad, mom, Sam, Petra\nwalked_yesterday {is} {ask} Who walked the dogs yesterday?\n{print} walked_yesterday shouldn't have to walk the dogs again today\n_\n{print} walkers {at} {random} , it's your turn to walk the dogs!" + question_score: '10' + correct_answer: A + 3: + mp_choice_options: + - option: "```\n{at} {random} {print} options\n```" + feedback: You're almost there. The order of the words isn't right yet. + - option: "```\n{print} rock {at} {random}\n```" + feedback: you don't always want the Hedy to {print} rock, sometimes you want scissors or paper. + - option: "```\n{print} options {at} {random}\n```" + feedback: Very good! + - option: Nothing, the code is correct! + feedback: Look carefully for the mistake + question_score: '10' + correct_answer: C + hint: The variable (the list) is called options. + code: "options {is} rock, paper, scissors\n{print} rock, paper, scissors {at} {random}" + question_text: How do you fix the mistake in line 2? + 11: + 1: + mp_choice_options: + - feedback: No + option: '`counter`' + - feedback: Correct + option: '`{range}`' + - feedback: No + option: '`{if}`' + - option: '`{for}`' + feedback: No + hint: What did you learn in this level? + code: "{for} i {in} _ 1 {to} 10\n {print} i" + correct_answer: B + question_text: What word should be at the place of the blank? + question_score: '10' + 4: + correct_answer: D + mp_choice_options: + - option: "```\n{for} i {in} {range} 0 {to} 10\n {print} i\n```" + feedback: Now Hedy prints the numbers from 0 to 10 instead of 10 to 0. + - feedback: Hedy would print negative numbers in this case. + option: "```\n{for} i {in} {range} 0 {to} 10\n {print} -1 * i\n```" + - feedback: Unfortunately this does not exist. + option: "```\n{for} i {in} {range} 10 {to} 0\n {print} i\n```" + - feedback: That's right! + option: "```\n{for} i {in} {range} 0 {to} 10\n {print} 10 - i\n```" + hint: It has to be a calculation… + output: "10\n9\n8\n7\n6\n5\n4\n3\n2\n1\n0" + question_score: '10' + question_text: Which code was used to get this output? + 10: + output: "Baby shark tututudutudu\nBaby shark tututudutudu\nBaby shark tututudutudu\nBaby shark" + mp_choice_options: + - option: "```\n{for} i {in} {range} 1 {to} 3\n {print} Baby shark tututudutudu\n {print} Baby shark\n```" + feedback: Mind the indentation + - option: "```\n{for} i {in} {range} 1 {to} 3\n {print} Baby shark tututudutudu\n{print} Baby shark\n```" + feedback: That's right! + - feedback: '`{range}` 0 `{to}` 3 is 4 times.' + option: "```\n{for} i {in} {range} 0 {to} 3\n {print} Baby shark tututudutudu\n{print} Baby shark\n```" + - option: "```\n{for} i {in} {range} 0 {to} 3\n {print} Baby shark tututudutudu\n {print} Baby shark\n```" + feedback: '`{range}` 0 `{to}` 3 is 4 times.' + hint: Mind the indentation + correct_answer: B + question_text: Which code belongs to this output? + question_score: '10' + 7: + mp_choice_options: + - option: "```\n{for} i {in} {range} 0 {to} 3\n```" + feedback: There's not always 3 people + - option: "```\n{for} i {in} {range} 1 {to} guests\n```" + feedback: The variable is not named guests + - feedback: Great! + option: "```\n{for} i {in} {range} 1 {to} people\n```" + - feedback: That's one order too many! + option: "```\n{for} i {in} {range} 0 {to} people\n```" + question_text: What should be on the place of the blank? + correct_answer: C + code: "{print} 'Welcome to Hedys diner'\npeople = {ask} 'How many people will be eating here tonight?'\n_\n food = {ask} 'What would you like to order?'\n {print} food" + hint: Use the variable 'people' + question_score: '10' + 9: + code: "age = {ask} 'How old are you?'\n{for} i {in} {range} 1 {to} age\n {print} 'Hip Hip Hoorray!'" + question_score: '10' + mp_choice_options: + - feedback: Try again + option: 1 time + - feedback: Try again + option: 2 times + - feedback: Try again + option: Never + - feedback: That's right! + option: That depends on how old you are + hint: '`{for}` i `{in}` `{range}` 1 `{to}` age' + question_text: How many times does Hedy chant Hip Hip Hooray? + correct_answer: D + 8: + mp_choice_options: + - feedback: The numbers don't appear. It doesn't say `{print}` i. + option: "```\n23\n24\n25\n```" + - feedback: The numbers don't appear. It doesn't say `{print}` i + option: "```\n23 hi 24 hi 25 hi\n```" + - feedback: Correct + option: "```\nhi\nhi\nhi\n```" + - feedback: No it will only appear 3 times. + option: The word 'hi' will appear 25 times in a row. + hint: It doesn't say `{print}` i + code: "{for} i {in} {range} 23 {to} 25\n {print} 'hi'" + question_score: '10' + question_text: What will be the output from this code? + correct_answer: C + 5: + mp_choice_options: + - option: The i in the last line need quotation marks + feedback: No it doesn't. + - feedback: You could use 1 to 5 just as well! + option: You can't use `{range}` 1 `{to}` 5 only `{range}` 1 `{to}` 10 + - option: Line 1 needs to start with an indention. + feedback: Not line 1... + - feedback: Perfect! + option: Line 2 needs to start with an indention + correct_answer: D + code: "{for} i {in} {range} 1 {to} 10\n{print} i" + hint: There is something wrong with the indention + question_text: What's wrong with this code? + question_score: '10' + 3: + mp_choice_options: + - option: "```\n{for} i {in} {range} 1 {to} 5\n {print} i\n{print} 'Once I caught a fish alive!'\n```" + feedback: Perfect + - option: "```\n{for} i {in} {range} 1 {to} 5\n{print} i\n{print} 'Once I caught a fish alive!'\n```" + feedback: This code won't work. You need an indent after {for}. + - option: "```\n{for} i {in} {range} 1 {to} 5\n {print} i\n {print} 'Once I caught a fish alive!'\n```" + feedback: Now Hedy will count '1 Once I caught a fish alive!, 2 Once I caught a fish alive! etc. + - option: "```\n{for} i {in} {range} 1 {to} 5\n {print} 'i'\n{print} 'Once I caught a fish alive!'\n```" + feedback: i is a variable and shouldn't have quotation marks + question_text: Which code was used to get this output? + hint: First all the numbers, then the sentence + correct_answer: A + output: "1\n2\n3\n4\n5\nOnce I caught a fish alive!" + question_score: '10' + 6: + mp_choice_options: + - option: 1 time + feedback: No + - feedback: No + option: 2 times + - feedback: That's right! + option: 3 times + - option: Never + feedback: No + code: "{for} i {in} {range} 0 {to} 2\n {print} 'Hello'" + hint: 0 also counts. So 0,1,2 that's 3 times. + question_score: '10' + question_text: How many times does the word Hello appear on your screen when you run the code? + correct_answer: C + 2: + mp_choice_options: + - option: "```\n1\n2\n3\n```" + feedback: Correct! + - feedback: That's not it + option: "```\n1 2 3\n```" + - option: "```\n1, 2, 3\n```" + feedback: That's not it + - feedback: That's not it + option: "```\n123\n```" + hint: How do the numbers appear in the screen? + question_text: What will be the output from this code? + correct_answer: A + code: "{for} i {in} {range} 1 {to} 3\n {print} i" + question_score: '10' + 4: + 2: + mp_choice_options: + - feedback: This quotation mark is skewed, you need a straight one. + option: "```\n{print} `hello`\n```" + - feedback: Correct + option: "```\n{print} 'hello'\n```" + - option: "```\n{print} hello\n```" + feedback: There are no quotation marks here! + - option: "```\n{print} ,hello,\n```" + feedback: This is a comma, you need quotation marks. + question_text: Which code uses the proper quotation marks? + question_score: '10' + correct_answer: B + hint: Pick the right quotation marks. + 5: + correct_answer: C + mp_choice_options: + - feedback: Never put the quotation mark in front of the `{print}` command. + option: "```\n'{print} options {at} {random}'\n```" + - option: "```\n{print} 'options' {at} {random}\n```" + feedback: options is a variable. You don't literally want to print 'options {at} {random}'. + - option: "```\n{print} options {at} {random}\n```" + feedback: That's right + - option: Nothing, the game already works! + feedback: Look carefully. There is an error. + question_text: What has to be changed in order for the game to work? + question_score: '10' + code: "options {is} rock, paper, scissors\n{print} 'options {at} {random}'" + hint: You don't want Hedy to literally print 'options {at} {random}', you want it to print 'rock' or 'paper' or 'scissors'. + 10: + mp_choice_options: + - feedback: A list doesn't need quotation marks + option: Quotation marks are missing in line 1 + - feedback: Correct + option: Quotation marks are missing in line 2 + - option: Quotation marks are missing in both line 2 and 3 + feedback: Line 3 doesn't need quotation marks because it's not printed literally + - feedback: You missed one! + option: Nothing, this code has no mistakes + code: "people {is} mom, dad, Emma, Sophie\n{print} The dishes are done by...\n{print} people {at} {random}" + correct_answer: B + question_score: '10' + hint: One line needs quotation marks, because you want it to be printed literally. + question_text: Which statement is true? + 8: + mp_choice_options: + - feedback: We need quotation marks + option: "```\n{print} So you pick door door\n```" + - feedback: If the player chooses door 3, Hedy will say 'So you pick 3 3 + option: "```\n{print} 'So you pick ' door door\n```" + - feedback: Super! + option: "```\n{print} 'So you pick door ' door\n```" + - feedback: Hedy will literally print 'So you pick door door + option: "```\n{print} 'So you pick door door'\n```" + hint: The second word door should be replaced with the number, the first should still be the word door... + question_score: '10' + correct_answer: C + code: "{print} 'Welcome at the money show!'\n{print} 'In front of you are 3 doors'\ndoor {is} {ask} 'Which door do you choose?'" + question_text: What would be a good next line for this code? + 7: + mp_choice_options: + - feedback: Correct! + option: Quotation marks are missing in line 1 + - option: Quotation marks are missing in line 2 + feedback: A variable doesn't need quotes + - feedback: You don't want Hedy to literally print 'answers {at} {random}' so no quotation marks needed here! + option: Quotation marks are missing in line 3 + - option: Nothing, this code is good as is! + feedback: Look carefully. You missed a mistake! + question_text: What's wrong with this code? + code: "question {is} {ask} What do you want to know?\nanswers {is} yes, no, maybe\n{print} answers {at} {random}" + hint: Check each line on whether they'd need quotation marks or not. + correct_answer: A + question_score: '10' + 4: + mp_choice_options: + - option: "You need quotation marks around the word `{print}`, like this: `'{print}'`." + feedback: The quotation marks shouldn't be around the command itself. + - feedback: Super! + option: You need quotation marks around the words you want to print. + - feedback: Both `{print}` and `{ask}` require quotation marks + option: You do not need quotation marks when using the `{ask}` command + - feedback: Unfortunately, Hedy is stricter than that. + option: You can choose yourself whether to use quotation marks or not. + hint: From level 4 on you need to use quotation marks. + question_text: Which statement is true? + question_score: '10' + correct_answer: B + 1: + mp_choice_options: + - feedback: That's right + option: "```\n{print} 'Im very excited to take this quiz!'\n```" + - option: "```\n{print} Im very excited to take this quiz!\n```" + feedback: '{print} now needs quotation marks!' + - option: "```\n{print} 'I'm very excited to take this quiz!'\n```" + feedback: do not use apostrophe or use backticks instead + - option: "```\n{print} 'I'm very excited to take this quiz!\n```" + feedback: careful when using quotes and apostrophe + hint: In level 4 you need quotation marks for 2 commands. + question_score: '10' + correct_answer: A + question_text: Which of these codes is correct? + 6: + mp_choice_options: + - feedback: Great! You get it! + option: "```\n{print} 'You win...' prices {at} {random}\n```" + - option: "```\n{print} You win... 'prices {at} {random}'\n```" + feedback: Hedy will literally print 'prices {at} {random}' + - option: "```\n{print} You win... prices {at} {random}\n```" + feedback: You need some quotation marks! + - option: "```\n{print} 'You win... prices {at} {random}'\n```" + feedback: Hedy will literally print 'prices {at} {random}'' + question_text: What would be a good next line in this code? + code: prices {is} 1 dollar, 100 dollars, 1 million dollars + correct_answer: A + question_score: '10' + hint: 'Think carefully: what is a variable and should be outside of the quotation marks? And what are normal words that should be inside?' + 3: + mp_choice_options: + - option: "```\n{print} Hi Im Hedy\n```" + feedback: Add quotation marks please! + - feedback: Both before and after the words you want to print should be a quotation mark. + option: "```\n{print} 'Hi Im Hedy\n```" + - feedback: The first quotation mark should be behind the word `{print}` + option: "```\n'{print} Hi Im Hedy'\n```" + - feedback: Perfect! + option: "```\n{print} 'Hi Im Hedy'\n```" + correct_answer: D + question_text: Where are the quotation marks used correctly? + hint: Both before and after the words you want to print should be a quotation mark. + question_score: '10' + 9: + code: "clubs {is} Real Madrid, Bayern Munchen, Manchester United, Ajax\n{print} clubs {at} {random} ' is going the win the champions league'" + hint: What are Hedy's options to randomly pick from? + mp_choice_options: + - feedback: Hedy could `{print}` that + option: Ajax is going to win the champions league + - feedback: Hedy could `{print}` that + option: Real Madrid is going to win the champions league + - option: Bayern Munchen is going to win the champions league + feedback: Hedy could `{print}` that + - feedback: That's right. It's not in the list + option: FC Barcelona is going to win the champions league + question_text: What will never appear in your output screen? + question_score: '10' + correct_answer: D + 10: + 5: + question_score: '10' + question_text: What word should be on the `_` with these digital dice? + correct_answer: B + mp_choice_options: + - option: players + feedback: It would say 'Ann throws Jesse', instead of 'Ann throws 6'. + - option: choices + feedback: That's right! + - feedback: You are very close. But you need Hedy to pick from the list called 'choices' not 'choice'... + option: choice + - feedback: Look at the names of the variables. + option: dice + hint: Hedy needs to pick a number `{at} {random}` + code: "{print} 'Welcome to the digital dice!'\nplayers = Ann, John, Jesse\nchoices = 1, 2, 3, 4, 5, 6\n{for} player {in} players\n {print} player ' throws ' _ {at} {random}" + 8: + mp_choice_options: + - option: "```\n'name gets a color shirt'\n```" + feedback: That's not it! + - option: "```\nname 'gets a ' colors {at} {random} ' shirt'\n```" + feedback: Great job! This was a hard one! + - feedback: You want each name printed. So the first word should not be names but... + option: "```\nnames 'gets a ' color {at} {random} ' shirt'\n```" + - feedback: There is no variable named people.. + option: "```\npeople ' gets a colors shirt'\n```" + code: "names = Donna, Tommy, Ben\ncolors = blue, red, purple\n{for} name {in} names\n {print} _" + question_text: What should be on the `_` in this code that decides which color shirt you get? + correct_answer: B + hint: Mind the quotation marks and the names of the variables + question_score: '10' + 7: + mp_choice_options: + - feedback: You are on fire! + option: "```\n{for} name {in} names\n```" + - feedback: No it should be for each name in the list nameS, so the other way around + option: "```\n{for} names {in} name\n```" + - option: "```\n{for} food {in} food\n```" + feedback: Each name should be told what they will have for dinner. + - option: "```\n{for} name {in} food\n```" + feedback: Each name should be told what they will have for dinner. + question_text: What line should be on the `_` in this code that decides what these people will have for dinner? + correct_answer: A + code: "names = Ron, Leslie, April, Andy\nfood = pasta, fries, salad\n_\n {print} name ' has to eat ' food {at} {random} ' for dinner'" + hint: Each name should be told what they will have for dinner. + question_score: '10' + 9: + code: "courses = appetizer, main course, dessert\nnames = Timon, Onno\n{for} name {in} names\n {for} course {in} courses\n food = {ask} name ', what would you like to eat as your ' course '?'\n {print} name ' orders ' food ' as their ' course" + mp_choice_options: + - option: Timon, what would you like to eat as your appetizer? + feedback: Perfect! + - option: Onno, what would you like to eat as your appetizer? + feedback: Timon is first on the list! + - option: Timon, what would you like to eat as your dessert? + feedback: Appetizers are first in the list + - option: You don't know that. Hedy will choose `{at} {random}`. + feedback: There is no `{at} {random}` in this code... + question_score: '10' + question_text: What is the first question Hedy will ask you when you run the program? + correct_answer: A + hint: The first options from both lists are chosen. + 3: + mp_choice_options: + - feedback: Line 2 says {for} each animal in the list of animals. So each animal is {print}ed. + option: dogs are lovely pets + - option: dogs, cats, hamsters, chickens are lovely pets + feedback: Each animal gets their own line in the output. + - option: "dogs are lovely pets\ncats are lovely pets\nhamsters are lovely pets\nchickens are lovely pets" + feedback: Great! + - option: You don't know yet. Because it chooses one of the animals {at} {random}. + feedback: Line 2 says {for} each animal in the list of animals. So each animal is {print}ed. + correct_answer: C + question_text: Which output is correct? + code: "animals = dogs, cats, hamsters, chickens\n{for} animal {in} animals\n {print} animal ' are lovely pets'" + hint: Line 2 says {for} each animal in the list of animals. So each animal is printed + question_score: '10' + 2: + mp_choice_options: + - feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + option: I love pizza + - option: I love pasta + feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + - option: I love pancakes + feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + - feedback: Great! + option: "I love pizza\nI love pasta\nI love pancakes" + correct_answer: D + hint: Line 2 says for each meal in the list of meals. So each meal is printed. + code: "meals = pizza, pasta, pancakes\n{for} meal {in} meals\n {print} 'I love ' meal" + question_score: '10' + question_text: Which output is correct? + 1: + mp_choice_options: + - feedback: That's not it + option: "```\n{for} each compliment\n```" + - feedback: You deserve all those compliments! + option: "```\n{for} compliment {in} compliments\n```" + - feedback: That's not it + option: "```\n{if} compliment {in} compliments\n```" + - feedback: Almost there! + option: "```\n{for} compliments {in} compliment\n```" + question_text: What do we need to fill in on the `_` if we want to print each compliment? + hint: '`{for}` each compliment in the lists of compliments...' + question_score: '10' + correct_answer: B + code: "compliments = perfect, great job, amazing\n_\n {print} compliment" + 6: + question_text: Which of the answers below is a possible outcome when you run the code? + mp_choice_options: + - option: "```\nKelly chooses rock\n```" + feedback: Meredith wants to play too! + - option: "```\nMeredith chooses scissors\nKelly chooses rock\n```" + feedback: So close! But Kelly is first in the list, so she goes first + - feedback: Kelly wants to play too! + option: "```\nMeredith chooses paper\n```" + - feedback: Amazing! + option: "```\nKelly chooses paper\nMeredith chooses scissors\n```" + question_score: '10' + code: "choices = rock, paper, scissors\nplayers = Kelly, Meredith\n{for} player {in} players\n {print} player ' chooses ' choices {at} {random}" + correct_answer: D + hint: Each player will pick an option. The player that's first on the list will go first. + 4: + mp_choice_options: + - option: Line 2 needs to start with 4 spaces as indentation + feedback: No it doesn't. Only line 3 needs indentation, which it has. + - feedback: Line 2 is a `{for}`command so line 3 does need to start with an indent. + option: Line 3 does not need to start with 4 spaces as indentation + - feedback: Good job! + option: Line 3 should say item instead of groceries + - feedback: No it does not. + option: Line 2 should say groceries instead of item + hint: Line 2 says `{for}` each item in the list of groceries + question_text: What's wrong with this code? + correct_answer: C + code: "groceries = apples, bread, milk\n{for} item {in} groceries\n {print} 'We need ' groceries" + question_score: '10' + 10: + mp_choice_options: + - feedback: That is not true, you could end up without a prize. + option: Everybody will always win a prize. + - option: All the prizes always go to one single person. + feedback: That is not true. All the prizes are given away, but to random people + - option: Larry will never win a prize + feedback: That is not true. Larry has the same odds as the others + - option: Someone might win two prizes + feedback: You get it! + correct_answer: D + code: "prizes = 1 million dollars, car, sandwich\nnames = Bob, Patrick, Sandy, Larry\n{for} prize {in} prizes\n {print} 'The ' prize ' is won by ' names {at} {random}" + hint: Try to imagine the output of this code. + question_score: '10' + question_text: What is true about this code? + 6: + 7: + mp_choice_options: + - option: It could have been `price = 3` just as well. + feedback: No, that's not true. Hedy needs to add 3 dollars to the total. + - feedback: Hedy would understand, but it wouldn't be right. + option: Because Hedy doesn't understand `price = 3`. + - option: Because Hedy would otherwise forget about the previous order. The price would be 3 dollars in total. + feedback: That's right! + - option: Because the price is 0 dollars to begin with. + feedback: That's true, but not the reason + hint: The price shouldn't be 3, but 3 dollars more than it already was + code: "{print} 'Welcome at Hedys diner'\nfood = {ask} 'What would you like to eat?'\nprice = 0\n{if} food {is} hamburger price = price + 15\n{if} food {is} fries price = price + 6\ndrinks is {ask} 'What would you like to drink?'\n{if} drinks {is} coke price = price + 3\n{if} drinks {is} water price = price + 1\n{print} price ' dollars please'" + question_score: '10' + question_text: Why does line 7 say 'price is price + 3' instead of 'price is 3'? + correct_answer: C + 4: + mp_choice_options: + - feedback: Mind, Hedy also prints 'Your lucky number is...' + option: '30' + - feedback: Please try again. + option: '10' + - option: Your lucky number is... 30 + feedback: That's right! + - option: Your lucky number is... 10 + feedback: Her lucky number is name times age... + question_text: Kim is 10 years old. What will Hedy print for her? + code: "name = {ask} 'How many letters are in your name?'\nage = {ask} 'How old are you?'\nluckynumber = name*age\n{print} 'Your lucky number is...' luckynumber" + hint: 'Kim has 3 letters, she is 10 years old so: letters times age = 3*10 = 30.' + question_score: '10' + correct_answer: C + 2: + mp_choice_options: + - option: '`-`' + feedback: That's not it + - option: plus + feedback: That's not it + - option: '`*`' + feedback: That's not it + - option: '`+`' + feedback: Correct! + question_score: '10' + hint: It's the plus sign. + correct_answer: D + question_text: What do you use when you want to add two numbers? + 10: + mp_choice_options: + - feedback: You are allowed to use the `=` sign as well + option: You can only fill in the word is on the `_` + - option: You can fill in either the word is or the `=` sign on the `_` + feedback: Amazing! + - option: You have to fill in =is= on the `_` + feedback: No, one `=` sign is enough + - feedback: You can also use `=` with words. + option: You can only use the `=` sign when working with numbers, not with words. + hint: '`{is}` and `=` are both allowed' + correct_answer: B + question_score: '10' + question_text: Which statement is true? + code: "name _ Hedy\n{print} name 'is walking trough the forrest'" + 8: + mp_choice_options: + - option: There shouldn't be quotation marks in line 2 + feedback: No, there should be! + - feedback: Correct! + option: The variable is called correct answer, but a variable's name can only be 1 word. So it should be correct_answer + - option: The `{if}` and `{else}` commands should be in the same line. + feedback: No, that's not true. + - feedback: Variable names can be similar, but they can't be 2 words... + option: The variable in line 2 can't be called answer, because it is too similar to the variable correct answer. + code: "correct answer = 3*12\nanswer = {ask} 'What is 3 times 12?'\n{if} answer {is} correct answer {print} 'Good job!'\n{else} {print} 'No... It was ' correct answer" + correct_answer: B + question_text: Why is this code incorrect? + hint: Inspect what the variables are called. + question_score: '10' + 3: + hint: Mind the quotation marks!! + correct_answer: C + mp_choice_options: + - feedback: This would be the right answer if there were no quotation marks. + option: '30' + - feedback: Try again.. + option: '13' + - feedback: Correct! There are quotation marks, so Hedy will print it literally. + option: 3*10 + - option: Nothing, Hedy will give an error message. + feedback: No, Hedy will print it literally. + question_text: What's Hedy's output when you run this code? + code: "{print} '3*10'" + question_score: '10' + 9: + mp_choice_options: + - feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + option: 10% + - feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + option: 32% + - option: 50% + feedback: Super! You are 100 percent smart! + - feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + option: 100% + question_score: '10' + correct_answer: C + question_text: Imagine you love football a 10, you've eaten 2 bananas and have washed your hands 3 times today. How smart does the silly fortune teller think you are? + hint: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + code: "{print} 'Im Hedy the silly fortune teller'\n{print} 'I will predict how smart you are!'\nfootball = {ask} 'On a scale of 0 to 10 how much do you love football?'\nbananas = {ask} 'How many bananas have you eaten this week?'\nhygiene = {ask} 'How many times did you wash your hands today??'\nresult = bananas + hygiene\nresult = result * football\n{print} 'You are ' result 'percent smart.'" + 1: + mp_choice_options: + - option: '20' + feedback: Correct! + - feedback: No, the plus sign is used in addition + option: '12' + - feedback: No, Hedy will calculate the answer + option: 2*10 + - feedback: Mind it's a calculation. + option: '210' + question_text: What's Hedy's output when you run this code? + code: '{print} 2*10' + correct_answer: A + hint: The `*` is used as a multiplication sign + question_score: '10' + 5: + mp_choice_options: + - option: 5 dollars + feedback: Unfortunately, it's not that cheap. + - feedback: No, it's 10 dollars each. + option: 10 dollars + - feedback: The * means multiplication. + option: 15 dollars + - option: 50 dollars + feedback: Great! + question_text: If 5 people eat at this restaurant, how much do they have to pay in total? + code: "{print} 'Welcome to Hedys!'\npeople = {ask} 'How many people are eating with us tonight?'\nprice = people * 10\n{print} 'That will be ' price 'dollar please'" + correct_answer: D + hint: '`price` `is` `people` `times` 10' + question_score: '10' + 6: + mp_choice_options: + - option: 15 dollars + feedback: Super! + - feedback: The fries are 6 dollars + option: 6 dollars + - option: 0 dollars + feedback: The hamburger isn't free! + - option: 21 dollars + feedback: That's the price for a hamburger and fries! + hint: Mind the fourth line. + code: "{print} 'Welcome at Hedys diner'\nfood = {ask} 'What would you like to eat?'\nprice = 0\n{if} food {is} hamburger price = 15\n{if} food {is} fries price = 6" + question_text: How much does a hamburger cost in this virtual restaurant? + question_score: '10' + correct_answer: A diff --git a/content/quizzes/ne.yaml b/content/quizzes/ne.yaml new file mode 100644 index 00000000000..95916ae34bd --- /dev/null +++ b/content/quizzes/ne.yaml @@ -0,0 +1,2543 @@ +levels: + 1: + 1: + mp_choice_options: + - option: Hedy + feedback: Good job! + - option: Heddy + feedback: Not this one! + - option: Haydie + feedback: Not this one! + - feedback: Not this one! + option: Heidi + hint: It's named after Hedy Lamarr. + correct_answer: A + question_score: '10' + question_text: What's this programming language called? + 3: + correct_answer: C + mp_choice_options: + - feedback: "`{print}` prints text, but it doesn't ask questions." + option: "```\n{print} What is your favorite color?\n```" + - option: "```\n{ask} {print} What is your favorite color?\n```" + feedback: You only need one command, not two. + - option: "```\n{ask} What is your favorite color?\n```" + feedback: Great! + - feedback: '`{echo}` repeats your answer back to you.' + option: "```\n{echo} What is your favorite color?\n```" + hint: You can ask something with the `{ask}` command + question_score: '10' + question_text: How do you ask what someone's favorite color is? + 5: + code: "{ask} What is your favorite pet?\n_ So your favorite pet is..." + mp_choice_options: + - feedback: No, you would like the answer to be repeated back to you. + option: '`{print}`' + - option: '`Hedy`' + feedback: Hedy isn't a command. + - option: '`{ask}`' + feedback: With `{ask}` you can ask a question. + - feedback: Right on! + option: '`{echo}`' + correct_answer: D + question_text: Which command is missing in line 2? + question_score: '10' + hint: You want to see the answer at the end of line 2... + 4: + hint: Line 1 doesn't seem right + question_score: '10' + question_text: What is wrong with this code? + mp_choice_options: + - feedback: Correct! + option: '`{print}` in line 1 is missing.' + - option: The command in line 2 is spelled wrong. + feedback: The command is spelled correctly. + - option: "`{echo}` isn't a command." + feedback: "`{echo}` is a command, there's another mistake." + - option: Nothing! This is a perfect code! + feedback: Wrong, look carefully! + code: "Hi Im Hedy!\n{ask} Who are you?\n{echo} Hi..." + correct_answer: A + 6: + hint: Check the `{print}` commands. + mp_choice_options: + - feedback: '`{print}` in line 1 is correct.' + option: In line 1 `{print}` should be replaced with `{ask}`. + - option: In line 2, `{print}` should be replaced with `{ask}`. + feedback: Great! You paid attention! + - feedback: '`{echo}` is correct.' + option: Line 3 has to begin with `{print}` instead of `{echo}`. + - feedback: No, there is a mistake somewhere else + option: In line 4, `{print}` is spelled wrong. + question_score: '10' + question_text: What's wrong with this code? + code: "{print} Hi im Hedy!\n{print} Which football team do you support?\n{echo} You support...\n{print} Cool! Me too!" + correct_answer: B + 7: + question_text: What's wrong with this code? + code: "{print} Welcome at Hedys restaurant!\n{ask} What would you like to eat?\n{echo} So you want to order ...\n{print} Coming right up! Enjoy!" + mp_choice_options: + - option: In line 1 `{print}` needs to be replaced with `{ask}` + feedback: Are you sure something is wrong? + - option: In line 1 `{print}` needs to be replaced with `{echo}` + feedback: Are you sure something's wrong? + - feedback: Are you sure something is wrong? + option: In line 3 `{echo}` needs to be replaced with `{print}` + - option: Nothing! This is a perfect code! + feedback: Correct! + question_score: '10' + correct_answer: D + hint: Check the code line by line + 8: + question_text: How do you use the `{echo}` command? + correct_answer: C + hint: '`{echo}` is used after an `{ask}` command.' + mp_choice_options: + - option: You can use it to `{ask}` a question. + feedback: That's what `{ask}` is for! + - feedback: That's what `{print}` is for! + option: You can use it exactly the same way as `{print}`. + - feedback: Good job! + option: You can use it to repeat an answer. + - feedback: That's not right... + option: You can use it to make text disappear. + question_score: '10' + 9: + mp_choice_options: + - option: '`{print}` in line 1 should be `{ask}`' + feedback: No, `{print}` is right. Where is the question being asked? + - option: '`{print}` in line 2 should be `{ask}`' + feedback: Super! + - feedback: No, `{echo}` is right. Where is the question being asked? + option: '`{echo}` in line 3 should be `{ask}`' + - option: Nothing. This is a perfect code! + feedback: Look carefully for the mistake... + code: "{print} Hello!\n{print} How are you doing?\n{echo} So you are doing..." + hint: '`{ask}` allows you to ask a question' + correct_answer: B + question_text: What's wrong with this code? + question_score: '10' + 10: + code: "{ask} Are you ready to go to level 2?\n{echo}\n{echo}" + mp_choice_options: + - option: Are you ready to go to level 2? + feedback: There are two `{echo}` commands + - feedback: Great job! + option: "Yes!\nYes!" + - option: Yes! + feedback: There are two `{echo}` commands + - option: "Are you ready to go to level 2?\nYes!" + feedback: There are two `{echo}` commands + question_text: Which output will be in your output screen after you've run this code? + correct_answer: B + hint: Let's go! + question_score: '10' + 2: + mp_choice_options: + - feedback: '`{echo}` repeats a given answer.' + option: '`{echo}`' + - option: '`{print}`' + feedback: Correct! + - option: '`hello`' + feedback: Hello isn't a command. + - feedback: With `{ask}`, you can ask a question. + option: '`{ask}`' + code: _ Hello! + correct_answer: B + question_score: '10' + hint: _ Hello world! + question_text: Which need to be filled in on the blanks to make the text Hello! appear? + 2: + 1: + correct_answer: C + mp_choice_options: + - option: You can use the `{print}` command to ask questions. + feedback: That is what `{ask}` is for + - option: You can use the `{ask}` command to echo answers. + feedback: That is not true + - option: With the `{print}` command you can make text appear + feedback: Good + - option: With the `{sleep}` command, you can remove text from the screen. + feedback: That's not how `{sleep}` works. + hint: '`{print}` still works the same way as in level 1' + question_score: '10' + question_text: Which statement is true? + 2: + mp_choice_options: + - option: "```\nname {is} {ask} What is your name?\n```" + feedback: Super! + - feedback: The words are right, the order is not! + option: "```\n{ask} {is} name What is your name\n```" + - feedback: This worked in level 1, but in level 2 and up it works differently. + option: "```\n{ask} What is your name?\n```" + - feedback: The words are right, the order isn't! + option: "```\n{ask} What is your name? {is} name\n```" + question_text: Which code is correct? + hint: "`{ask}` doesn't work like in level 1" + question_score: '10' + correct_answer: A + 3: + mp_choice_options: + - feedback: The word name is replaced with Marleen + option: name goes to the market and she buys an apple. + - option: Marleen goes to the market. + feedback: The second part of the sentence isn't left out! + - feedback: Right on! + option: Marleen goes to the market and she buys an apple. + - feedback: She is not replaced with the name + option: Marleen goes to the market and Marleen buys an apple. + correct_answer: C + code: "name {is} Marleen\n{print} name goes to the market and she buys an apple." + question_score: '10' + question_text: What appears on your output screen when you run this code? + hint: The word name is replaced with Marleen + 4: + mp_choice_options: + - option: Hi my name is name + feedback: The variable name is replaced with Hedy + - feedback: The variable name is replaced with Hedy + option: Hi my name is Hedy + - option: Hi my Hedy is name + feedback: The variable name is replaced with Hedy + - option: Hi my Hedy is Hedy + feedback: Correct, this mistake will be fixed in level 4! + code: "name {is} Hedy\n{print} Hi my name is name" + hint: "'name' is being replaced with 'Hedy' in both places" + question_score: '10' + question_text: What will you see on the output screen when you run this code? + correct_answer: D + 6: + question_text: What should be on the lines? + code: "{print} And the award for best programming language goes to...\n_\n{print} Hedy!" + hint: Pause for dramatic effect... + mp_choice_options: + - feedback: Perfect! + option: '`{sleep}`' + - feedback: There is nothing to repeat back here + option: '`{echo}`' + - option: '`{print}`' + feedback: There is no text there to `{print}` there + - option: '`{ask}`' + feedback: There is no question there to be asked + correct_answer: A + question_score: '10' + 7: + mp_choice_options: + - option: "```\n{print} 3\n```" + feedback: You don't need to `{print}` + - feedback: Perfect! + option: "```\n{sleep} 3\n```" + - feedback: This way the bomb will explode in 1 second + option: "```\n{sleep}\n```" + - feedback: Make it easier on yourself by using the number 3 + option: "```\n{sleep} {sleep} {sleep}\n```" + hint: You want the computer to wait for 3 seconds + correct_answer: B + code: "{print} I will explode in 3 seconds!\n_\n{print} BOOM!" + question_text: What command should be used on line 2? + question_score: '10' + 8: + mp_choice_options: + - option: "```\nage {ask} {is} How old are you?\n```" + feedback: That is the wrong order + - feedback: That is the wrong order + option: "```\n{ask} {is} age How old are you?\n```" + - option: "```\nage {is} {ask} How old are you?\n```" + feedback: You get it! + - option: "```\nage {is} How old are you?\n```" + feedback: Where is the `{ask}` command? + question_text: How would you correct the first line of code? + hint: The variable name should come first + correct_answer: C + code: "{ask} {is} How old are you?\n{print} age" + question_score: '10' + 9: + mp_choice_options: + - feedback: The variable name is animal + option: 'Line 1 should say: dogs `{is}` animals' + - option: 'Line 1 should say: animal `{is}` dogs' + feedback: Great! + - feedback: The variable name is animal + option: 'Line 2 should say: `{print}` I love animals' + - option: 'Line 2 should say: `{sleep}` I love animals' + feedback: Sleep is not used to `{print}` text + question_score: '10' + question_text: What is going wrong in this code? + code: "dogs {is} animal\n{print} I love animal" + hint: You want to `{print}` 'I love dogs' + correct_answer: B + 10: + mp_choice_options: + - feedback: You want to know the favorite flavor! + option: "```\n{sleep} 3\n```" + - option: "```\n{print} strawberries\n```" + feedback: You do not want a `{print}` command at the middle of the line... + - option: "```\nstrawberries, chocolate, vanilla\n```" + feedback: This way you are making a list. You don't want that now. + - feedback: That's right! + option: "```\n{ask} What flavor icecream do you like?\n```" + correct_answer: D + hint: You want to `{ask}` a question + question_text: What command should be used on the line 1? + question_score: '10' + code: "flavor {is} _\n{print} Your favorite icecream is...\n{sleep}\n{print} flavor" + 5: + question_score: '10' + hint: The computer waits for a second at the `{sleep}` command + mp_choice_options: + - feedback: fortunately not! + option: It slows down your computer + - option: It closes down Hedy + feedback: fortunately not! + - feedback: That's right! + option: Your program pauses for a second and then continues + - feedback: No it would be useless at the end of your code + option: You put it at the end so Hedy knows your program is finished + correct_answer: C + question_text: What happens when you use the `{sleep}` command? + 3: + 1: + hint: Arbitrarily means without a plan or randomly. + question_score: '10' + mp_choice_options: + - option: '`{print}`' + feedback: '`{print}` is used to print text' + - feedback: '`{ask}` is used to ask a question' + option: '`{ask}`' + - feedback: '`{is}` is used to make a list' + option: '`{is}`' + - option: '`{at} {random}`' + feedback: Correct! + correct_answer: D + question_text: What command(s) do you use to let Hedy pick something arbitrarily? + 2: + mp_choice_options: + - feedback: Good job! + option: 'You need commas in line 1: dog, cat, cow.' + - feedback: No, you don't need `{print}` + option: Line 1 needs to start with `{print}`. + - feedback: animals is correct. + option: Line 2 needs to say 'animal' instead of 'animals' + - feedback: '`{at} {random}` is the correct spelling' + option: '`{at} {random}` is spelled incorrectly' + question_score: '10' + correct_answer: A + hint: There's something wrong in line 1 + question_text: What's wrong with this code? + code: "animals {is} dog cat cow\n{print} animals {at} {random}" + 3: + mp_choice_options: + - option: "```\n{at} {random} {print} options\n```" + feedback: You're almost there. The order of the words isn't right yet. + - option: "```\n{print} rock {at} {random}\n```" + feedback: you don't always want the Hedy to {print} rock, sometimes you want scissors or paper. + - option: "```\n{print} options {at} {random}\n```" + feedback: Very good! + - option: Nothing, the code is correct! + feedback: Look carefully for the mistake + question_score: '10' + correct_answer: C + hint: The variable (the list) is called options. + code: "options {is} rock, paper, scissors\n{print} rock, paper, scissors {at} {random}" + question_text: How do you fix the mistake in line 2? + 5: + question_score: '10' + mp_choice_options: + - feedback: No, that's not wrong. + option: Line 1 needs to say `{print}` instead of `{ask}` + - feedback: No that's not wrong. + option: Line 2 needs to say `{ask}` instead of `{print}` + - feedback: No, that's not wrong. + option: Line 2 needs to say answers `{at} {random}` `{is}` yes, no, maybe + - feedback: That's right! + option: Nothing, this code is perfect + correct_answer: D + hint: Does this code even have a mistake? + code: "question {is} {ask} What do you want to know?\n{print} question\nanswers {is} yes, no, maybe\n{print} answers {at} {random}" + question_text: What is wrong in this code? + 6: + mp_choice_options: + - option: Line 2 needs to say question instead of answers + feedback: No that's not right + - option: Line 2 needs the `{is}` command + feedback: Correct + - option: Line 3 needs to say answer instead of answers + feedback: No the variable's called answers + - option: Nothing! This code is great! + feedback: Actually, line 2 has a mistake. + code: "question {is} {ask} What do you want to know?\nanswers yes, no, maybe\n{print} answers {at} {random}" + question_text: What's wrong with this code? + correct_answer: B + hint: There is something wrong with line 2. + question_score: '10' + 7: + mp_choice_options: + - feedback: The remove command removes, the add command adds + option: The `{add}` command removes a random book from the list + - option: The `{add}` command adds a random book to a list + feedback: It doesn't. It adds your answer to the list! + - feedback: Correct! + option: The `{add}` command adds your favorite book to the list + - option: The `{add}` command prints your favorite book. + feedback: No, it adds your favorite book to the list + correct_answer: C + hint: The `{add}` command adds a book, but which one? + code: "books {is} Harry Potter, The Hobbit, Green Eggs and Ham\nyour_book {is} {ask} What is your favorite book?\n{add} your_book {to} books\n{print} books {at} {random}" + question_text: What does the `{add}` command do? + question_score: '10' + 8: + code: "crisps {is} sea salt, paprika, sour cream\n{remove} sea salt {from} crisps\n{remove} paprika {from} crisps\n{print} crisps {at} {random}" + mp_choice_options: + - option: You can't tell, because Hedy will `{print}` one of the 3 flavors `{at} {random}` + feedback: Take a look at the `{remove}` commands + - feedback: sea salt is removed from the list + option: sea salt + - option: paprika + feedback: Paprika is removed from the list + - option: sour cream + feedback: That's right! + hint: There are 3 flavors, bit 2 are removed. Which one remains? + correct_answer: D + question_score: '10' + question_text: What is the output of this code? + 9: + mp_choice_options: + - feedback: Maybe you want blue hair though! + option: 'Line 3 should say: `{remove}` blue `{from}` colors' + - feedback: You want to remove the chosen color so `{remove}` is right. + option: Line 3 should have an `{add}` command instead of a `{remove}` command + - feedback: Great job! + option: In line 4 the variable should be called colors instead of color + - feedback: Find the mistake! + option: Nothing, this is a correct code! + code: "colors {is} blue, purple, green\nchosen_color {is} {ask} Which hair color wouldn't you like to have?\n{remove} chosen_color {from} colors\n{print} I will dye my hair color {at} {random}" + hint: Look at line 4 + question_score: '10' + question_text: What's wrong with this code? + correct_answer: C + 10: + mp_choice_options: + - option: "```\n{remove} walked_yesterday {from} walkers\n```" + feedback: Super! + - feedback: '`{remove} {from}` or `{add} {to}`, not `{remove} {to}`' + option: "```\n{remove} walked_yesterday {to} walkers\n```" + - option: "```\n{remove} walkers {from} yesterday\n```" + feedback: yesterday is not a variable + - feedback: This increased the chance that the person who walked yesterday now has to do it again. That's mean. + option: "```\n{add} walked_yesterday {to} walkers\n```" + question_text: What should be on the _? + hint: The person who walked the dogs yesterday should be removed from the list. + code: "walkers {is} dad, mom, Sam, Petra\nwalked_yesterday {is} {ask} Who walked the dogs yesterday?\n{print} walked_yesterday shouldn't have to walk the dogs again today\n_\n{print} walkers {at} {random} , it's your turn to walk the dogs!" + question_score: '10' + correct_answer: A + 4: + mp_choice_options: + - option: "```\n{print} price\n```" + feedback: You don't want to `{print}` the word price, but you want to `{print}` one price out of your list `{at} {random}` + - option: "```\n{print} prices {at} {random}\n```" + feedback: Great! You've really paid attention. + - feedback: '`{at} {random}` is placed behind the variable.' + option: "```\n{print} {at} {random} price\n```" + - option: Nothing, this code is alright. + feedback: Look carefully for the mistake you missed! + hint: The variable name is prices + question_text: What should change in line 2 to print a random price? + correct_answer: B + question_score: '10' + code: "prices {is} 1 dollar, 100 dollar, 1 million dollar\n{print} price {at} {random}" + 4: + 2: + mp_choice_options: + - feedback: This quotation mark is skewed, you need a straight one. + option: "```\n{print} `hello`\n```" + - feedback: Correct + option: "```\n{print} 'hello'\n```" + - option: "```\n{print} hello\n```" + feedback: There are no quotation marks here! + - option: "```\n{print} ,hello,\n```" + feedback: This is a comma, you need quotation marks. + question_text: Which code uses the proper quotation marks? + question_score: '10' + correct_answer: B + hint: Pick the right quotation marks. + 3: + correct_answer: D + hint: Both before and after the words you want to print should be a quotation mark. + mp_choice_options: + - option: "```\n{print} Hi Im Hedy\n```" + feedback: Add quotation marks please! + - feedback: Both before and after the words you want to print should be a quotation mark. + option: "```\n{print} 'Hi Im Hedy\n```" + - feedback: The first quotation mark should be behind the word `{print}` + option: "```\n'{print} Hi Im Hedy'\n```" + - feedback: Perfect! + option: "```\n{print} 'Hi Im Hedy'\n```" + question_text: Where are the quotation marks used correctly? + question_score: '10' + 4: + mp_choice_options: + - option: "You need quotation marks around the word `{print}`, like this: `'{print}'`." + feedback: The quotation marks shouldn't be around the command itself. + - option: You need quotation marks around the words you want to print. + feedback: Super! + - option: You do not need quotation marks when using the `{ask}` command + feedback: Both `{print}` and `{ask}` require quotation marks + - feedback: Unfortunately, Hedy is stricter than that. + option: You can choose yourself whether to use quotation marks or not. + correct_answer: B + hint: From level 4 on you need to use quotation marks. + question_text: Which statement is true? + question_score: '10' + 5: + mp_choice_options: + - feedback: Never put the quotation mark in front of the `{print}` command. + option: "```\n'{print} options {at} {random}'\n```" + - option: "```\n{print} 'options' {at} {random}\n```" + feedback: options is a variable. You don't literally want to print 'options {at} {random}'. + - option: "```\n{print} options {at} {random}\n```" + feedback: That's right + - option: Nothing, the game already works! + feedback: Look carefully. There is an error. + question_text: What has to be changed in order for the game to work? + code: "options {is} rock, paper, scissors\n{print} 'options {at} {random}'" + correct_answer: C + question_score: '10' + hint: You don't want Hedy to literally print 'options {at} {random}', you want it to print 'rock' or 'paper' or 'scissors'. + 6: + question_text: What would be a good next line in this code? + code: prices {is} 1 dollar, 100 dollars, 1 million dollars + mp_choice_options: + - option: "```\n{print} 'You win...' prices {at} {random}\n```" + feedback: Great! You get it! + - option: "```\n{print} You win... 'prices {at} {random}'\n```" + feedback: Hedy will literally print 'prices {at} {random}' + - option: "```\n{print} You win... prices {at} {random}\n```" + feedback: You need some quotation marks! + - option: "```\n{print} 'You win... prices {at} {random}'\n```" + feedback: Hedy will literally print 'prices {at} {random}'' + correct_answer: A + question_score: '10' + hint: 'Think carefully: what is a variable and should be outside of the quotation marks? And what are normal words that should be inside?' + 7: + mp_choice_options: + - feedback: Correct! + option: Quotation marks are missing in line 1 + - option: Quotation marks are missing in line 2 + feedback: A variable doesn't need quotes + - feedback: You don't want Hedy to literally print 'answers {at} {random}' so no quotation marks needed here! + option: Quotation marks are missing in line 3 + - feedback: Look carefully. You missed a mistake! + option: Nothing, this code is good as is! + question_text: What's wrong with this code? + hint: Check each line on whether they'd need quotation marks or not. + correct_answer: A + question_score: '10' + code: "question {is} {ask} What do you want to know?\nanswers {is} yes, no, maybe\n{print} answers {at} {random}" + 8: + mp_choice_options: + - feedback: We need quotation marks + option: "```\n{print} So you pick door door\n```" + - feedback: If the player chooses door 3, Hedy will say 'So you pick 3 3 + option: "```\n{print} 'So you pick ' door door\n```" + - feedback: Super! + option: "```\n{print} 'So you pick door ' door\n```" + - feedback: Hedy will literally print 'So you pick door door + option: "```\n{print} 'So you pick door door'\n```" + hint: The second word door should be replaced with the number, the first should still be the word door... + question_score: '10' + correct_answer: C + code: "{print} 'Welcome at the money show!'\n{print} 'In front of you are 3 doors'\ndoor {is} {ask} 'Which door do you choose?'" + question_text: What would be a good next line for this code? + 9: + question_text: What will never appear in your output screen? + code: "clubs {is} Real Madrid, Bayern Munchen, Manchester United, Ajax\n{print} clubs {at} {random} ' is going the win the champions league'" + mp_choice_options: + - feedback: Hedy could `{print}` that + option: Ajax is going to win the champions league + - option: Real Madrid is going to win the champions league + feedback: Hedy could `{print}` that + - option: Bayern Munchen is going to win the champions league + feedback: Hedy could `{print}` that + - feedback: That's right. It's not in the list + option: FC Barcelona is going to win the champions league + question_score: '10' + hint: What are Hedy's options to randomly pick from? + correct_answer: D + 10: + mp_choice_options: + - feedback: A list doesn't need quotation marks + option: Quotation marks are missing in line 1 + - feedback: Correct + option: Quotation marks are missing in line 2 + - option: Quotation marks are missing in both line 2 and 3 + feedback: Line 3 doesn't need quotation marks because it's not printed literally + - feedback: You missed one! + option: Nothing, this code has no mistakes + question_text: Which statement is true? + code: "people {is} mom, dad, Emma, Sophie\n{print} The dishes are done by...\n{print} people {at} {random}" + correct_answer: B + question_score: '10' + hint: One line needs quotation marks, because you want it to be printed literally. + 1: + mp_choice_options: + - feedback: That's right + option: "```\n{print} 'Im very excited to take this quiz!'\n```" + - option: "```\n{print} Im very excited to take this quiz!\n```" + feedback: '{print} now needs quotation marks!' + - option: "```\n{print} 'I'm very excited to take this quiz!'\n```" + feedback: do not use apostrophe or use backticks instead + - feedback: careful when using quotes and apostrophe + option: "```\n{print} 'I'm very excited to take this quiz!\n```" + hint: In level 4 you need quotation marks for 2 commands. + question_score: '10' + correct_answer: A + question_text: Which of these codes is correct? + 5: + 1: + question_text: Which command should be filled in on the _? + mp_choice_options: + - feedback: There already is a `{print}` command. + option: '`{print}`' + - option: '`{if}`' + feedback: The `{if}` command is used in the line above. + - option: '`{sleep}`' + feedback: That's not it! + - option: '`{else}`' + feedback: That's right! + code: "number {is} {ask} 'What is your lucky number?'\n{if} number {is} 5 {print} 'Mine too!'\n_ {print} 'My lucky number is 5!'" + hint: Which one goes together with the `{if}` command? + question_score: '10' + correct_answer: D + 2: + code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy {print} 'fun' {else} {print} 'less fun'" + question_text: What appears in your output screen when you type in the name Hedy? + mp_choice_options: + - feedback: That's right! + option: fun + - option: less fun + feedback: If the name is Hedy, it will say 'fun'' + - option: Hedy + feedback: No, it doesn't print the name + - option: Error + feedback: Fortunately not! + question_score: '10' + hint: '`{if}` name `{is}` Hedy `{print}` ...?' + correct_answer: A + 3: + mp_choice_options: + - feedback: This is printed when you type in the correct password + option: Correct! + - feedback: That's right!' + option: SECRET + - option: password + feedback: The password isn't password... + - feedback: This is printed when you type in the incorrect password! + option: ALARM INTRUDER + question_score: '10' + question_text: What is the right password? + hint: "`{if}` password `{is}` ... `{print}` 'Correct!'" + correct_answer: B + code: "password {is} {ask} 'What is the password?'\n{if} password {is} SECRET {print} 'Correct!'\n{else} {print} 'ALARM! INTRUDER!'" + 4: + code: "password {is} {ask} 'What is the password?'\n{if} password {is} SECRET {print} 'Correct!'\n{else} {print} 'ALARM! INTRUDER!'" + mp_choice_options: + - feedback: That's printed if the correct answer is given, not the wrong one... + option: Correct + - feedback: That's not the right answer + option: SECRET + - option: Wrong! + feedback: No, this is not what Hedy will print + - option: ALARM! INTRUDER! + feedback: Great job! + hint: Your computer will sound the alarm for intruders! + correct_answer: D + question_score: '10' + question_text: What does Hedy print when you type in the wrong password? + 5: + mp_choice_options: + - feedback: Indeed! + option: Because it needs to be in capitals, so SECRET + - feedback: No, this is not the password. + option: Because the password is alarm + - option: Because it's spelled wrong. + feedback: That's not how you spell secret + - option: Because Hedy makes a mistake + feedback: No, Hedy is right + question_score: '10' + code: "password {is} {ask} 'What is the password?'\n{if} password {is} SECRET {print} 'Correct!'\n{else} {print} 'ALARM! INTRUDER!'" + correct_answer: A + hint: The spelling of the word has to be exactly the same. + question_text: Why will Hedy say 'ALARM! INTRUDER' when you type in 'secret'? + 6: + mp_choice_options: + - option: "```\n{if}\n```" + feedback: '`{if}` is already in the line above' + - feedback: No, you need `{else}`. + option: "```\n{at} {random}\n```" + - option: "```\n{else}\n```" + feedback: Great! + - option: "```\n{print}\n```" + feedback: '`{print}` is already there, we need a word before it!' + hint: '`{if}` goes together with...?' + question_score: '10' + correct_answer: C + question_text: Which word should be on the place of the blank in the last line? + code: "{print} 'Im Hedy the football fortune teller!'\n{print} 'I will predict what place your team will end up!'\nclub is {ask} 'Which club is your favorite?'\n{if} club {is} ajax {print} 'Ajax is going to win of course!'\n_ {print} 'Sorry, your club is gonna be in last place...'" + 7: + mp_choice_options: + - option: '`{if}`' + feedback: '`{if}` is in the line above.' + - option: '`{at}` `{random}`' + feedback: No, you don't need `{at} {random}`. + - feedback: There already is an `{else}` command + option: '`{else}`' + - feedback: Awesome! + option: '`{print}`' + question_text: Which word should be in the place of the blank? + code: "{print} 'I can predict if you will be a millionair or not!'\nname {is} {ask} 'Whats your name?'\n{if} name {is} Hedy {print} 'You will be a millionair!'\n{else} _ 'Unfortunately... No big money for you.'" + hint: After `{else}` a `{print}` command follows + question_score: '10' + correct_answer: D + 8: + mp_choice_options: + - option: "```\nfavorite animal\n```" + feedback: That's not the variable name. + - option: "```\nanimal\n```" + feedback: Great job! + - option: '`{if}`' + feedback: '`{if}` is already there' + - feedback: No, that's not it. + option: '`{print}`' + question_text: Which word should be on the place of the blank? + question_score: '10' + hint: What the variable name? + correct_answer: B + code: "animal {is} {ask} 'What is your favorite animal?'\n{if} _ {is} penguin {print} 'Thats my favorite animal too!'\n{else} {print} 'Cool! I like penguins.'" + 9: + question_text: Which door should you choose to escape?? + mp_choice_options: + - feedback: Bad choice! You're being eaten + option: '1' + - feedback: Super! You escaped! + option: '2' + - feedback: Bad choice! You're being eaten. + option: '3' + - option: It's a trap, you will always be eaten! + feedback: Luckily not! + question_score: '10' + correct_answer: B + hint: One of the doors will keep you safe.. + code: "{print} 'Escape from the haunted house!'\n{print} 'There are 3 doors in front of you'\ndoor {is} {ask} 'Which door do you choose?'\nmonsters {is} vampire, werewolf, giant spider\n{if} door {is} 2 {print} 'Yay, you can escape!'\n{else} {print} 'You are being devoured by a... ' monsters {at} {random}" + 10: + question_text: Which monster is standing behind door 1? + code: "{print} 'Escape from the haunted house!'\n{print} 'There are 3 doors in front of you'\ndoor {is} {ask} 'Which door do you choose?'\nmonsters {is} vampire, werewolf, giant spider\n{if} door {is} 2 {print} 'Yay, you can escape!'\n{else} {print} 'You are being devoured by a... ' monsters {at} {random}" + mp_choice_options: + - feedback: Awesome! + option: Hedy picks a random monster each time. + - feedback: Not always... + option: vampire + - feedback: Not always... + option: werewolf + - feedback: Not always... + option: giant spider + correct_answer: A + hint: Mind the last 3 words... monsters `{at} {random}`... + question_score: '10' + 6: + 1: + mp_choice_options: + - option: '20' + feedback: Correct! + - option: '12' + feedback: No, the plus sign is used in addition + - feedback: No, Hedy will calculate the answer + option: 2*10 + - feedback: Mind it's a calculation. + option: '210' + question_text: What's Hedy's output when you run this code? + code: '{print} 2*10' + question_score: '10' + correct_answer: A + hint: The `*` is used as a multiplication sign + 2: + mp_choice_options: + - feedback: That's not it + option: '`-`' + - feedback: That's not it + option: plus + - option: '`*`' + feedback: That's not it + - option: '`+`' + feedback: Correct! + hint: It's the plus sign. + question_score: '10' + correct_answer: D + question_text: What do you use when you want to add two numbers? + 3: + mp_choice_options: + - feedback: This would be the right answer if there were no quotation marks. + option: '30' + - option: '13' + feedback: Try again.. + - feedback: Correct! There are quotation marks, so Hedy will print it literally. + option: 3*10 + - option: Nothing, Hedy will give an error message. + feedback: No, Hedy will print it literally. + question_text: What's Hedy's output when you run this code? + code: "{print} '3*10'" + hint: Mind the quotation marks!! + correct_answer: C + question_score: '10' + 4: + mp_choice_options: + - feedback: Mind, Hedy also prints 'Your lucky number is...' + option: '30' + - feedback: Please try again. + option: '10' + - option: Your lucky number is... 30 + feedback: That's right! + - option: Your lucky number is... 10 + feedback: Her lucky number is name times age... + question_text: Kim is 10 years old. What will Hedy print for her? + code: "name = {ask} 'How many letters are in your name?'\nage = {ask} 'How old are you?'\nluckynumber = name*age\n{print} 'Your lucky number is...' luckynumber" + hint: 'Kim has 3 letters, she is 10 years old so: letters times age = 3*10 = 30.' + correct_answer: C + question_score: '10' + 5: + question_text: If 5 people eat at this restaurant, how much do they have to pay in total? + mp_choice_options: + - option: 5 dollars + feedback: Unfortunately, it's not that cheap. + - feedback: No, it's 10 dollars each. + option: 10 dollars + - feedback: The * means multiplication. + option: 15 dollars + - option: 50 dollars + feedback: Great! + correct_answer: D + hint: '`price` `is` `people` `times` 10' + question_score: '10' + code: "{print} 'Welcome to Hedys!'\npeople = {ask} 'How many people are eating with us tonight?'\nprice = people * 10\n{print} 'That will be ' price 'dollar please'" + 6: + question_text: How much does a hamburger cost in this virtual restaurant? + question_score: '10' + mp_choice_options: + - feedback: Super! + option: 15 dollars + - option: 6 dollars + feedback: The fries are 6 dollars + - feedback: The hamburger isn't free! + option: 0 dollars + - feedback: That's the price for a hamburger and fries! + option: 21 dollars + hint: Mind the fourth line. + correct_answer: A + code: "{print} 'Welcome at Hedys diner'\nfood = {ask} 'What would you like to eat?'\nprice = 0\n{if} food {is} hamburger price = 15\n{if} food {is} fries price = 6" + 7: + mp_choice_options: + - option: It could have been `price = 3` just as well. + feedback: No, that's not true. Hedy needs to add 3 dollars to the total. + - feedback: Hedy would understand, but it wouldn't be right. + option: Because Hedy doesn't understand `price = 3`. + - option: Because Hedy would otherwise forget about the previous order. The price would be 3 dollars in total. + feedback: That's right! + - option: Because the price is 0 dollars to begin with. + feedback: That's true, but not the reason + correct_answer: C + question_score: '10' + question_text: Why does line 7 say 'price is price + 3' instead of 'price is 3'? + hint: The price shouldn't be 3, but 3 dollars more than it already was + code: "{print} 'Welcome at Hedys diner'\nfood = {ask} 'What would you like to eat?'\nprice = 0\n{if} food {is} hamburger price = price + 15\n{if} food {is} fries price = price + 6\ndrinks is {ask} 'What would you like to drink?'\n{if} drinks {is} coke price = price + 3\n{if} drinks {is} water price = price + 1\n{print} price ' dollars please'" + 8: + mp_choice_options: + - option: There shouldn't be quotation marks in line 2 + feedback: No, there should be! + - feedback: Correct! + option: The variable is called correct answer, but a variable's name can only be 1 word. So it should be correct_answer + - option: The `{if}` and `{else}` commands should be in the same line. + feedback: No, that's not true. + - feedback: Variable names can be similar, but they can't be 2 words... + option: The variable in line 2 can't be called answer, because it is too similar to the variable correct answer. + question_score: '10' + correct_answer: B + code: "correct answer = 3*12\nanswer = {ask} 'What is 3 times 12?'\n{if} answer {is} correct answer {print} 'Good job!'\n{else} {print} 'No... It was ' correct answer" + question_text: Why is this code incorrect? + hint: Inspect what the variables are called. + 9: + mp_choice_options: + - feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + option: 10% + - option: 32% + feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + - option: 50% + feedback: Super! You are 100 percent smart! + - feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + option: 100% + question_text: Imagine you love football a 10, you've eaten 2 bananas and have washed your hands 3 times today. How smart does the silly fortune teller think you are? + question_score: '10' + correct_answer: C + hint: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + code: "{print} 'Im Hedy the silly fortune teller'\n{print} 'I will predict how smart you are!'\nfootball = {ask} 'On a scale of 0 to 10 how much do you love football?'\nbananas = {ask} 'How many bananas have you eaten this week?'\nhygiene = {ask} 'How many times did you wash your hands today??'\nresult = bananas + hygiene\nresult = result * football\n{print} 'You are ' result 'percent smart.'" + 10: + mp_choice_options: + - feedback: You are allowed to use the `=` sign as well + option: You can only fill in the word is on the `_` + - option: You can fill in either the word is or the `=` sign on the `_` + feedback: Amazing! + - option: You have to fill in =is= on the `_` + feedback: No, one `=` sign is enough + - feedback: You can also use `=` with words. + option: You can only use the `=` sign when working with numbers, not with words. + hint: '`{is}` and `=` are both allowed' + correct_answer: B + question_score: '10' + question_text: Which statement is true? + code: "name _ Hedy\n{print} name 'is walking trough the forrest'" + 7: + 1: + mp_choice_options: + - feedback: No you can repeat a line. + option: '0' + - option: '1' + feedback: Correct, one line at a time + - feedback: In this level only one line at a time + option: '3' + - feedback: In this level you can only repeat one line at a time + option: infinite + correct_answer: B + question_score: '10' + question_text: How many lines can you repeat at once with the repeat command at this level? + hint: You can only repeat one line at a time + 2: + question_text: Which code is right? + mp_choice_options: + - feedback: "`{repeat}` 100 `{times}` `{print}` 'hello'" + option: "```\n{print} 100 {times} 'hello'\n```" + - option: "```\n{print} {repeat} 100 {times} 'hello'\n```" + feedback: "{repeat} 100 {times} {print} 'hello'" + - feedback: "{repeat} 100 {times} {print} 'hello'" + option: "```\n{repeat} 'hello' 100 {times}\n```" + - feedback: That's right! + option: "```\n{repeat} 100 {times} {print} 'hello'\n```" + hint: First the `{repeat}` command, then the `{print}` command + correct_answer: D + question_score: '10' + 3: + mp_choice_options: + - feedback: No, a word is missing + option: Right + - option: Wrong, the word `{repeat}` is missing + feedback: The word `{repeat}` is there, another word is missing + - option: Wrong, the word `{times}` is missing + feedback: The word `{times}` is there, another word is missing. + - option: Wrong, the word `{print}` is missing + feedback: Correct + code: "{repeat} 100 {times} 'Hello!'" + correct_answer: D + question_score: '10' + hint: "It should be: `{repeat}` 100 `{times}` `{print}` 'Hello'" + question_text: Is this code right or wrong? + 4: + mp_choice_options: + - option: "`I'm`" + feedback: That's right! + - feedback: '`{print}` is spelled correctly' + option: '`{print}`' + - feedback: '`{repeat}` is spelled correctly' + option: '`{repeat}`' + - feedback: '`{times}` is spelled correctly' + option: '`{times}`' + question_score: '10' + code: "{print} 'I'm blue'\n{repeat} 7 {times} {print} 'da ba dee, da ba da'" + hint: I'm is wrong, you can't use apostrophes in a sentence + correct_answer: A + question_text: Which word is wrong in the code? + 5: + mp_choice_options: + - option: Correct + feedback: That's right! + - option: Wrong + feedback: That's not it + hint: The code is correct! + question_score: '10' + question_text: Is this code right or wrong? + code: "{repeat} 100 {times} {print} 'Hedy is awesome!'" + correct_answer: A + 6: + mp_choice_options: + - option: "```\nthe wheels on the bus go\nround and round\n```" + feedback: Only the second line is repeated 3 times + - option: "```\nthe wheels on the bus go\nthe wheels on the bus go\nthe wheels on the bus go\nround and round\n```" + feedback: Only the second line is repeated 3 times + - option: "```\nthe wheels on the bus go\nround and round\nthe wheels on the bus go\nround and round\nthe wheels on the bus go\nround and round\n```" + feedback: Only the second line is repeated 3 times + - option: "```\nthe wheels on the bus go\nround and round\nround and round\nround and round\n```" + feedback: All through the town! Perfect! + question_text: What will be the output from this code? + correct_answer: D + hint: Only 'round and round' is repeated 3 times. + question_score: '10' + code: "{print} 'The wheels on the bus go'\n{repeat} 3 {times} {print} ' round and round'" + 7: + hint: Mind the `{repeat}` command. + mp_choice_options: + - option: "```\nWe will We will\nROCK YOU!\n```" + feedback: "'We will' won't appear twice in the same line" + - feedback: Great! + option: "```\nWe will\nWe will\nROCK YOU!\n```" + - feedback: ROCK YOU! won't be repeated + option: "```\nWe will\nROCK YOU!\nWe will\nROCK YOU!\n```" + - feedback: Mind the `{repeat}` command + option: "```\nWe will\nROCK YOU!" + correct_answer: B + question_text: What will be the output from this code? + code: "{repeat} 2 {times} {print} 'We will'\n{print} 'ROCK YOU!'" + question_score: '10' + 8: + question_text: What Hedy code belongs to this output? + code: "Here comes the sun\nDo do do do\nHere comes the sun\nAnd I say\nIts alright" + mp_choice_options: + - feedback: Awesome, you can't use the `{repeat}` command here. + option: "```\n{print} 'Here comes the sun'\n{print} 'Do do do do'\n{print} 'Here comes the sun'\n{print} 'And I say'\n{print} 'Its alright'\n```" + - option: "```\n{repeat} 2 {times} {print} 'Here comes the sun'\n{print} 'And I say'\n{print} 'Its alright'" + feedback: Where did you leave 'Do do do do'? + - option: "```\n{repeat} 2 {times} {print} 'Here comes the sun'\n{print} 'Do do do do'\n{print} 'And I say'\n{print} 'Its alright'\n```" + feedback: This is not the correct order.. + - option: "```\n{repeat} 2 {times} {print} 'Here comes the sun'\n{repeat} 2 {times} {print} 'Do do'\n{print} 'And I say'\n{print} 'Its alright'\n```" + feedback: This is not the correct order.. + question_score: '10' + correct_answer: A + hint: '`{repeat}` can only be used if you want to execute the same line multiple times in a row.' + 9: + correct_answer: D + mp_choice_options: + - feedback: Your repeated line is incorrect. + option: "```\n{print} 'Batman was flying through Gotham. '\n{print} 'When suddenly he heard someone screaming!'\n{print} 'Help!'\n{repeat} 3 {times} {print} 'Please help me!'\n```" + - option: "```\n{print} 'Batman was flying through Gotham.'\n{print} 'When suddenly he heard someone screaming!'\n{repeat} 3 {times} 'Help!'\n{print} 'Please help me!'\n```" + feedback: The `{print}` command is missing on line 3. + - feedback: You're missing the quotation marks + option: "```\n{print} Batman was flying through Gotham.\n{print} When suddenly he heard someone screaming!\n{repeat} 3 {times} {print} Help!\n{print} Please help me!\n```" + - option: "```\n{print} 'Batman was flying through Gotham.'\n{print} 'When suddenly he heard someone screaming!'\n{repeat} 3 {times} {print} 'Help!'\n{print} 'Please help me!'\n```" + feedback: Perfect + hint: "'Help!' is repeated 3 times." + question_score: '10' + code: "Batman was flying through Gotham.\nWhen suddenly he heard someone screaming...\nHelp!\nHelp!\nHelp!\nPlease help me!" + question_text: What Hedy code belongs to this output? + 10: + code: "if youre happy and you know it clap your hands\nif youre happy and you know it clap your hands\nif youre happy and you know it and you really want to show it\nif youre happy and you know it clap your hands" + mp_choice_options: + - feedback: Almost! the first line needs an extra word + option: "```\n{repeat} 2 {times} 'if youre happy and you know it clap your hands'\n{print} 'if youre happy and you know it and you really want to show it'\n{print} 'if youre happy and you know it clap your hands'\n```" + - option: "```\n{repeat} 2 {times} {print} 'if youre happy and you know it clap your hands'\n{print} 'if youre happy and you know it and you really want to show it'\n{print} 'if youre happy and you know it clap your hands'\n```" + feedback: Great! + - feedback: This is not in the right order. + option: "```\n{repeat} 3 {times} {print} 'if youre happy and you know it clap your hands'\n{print} 'if youre happy and you know it and you really want to show it'\n```" + - option: "```\n{repeat} 4 {times} 'if youre happy and you know it'\n{repeat} 2 {times} 'clap your hands'\n{print} 'and you really want to show it'\n{print} 'clap your hands'\n```" + feedback: This is not in the right order. + question_text: Which code belongs to this output? + hint: Mind the order of the sentences. + correct_answer: B + question_score: '10' + 8: + 1: + mp_choice_options: + - option: "Hello\nIm Hedy!" + feedback: Everything is printed twice. + - option: "Hello\nHello\nIm Hedy" + feedback: The second line is repeated twice as well. + - option: "Hello\nIm Hedy!\nHello\nIm Hedy!" + feedback: Super! + - option: "Hello\nHello\nIm Hedy!\nIm Hedy!" + feedback: Everything is printed twice + correct_answer: C + question_text: Which output will be produced by this code? + hint: Both lines are repeated twice. + question_score: '10' + code: "{repeat} 2 {times}\n {print} 'Hello'\n {print} 'Im Hedy!'" + 2: + code: "{repeat} 5 {times}\n{print} 'Hedy is cool!'" + mp_choice_options: + - feedback: No it should be 2 lines. + option: This should be only one line, not 2. + - option: This `{print}` command has to be removed. + feedback: No, you need it. + - feedback: No, `{repeat}` is the correct spelling + option: There is a spelling mistake in the `{repeat}` command. + - option: The second line needs to start with 4 spaces as indentation. + feedback: Correct! + correct_answer: D + question_score: '10' + hint: Something is missing in the second line? + question_text: What is wrong with this code? + 3: + mp_choice_options: + - option: "Baby shark tututudutudu\nBaby shark" + feedback: Mind the `{repeat}` command! + - feedback: The last line has no indentation, so it's not repeated. + option: "Baby shark tututudutudu\nBaby shark\nBaby shark tututudutudu\nBaby shark\nBaby shark tututudutudu\nBaby shark" + - feedback: Right! + option: "Baby shark tututudutudu\nBaby shark tututudutudu\nBaby shark tututudutudu\nBaby shark" + - feedback: What is being repeated and what isn't ? + option: "Baby shark tututudutudu\nBaby shark\nBaby shark\nBaby shark" + code: "{repeat} 3 {times}\n {print} 'Baby shark tututudutudu'\n{print} 'Baby shark'" + question_text: What output will be produced when you run this program? + question_score: '10' + hint: What is being repeated and what is not? + correct_answer: C + 4: + question_text: Which output is correct? + mp_choice_options: + - option: "The children went:\nYay!\nWe are going on vacation!" + feedback: Mind the `{repeat}` command! + - option: "The children went:\nYay!\nWe are going on vacation!\nYay!\nWe are going on vacation!" + feedback: Correct! + - option: "The children went:\nYay!\nYay!\nWe are going on vacation!\nWe are going on vacation!" + feedback: This order is incorrect. + - option: "The children went:\nYay!\nYay!\nWe are going on vacation!" + feedback: The last line is repeated too. + hint: The block under the `{repeat}` command is repeated twice. + question_score: '10' + correct_answer: B + code: "{print} 'The children went:'\n{repeat} 2 {times}\n {print} 'Yay!'\n {print} 'We are going on vacation!'" + 5: + mp_choice_options: + - option: The `{print}` commands on the last two lines should start on new lines and start with 4 spaces. + feedback: That's right! + - option: '`{else}` is not a command!' + feedback: It is! + - feedback: That's not true + option: Lines that start with `{if}` should start with 4 spaces + - feedback: That's not true + option: '`{ask}` is no longer a command' + question_score: '10' + correct_answer: A + code: "end = {ask} 'Do you want a happy or a sad ending?'\n{if} end {is} happy {print} 'They lived happily ever after'\n{else} {print} 'The world exploded. The end.'" + question_text: What is wrong with this code? + hint: Something is wrong with indentation + 6: + mp_choice_options: + - feedback: There is no repetition in this answer. + option: "Welcome to restaurant Hedy\nPancakes" + - option: "Welcome to restaurant Hedy\nWelcome to restaurant Hedy\nPancakes\nPancakes" + feedback: This answer also repeats the welcome message + - option: "Welcome to restaurant Hedy\nWhat do you want to eat?\nWhat do you want to eat?\nPancakes\nPancakes" + feedback: Almost! But look at the question, it is not repeated. + - option: "Welcome to restaurant Hedy\nPancakes\nPancakes" + feedback: Well done! + question_text: What will be the output of this code when we enter pancakes? + question_score: '10' + hint: The first sentence and question will not be repeated + correct_answer: D + code: "{print} 'Welcome to restaurant Hedy'\n{repeat} 2 {times}\n food {is} {ask} 'What do you want to eat?'\n {print} food" + 7: + mp_choice_options: + - option: Nothing. This code is correct! + feedback: Something is wrong! + - feedback: You are! + option: You're not allowed to use an `{if}` command after an `{ask}` command. + - option: You don't have to use indentation twice. Only in the first `{if}` command. + feedback: You always have to use indentation. + - feedback: That's right. + option: The indentation is wrong in the first `{if}` command. + correct_answer: D + code: "food = {ask} 'What would you like to eat?'\n{if} food {is} fries\nsauce = {ask} 'What sauce would you like?'\n {print} 'One fries with ' sauce\n{if} food {is} pizza\n topping = {ask} 'What topping would you like?'\n {print} 'One pizza with ' topping\n{print} 'Thank you for your order'" + hint: Take a careful look at the indentation. + question_score: '10' + question_text: What is wrong with this code? + 8: + mp_choice_options: + - feedback: You are wrong! + option: "```\n{if} answer {is} 32\n {print} 'You are...'\n {sleep}\n {print} 'right!'\n {else}\n {print} 'You are wrong!'\n```" + - feedback: You are wrong! + option: "```\n{if} answer {is} 32\n{print} 'You are...'\n{sleep}\n{print} 'right!'\n{else}\n{print} 'You are wrong!'\n```" + - option: "```\n{if} answer {is} 32\n {print} 'You are...'\n {sleep}\n {print} 'right!'\n{else}\n {print} 'You are wrong!'\n```" + feedback: You are... right! + - option: "```\n{if} answer {is} 32\n {print} 'You are...'\n {sleep}\n{print} 'right!'\n{else}\n {print} 'You are wrong!'\n```" + feedback: You are wrong! + question_score: '10' + hint: What should happen if the person is right? And what else? + question_text: In which of the codes is the indentation done right? + correct_answer: C + 9: + mp_choice_options: + - feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces + option: Line 2 and 4 + - feedback: Not only 3... + option: Only line 3 + - option: Line 3, 4 and 5 + feedback: Line 4 shouldn't + - feedback: Great job! + option: Line 3 and 5 + code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'" + question_score: '10' + hint: The lines after an `{if}` or `{else}` command should start with 4 spaces. + correct_answer: D + question_text: What line(s) in this code should start with 4 spaces? + 10: + code: "1 level = {ask} 'What level are you on?'\n2 {if} level {is} 8\n3 {print} 'Great job!'" + question_text: Which statement is true? + correct_answer: D + mp_choice_options: + - feedback: That's not true + option: All lines should start with 4 spaces + - option: Line 2 and 3 should start with 4 spaces + feedback: That's not true + - feedback: That's not true + option: Line 2 should start with 4 spaces + - option: Line 3 should start with 4 spaces + feedback: You are correct! + hint: Only one line starts with 4 spaces, but which one...? + question_score: '10' + 9: + 1: + mp_choice_options: + - feedback: That's right! + option: Nothing, this code is correct! + - feedback: You are! + option: You're not allowed to use an `{if}` command after an `{ask}` command. + - feedback: You always have to use indentation. + option: You don't have to use indentation twice. + - option: The indentation is wrong in the last `{if}` command. + feedback: It is not the indentation. + hint: All the indentation is done correctly. + question_score: '10' + correct_answer: A + question_text: What is wrong with this code? + code: "{repeat} 3 {times}\n food = {ask} 'What would you like to eat?'\n {if} food {is} fries\n sauce = {ask} 'What sauce would you like?'\n {print} 'One fries with ' sauce\n {if} food {is} pizza\n topping = {ask} 'What topping would you like?'\n {print} 'One pizza with ' topping\n{print} 'Thank you for your order'" + 2: + code: "password = {ask} 'What is the password?'\ncorrect_password = Hedy\n{if} password {is} correct_password\n {repeat} 2 {times}\n {print} 'Good job!'\n {print} 'You can use the computer!'\n{else}\n {print} 'The computer will explode in 5... 4... 3... 2... 1...'" + question_text: What will be printed after entering the correct password? + mp_choice_options: + - option: "```\nGood job!\nGood job!\n```" + feedback: That's not it! + - option: "```\nThe computer will explode in 5... 4... 3... 2... 1...\n```" + feedback: That's not it! + - feedback: That's not it! + option: "```\nGood job!\nGood job!\nYou can use the computer!\n```" + - option: "```\nGood job!\nYou can use the computer!\nGood job!\nYou can use the computer!\n```" + feedback: Correct! + correct_answer: D + hint: Everything under the `{repeat}` command is repeated twice. + question_score: '10' + 4: + code: "name = {ask} 'What is your name?'\nsize = {ask} 'What is your shoe size?'\n{if} size {is} 38\n {if} name {is} Cinderella\n {print} '❤️❤️❤️'\n {else}\n {print} 'You are not the one!'\n{else}\n {print} 'Ill keep looking'" + question_text: Which statement is true? + mp_choice_options: + - option: Sleeping Beauty with shoe size 38 gets the output 'Ill keep looking' + feedback: No, she gets 'You are not the one!' + - feedback: No, she gets 'Ill keep looking' + option: Cinderella with shoe size 40 gets the output '❤️❤️❤️' + - feedback: That's right! + option: Sleeping Beauty with shoe size 40 gets the output 'Ill keep looking' + - feedback: No she gets '❤️❤️❤️' + option: Cinderella with shoe size 38 gets the output 'Ill keep looking' + hint: No matter what your name is, if you have shoe size 40 you will get the message 'Ill keep looking'. + question_score: '10' + correct_answer: C + 5: + mp_choice_options: + - feedback: Don't forget the indentation after `{repeat}` commands. + option: "```\ndessert = {ask} 'What is your favorite type of dessert?'\n{if} dessert {is} icecream\n {repeat} 3 {times}\n {print} 'Icecream is the best!'\n```" + - feedback: Use indentation after an `{if}` command + option: "```\ndessert = {ask} 'What is your favorite type of dessert?'\n{if} dessert {is} icecream\n{repeat} 3 {times}\n {print} 'Icecream is the best!'\n```" + - feedback: Perfect + option: "```\ndessert = {ask} 'What is your favorite type of dessert?'\n{if} dessert {is} icecream\n {repeat} 3 {times}\n {print} 'Icecream is the best!'\n```" + - option: "```\n{repeat} 3 {times}\n dessert = {ask} 'What is your favorite type of dessert?'\n {if} dessert {is} icecream\n {repeat} 3 {times}\n {print} 'Icecream is the best!'\n```" + feedback: There are 2 `{repeat}` commands in this code. + hint: Watch the indentation + question_score: '10' + output: "Icecream is the best!\nIcecream is the best!\nIcecream is the best!" + question_text: Which code produced this output? + correct_answer: C + 6: + mp_choice_options: + - feedback: Don't forget the others + option: '`{if}`' + - feedback: Don't forget `{else}`! + option: '`{if}` `{repeat}`' + - option: '`{if}` `{else}` `{repeat}`' + feedback: Keep it up! + - feedback: Not with `{print}` + option: '`{if}` `{else}` `{repeat}` `{print}`' + question_text: After which command(s) should you use indentation (starting the next line with 4 spaces)? + hint: Indentation happens on the line below some commands + question_score: '10' + correct_answer: C + 7: + question_score: '10' + hint: After each `{if}` command, the line below should indent + mp_choice_options: + - option: "```\n{if} food {is} pizza\n {if} size {is} medium\n {if} drink {is} coke\n price = price - 5\n```" + feedback: Amazing! + - option: "```\n{if} food {is} pizza\n {if} size {is} medium\n{if} drink {is} coke\n price = price - 5\n```" + feedback: The second `{if}` misses code! + - option: "```\n{if} food {is} pizza\n{if} size {is} medium\n{if} drink {is} coke\n price = price - 5\n```" + feedback: Two consecutive `{if}`s is never correct. + - feedback: Almost right. Take another look at the last line + option: "```\n{if} food {is} pizza\n {if} size {is} medium\n {if} drink {is} coke\n price = price - 5\n```" + correct_answer: A + code: "{if} food {is} pizza\n{if} size {is} medium\n{if} drink {is} coke\nprice = price - 5" + question_text: You'll get a 5 dollar discount if you order a medium pizza with coke.
But the code has a mistake! How to debug it? + 8: + question_text: What is wrong in this code? + code: "age = {ask} 'Happy Birthday! How old are you?'\nsinging = {ask} 'Would you like us to sing?'\n{if} singing {is} yes\n {repeat} years {times}\n {print} 'Hip Hip Hooray'" + mp_choice_options: + - feedback: Yes you can. + option: You can't put two questions in a row + - feedback: Keen eye! Good job! + option: The variable called 'age' is later on used as 'years' + - option: You're not allowed to start with 8 spaces, like line 5 does + feedback: You actually must start like that. + - feedback: That's not true. + option: A code must always start with a `{print}` command in the first line + correct_answer: B + question_score: '10' + hint: The indentation is done right this time + 9: + mp_choice_options: + - feedback: You are allowed to + option: None, that is not allowed + - option: Only 1 + feedback: You could use more if you like + - feedback: You could use more if you like + option: '3' + - option: Infinite, as long as you keep using indentation correctly + feedback: That is true + question_score: '10' + correct_answer: D + question_text: How many `{if}` commands can be placed inside another `{if}` command? + hint: You can put an `{if}` command inside an `{if}` command. + 10: + question_text: Which statement is true? + mp_choice_options: + - feedback: Only line 2 and 3 start with spaces + option: All lines should start with 4 spaces + - option: Line 2 and 3 should start with 4 spaces + feedback: Line 3 should start with 8 + - option: Line 2 and 3 should start with 8 spaces + feedback: Line 2 should start with 4 + - feedback: You are correct! + option: line 2 should start with 4 spaces and line 3 with 8 + question_score: '10' + correct_answer: D + hint: The first line doesn't start with any spaces + code: "1 {repeat} 2 {times}\n2 {if} level {is} 9\n3 {print} 'Great job!'" + 3: + mp_choice_options: + - feedback: You don't win a million! + option: case 1, sell + - option: case 1, open + feedback: You don't win a million + - feedback: You don't win a million + option: case 2, sell + - option: case 2, open + feedback: Great job! You win! + correct_answer: D + hint: Follow the right path + question_score: '10' + question_text: Which case should you choose to win a million dollars? + code: "{print} 'Choose the right case and win!'\ncase = {ask} 'Which case will you pick? 1 or 2?'\n{if} case {is} 1\n action = {ask} 'Open it or sell it?'\n {if} action {is} sell\n {print} 'You sell your case for 10 dollars'\n {if} action {is} open\n {print} 'You open the case and win an apple pie'\n{if} case {is} 2\n action = {ask} 'Open it or sell it?'\n {if} action {is} sell\n {print} 'You sell the case for 500 dollars'\n {if} action {is} open\n {print} 'You open the case and win a million dollars!'" + 10: + 1: + mp_choice_options: + - feedback: That's not it + option: "```\n{for} each compliment\n```" + - feedback: You deserve all those compliments! + option: "```\n{for} compliment {in} compliments\n```" + - feedback: That's not it + option: "```\n{if} compliment {in} compliments\n```" + - feedback: Almost there! + option: "```\n{for} compliments {in} compliment\n```" + hint: '`{for}` each compliment in the lists of compliments...' + question_score: '10' + question_text: What do we need to fill in on the `_` if we want to print each compliment? + correct_answer: B + code: "compliments = perfect, great job, amazing\n_\n {print} compliment" + 2: + mp_choice_options: + - feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + option: I love pizza + - option: I love pasta + feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + - option: I love pancakes + feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + - feedback: Great! + option: "I love pizza\nI love pasta\nI love pancakes" + hint: Line 2 says for each meal in the list of meals. So each meal is printed. + correct_answer: D + question_score: '10' + code: "meals = pizza, pasta, pancakes\n{for} meal {in} meals\n {print} 'I love ' meal" + question_text: Which output is correct? + 3: + question_text: Which output is correct? + code: "animals = dogs, cats, hamsters, chickens\n{for} animal {in} animals\n {print} animal ' are lovely pets'" + question_score: '10' + mp_choice_options: + - feedback: Line 2 says {for} each animal in the list of animals. So each animal is {print}ed. + option: dogs are lovely pets + - option: dogs, cats, hamsters, chickens are lovely pets + feedback: Each animal gets their own line in the output. + - option: "dogs are lovely pets\ncats are lovely pets\nhamsters are lovely pets\nchickens are lovely pets" + feedback: Great! + - option: You don't know yet. Because it chooses one of the animals {at} {random}. + feedback: Line 2 says {for} each animal in the list of animals. So each animal is {print}ed. + correct_answer: C + hint: Line 2 says {for} each animal in the list of animals. So each animal is printed + 4: + mp_choice_options: + - option: Line 2 needs to start with 4 spaces as indentation + feedback: No it doesn't. Only line 3 needs indentation, which it has. + - feedback: Line 2 is a `{for}`command so line 3 does need to start with an indent. + option: Line 3 does not need to start with 4 spaces as indentation + - feedback: Good job! + option: Line 3 should say item instead of groceries + - feedback: No it does not. + option: Line 2 should say groceries instead of item + question_text: What's wrong with this code? + question_score: '10' + hint: Line 2 says `{for}` each item in the list of groceries + correct_answer: C + code: "groceries = apples, bread, milk\n{for} item {in} groceries\n {print} 'We need ' groceries" + 5: + question_score: '10' + question_text: What word should be on the `_` with these digital dice? + correct_answer: B + mp_choice_options: + - option: players + feedback: It would say 'Ann throws Jesse', instead of 'Ann throws 6'. + - feedback: That's right! + option: choices + - feedback: You are very close. But you need Hedy to pick from the list called 'choices' not 'choice'... + option: choice + - feedback: Look at the names of the variables. + option: dice + hint: Hedy needs to pick a number `{at} {random}` + code: "{print} 'Welcome to the digital dice!'\nplayers = Ann, John, Jesse\nchoices = 1, 2, 3, 4, 5, 6\n{for} player {in} players\n {print} player ' throws ' _ {at} {random}" + 6: + mp_choice_options: + - feedback: Meredith wants to play too! + option: "```\nKelly chooses rock\n```" + - option: "```\nMeredith chooses scissors\nKelly chooses rock\n```" + feedback: So close! But Kelly is first in the list, so she goes first + - option: "```\nMeredith chooses paper\n```" + feedback: Kelly wants to play too! + - option: "```\nKelly chooses paper\nMeredith chooses scissors\n```" + feedback: Amazing! + question_score: '10' + question_text: Which of the answers below is a possible outcome when you run the code? + code: "choices = rock, paper, scissors\nplayers = Kelly, Meredith\n{for} player {in} players\n {print} player ' chooses ' choices {at} {random}" + correct_answer: D + hint: Each player will pick an option. The player that's first on the list will go first. + 7: + mp_choice_options: + - feedback: You are on fire! + option: "```\n{for} name {in} names\n```" + - feedback: No it should be for each name in the list nameS, so the other way around + option: "```\n{for} names {in} name\n```" + - option: "```\n{for} food {in} food\n```" + feedback: Each name should be told what they will have for dinner. + - option: "```\n{for} name {in} food\n```" + feedback: Each name should be told what they will have for dinner. + question_score: '10' + question_text: What line should be on the `_` in this code that decides what these people will have for dinner? + correct_answer: A + code: "names = Ron, Leslie, April, Andy\nfood = pasta, fries, salad\n_\n {print} name ' has to eat ' food {at} {random} ' for dinner'" + hint: Each name should be told what they will have for dinner. + 8: + mp_choice_options: + - feedback: That's not it! + option: "```\n'name gets a color shirt'\n```" + - option: "```\nname 'gets a ' colors {at} {random} ' shirt'\n```" + feedback: Great job! This was a hard one! + - feedback: You want each name printed. So the first word should not be names but... + option: "```\nnames 'gets a ' color {at} {random} ' shirt'\n```" + - feedback: There is no variable named people.. + option: "```\npeople ' gets a colors shirt'\n```" + code: "names = Donna, Tommy, Ben\ncolors = blue, red, purple\n{for} name {in} names\n {print} _" + question_text: What should be on the `_` in this code that decides which color shirt you get? + correct_answer: B + hint: Mind the quotation marks and the names of the variables + question_score: '10' + 10: + mp_choice_options: + - feedback: That is not true, you could end up without a prize. + option: Everybody will always win a prize. + - option: All the prizes always go to one single person. + feedback: That is not true. All the prizes are given away, but to random people + - feedback: That is not true. Larry has the same odds as the others + option: Larry will never win a prize + - feedback: You get it! + option: Someone might win two prizes + question_text: What is true about this code? + correct_answer: D + code: "prizes = 1 million dollars, car, sandwich\nnames = Bob, Patrick, Sandy, Larry\n{for} prize {in} prizes\n {print} 'The ' prize ' is won by ' names {at} {random}" + hint: Try to imagine the output of this code. + question_score: '10' + 9: + mp_choice_options: + - option: Timon, what would you like to eat as your appetizer? + feedback: Perfect! + - option: Onno, what would you like to eat as your appetizer? + feedback: Timon is first on the list! + - feedback: Appetizers are first in the list + option: Timon, what would you like to eat as your dessert? + - option: You don't know that. Hedy will choose `{at} {random}`. + feedback: There is no `{at} {random}` in this code... + question_score: '10' + code: "courses = appetizer, main course, dessert\nnames = Timon, Onno\n{for} name {in} names\n {for} course {in} courses\n food = {ask} name ', what would you like to eat as your ' course '?'\n {print} name ' orders ' food ' as their ' course" + question_text: What is the first question Hedy will ask you when you run the program? + correct_answer: A + hint: The first options from both lists are chosen. + 11: + 1: + mp_choice_options: + - option: '`counter`' + feedback: No + - feedback: Correct + option: '`{range}`' + - feedback: No + option: '`{if}`' + - option: '`{for}`' + feedback: No + hint: What did you learn in this level? + code: "{for} i {in} _ 1 {to} 10\n {print} i" + correct_answer: B + question_text: What word should be at the place of the blank? + question_score: '10' + 3: + mp_choice_options: + - option: "```\n{for} i {in} {range} 1 {to} 5\n {print} i\n{print} 'Once I caught a fish alive!'\n```" + feedback: Perfect + - option: "```\n{for} i {in} {range} 1 {to} 5\n{print} i\n{print} 'Once I caught a fish alive!'\n```" + feedback: This code won't work. You need an indent after {for}. + - option: "```\n{for} i {in} {range} 1 {to} 5\n {print} i\n {print} 'Once I caught a fish alive!'\n```" + feedback: Now Hedy will count '1 Once I caught a fish alive!, 2 Once I caught a fish alive! etc. + - option: "```\n{for} i {in} {range} 1 {to} 5\n {print} 'i'\n{print} 'Once I caught a fish alive!'\n```" + feedback: i is a variable and shouldn't have quotation marks + question_score: '10' + question_text: Which code was used to get this output? + hint: First all the numbers, then the sentence + correct_answer: A + output: "1\n2\n3\n4\n5\nOnce I caught a fish alive!" + 2: + mp_choice_options: + - option: "```\n1\n2\n3\n```" + feedback: Correct! + - option: "```\n1 2 3\n```" + feedback: That's not it + - option: "```\n1, 2, 3\n```" + feedback: That's not it + - feedback: That's not it + option: "```\n123\n```" + hint: How do the numbers appear in the screen? + question_text: What will be the output from this code? + correct_answer: A + code: "{for} i {in} {range} 1 {to} 3\n {print} i" + question_score: '10' + 5: + mp_choice_options: + - feedback: No it doesn't. + option: The i in the last line need quotation marks + - feedback: You could use 1 to 5 just as well! + option: You can't use `{range}` 1 `{to}` 5 only `{range}` 1 `{to}` 10 + - option: Line 1 needs to start with an indention. + feedback: Not line 1... + - feedback: Perfect! + option: Line 2 needs to start with an indention + question_score: '10' + correct_answer: D + question_text: What's wrong with this code? + code: "{for} i {in} {range} 1 {to} 10\n{print} i" + hint: There is something wrong with the indention + 7: + mp_choice_options: + - option: "```\n{for} i {in} {range} 0 {to} 3\n```" + feedback: There's not always 3 people + - feedback: The variable is not named guests + option: "```\n{for} i {in} {range} 1 {to} guests\n```" + - feedback: Great! + option: "```\n{for} i {in} {range} 1 {to} people\n```" + - feedback: That's one order too many! + option: "```\n{for} i {in} {range} 0 {to} people\n```" + question_score: '10' + question_text: What should be on the place of the blank? + correct_answer: C + code: "{print} 'Welcome to Hedys diner'\npeople = {ask} 'How many people will be eating here tonight?'\n_\n food = {ask} 'What would you like to order?'\n {print} food" + hint: Use the variable 'people' + 6: + correct_answer: C + mp_choice_options: + - option: 1 time + feedback: No + - feedback: No + option: 2 times + - feedback: That's right! + option: 3 times + - option: Never + feedback: No + code: "{for} i {in} {range} 0 {to} 2\n {print} 'Hello'" + hint: 0 also counts. So 0,1,2 that's 3 times. + question_score: '10' + question_text: How many times does the word Hello appear on your screen when you run the code? + 8: + mp_choice_options: + - option: "```\n23\n24\n25\n```" + feedback: The numbers don't appear. It doesn't say `{print}` i. + - feedback: The numbers don't appear. It doesn't say `{print}` i + option: "```\n23 hi 24 hi 25 hi\n```" + - feedback: Correct + option: "```\nhi\nhi\nhi\n```" + - feedback: No it will only appear 3 times. + option: The word 'hi' will appear 25 times in a row. + question_text: What will be the output from this code? + correct_answer: C + hint: It doesn't say `{print}` i + code: "{for} i {in} {range} 23 {to} 25\n {print} 'hi'" + question_score: '10' + 9: + code: "age = {ask} 'How old are you?'\n{for} i {in} {range} 1 {to} age\n {print} 'Hip Hip Hoorray!'" + question_text: How many times does Hedy chant Hip Hip Hooray? + question_score: '10' + mp_choice_options: + - feedback: Try again + option: 1 time + - feedback: Try again + option: 2 times + - feedback: Try again + option: Never + - feedback: That's right! + option: That depends on how old you are + hint: '`{for}` i `{in}` `{range}` 1 `{to}` age' + correct_answer: D + 10: + output: "Baby shark tututudutudu\nBaby shark tututudutudu\nBaby shark tututudutudu\nBaby shark" + mp_choice_options: + - option: "```\n{for} i {in} {range} 1 {to} 3\n {print} Baby shark tututudutudu\n {print} Baby shark\n```" + feedback: Mind the indentation + - option: "```\n{for} i {in} {range} 1 {to} 3\n {print} Baby shark tututudutudu\n{print} Baby shark\n```" + feedback: That's right! + - feedback: '`{range}` 0 `{to}` 3 is 4 times.' + option: "```\n{for} i {in} {range} 0 {to} 3\n {print} Baby shark tututudutudu\n{print} Baby shark\n```" + - option: "```\n{for} i {in} {range} 0 {to} 3\n {print} Baby shark tututudutudu\n {print} Baby shark\n```" + feedback: '`{range}` 0 `{to}` 3 is 4 times.' + question_score: '10' + hint: Mind the indentation + correct_answer: B + question_text: Which code belongs to this output? + 4: + question_text: Which code was used to get this output? + correct_answer: D + mp_choice_options: + - option: "```\n{for} i {in} {range} 0 {to} 10\n {print} i\n```" + feedback: Now Hedy prints the numbers from 0 to 10 instead of 10 to 0. + - feedback: Hedy would print negative numbers in this case. + option: "```\n{for} i {in} {range} 0 {to} 10\n {print} -1 * i\n```" + - feedback: Unfortunately this does not exist. + option: "```\n{for} i {in} {range} 10 {to} 0\n {print} i\n```" + - option: "```\n{for} i {in} {range} 0 {to} 10\n {print} 10 - i\n```" + feedback: That's right! + hint: It has to be a calculation… + output: "10\n9\n8\n7\n6\n5\n4\n3\n2\n1\n0" + question_score: '10' + 12: + 1: + mp_choice_options: + - option: '5' + feedback: Don't forget the first line of code! + - feedback: This is not the one! + option: 3.5 + 1.5 + - option: "three and a half plus one and a half is...\nfive" + feedback: Take a close look at the second line... + - option: "three and a half plus one and a half is...\n5" + feedback: Great job! + code: "{print} 'three and a half plus one and a half is...'\n{print} 3.5 + 1.5" + hint: Both lines are printed! + question_text: Which output is correct? + correct_answer: D + question_score: '10' + 2: + mp_choice_options: + - feedback: All the different values of flavors should be in quotation marks. + option: "```\nflavors {is} vanilla, strawberry, chocolate\n{print} 'I would like a ' flavors {at} {random} ' cake.'\n```" + - option: "```\n'flavors = vanilla, strawberry, chocolate'\n{print} 'I would like a ' flavors {at} {random} ' cake.'\n```" + feedback: All the different values of flavors should be in quotation marks. + - option: "```\nflavors = 'vanilla', 'strawberry', 'chocolate'\n{print} 'I would like a ' flavors {at} {random} ' cake.'\n```" + feedback: Alright! + - feedback: All the different values of flavors should be in quotation marks. + option: "```\nflavors = 'vanilla, strawberry, chocolate'\n{print} 'I would like a ' flavors {at} {random} ' cake.'\n```" + hint: The second line is the same in each code, pay attention to the first line + correct_answer: C + question_score: '10' + question_text: Which of these codes is correct? + 10: + mp_choice_options: + - option: "```\n{for} i {in} {range} 1 {to} 3\n```" + feedback: This is a hard one! All the actions on the list must be in the song. + - option: "```\n{for} action {in} actions\n```" + feedback: You are amazing! + - feedback: This is a hard one! All the actions on the list must be in the song. + option: "```\n{repeat} 3 {times}\n```" + - feedback: This is a hard one! All the actions on the list must be in the song. + option: "```\n{print} actions {at} {random}\n```" + hint: This is a hard one! All the actions on the list must be in the song. + question_score: '10' + correct_answer: B + question_text: Which line of code should be filled in at the `_` to complete the song ? + code: "actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'\n_\n {for} i {in} {range} 0 {to} 1\n {print} 'if youre happy and you know it'\n {print} action\n {print} 'if youre happy and you know it and you really want to show it'\n {print} 'if youre happy and you know it'\n {print} action" + 4: + mp_choice_options: + - feedback: No + option: Line 1 and 2 + - feedback: No + option: Line 1, 2 and 3 + - option: Line 1, 2 and 4 + feedback: No + - feedback: Perfect! + option: All of the lines + correct_answer: D + question_score: '10' + hint: Does line 3 need quotation marks too? + code: "{print} Welcome to the online shoe shop\ncategory = {ask} What kind of shoes are you looking for?\n{if} category = high heels\n {print} High heels are 50% off now!" + question_text: In which lines are quotation marks needed to get the code to work? + 3: + hint: The quotation marks are used correctly + mp_choice_options: + - option: The name of the variable is different in line 1 than in line 2. + feedback: Correct! + - feedback: That's not true + option: The quotation marks aren't used correctly in line 2 + - option: You can't use the = sign when using an {ask} command + feedback: That's not true + - feedback: That's not true + option: Nothing is wrong. + code: "favorite_animal = {ask} 'What is your favorite animal?'\n{print} 'I like ' favoriteanimal ' too!'" + correct_answer: A + question_text: What's wrong with this code? + question_score: '10' + 8: + mp_choice_options: + - feedback: No + option: "```\n{print} '7 / 2'\n```" + - option: "```\n{print} 7 / 2\n```" + feedback: That is right! + - option: "```\n{print} 7 : 2\n```" + feedback: No + - feedback: No + option: "```\n{print} 7 * 2\n```" + hint: 7 devided by 2 is 3.5 + code: '3.5' + question_text: Which code was used to create this output? + question_score: '10' + correct_answer: B + 9: + question_score: '10' + mp_choice_options: + - feedback: You won nothing + option: "```\nprizes = 'one' 'million' 'dollars', 'nothing'\n```" + - feedback: You won nothing + option: "```\nprizes = 'one million dollars, nothing'\n```" + - option: "```\nprizes = 'one million dollars', 'nothing'\n```" + feedback: Winner! + - feedback: You won nothing + option: "```\n'prizes' = 'one million dollars', 'nothing'\n```" + hint: The items on the list should be in quotation marks + correct_answer: C + code: "_\n{print} 'You won ' prizes {at} {random} '!'" + question_text: Which code should be filled in in line 1 at the `_`? + 7: + mp_choice_options: + - feedback: Terrific! + option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ncookies\ngrapes" + - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ngrapes" + feedback: There's more options than just one + - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ncheese\ngrapes" + feedback: A vegan person can't have cheese + - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ngrapes\ncookies" + feedback: Almost there, but look at the order of snacks in the list + question_text: Which output does a vegan get? + hint: What item is removed from the list when you answer 'vegan'? + code: "menu = 'cookies', 'cheese', 'grapes'\n{print} \"It's my birthday! I`ve brought some snacks!\"\ndiet = {ask} 'Do you have any dietary restrictions?'\n{if} diet = 'gluten free'\n {remove} 'cookies' {from} menu\n{if} diet = 'vegan'\n {remove} 'cheese' {from} menu\n{print} 'For you I have brought: '\n{for} snack {in} menu\n {print} snack" + question_score: '10' + correct_answer: A + 6: + correct_answer: C + question_text: Which line should be filled in at the `_`? + mp_choice_options: + - feedback: What if you only order fries and a drink? + option: "```\nprice = 14\n```" + - option: "```\nprice = '14'\n```" + feedback: What if you only order fries and a drink? + - feedback: Excellent! + option: "```\nprice = price + 2\n```" + - feedback: Almost there! + option: "```\nprice = + 2\n```" + hint: What if you only order fries and a drink? + code: "{print} 'Welcome to McHedy!'\norder = {ask} 'Would you like a hamburger or fries?'\n{if} order = 'hamburger'\n price = 12\n{if} order = 'fries'\n price = 4\ndrinks = {ask} 'Would you like a drink with that for 2 dollars?'\n{if} drinks = 'yes'\n _\n{print} 'That will be ' price ' dollar please'" + question_score: '10' + 5: + code: "name {is} {ask} 'What is your name?'\n{if} name {is} 'Agent007'\n a {is} 'Go to the airport '\nelse\n a {is} 'Go to the train station '\npassword {is} {ask} 'What is the password?'\n{if} password {is} 'TOPSECRET'\n b {is} 'tomorrow at 02.00'\n{else}\n b {is} 'today at 10.00'\n{print} a + b" + question_text: What output does Agent007 get when they put in the correct password? + mp_choice_options: + - feedback: The agent won't be catching any bad guys here + option: Go to the train station today at 10.00 + - feedback: You've cracked the code! + option: Go to the airport tomorrow at 02.00 + - option: Go to the train station tomorrow at 02.00 + feedback: The agent won't be catching any bad guys here + - option: Go to the airport tomorrow at 10.00 + feedback: The agent won't be catching any bad guys here + question_score: '10' + correct_answer: B + hint: The correct password is TOPSECRET + 13: + 1: + mp_choice_options: + - option: "```\n{if} birthday {and} song = 'yes'\n```" + feedback: Almost there + - feedback: Hedy only sings for you if you like to hear a song + option: "```\n{if} birthday = 'yes' {and} name = 'Hedy'\n```" + - option: "```\n{if} song = 'yes' {and} birthday = 'yes'\n```" + feedback: Super! + - feedback: Hedy only sings if both answers are yes + option: "```\n{if} song = 'yes' {or} birthday = 'yes'\n```" + question_text: Which code should be filled in at the ??? ? + correct_answer: C + code: "name = {ask} 'What is your name?'\nsong = {ask} 'Whould you like to hear a song?'\nbirthday = {ask} 'Is today your birthday?'\n???\n {print} 'Happy Birthday to you!'\n {print} 'Happy Birthday to you!'\n {print} 'Happy Birthday dear ' name\n {print} 'Happy Birthday to you!'" + question_score: '10' + hint: Hedy sings if you want to hear a song and it's you birthday + 3: + question_text: Which output is given to a member without a discount code? + mp_choice_options: + - option: You get a free apple pie! + feedback: Great job! + - option: That will be 5 dollars please + feedback: That is not true + - option: This code won't work, so there is no output + feedback: There is nothing wrong with the code + - feedback: There is! Read the question carefully + option: There is no way of knowing + code: "member = {ask} 'Do you have a membership card?'\ndiscount = {ask} 'Do you have a discount code?'\n{if} member = 'yes' {or} discount = 'yes'\n {print} 'You get a free apple pie!'\n{else}\n {print} 'That will be 5 dollars please'" + hint: Mind the command `{or}` in line 3 + correct_answer: A + question_score: '10' + 2: + hint: Neither vegans nor muslims can eat sausage rolls. + mp_choice_options: + - option: '`{and}`' + feedback: You don't have to be vegan and muslim + - feedback: Great thinking! + option: '`{or}`' + - feedback: No + option: '`+`' + - feedback: No + option: '`{print}`' + correct_answer: B + code: "menu = 'cheese', 'sausage rolls', 'cookies'\ndiet = {ask} 'Do you have any dietary restrictions?'\n{if} diet = 'vegan' ??? diet = 'halal'\n {remove} 'sausage rolls' {from} menu" + question_text: Which command is missing in the code at the place of the ??? ? + question_score: '10' + 4: + mp_choice_options: + - option: "```\n{print} 'you win'\n```" + feedback: You win! + - feedback: You lose! + option: "```\n{print} 'you lose'\n```" + - feedback: It's only a tie if both choices are the same + option: "```\n{print} 'tie'\n```" + - option: "```\n{print} 'try again'\n```" + feedback: Try again! + correct_answer: A + question_score: '10' + hint: Paper beats rock + code: "{if} computer_choice {is} 'rock' {and} your_choice {is} 'paper'" + question_text: Which line of code should follow this line in rock-paper-scissors game? + 7: + question_text: Which statement is false? + mp_choice_options: + - option: The grey cat is called Abby + feedback: This is true! + - option: Milo the orange cat eats 4 scoops of cat nibbles + feedback: This is true + - feedback: Great job! + option: The black hamster needs to be fed a piece of carrot + - option: The yellow bird was fed this morning + feedback: This is true + hint: Read the last 4 lines carefully + question_score: '10' + correct_answer: C + code: "{print} 'Thank you for helping me take care of my pets'\n{print} 'Here is a program to help feed them'\nanimal = {ask} 'What kind of animal are they?'\ncolor = {ask} 'What colour are they?'\n{if} animal = 'cat' {and} color = 'grey'\n {print} 'That is Abby. She eats 3 scoops of cat nibbles'\n{if} animal = 'cat' {and} color = 'orange'\n {print} 'That is Milo. He eats 4 scoops of cat nibbles'\n{if} animal = 'bird' {or} color = 'black'\n {print} 'I fed them this moring! They do not need more food today'\n{if} animal = 'hamster' {and} color = 'brown'\n {print} 'You can feed them a piece of carrot'" + 6: + mp_choice_options: + - option: Michael is a boy with glasses + feedback: Try again + - feedback: Try again + option: Marleen is a girl with glasses + - feedback: Try again + option: Wouter is a boy without glasses + - option: Sophie is a girl with glasses + feedback: Great job! + code: "{print} 'Let me guess which family member you are!'\nglasses = {ask} 'Do you wear glasses?'\nfemale = {ask} 'Are you female?'\n{if} glasses = 'yes' {and} female = 'yes'\n {print} 'You must be Sophie!'\n{if} glasses = 'no' {and} female = 'yes'\n {print} 'You must be Marleen!'\n{if} glasses = 'yes' {and} female = 'no'\n {print} 'You must be Wouter!'\n{if} glasses = 'no' {and} female = 'no'\n {print} 'You must be Michael!'" + question_text: Which statement about this code is true? + hint: Take a good look! Or do you need glasses? + correct_answer: D + question_score: '10' + 9: + mp_choice_options: + - option: "Line 3 should be:\n```\n{if} chocolate = 'yes' {and} sprinkles = 'yes'\n```" + feedback: Correct! + - option: "Line 3 should be: \n```\n{if} chocolate = 'no' {and} sprinkles = 'no'\n```" + feedback: This is not what I ordered! + - option: "Line 5 should be: \n```\n{if} chocolate = 'yes' {and} sprinkles = 'yes'\n```" + feedback: This is not what I ordered! + - option: "Line 7 should be:\n```\n{if} chocolate = 'yes' {and} sprinkles = 'no'\n```" + feedback: This is not what I ordered! + question_text: What is wrong with this code? + code: "1 chocolate = {ask} 'Would you like chocolate sauce on your ice cream?'\n2 sprinkles = {ask} 'Would you like sprinkles on your ice cream?'\n3 {if} chocolate {and} sprinkles = 'yes'\n4 {print} 'Ice cream with chocolate sauce and sprinkles, coming up!'\n5 {if} chocolate = 'yes' {and} sprinkles = 'no'\n6 {print} 'Ice cream with chocolate sauce, coming up!'\n7 {if} chocolate = 'no' {and} sprinkles = 'yes'\n8 {print} 'Ice cream with sprinkles, coming up'\n9 {if} chocolate = 'no' {and} sprinkles = 'no'\n10 {print} 'Just plain icecream, coming up!'" + correct_answer: A + hint: There is a mistake in line 3 + question_score: '10' + 8: + hint: popcorn = yes and drink = no + code: "{print} 'Welcome to the movie theater'\npopcorn = {ask} 'Would you like some popcorn?'\ndrink = {ask} 'Would you like a drink?'\n{if} popcorn = 'yes' {and} drink = 'yes'\n {print} 'That will be 8 dollars please'\n{if} popcorn = 'no' {and} drink = 'yes'\n {print} 'That will be 3 dollars please'\n{if} popcorn = 'yes' {and} drink = 'no'\n {print} 'That will be 5 dollars please'\n{if} popcorn = 'no' {and} drink = 'no'\n {print} 'Ok'\n{print} 'Enjoy the movie'" + mp_choice_options: + - feedback: You have paid too much! + option: "Welcome to the movie theater\nThat will be 8 dollars please\nEnjoy the movie" + - option: "Welcome to the movie theater\nThat will be 5 dollars please\nEnjoy the movie" + feedback: Amazing! + - feedback: That's not enough money! + option: "Welcome to the movie theater\nThat will be 3 dollars please\nEnjoy the movie" + - option: "Welcome to the movie theater\nOk\nEnjoy the movie" + feedback: You have to pay for your popcorn! + question_text: What output do you get if you order popcorn but no drink? + correct_answer: B + question_score: '10' + 5: + mp_choice_options: + - feedback: The prince is a little more picky than that! + option: Every person with shoe size 38 is this prince's one true love + - option: Every person named Cinderella is this prince's one true love + feedback: The prince is a little more picky than that! + - feedback: Fantastic! + option: Every person that is named Cinderella and has shoe size 38 is this prince's one true love + - feedback: The prince is a little more picky than that! + option: Every person that's not named Cinderella and does not have shoe size 38 is this prince's one true love + question_text: Which statement is true about this code? + code: "{if} name = 'Cinderella' {and} shoe_size = 38\n {print} 'You are my one true love!'" + hint: Both statements have to be true + correct_answer: C + question_score: '10' + 10: + question_text: Which command needs to be in line 8 at the place of the ??? ? + mp_choice_options: + - feedback: There are no items that are both the list of snacks and the list of drinks + option: '`{and}`' + - feedback: Great job! + option: '`{or}`' + - option: '`{in}`' + feedback: No + - feedback: No + option: '`{if}`' + question_score: '10' + code: "{print} 'Welcome to the product finder of this supermarkt'\nitem = {ask} 'What product are you looking for?'\nbakery = 'bread', 'buns', 'muffins'\ndrinks = 'soda', 'water', 'lemonade'\nsnacks = 'chips', 'nuts', 'dips'\nfrozen = 'fries', 'icecream', 'pizza'\nfruit = 'bananas', 'apples', 'oranges'\n{if} item {in} snacks ??? item {in} drinks\n {print} 'This item is in aisle 3'\n{if} item {in} bakery {or} item {in} bakery\n {print} 'This item in in the back of the store'\n{if} item {in} fruit\n {print} 'The fruit is sold near the register'" + correct_answer: B + hint: The item is either in the list of snacks, or in the list of drinks + 14: + 6: + question_score: '10' + mp_choice_options: + - feedback: It stops after 2 times + option: 10 times + - option: 0 times + feedback: It stops after 2 times + - option: 1 time + feedback: It stops after 2 times + - feedback: That is correct + option: 2 times + correct_answer: D + question_text: How many times do you have to say you are annoyed before this annoying game stops? + code: "lives = 2\n{repeat} 10 {times}\n {if} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n {if} answer == 'yes'\n lives = lives - 1" + hint: "!= means 'is not'" + 7: + mp_choice_options: + - feedback: That's not quite right. + option: "`'Lower'` and `'Higher'` and `'You win!'`" + - option: "`'Higher'` and `'Lower'` and `'You win!'`" + feedback: You win! + - option: "`'You win!'` and `'Lower!'` and `'Higher'`" + feedback: That's not quite right. + - option: "`'Lower!'` and `'You win!'` and `'Higher!'`" + feedback: That's not quite right. + hint: The last one should say you win. + correct_answer: B + question_text: What should be filled in on the three blanks? + question_score: '10' + code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'" + 8: + question_text: Which statement is true about this roller coaster? + mp_choice_options: + - option: You must be taller than 120 cm to go on the roller coaster + feedback: True! + - feedback: If you are 120 cm you won't get in + option: You must be taller than 119 cm to go on the roller coaster + - feedback: '> means greater than' + option: You must be shorter than 120 cm to go on the roller coaster + - option: There are no length restrictions to go on the roller coaster + feedback: There are. + correct_answer: A + hint: '> means greater than' + code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'" + question_score: '10' + 1: + mp_choice_options: + - feedback: This is not a symbol. + option: '`=>`' + - option: '`==`' + feedback: We are not comparing anything, just asking. + - option: '`!=`' + feedback: We are not comparing anything, just asking + - feedback: Right! + option: '`=`' + code: "name _ {ask} 'Who are you?'\n{if} name == 'Hedy'\n {print} 'Me too!'" + hint: We are not comparing anything, we are just asking a name. + question_text: Which symbol should be used on the blank? + question_score: '10' + correct_answer: D + 2: + mp_choice_options: + - feedback: No + option: '{if} name = Hedy' + - option: '{if} age = 24' + feedback: No + - option: answer = {ask} 'What is your answer' + feedback: Yes! + - feedback: No + option: answer == {ask} 'How are you doing?' + correct_answer: C + question_score: '10' + hint: When you are comparing two answers you should use == + question_text: Which of these codes has used the correct = or == symbol? + 4: + hint: The symbols are right + mp_choice_options: + - option: In line 1 == should be used instead of = + feedback: No that's not it + - option: Line 2 misses quotation marks + feedback: You are correct + - feedback: No that's not it + option: In line 4 = should have been used instead of == + - option: In line 4 <= should have been used instead of >= + feedback: No that's not it + code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price {and} buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'" + question_text: What's wrong with this code? + correct_answer: B + question_score: '10' + 5: + mp_choice_options: + - feedback: 12 year olds are allowed too + option: '`> 12`' + - feedback: Great! + option: '`>= 12`' + - option: '`< 12`' + feedback: These kids are too young! + - feedback: These kids are too young + option: '`<= 12`' + hint: '> means greater than' + code: "age = {ask} 'How old are you?'\nticket = {ask} 'Do you have a ticket?'\n{if} age _ {and} ticket == 'yes'\n {print} 'You can enter the movie theater.'\n{else}\n {print} 'You are not allowed to come in!'" + question_score: '10' + question_text: Which symbol should be filled in on the blanks if the movie is suitable for kids for the age of 12 and up? + correct_answer: B + 10: + correct_answer: B + mp_choice_options: + - feedback: Look at who has the highest score! + option: "'player 1 wins'" + - option: "'player 2 wins'" + feedback: Yes! + - option: "'player 2 loses'" + feedback: Look at who has the highest score! + - feedback: No it's not, one player has a higher score + option: "'It is a tie'" + hint: You win the game by having the most points + code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _" + question_text: What should be filled in in the blanks? + question_score: '10' + 9: + mp_choice_options: + - option: 1 or more + feedback: No + - option: 2 or more + feedback: No + - option: 8 or more + feedback: Almost + - feedback: Great! + option: 9 or more + code: "chocolate = {ask} 'How many pieces of chocolate have you eaten?'\n {if} chocolate <= 2\n {print} 'That is a healthy amount'\n {if} chocolate > 2 {and} chocolate =< 8\n {print} 'That is a bit much'\n {if} chocolate > 8\n {print} 'You will get a stomach ache!'" + hint: '> 8 means more than 8' + question_text: How many pieces of chocolate will give you a stomach ache according to this fitbit? + question_score: '10' + correct_answer: D + 3: + question_score: '10' + mp_choice_options: + - option: '`>` and `<`' + feedback: That's not it + - option: '`=` and `>=`' + feedback: That's not it + - option: '`<` and `>=`' + feedback: You are right + - option: '`+` and `==`' + feedback: That's not it + correct_answer: C + code: "guests = {ask} 'How many people are at the party?'\n{if} guests _ 130\n {print} 'You can come in!'\n{if} guests _ 130\n {print} 'Im sorry, the club is full. '\n {print} 'You have to wait for a guest to leave'" + hint: There are 130 people allowed in the club + question_text: Which symbols should be filled in on the two blanks? + 15: + 5: + correct_answer: C + hint: wetness should get less each time + mp_choice_options: + - option: "```\n = wetness\n```" + feedback: That will not change anything + - feedback: You can't have two times = in one line + option: "```\n = wetness = 1\n```" + - option: "```\n = wetness - 1\n```" + feedback: You are correct! + - feedback: The program should count down + option: "```\n = wetness + 1\n```" + question_text: What should be placed on the blank to make this program work correctly? + question_score: '10' + code: "wetness = 10\n{while} wetness != 0\n {print} 'Your hair is still wet, hair dryer on!'\n {sleep} 1\n {clear}\n wetness _\n\n{print} 'All dry!'" + 9: + mp_choice_options: + - feedback: No + option: Nothing. 1600 is not programmed into the app. + - feedback: No + option: You could eat some more + - option: That is alright + feedback: Yes! + - option: You have eaten enough for today + feedback: No + hint: 1600 is between 1000 and 2000 + question_score: '10' + correct_answer: C + code: "calories = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 {and} calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'" + question_text: What will the diet app say if you have eaten 1600 calories today? + 1: + mp_choice_options: + - feedback: That is not right. + option: '`=!`' + - option: '`==`' + feedback: You don't have to keep guessing if you've given the right answer. + - feedback: Correct + option: '`!=`' + - feedback: That's not it + option: '`=`' + correct_answer: C + hint: Keep guessing until you say Amsterdam + question_score: '10' + code: "answer = 0\n{while} answer _ 'Amsterdam'\n answer = {ask} 'What is the capital city of the Netherlands?'\n{print} 'You have given the correct answer'" + question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.' + 4: + question_text: What's wrong with this code? + mp_choice_options: + - option: In line 1 `==` should be used instead of `=` + feedback: No that's not it + - option: Line 2 misses quotation marks + feedback: That's not right + - feedback: That's not it + option: In line 5 `{if}` should have been used instead of `{while}` + - feedback: You are correct + option: In line 5 `!=` should have been used instead of `==` + code: "options = 1, 2, 3, 4, 5, 6\n{print} 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\n{while} thrown == 6\n thrown = options {at} {random}\n {print} 'You threw ' thrown\n tries = tries + 1\n{print} 'Yes! You have thrown 6 in ' tries ' tries.'" + hint: There is something wrong in line 5 + question_score: '10' + correct_answer: D + 3: + code: "_ age < 18\n {print} 'you are not allowed in this bar'" + mp_choice_options: + - option: '`{in}`' + feedback: That's not it + - option: '`{while}`' + feedback: You are right + - option: '`{for}`' + feedback: That's not it + - option: '`{range}`' + feedback: That's not it + question_score: '10' + question_text: Which command should be filled in on the blank? + correct_answer: B + hint: You are not allowed in the bar as long as you are 17 or younger + 2: + mp_choice_options: + - feedback: No + option: "```\n{while} name = Hedy\n```" + - option: "```\n{while} age = 24\n```" + feedback: No + - feedback: Yes! + option: "```\n{while} time > 0\n```" + - option: "```\n{while} answer == yes'\n```" + feedback: A quotation mark is missing + question_text: Which of these codes has used the correct symbol(s)? + hint: When you are comparing two answers you should use == + question_score: '10' + correct_answer: C + 7: + hint: The last one should say you win. + question_score: '10' + mp_choice_options: + - option: '... change the first `{if}` into a `{while}`' + feedback: Perfect! + - feedback: That's not quite right. + option: '... change the second `{if}` into a `{while}`' + - feedback: That's not quite right. + option: '... change the third `{if}` into a `{while}`' + - feedback: That's not quite right. + option: '... change the fourth `{if}` into a `{while}`' + correct_answer: A + question_text: How should this program be changed so that it works? + code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'" + 6: + mp_choice_options: + - option: '`{while}` should be`{if}`' + feedback: No that is not right + - feedback: No that is not right + option: '`{if}` should be `{while}`' + - option: Line 3 should start with more indentation + feedback: No that's not right + - feedback: That is correct + option: Line 2 should start with less indentation + hint: Look closely at the indentation + correct_answer: D + question_text: What is wrong with this code? + question_score: '10' + code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n {if} answer == 'yes'\n lives = lives - 1" + 8: + mp_choice_options: + - option: The lights and air freshener will turn off after 1 minute + feedback: False! + - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet + feedback: Great job + - option: The air freshener sprays once you leave the toilet. + feedback: It only sprays when you're in there. + - feedback: That wouldn't be right. + option: The lights will always stay on. + hint: The block after the {while} command keeps happening while the toilet is occupied. + code: "{while} toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n {sleep} 60\nlights = 'off'\nair_freshener_sprays = 'no'" + question_score: '10' + correct_answer: B + question_text: Which statement is true about this automated toilet system? + 10: + hint: You win the game by having the most points. Your name should appear on the screen + correct_answer: A + mp_choice_options: + - option: "```\n name_player_1\n```" + feedback: You are right! + - feedback: No they are losing! + option: "```\n name_player_2\n```" + - feedback: You should fill in a name, not a number + option: "```\n points_player_1\n```" + - feedback: You should fill in a name, not a number + option: "```\n points_player_2\n```" + question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.' + question_score: '10' + code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'" + 16: + 1: + mp_choice_options: + - feedback: This is the old way. + option: '`snacks {at} {random}`' + - option: '`[{random} snack]`' + feedback: The order is wrong. + - option: '`snacks[{random}]`' + feedback: Correct + - option: '`snacks[{at} {random}]`' + feedback: We do not need `at`anymore + code: "snacks = nachos, chips, cucumber, sweets\n{print} _" + question_score: '10' + correct_answer: C + hint: We no longer use {at} + question_text: Which command should be filled in on the blanks to print a random snack? + 8: + correct_answer: B + mp_choice_options: + - option: "```\nteams = ['Macy and Kate', 'Lionell and Raj', 'Kim and Leroy']\nposition = ['first', 'second', 'third']\n{for} i {in} {range} 0 {to} 3\n{print} teams[random] ' get to go ' position[i]\n```" + feedback: This is not right + - option: "```\nteams = ['Macy and Kate', 'Lionell and Raj', 'Kim and Leroy']\nposition = ['first', 'second', 'third']\n{for} i {in} {range} 1 {to} 3\n {print} teams[i] ' get to go ' position[i]\n```" + feedback: Amazing! + - feedback: This is not it. + option: "```\nteams = ['Macy', 'Kate', 'Lionell', 'Raj', 'Kim', 'Leroy']\nposition = ['first', 'second', 'third']\n{for} i {in} {range} 1 {to} 6\n {print} teams[random] ' get to go ' position[random]\n```" + - option: "```\nteams = ['Macy and Kate' 'Lionell and Raj' 'Kim and Leroy']\nposition = ['first' 'second' 'third']\n{for} teams {in} {range} 0 {to} 3\n {print} teams[i] ' get to go ' position[i]\n```" + feedback: This is not going to work! + code: "Macy and Kate get to go first\nLionell and Raj get to go second\nKim and Leroy get to go third" + hint: If you look carefully at the first line, you'll see that only the first two answers are possibly correct. + question_score: '10' + question_text: Which of these codes belongs to this output? + 7: + mp_choice_options: + - feedback: That is not right. + option: Line 1 needs less quotation marks + - feedback: It should not! + option: Line 3 should start with indentation + - feedback: It should not + option: Line 4 should start without indentation + - feedback: Amazing! + option: Line 4 needs more quotation marks. + question_text: What's wrong with this code? + correct_answer: D + code: "people = ['Savi', 'Senna', 'Fayenne']\ntransportation = ['bike', 'train', 'car']\n{for} i {in} {range} 1 {to} 3\n {print} people[i] goes to school by transportation[i]" + hint: There is a mistake made in the usage of quotation marks. + question_score: '10' + 10: + mp_choice_options: + - feedback: Almost there... but adding the winner to the list makes this raffle unfair + option: "```\nchosen_number = list_of_numbers at random\nprint books[i] ' will go to person number ' chosen_number\n{add} chosen_number {to} list_of_numbers\n```" + - option: "```\nprint person[i] ' wins ' book[i]\n```" + feedback: There is no list called 'person' + - feedback: This is not it. + option: "```\nchosen_number = list_of_numbers[people]\nprint books[people] ' will go to person number ' chosen_number\n{remove} chosen_number {from} list_of_numbers\n```" + - option: "```\nchosen_number = list_of_numbers[random]\nprint books[i] ' will go to person number ' chosen_number\n{remove} chosen_number {from} list_of_numbers\n```" + feedback: Fantastic! + hint: You need to use the {remove} command + correct_answer: D + code: "{print} 'The book raffle will start soon'\n{print} 'Get your tickets now!'\nbooks = ['Narnia', 'The Hobbit', 'Oliver Twist', 'Harry Potter', 'Green eggs and ham']\npeople = {ask} 'How many raffle tickets are sold?'\nlist_of_numbers = [1, 2]\n{for} i {in} {range} 3 {to} people\n {add} i {to} list_of_numbers\n{for} i {in} {range} 1 {to} 5" + question_text: Which 3 lines will complete this code correctly? + question_score: '10' + 9: + code: "countries = ['Canada', 'Zimbabwe', 'New Zealand']\n{for} i {in} {range} 0 {to} 1\n {print} 'I will travel to ' countries[random]" + mp_choice_options: + - option: "```\nI will travel to Canada\nI will travel to Canada\n```" + feedback: Great job! + - feedback: It will be repeated twice + option: "```\nI will travel to Canada\n```" + - feedback: This is not it. + option: "```\nI will travel to Canada, Zimbabwe and New Zealand\n```" + - feedback: It's only repeated twice + option: "```\nI will travel to Canada\nI will travel to Zimbabwe\nI will travel to New Zealand\n```" + hint: Range 0 to 1 is 2 times + question_score: '10' + question_text: What is a possible output for this code? + correct_answer: A + 2: + mp_choice_options: + - feedback: Mind the spacing. + option: "```\nfriends[i] has to do chores [i]\n```" + - option: "```\nfriends[1] has to do chores[1]\n```" + feedback: It will print 3 times that Wesley has to do the cooking + - feedback: The person has to do the chore, not the other way around + option: "```\nchores[i] ' has to do ' friends[random]\n```" + - option: "```\nfriends[i] ' has to do ' chores[i]\n```" + feedback: Fantastic! + code: "friends = ['Wesley', 'Eric', 'Kaylee']\nchores = ['the cooking', 'the cleaning', 'nothing']\n{for} i {in} {range} 1 {to} 3\n {print} _" + question_text: What should be filled in on the blanks if you want a list of what chores are done by whom? + hint: '`i` tells us what item in the list it is. So friend 1 does chore 1 etc.' + correct_answer: D + question_score: '10' + 3: + code: "friends = ['Wesley', 'Eric', 'Kaylee']\nchore = ['the cooking', 'the cleaning', 'nothing']\n{for} i {in} {range} 1 {to} 3\n {print} friends[i] has to do chores[i]" + mp_choice_options: + - feedback: Super! + option: "```\nWesley has to do the cooking\nEric has to do the cleaning\nKaylee has to do nothing\n```" + - option: "```\nKaylee has to do the cooking\nWesley has to do the cleaning\nEric has to do nothing\n```" + feedback: No, it is not random. + - feedback: Poor Wesley! + option: "```\nWesley has to do the cooking\nWesley has to do the cleaning\nWesley has to do the nothing\n```" + - feedback: That's not it + option: "```\nWesley has to do the cooking\nWesley has to do the cooking\nWesley has to do the cooking\n```" + hint: It's not random... + correct_answer: A + question_score: '10' + question_text: What is a possible output for this program? + 5: + mp_choice_options: + - option: "```\n noises = ['moo', 'woof', 'neigh']\n```" + feedback: Mind the variable name and the order of the sounds. + - feedback: Look at line one to see how brackets are supposed to be used. + option: "```\n sounds = '[woof], [moo], [neigh]'\n```" + - feedback: Don't forget the quotation marks! + option: "```\n sounds = [woof, moo, neigh]\n```" + - feedback: Great job! + option: "```\n sounds = ['woof', 'moo', 'neigh']\n```" + hint: Look at line 1 to see proper use of brackets and quotation marks. + question_score: '10' + question_text: Which line should be filled in in the blank? + correct_answer: D + code: "animals = ['dog', 'cow', 'horse']\n_\n{for} i {in} {range} 1 {to} 3\n {print} 'the ' animals[i] ' says ' sounds[i]" + 6: + mp_choice_options: + - option: You are not allowed to use the variable o. It should be named i. + feedback: i is the most commonly used variable name in this case, but it's not mandatory to use i. + - feedback: No, he likes minecraft. + option: The output will say that Jaylino likes fortnite. + - feedback: Correct + option: The output will say that Ryan likes fifa + - option: This code will not work. It will give and error. + feedback: No, the code is correct. + question_score: '10' + correct_answer: C + code: "people = ['Chris', 'Jaylino', 'Ryan']\ngames = ['fortnite', 'minecraft', 'fifa']\n{for} o {in} {range} 1 {to} 3\n {print} people[o] ' likes ' games[o]" + hint: There is nothing wrong with this code. + question_text: Which statement is true? + 4: + mp_choice_options: + - option: The variable in line 4 should be `friend[i]`, not `friends[i]` + feedback: That is not right. + - option: Line 3 should say `in range 1 to 3` not `in range 0 to 3` + feedback: Good catch! + - feedback: It's not a variable, it's just text. + option: Line 4 should say 'lucky_number', not 'lucky number + - feedback: That's not it + option: '{in} in line 3 should be removed' + correct_answer: B + hint: There's nothing wrong with line 4 + code: "friends = ['Jaylee', 'Erin', 'Fay']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 0 {to} 3\n print 'the lucky number of ' friends[i]\n print 'is ' lucky_numbers[i]" + question_score: '10' + question_text: What is wrong with this code? + 17: + 1: + mp_choice_options: + - option: "```\nm i n i o n s\n```" + feedback: This is not it. + - feedback: Correct! + option: "```\nBob\nKevin\nStuart\n```" + - option: "```\nminions\nminions\nminions\n```" + feedback: Take a look at the content of your list. + - option: "```\nB o b K e v i n S t u a r t\n```" + feedback: Do not loop through the letters. + correct_answer: B + question_score: '10' + question_text: What is the output of this code? + hint: Loop through your list. + code: "minions = ['Bob', 'Kevin', 'Stuart']\n{for} x in minions:\n {print} x" + 2: + mp_choice_options: + - option: You cannot have so many variables. + feedback: This is not it. + - feedback: Not true! + option: The way the variables are multiplied is incorrect. + - feedback: Keep looking for the mistake. + option: One of the variables `noleap_year` does not belong with the `{if}` statement. + - option: The `noleap_year` has to be identical in both cases. + feedback: Correct! + correct_answer: D + hint: Read the code carefully. + code: "seconds_minute = 60\nminute_hour = 60\nhour_day = 24\nleap_year = 366\nno_leap_year = 365\nyears = ask 'what year is it?'\n{if} years = 2024:\n print seconds_minute * minute_hour * hour_day * leap_year\n{else}:\n print seconds_minute * minute_hour * hour_day * noleap_year" + question_text: What is wrong with this code? + question_score: '10' + 3: + hint: Think about how many times you need repeating. + mp_choice_options: + - option: "```\n🦔\n🦔\n🦔\n```" + feedback: Try again. + - feedback: One more try. + option: "```\n🦔\n🦔\n```" + - option: "```\n🦔\n🦔\n🦔\n🦔\n🦔\n🦔\n```" + feedback: Well done! + - feedback: That is not it. + option: "```\n🦔\n🦔\n🦔\n🦔\n🦔\n```" + code: "{for} x in range 1 to 3:\n {for} y in range 1 to 2:\n {print} 🦔" + correct_answer: C + question_score: '10' + question_text: How many hedgehogs will this code print? + 6: + question_score: '10' + correct_answer: D + code: "name = {ask} 'What is your name?'\n{if} name == 'Hedy':\n password = {ask} 'What is your password?'\n {if} password =='turtle123':\n {print} 'Yey'\n {else}:\n {print} 'Access denied'\n{else}:\n {print} 'Go fish'" + mp_choice_options: + - feedback: Try again. + option: '`{elif}` is missing.' + - option: '`{else}` can only be used once.' + feedback: From now on we can use elif multiple times. + - option: Nothing! + feedback: There is a mistake. Look carefully! + - feedback: Amazing! + option: There is an indentation mistake in the last line. + hint: There is a mistake somewhere... + question_text: What is wrong with code? + 8: + hint: Read the code carefully. + question_score: '10' + mp_choice_options: + - option: '`{or}` cannot be used with `{if}`.' + feedback: Try again. + - option: In the `{for}` command `insect` should be `insects`. + feedback: Not true. + - feedback: Well done! + option: Nothing! + - option: There is an indentation mistake in the last line. + feedback: Nope. + question_text: What is wrong with code? + correct_answer: C + code: "insects = ['🐝', '🦋', '🕷', '🐞']\nyour_favorite = {ask} 'what is your favorite insect?'\n{for} insect in insects:\n {if} your_favorite == '🐝' {or} your_favorite == '🐞':\n {print} 'very useful'\n {elif} your_favorite == '🕷':\n {print} 'it can catch mosquitoes'\n {else}:\n {print} 'almost all insects can be useful one way or another'" + 9: + mp_choice_options: + - feedback: Try again! + option: "```\n {for} number in range -5 to 3:\n {if} number > 0: \n {print} number ' is positive'\n {elif} number < 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + - feedback: That is not it. + option: "```\n {for} number in range -5 to 3:\n {if} number > 0: \n {print} number ' is positive'\n {elif} number <= 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + - option: "```\n {for} number in range -5 to 3:\n {if} number >= 0: \n {print} number ' is positive'\n {elif} number < 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + feedback: Very good! + - option: "```\n {for} number in range -5 to 3:\n {if} number < 0: \n {print} number ' is positive'\n {elif} number <=0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + feedback: That is not it. + hint: Read the code carefully. + correct_answer: C + question_score: '10' + question_text: Which one of the codes below gave this output? + code: "-5 is negative\n-4 is negative\n-3 is negative\n-2 is negative\n-1 is negative\n0 is positive\n1 is positive\n2 is positive\n3 is positive" + 10: + question_text: What is wrong with this code? + code: "{for} number in range 1 to 5:\n volume_room = num * num * num\n {print} volume_room ' cubic meters'\n {if} volume_room > 100:\n {print} 'this is a large room'\n {elif} volume_room < 100:\n {print} 'small room but cosy'\n {else}:\n {print} 'i will look for something else'" + mp_choice_options: + - feedback: Try again. + option: The word num needs quotation marks. + - feedback: Not true. + option: The `{if}` command is not used correctly. + - option: Line 3 should be `volume_room = number * number * number`. + feedback: Well done! + - option: There is an indentation mistake in the last line. + feedback: Nope. + question_score: '10' + hint: Read the code carefully. + correct_answer: C + 4: + correct_answer: D + mp_choice_options: + - feedback: Try again. + option: The first `{elif}` should be used before the `print` command + - feedback: From now on we can use elif multiple times. + option: '`{elif}` can only be used once' + - feedback: Not correct. + option: '`==` used with `{elif}` should be replaced by `=`' + - feedback: Great! + option: '`{elif}` in the last line should be replaced by `{else}`' + question_text: What is wrong with code? + code: "name_color = {ask} 'What is your favorite color?'\n{if} name_color == 'red':\n {print} 'the color of a tomato'\n{elif} name_color == 'green':\n {print} 'the color of an apple'\n{elif} name_color == 'blue':\n {print} 'the color of a blueberry'\n{elif} name_color == 'yellow':\n {print} 'the color of a banana'\n{elif}:\n {print} 'this fruit-color does not exist'" + question_score: '10' + hint: Think about `{if}`, `{elif}`, `{else}`. + 5: + mp_choice_options: + - option: "```\n7\nanother number\nanother number\nanother number\nanother number\n71\n79\n97\n```" + feedback: Well done! + - option: "```\nanother number\n19\n29\n41\n53\n71\n79\n97\n```" + feedback: Try again. + - option: "```\n7\n19\n29\n41\n53\n71\n79\nanother number\n```" + feedback: One more try. + - option: "```\n7\n19\n29\n41\n53\n71\n79\n97\n```" + feedback: That is not it. + question_score: '10' + code: "numbers = [7, 19, 29, 41, 53, 71, 79, 97]\n{for} prime in numbers:\n {if} prime <= 10:\n {print} prime\n {elif} prime >= 60:\n {print} prime\n {elif} prime >= 90:\n {print} prime\n {else}:\n {print} 'another number'" + question_text: What is the output of this code? + hint: Think about how many times you need repeating and the values of if and elif. + correct_answer: A + 7: + question_score: '10' + mp_choice_options: + - feedback: Try again! + option: "```\n numbers = [1, 2 , 3, 4, 5]\n {for} n in numbers:\n result = n * 1\n {print} 'The result is ' result\n```" + - option: "```\nnumbers = [1, 2, 3, 4, 5]\n {for} u in numbers:\n number = u\n {print} 'The result is ' number\n```" + feedback: That is not it. + - option: "```\nnumbers = [1, 2, 3, 4, 5]\n {for} number in numbers:\n number = 3\n {print} 'The result is ' number\n```" + feedback: Very good! + - option: "```\nnumbers = [1, 2 , 3, 4, 5]\n {for} n in numbers:\n n = result\n {print} 'The result is ' result\n```" + feedback: That is not it. + hint: Think about mathematical symbols. + question_text: Which of the following codes will print five times 'the result is 3' on the screen? + correct_answer: C diff --git a/content/quizzes/nl.yaml b/content/quizzes/nl.yaml index 398149ca021..e76820972b5 100644 --- a/content/quizzes/nl.yaml +++ b/content/quizzes/nl.yaml @@ -529,7 +529,7 @@ levels: correct_answer: B question_score: '10' 6: - question_text: Wat is het foutje in deze code? + question_text: Wat is er mis met deze code? code: |- vraag {is} {ask} Wat wil je weten? {print} vraag @@ -567,7 +567,7 @@ levels: correct_answer: C question_score: '10' 8: - question_text: Wat is de uitvoer van deze code? + question_text: Wat is het resultaat van deze code? code: |- chips {is} naturel, paprika, cheese onion {remove} naturel {from} chips @@ -586,7 +586,7 @@ levels: correct_answer: D question_score: '10' 9: - question_text: Wat is er fout in deze code? + question_text: Wat is er mis met deze code? code: |- kleuren {is} blauw, paars, groen gekozen_kleur {is} {ask} Welke kleur wil je echt niet? @@ -3494,7 +3494,7 @@ levels: question_score: '10' 16: 1: - question_text: Which command should be filled in on the blanks to print a random snack? + question_text: Welk commando moet je op de lege plekken invullen om een willekeurige snack te printen? code: |- snacks = nachos, chips, cucumber, sweets {print} _ @@ -3511,10 +3511,10 @@ levels: correct_answer: C question_score: '10' 2: - question_text: What should be filled in on the blanks if you want a list of what chores are done by whom? + question_text: Wat moet je op de lege plekken invullen als je wilt weten welke klusjes door wie worden uitgevoerd? code: |- - friends = ['Wesley', 'Eric', 'Kaylee'] - chores = [the cooking, the cleaning, nothing] + vrienden = ['Wesley', 'Eric', 'Kaylee'] + klusjes = ['koken', 'schoonmaken', 'niks doen'] {for} i {in} {range} 1 {to} 3 {print} _ mp_choice_options: @@ -3542,12 +3542,12 @@ levels: correct_answer: D question_score: '10' 3: - question_text: What is a possible output for this program? + question_text: Wat is een mogelijk resultaat voor dit programma? code: |- - friends = ['Wesley', 'Eric', 'Kaylee'] - chore = [the cooking, the cleaning, nothing] + vrienden = ['Wesley', 'Eric', 'Kaylee'] + klusjes = ['koken', 'schoonmaken', 'niks doen'] {for} i {in} {range} 1 {to} 3 - {print} friends[i] has to do chores[i] + {print} vrienden[i] ' moet ' klusjes[i] mp_choice_options: - option: |- ``` @@ -3581,7 +3581,7 @@ levels: correct_answer: A question_score: '10' 4: - question_text: What is wrong with this code? + question_text: Wat is er mis met deze code? code: |- friends = ['Jaylee', 'Erin', 'Fay'] lucky_numbers = [15, 18, 6] @@ -3601,7 +3601,7 @@ levels: correct_answer: B question_score: '10' 5: - question_text: Which line should be filled in in the blank? + question_text: Welke regel moet er op de lege plek worden ingevuld? code: |- animals = ['dog', 'cow', 'horse'] _ @@ -3620,7 +3620,7 @@ levels: correct_answer: D question_score: '10' 6: - question_text: Which statement is true? + question_text: Welke stelling is waar? code: |- people = ['Chris', 'Jaylino', 'Ryan'] games = ['fortnite', 'minecraft', 'fifa'] @@ -3639,7 +3639,7 @@ levels: correct_answer: C question_score: '10' 7: - question_text: What's wrong with this code? + question_text: Wat is er mis met deze code? code: |- people = ['Savi', 'Senna', 'Fayenne'] transportation = ['bike', 'train', 'car'] @@ -3658,7 +3658,7 @@ levels: correct_answer: D question_score: '10' 8: - question_text: Which of these codes belongs to this output? + question_text: Welke code hoort bij dit resultaat? code: |- Macy and Kate get to go first Lionell and Raj get to go second @@ -3700,7 +3700,7 @@ levels: correct_answer: B question_score: '10' 9: - question_text: What is a possible output for this code? + question_text: Wat is een mogelijk resultaat voor deze code? code: |- countries = ['Canada', 'Zimbabwe', 'New Zealand'] {for} i {in} {range} 0 {to} 1 @@ -3733,7 +3733,7 @@ levels: correct_answer: A question_score: '10' 10: - question_text: Which 3 lines will complete this code correctly? + question_text: Welke 3 regels maken deze code compleet? code: |- {print} 'The book raffle will start soon' {print} 'Get your tickets now!' @@ -3775,7 +3775,7 @@ levels: question_score: '10' 17: 1: - question_text: What is the output of this code? + question_text: Wat is het resultaat van deze code? code: |- minions = ['Bob', 'Kevin', 'Stuart'] {for} x in minions: @@ -3809,7 +3809,7 @@ levels: correct_answer: B question_score: '10' 2: - question_text: What is wrong with this code? + question_text: Wat is er mis met deze code? code: |- seconds_minute = 60 minute_hour = 60 @@ -3834,7 +3834,7 @@ levels: correct_answer: D question_score: '10' 3: - question_text: How many hedgehogs will this code print? + question_text: Hoeveel egels worden er met deze code geprint? code: |- {for} x in range 1 to 3: {for} y in range 1 to 2: @@ -3876,7 +3876,7 @@ levels: correct_answer: C question_score: '10' 4: - question_text: What is wrong with code? + question_text: Wat is er mis met deze code? code: |- name_color = {ask} 'What is your favorite color?' {if} name_color == 'red': @@ -3902,7 +3902,7 @@ levels: correct_answer: D question_score: '10' 5: - question_text: What is the output of this code? + question_text: Wat is het resultaat van deze code? code: |- numbers = [7, 19, 29, 41, 53, 71, 79, 97] {for} prime in numbers: @@ -3967,7 +3967,7 @@ levels: correct_answer: A question_score: '10' 6: - question_text: What is wrong with code? + question_text: Wat is er mis met deze code? code: |- name = {ask} 'What is your name?' {if} name == 'Hedy': @@ -4029,7 +4029,7 @@ levels: correct_answer: C question_score: '10' 8: - question_text: What is wrong with code? + question_text: Wat is er mis met deze code? code: |- insects = ['🐝', '🦋', '🕷', '🐞'] your_favorite = {ask} 'what is your favorite insect?' @@ -4053,7 +4053,7 @@ levels: correct_answer: C question_score: '10' 9: - question_text: Which one of the codes below gave this output? + question_text: Welke van de onderstaande codes geeft dit resultaat? code: |- -5 is negative -4 is negative @@ -4077,7 +4077,7 @@ levels: correct_answer: C question_score: '10' 10: - question_text: What is wrong with this code? + question_text: Wat is er mis met deze code? code: |- {for} number in range 1 to 5: volume_room = num * num * num diff --git a/content/quizzes/ta.yaml b/content/quizzes/ta.yaml new file mode 100644 index 00000000000..af20594b364 --- /dev/null +++ b/content/quizzes/ta.yaml @@ -0,0 +1,4223 @@ +levels: + 1: + 1: + question_text: What's this programming language called? + mp_choice_options: + - option: Hedy + feedback: Good job! + - option: Heddy + feedback: Not this one! + - option: Haydie + feedback: Not this one! + - option: Heidi + feedback: Not this one! + hint: It's named after Hedy Lamarr. + correct_answer: A + question_score: '10' + 2: + question_text: Which need to be filled in on the blanks to make the text Hello! appear? + code: _ Hello! + mp_choice_options: + - option: '`{echo}`' + feedback: '`{echo}` repeats a given answer.' + - option: '`{print}`' + feedback: Correct! + - option: '`hello`' + feedback: Hello isn't a command. + - option: '`{ask}`' + feedback: With `{ask}`, you can ask a question. + hint: _ Hello world! + correct_answer: B + question_score: '10' + 3: + question_text: How do you ask what someone's favorite color is? + mp_choice_options: + - option: |- + ``` + {print} What is your favorite color? + ``` + feedback: '`{print}` prints text, but it doesn''t ask questions.' + - option: |- + ``` + {ask} {print} What is your favorite color? + ``` + feedback: You only need one command, not two. + - option: |- + ``` + {ask} What is your favorite color? + ``` + feedback: Great! + - option: |- + ``` + {echo} What is your favorite color? + ``` + feedback: '`{echo}` repeats your answer back to you.' + hint: You can ask something with the `{ask}` command + correct_answer: C + question_score: '10' + 4: + question_text: What is wrong with this code? + code: |- + Hi Im Hedy! + {ask} Who are you? + {echo} Hi... + mp_choice_options: + - option: '`{print}` in line 1 is missing.' + feedback: Correct! + - option: The command in line 2 is spelled wrong. + feedback: The command is spelled correctly. + - option: '`{echo}` isn''t a command.' + feedback: '`{echo}` is a command, there''s another mistake.' + - option: Nothing! This is a perfect code! + feedback: Wrong, look carefully! + hint: Line 1 doesn't seem right + correct_answer: A + question_score: '10' + 5: + question_text: Which command is missing in line 2? + code: |- + {ask} What is your favorite pet? + _ So your favorite pet is... + mp_choice_options: + - option: '`{print}`' + feedback: No, you would like the answer to be repeated back to you. + - option: '`Hedy`' + feedback: Hedy isn't a command. + - option: '`{ask}`' + feedback: With `{ask}` you can ask a question. + - option: '`{echo}`' + feedback: Right on! + hint: You want to see the answer at the end of line 2... + correct_answer: D + question_score: '10' + 6: + question_text: What's wrong with this code? + code: |- + {print} Hi im Hedy! + {print} Which football team do you support? + {echo} You support... + {print} Cool! Me too! + mp_choice_options: + - option: In line 1 `{print}` should be replaced with `{ask}`. + feedback: '`{print}` in line 1 is correct.' + - option: In line 2, `{print}` should be replaced with `{ask}`. + feedback: Great! You paid attention! + - option: Line 3 has to begin with `{print}` instead of `{echo}`. + feedback: '`{echo}` is correct.' + - option: In line 4, `{print}` is spelled wrong. + feedback: No, there is a mistake somewhere else + hint: Check the `{print}` commands. + correct_answer: B + question_score: '10' + 7: + question_text: What's wrong with this code? + code: |- + {print} Welcome at Hedys restaurant! + {ask} What would you like to eat? + {echo} So you want to order ... + {print} Coming right up! Enjoy! + mp_choice_options: + - option: In line 1 `{print}` needs to be replaced with `{ask}` + feedback: Are you sure something is wrong? + - option: In line 1 `{print}` needs to be replaced with `{echo}` + feedback: Are you sure something's wrong? + - option: In line 3 `{echo}` needs to be replaced with `{print}` + feedback: Are you sure something is wrong? + - option: Nothing! This is a perfect code! + feedback: Correct! + hint: Check the code line by line + correct_answer: D + question_score: '10' + 8: + question_text: How do you use the `{echo}` command? + mp_choice_options: + - option: You can use it to `{ask}` a question. + feedback: That's what `{ask}` is for! + - option: You can use it exactly the same way as `{print}`. + feedback: That's what `{print}` is for! + - option: You can use it to repeat an answer. + feedback: Good job! + - option: You can use it to make text disappear. + feedback: That's not right... + hint: '`{echo}` is used after an `{ask}` command.' + correct_answer: C + question_score: '10' + 9: + question_text: What's wrong with this code? + code: |- + {print} Hello! + {print} How are you doing? + {echo} So you are doing... + mp_choice_options: + - option: '`{print}` in line 1 should be `{ask}`' + feedback: No, `{print}` is right. Where is the question being asked? + - option: '`{print}` in line 2 should be `{ask}`' + feedback: Super! + - option: '`{echo}` in line 3 should be `{ask}`' + feedback: No, `{echo}` is right. Where is the question being asked? + - option: Nothing. This is a perfect code! + feedback: Look carefully for the mistake... + hint: '`{ask}` allows you to ask a question' + correct_answer: B + question_score: '10' + 10: + question_text: Which output will be in your output screen after you've run this code? + code: |- + {ask} Are you ready to go to level 2? + {echo} + {echo} + mp_choice_options: + - option: Are you ready to go to level 2? + feedback: There are two `{echo}` commands + - option: |- + Yes! + Yes! + feedback: Great job! + - option: Yes! + feedback: There are two `{echo}` commands + - option: |- + Are you ready to go to level 2? + Yes! + feedback: There are two `{echo}` commands + hint: Let's go! + correct_answer: B + question_score: '10' + 2: + 1: + question_text: Which statement is true? + mp_choice_options: + - option: You can use the `{print}` command to ask questions. + feedback: That is what `{ask}` is for + - option: You can use the `{ask}` command to echo answers. + feedback: That is not true + - option: With the `{print}` command you can make text appear + feedback: Good + - option: With the `{sleep}` command, you can remove text from the screen. + feedback: That's not how `{sleep}` works. + hint: '`{print}` still works the same way as in level 1' + correct_answer: C + question_score: '10' + 2: + question_text: Which code is correct? + mp_choice_options: + - option: |- + ``` + name {is} {ask} What is your name? + ``` + feedback: Super! + - option: |- + ``` + {ask} {is} name What is your name + ``` + feedback: The words are right, the order is not! + - option: |- + ``` + {ask} What is your name? + ``` + feedback: This worked in level 1, but in level 2 and up it works differently. + - option: |- + ``` + {ask} What is your name? {is} name + ``` + feedback: The words are right, the order isn't! + hint: '`{ask}` doesn''t work like in level 1' + correct_answer: A + question_score: '10' + 3: + question_text: What appears on your output screen when you run this code? + code: |- + name {is} Marleen + {print} name goes to the market and she buys an apple. + mp_choice_options: + - option: name goes to the market and she buys an apple. + feedback: The word name is replaced with Marleen + - option: Marleen goes to the market. + feedback: The second part of the sentence isn't left out! + - option: Marleen goes to the market and she buys an apple. + feedback: Right on! + - option: Marleen goes to the market and Marleen buys an apple. + feedback: She is not replaced with the name + hint: The word name is replaced with Marleen + correct_answer: C + question_score: '10' + 4: + question_text: What will you see on the output screen when you run this code? + code: |- + name {is} Hedy + {print} Hi my name is name + mp_choice_options: + - option: Hi my name is name + feedback: The variable name is replaced with Hedy + - option: Hi my name is Hedy + feedback: The variable name is replaced with Hedy + - option: Hi my Hedy is name + feedback: The variable name is replaced with Hedy + - option: Hi my Hedy is Hedy + feedback: Correct, this mistake will be fixed in level 4! + hint: '''name'' is being replaced with ''Hedy'' in both places' + correct_answer: D + question_score: '10' + 5: + question_text: What happens when you use the `{sleep}` command? + mp_choice_options: + - option: It slows down your computer + feedback: fortunately not! + - option: It closes down Hedy + feedback: fortunately not! + - option: Your program pauses for a second and then continues + feedback: That's right! + - option: You put it at the end so Hedy knows your program is finished + feedback: No it would be useless at the end of your code + hint: The computer waits for a second at the `{sleep}` command + correct_answer: C + question_score: '10' + 6: + question_text: What should be on the lines? + code: |- + {print} And the award for best programming language goes to... + _ + {print} Hedy! + mp_choice_options: + - option: '`{sleep}`' + feedback: Perfect! + - option: '`{echo}`' + feedback: There is nothing to repeat back here + - option: '`{print}`' + feedback: There is no text there to `{print}` there + - option: '`{ask}`' + feedback: There is no question there to be asked + hint: Pause for dramatic effect... + correct_answer: A + question_score: '10' + 7: + question_text: What command should be used on line 2? + code: |- + {print} I will explode in 3 seconds! + _ + {print} BOOM! + mp_choice_options: + - option: |- + ``` + {print} 3 + ``` + feedback: You don't need to `{print}` + - option: |- + ``` + {sleep} 3 + ``` + feedback: Perfect! + - option: |- + ``` + {sleep} + ``` + feedback: This way the bomb will explode in 1 second + - option: |- + ``` + {sleep} {sleep} {sleep} + ``` + feedback: Make it easier on yourself by using the number 3 + hint: You want the computer to wait for 3 seconds + correct_answer: B + question_score: '10' + 8: + question_text: How would you correct the first line of code? + code: |- + {ask} {is} How old are you? + {print} age + mp_choice_options: + - option: |- + ``` + age {ask} {is} How old are you? + ``` + feedback: That is the wrong order + - option: |- + ``` + {ask} {is} age How old are you? + ``` + feedback: That is the wrong order + - option: |- + ``` + age {is} {ask} How old are you? + ``` + feedback: You get it! + - option: |- + ``` + age {is} How old are you? + ``` + feedback: Where is the `{ask}` command? + hint: The variable name should come first + correct_answer: C + question_score: '10' + 9: + question_text: What is going wrong in this code? + code: |- + dogs {is} animal + {print} I love animal + mp_choice_options: + - option: 'Line 1 should say: dogs `{is}` animals' + feedback: The variable name is animal + - option: 'Line 1 should say: animal `{is}` dogs' + feedback: Great! + - option: 'Line 2 should say: `{print}` I love animals' + feedback: The variable name is animal + - option: 'Line 2 should say: `{sleep}` I love animals' + feedback: Sleep is not used to `{print}` text + hint: You want to `{print}` 'I love dogs' + correct_answer: B + question_score: '10' + 10: + question_text: What command should be used on the line 1? + code: |- + flavor {is} _ + {print} Your favorite icecream is... + {sleep} + {print} flavor + mp_choice_options: + - option: |- + ``` + {sleep} 3 + ``` + feedback: You want to know the favorite flavor! + - option: |- + ``` + {print} strawberries + ``` + feedback: You do not want a `{print}` command at the middle of the line... + - option: |- + ``` + strawberries, chocolate, vanilla + ``` + feedback: This way you are making a list. You don't want that now. + - option: |- + ``` + {ask} What flavor icecream do you like? + ``` + feedback: That's right! + hint: You want to `{ask}` a question + correct_answer: D + question_score: '10' + 3: + 1: + question_text: What command(s) do you use to let Hedy pick something arbitrarily? + mp_choice_options: + - option: '`{print}`' + feedback: '`{print}` is used to print text' + - option: '`{ask}`' + feedback: '`{ask}` is used to ask a question' + - option: '`{is}`' + feedback: '`{is}` is used to make a list' + - option: '`{at} {random}`' + feedback: Correct! + hint: Arbitrarily means without a plan or randomly. + correct_answer: D + question_score: '10' + 2: + question_text: What's wrong with this code? + code: |- + animals {is} dog cat cow + {print} animals {at} {random} + mp_choice_options: + - option: 'You need commas in line 1: dog, cat, cow.' + feedback: Good job! + - option: Line 1 needs to start with `{print}`. + feedback: No, you don't need `{print}` + - option: Line 2 needs to say 'animal' instead of 'animals' + feedback: animals is correct. + - option: '`{at} {random}` is spelled incorrectly' + feedback: '`{at} {random}` is the correct spelling' + hint: There's something wrong in line 1 + correct_answer: A + question_score: '10' + 3: + question_text: How do you fix the mistake in line 2? + code: |- + options {is} rock, paper, scissors + {print} rock, paper, scissors {at} {random} + mp_choice_options: + - option: |- + ``` + {at} {random} {print} options + ``` + feedback: You're almost there. The order of the words isn't right yet. + - option: |- + ``` + {print} rock {at} {random} + ``` + feedback: you don't always want the Hedy to {print} rock, sometimes you want scissors or paper. + - option: |- + ``` + {print} options {at} {random} + ``` + feedback: Very good! + - option: Nothing, the code is correct! + feedback: Look carefully for the mistake + hint: The variable (the list) is called options. + correct_answer: C + question_score: '10' + 4: + question_text: What should change in line 2 to print a random price? + code: |- + prices {is} 1 dollar, 100 dollar, 1 million dollar + {print} price {at} {random} + mp_choice_options: + - option: |- + ``` + {print} price + ``` + feedback: You don't want to `{print}` the word price, but you want to `{print}` one price out of your list `{at} {random}` + - option: |- + ``` + {print} prices {at} {random} + ``` + feedback: Great! You've really paid attention. + - option: |- + ``` + {print} {at} {random} price + ``` + feedback: '`{at} {random}` is placed behind the variable.' + - option: Nothing, this code is alright. + feedback: Look carefully for the mistake you missed! + hint: The variable name is prices + correct_answer: B + question_score: '10' + 5: + question_text: What is wrong in this code? + code: |- + question {is} {ask} What do you want to know? + {print} question + answers {is} yes, no, maybe + {print} answers {at} {random} + mp_choice_options: + - option: Line 1 needs to say `{print}` instead of `{ask}` + feedback: No, that's not wrong. + - option: Line 2 needs to say `{ask}` instead of `{print}` + feedback: No that's not wrong. + - option: Line 2 needs to say answers `{at} {random}` `{is}` yes, no, maybe + feedback: No, that's not wrong. + - option: Nothing, this code is perfect + feedback: That's right! + hint: Does this code even have a mistake? + correct_answer: D + question_score: '10' + 6: + question_text: What's wrong with this code? + code: |- + question {is} {ask} What do you want to know? + answers yes, no, maybe + {print} answers {at} {random} + mp_choice_options: + - option: Line 2 needs to say question instead of answers + feedback: No that's not right + - option: Line 2 needs the `{is}` command + feedback: Correct + - option: Line 3 needs to say answer instead of answers + feedback: No the variable's called answers + - option: Nothing! This code is great! + feedback: Actually, line 2 has a mistake. + hint: There is something wrong with line 2. + correct_answer: B + question_score: '10' + 7: + question_text: What does the `{add}` command do? + code: |- + books {is} Harry Potter, The Hobbit, Green Eggs and Ham + your_book {is} {ask} What is your favorite book? + {add} your_book {to} books + {print} books {at} {random} + mp_choice_options: + - option: The `{add}` command removes a random book from the list + feedback: The remove command removes, the add command adds + - option: The `{add}` command adds a random book to a list + feedback: It doesn't. It adds your answer to the list! + - option: The `{add}` command adds your favorite book to the list + feedback: Correct! + - option: The `{add}` command prints your favorite book. + feedback: No, it adds your favorite book to the list + hint: The `{add}` command adds a book, but which one? + correct_answer: C + question_score: '10' + 8: + question_text: What is the output of this code? + code: |- + crisps {is} sea salt, paprika, sour cream + {remove} sea salt {from} crisps + {remove} paprika {from} crisps + {print} crisps {at} {random} + mp_choice_options: + - option: You can't tell, because Hedy will `{print}` one of the 3 flavors `{at} {random}` + feedback: Take a look at the `{remove}` commands + - option: sea salt + feedback: sea salt is removed from the list + - option: paprika + feedback: Paprika is removed from the list + - option: sour cream + feedback: That's right! + hint: There are 3 flavors, bit 2 are removed. Which one remains? + correct_answer: D + question_score: '10' + 9: + question_text: What's wrong with this code? + code: |- + colors {is} blue, purple, green + chosen_color {is} {ask} Which hair color wouldn't you like to have? + {remove} chosen_color {from} colors + {print} I will dye my hair color {at} {random} + mp_choice_options: + - option: 'Line 3 should say: `{remove}` blue `{from}` colors' + feedback: Maybe you want blue hair though! + - option: Line 3 should have an `{add}` command instead of a `{remove}` command + feedback: You want to remove the chosen color so `{remove}` is right. + - option: In line 4 the variable should be called colors instead of color + feedback: Great job! + - option: Nothing, this is a correct code! + feedback: Find the mistake! + hint: Look at line 4 + correct_answer: C + question_score: '10' + 10: + question_text: What should be on the _? + code: |- + walkers {is} dad, mom, Sam, Petra + walked_yesterday {is} {ask} Who walked the dogs yesterday? + {print} walked_yesterday shouldn't have to walk the dogs again today + _ + {print} walkers {at} {random} , it's your turn to walk the dogs! + mp_choice_options: + - option: |- + ``` + {remove} walked_yesterday {from} walkers + ``` + feedback: Super! + - option: |- + ``` + {remove} walked_yesterday {to} walkers + ``` + feedback: '`{remove} {from}` or `{add} {to}`, not `{remove} {to}`' + - option: |- + ``` + {remove} walkers {from} yesterday + ``` + feedback: yesterday is not a variable + - option: |- + ``` + {add} walked_yesterday {to} walkers + ``` + feedback: This increased the chance that the person who walked yesterday now has to do it again. That's mean. + hint: The person who walked the dogs yesterday should be removed from the list. + correct_answer: A + question_score: '10' + 4: + 1: + question_text: Which of these codes is correct? + mp_choice_options: + - option: |- + ``` + {print} 'Im very excited to take this quiz!' + ``` + feedback: That's right + - option: |- + ``` + {print} Im very excited to take this quiz! + ``` + feedback: '{print} now needs quotation marks!' + - option: |- + ``` + {print} 'I'm very excited to take this quiz!' + ``` + feedback: do not use apostrophe or use backticks instead + - option: |- + ``` + {print} 'I'm very excited to take this quiz! + ``` + feedback: careful when using quotes and apostrophe + hint: In level 4 you need quotation marks for 2 commands. + correct_answer: A + question_score: '10' + 2: + question_text: Which code uses the proper quotation marks? + mp_choice_options: + - option: |- + ``` + {print} `hello` + ``` + feedback: This quotation mark is skewed, you need a straight one. + - option: |- + ``` + {print} 'hello' + ``` + feedback: Correct + - option: |- + ``` + {print} hello + ``` + feedback: There are no quotation marks here! + - option: |- + ``` + {print} ,hello, + ``` + feedback: This is a comma, you need quotation marks. + hint: Pick the right quotation marks. + correct_answer: B + question_score: '10' + 3: + question_text: Where are the quotation marks used correctly? + mp_choice_options: + - option: |- + ``` + {print} Hi Im Hedy + ``` + feedback: Add quotation marks please! + - option: |- + ``` + {print} 'Hi Im Hedy + ``` + feedback: Both before and after the words you want to print should be a quotation mark. + - option: |- + ``` + '{print} Hi Im Hedy' + ``` + feedback: The first quotation mark should be behind the word `{print}` + - option: |- + ``` + {print} 'Hi Im Hedy' + ``` + feedback: Perfect! + hint: Both before and after the words you want to print should be a quotation mark. + correct_answer: D + question_score: '10' + 4: + question_text: Which statement is true? + mp_choice_options: + - option: 'You need quotation marks around the word `{print}`, like this: `''{print}''`.' + feedback: The quotation marks shouldn't be around the command itself. + - option: You need quotation marks around the words you want to print. + feedback: Super! + - option: You do not need quotation marks when using the `{ask}` command + feedback: Both `{print}` and `{ask}` require quotation marks + - option: You can choose yourself whether to use quotation marks or not. + feedback: Unfortunately, Hedy is stricter than that. + hint: From level 4 on you need to use quotation marks. + correct_answer: B + question_score: '10' + 5: + question_text: What has to be changed in order for the game to work? + code: |- + options {is} rock, paper, scissors + {print} 'options {at} {random}' + mp_choice_options: + - option: |- + ``` + '{print} options {at} {random}' + ``` + feedback: Never put the quotation mark in front of the `{print}` command. + - option: |- + ``` + {print} 'options' {at} {random} + ``` + feedback: options is a variable. You don't literally want to print 'options {at} {random}'. + - option: |- + ``` + {print} options {at} {random} + ``` + feedback: That's right + - option: Nothing, the game already works! + feedback: Look carefully. There is an error. + hint: You don't want Hedy to literally print 'options {at} {random}', you want it to print 'rock' or 'paper' or 'scissors'. + correct_answer: C + question_score: '10' + 6: + question_text: What would be a good next line in this code? + code: prices {is} 1 dollar, 100 dollars, 1 million dollars + mp_choice_options: + - option: |- + ``` + {print} 'You win...' prices {at} {random} + ``` + feedback: Great! You get it! + - option: |- + ``` + {print} You win... 'prices {at} {random}' + ``` + feedback: Hedy will literally print 'prices {at} {random}' + - option: |- + ``` + {print} You win... prices {at} {random} + ``` + feedback: You need some quotation marks! + - option: |- + ``` + {print} 'You win... prices {at} {random}' + ``` + feedback: Hedy will literally print 'prices {at} {random}'' + hint: 'Think carefully: what is a variable and should be outside of the quotation marks? And what are normal words that should be inside?' + correct_answer: A + question_score: '10' + 7: + question_text: What's wrong with this code? + code: |- + question {is} {ask} What do you want to know? + answers {is} yes, no, maybe + {print} answers {at} {random} + mp_choice_options: + - option: Quotation marks are missing in line 1 + feedback: Correct! + - option: Quotation marks are missing in line 2 + feedback: A variable doesn't need quotes + - option: Quotation marks are missing in line 3 + feedback: You don't want Hedy to literally print 'answers {at} {random}' so no quotation marks needed here! + - option: Nothing, this code is good as is! + feedback: Look carefully. You missed a mistake! + hint: Check each line on whether they'd need quotation marks or not. + correct_answer: A + question_score: '10' + 8: + question_text: What would be a good next line for this code? + code: |- + {print} 'Welcome at the money show!' + {print} 'In front of you are 3 doors' + door {is} {ask} 'Which door do you choose?' + mp_choice_options: + - option: |- + ``` + {print} So you pick door door + ``` + feedback: We need quotation marks + - option: |- + ``` + {print} 'So you pick ' door door + ``` + feedback: If the player chooses door 3, Hedy will say 'So you pick 3 3 + - option: |- + ``` + {print} 'So you pick door ' door + ``` + feedback: Super! + - option: |- + ``` + {print} 'So you pick door door' + ``` + feedback: Hedy will literally print 'So you pick door door + hint: The second word door should be replaced with the number, the first should still be the word door... + correct_answer: C + question_score: '10' + 9: + question_text: What will never appear in your output screen? + code: |- + clubs {is} Real Madrid, Bayern Munchen, Manchester United, Ajax + {print} clubs {at} {random} ' is going the win the champions league' + mp_choice_options: + - option: Ajax is going to win the champions league + feedback: Hedy could `{print}` that + - option: Real Madrid is going to win the champions league + feedback: Hedy could `{print}` that + - option: Bayern Munchen is going to win the champions league + feedback: Hedy could `{print}` that + - option: FC Barcelona is going to win the champions league + feedback: That's right. It's not in the list + hint: What are Hedy's options to randomly pick from? + correct_answer: D + question_score: '10' + 10: + question_text: Which statement is true? + code: |- + people {is} mom, dad, Emma, Sophie + {print} The dishes are done by... + {print} people {at} {random} + mp_choice_options: + - option: Quotation marks are missing in line 1 + feedback: A list doesn't need quotation marks + - option: Quotation marks are missing in line 2 + feedback: Correct + - option: Quotation marks are missing in both line 2 and 3 + feedback: Line 3 doesn't need quotation marks because it's not printed literally + - option: Nothing, this code has no mistakes + feedback: You missed one! + hint: One line needs quotation marks, because you want it to be printed literally. + correct_answer: B + question_score: '10' + 5: + 1: + question_text: Which command should be filled in on the _? + code: |- + number {is} {ask} 'What is your lucky number?' + {if} number {is} 5 {print} 'Mine too!' + _ {print} 'My lucky number is 5!' + mp_choice_options: + - option: '`{print}`' + feedback: There already is a `{print}` command. + - option: '`{if}`' + feedback: The `{if}` command is used in the line above. + - option: '`{sleep}`' + feedback: That's not it! + - option: '`{else}`' + feedback: That's right! + hint: Which one goes together with the `{if}` command? + correct_answer: D + question_score: '10' + 2: + question_text: What appears in your output screen when you type in the name Hedy? + code: |- + name {is} {ask} 'What is your name?' + {if} name {is} Hedy {print} 'fun' {else} {print} 'less fun' + mp_choice_options: + - option: fun + feedback: That's right! + - option: less fun + feedback: If the name is Hedy, it will say 'fun'' + - option: Hedy + feedback: No, it doesn't print the name + - option: Error + feedback: Fortunately not! + hint: '`{if}` name `{is}` Hedy `{print}` ...?' + correct_answer: A + question_score: '10' + 3: + question_text: What is the right password? + code: |- + password {is} {ask} 'What is the password?' + {if} password {is} SECRET {print} 'Correct!' + {else} {print} 'ALARM! INTRUDER!' + mp_choice_options: + - option: Correct! + feedback: This is printed when you type in the correct password + - option: SECRET + feedback: That's right!' + - option: password + feedback: The password isn't password... + - option: ALARM INTRUDER + feedback: This is printed when you type in the incorrect password! + hint: '`{if}` password `{is}` ... `{print}` ''Correct!''' + correct_answer: B + question_score: '10' + 4: + question_text: What does Hedy print when you type in the wrong password? + code: |- + password {is} {ask} 'What is the password?' + {if} password {is} SECRET {print} 'Correct!' + {else} {print} 'ALARM! INTRUDER!' + mp_choice_options: + - option: Correct + feedback: That's printed if the correct answer is given, not the wrong one... + - option: SECRET + feedback: That's not the right answer + - option: Wrong! + feedback: No, this is not what Hedy will print + - option: ALARM! INTRUDER! + feedback: Great job! + hint: Your computer will sound the alarm for intruders! + correct_answer: D + question_score: '10' + 5: + question_text: Why will Hedy say 'ALARM! INTRUDER' when you type in 'secret'? + code: |- + password {is} {ask} 'What is the password?' + {if} password {is} SECRET {print} 'Correct!' + {else} {print} 'ALARM! INTRUDER!' + mp_choice_options: + - option: Because it needs to be in capitals, so SECRET + feedback: Indeed! + - option: Because the password is alarm + feedback: No, this is not the password. + - option: Because it's spelled wrong. + feedback: That's not how you spell secret + - option: Because Hedy makes a mistake + feedback: No, Hedy is right + hint: The spelling of the word has to be exactly the same. + correct_answer: A + question_score: '10' + 6: + question_text: Which word should be on the place of the blank in the last line? + code: |- + {print} 'Im Hedy the football fortune teller!' + {print} 'I will predict what place your team will end up!' + club is {ask} 'Which club is your favorite?' + {if} club {is} ajax {print} 'Ajax is going to win of course!' + _ {print} 'Sorry, your club is gonna be in last place...' + mp_choice_options: + - option: |- + ``` + {if} + ``` + feedback: '`{if}` is already in the line above' + - option: |- + ``` + {at} {random} + ``` + feedback: No, you need `{else}`. + - option: |- + ``` + {else} + ``` + feedback: Great! + - option: |- + ``` + {print} + ``` + feedback: '`{print}` is already there, we need a word before it!' + hint: '`{if}` goes together with...?' + correct_answer: C + question_score: '10' + 7: + question_text: Which word should be in the place of the blank? + code: |- + {print} 'I can predict if you will be a millionair or not!' + name {is} {ask} 'Whats your name?' + {if} name {is} Hedy {print} 'You will be a millionair!' + {else} _ 'Unfortunately... No big money for you.' + mp_choice_options: + - option: '`{if}`' + feedback: '`{if}` is in the line above.' + - option: '`{at}` `{random}`' + feedback: No, you don't need `{at} {random}`. + - option: '`{else}`' + feedback: There already is an `{else}` command + - option: '`{print}`' + feedback: Awesome! + hint: After `{else}` a `{print}` command follows + correct_answer: D + question_score: '10' + 8: + question_text: Which word should be on the place of the blank? + code: |- + animal {is} {ask} 'What is your favorite animal?' + {if} _ {is} penguin {print} 'Thats my favorite animal too!' + {else} {print} 'Cool! I like penguins.' + mp_choice_options: + - option: |- + ``` + favorite animal + ``` + feedback: That's not the variable name. + - option: |- + ``` + animal + ``` + feedback: Great job! + - option: '`{if}`' + feedback: '`{if}` is already there' + - option: '`{print}`' + feedback: No, that's not it. + hint: What the variable name? + correct_answer: B + question_score: '10' + 9: + question_text: Which door should you choose to escape?? + code: |- + {print} 'Escape from the haunted house!' + {print} 'There are 3 doors in front of you' + door {is} {ask} 'Which door do you choose?' + monsters {is} vampire, werewolf, giant spider + {if} door {is} 2 {print} 'Yay, you can escape!' + {else} {print} 'You are being devoured by a... ' monsters {at} {random} + mp_choice_options: + - option: '1' + feedback: Bad choice! You're being eaten + - option: '2' + feedback: Super! You escaped! + - option: '3' + feedback: Bad choice! You're being eaten. + - option: It's a trap, you will always be eaten! + feedback: Luckily not! + hint: One of the doors will keep you safe.. + correct_answer: B + question_score: '10' + 10: + question_text: Which monster is standing behind door 1? + code: |- + {print} 'Escape from the haunted house!' + {print} 'There are 3 doors in front of you' + door {is} {ask} 'Which door do you choose?' + monsters {is} vampire, werewolf, giant spider + {if} door {is} 2 {print} 'Yay, you can escape!' + {else} {print} 'You are being devoured by a... ' monsters {at} {random} + mp_choice_options: + - option: Hedy picks a random monster each time. + feedback: Awesome! + - option: vampire + feedback: Not always... + - option: werewolf + feedback: Not always... + - option: giant spider + feedback: Not always... + hint: Mind the last 3 words... monsters `{at} {random}`... + correct_answer: A + question_score: '10' + 6: + 1: + question_text: What's Hedy's output when you run this code? + code: '{print} 2*10' + mp_choice_options: + - option: '20' + feedback: Correct! + - option: '12' + feedback: No, the plus sign is used in addition + - option: 2*10 + feedback: No, Hedy will calculate the answer + - option: '210' + feedback: Mind it's a calculation. + hint: The `*` is used as a multiplication sign + correct_answer: A + question_score: '10' + 2: + question_text: What do you use when you want to add two numbers? + mp_choice_options: + - option: '`-`' + feedback: That's not it + - option: plus + feedback: That's not it + - option: '`*`' + feedback: That's not it + - option: '`+`' + feedback: Correct! + hint: It's the plus sign. + correct_answer: D + question_score: '10' + 3: + question_text: What's Hedy's output when you run this code? + code: '{print} ''3*10''' + mp_choice_options: + - option: '30' + feedback: This would be the right answer if there were no quotation marks. + - option: '13' + feedback: Try again.. + - option: 3*10 + feedback: Correct! There are quotation marks, so Hedy will print it literally. + - option: Nothing, Hedy will give an error message. + feedback: No, Hedy will print it literally. + hint: Mind the quotation marks!! + correct_answer: C + question_score: '10' + 4: + question_text: Kim is 10 years old. What will Hedy print for her? + code: |- + name = {ask} 'How many letters are in your name?' + age = {ask} 'How old are you?' + luckynumber = name*age + {print} 'Your lucky number is...' luckynumber + mp_choice_options: + - option: '30' + feedback: Mind, Hedy also prints 'Your lucky number is...' + - option: '10' + feedback: Please try again. + - option: Your lucky number is... 30 + feedback: That's right! + - option: Your lucky number is... 10 + feedback: Her lucky number is name times age... + hint: 'Kim has 3 letters, she is 10 years old so: letters times age = 3*10 = 30.' + correct_answer: C + question_score: '10' + 5: + question_text: If 5 people eat at this restaurant, how much do they have to pay in total? + code: |- + {print} 'Welcome to Hedys!' + people = {ask} 'How many people are eating with us tonight?' + price = people * 10 + {print} 'That will be ' price 'dollar please' + mp_choice_options: + - option: 5 dollars + feedback: Unfortunately, it's not that cheap. + - option: 10 dollars + feedback: No, it's 10 dollars each. + - option: 15 dollars + feedback: The * means multiplication. + - option: 50 dollars + feedback: Great! + hint: '`price` `is` `people` `times` 10' + correct_answer: D + question_score: '10' + 6: + question_text: How much does a hamburger cost in this virtual restaurant? + code: |- + {print} 'Welcome at Hedys diner' + food = {ask} 'What would you like to eat?' + price = 0 + {if} food {is} hamburger price = 15 + {if} food {is} fries price = 6 + mp_choice_options: + - option: 15 dollars + feedback: Super! + - option: 6 dollars + feedback: The fries are 6 dollars + - option: 0 dollars + feedback: The hamburger isn't free! + - option: 21 dollars + feedback: That's the price for a hamburger and fries! + hint: Mind the fourth line. + correct_answer: A + question_score: '10' + 7: + question_text: Why does line 7 say 'price is price + 3' instead of 'price is 3'? + code: |- + {print} 'Welcome at Hedys diner' + food = {ask} 'What would you like to eat?' + price = 0 + {if} food {is} hamburger price = price + 15 + {if} food {is} fries price = price + 6 + drinks is {ask} 'What would you like to drink?' + {if} drinks {is} coke price = price + 3 + {if} drinks {is} water price = price + 1 + {print} price ' dollars please' + mp_choice_options: + - option: It could have been `price = 3` just as well. + feedback: No, that's not true. Hedy needs to add 3 dollars to the total. + - option: Because Hedy doesn't understand `price = 3`. + feedback: Hedy would understand, but it wouldn't be right. + - option: Because Hedy would otherwise forget about the previous order. The price would be 3 dollars in total. + feedback: That's right! + - option: Because the price is 0 dollars to begin with. + feedback: That's true, but not the reason + hint: The price shouldn't be 3, but 3 dollars more than it already was + correct_answer: C + question_score: '10' + 8: + question_text: Why is this code incorrect? + code: |- + correct answer = 3*12 + answer = {ask} 'What is 3 times 12?' + {if} answer {is} correct answer {print} 'Good job!' + {else} {print} 'No... It was ' correct answer + mp_choice_options: + - option: There shouldn't be quotation marks in line 2 + feedback: No, there should be! + - option: The variable is called correct answer, but a variable's name can only be 1 word. So it should be correct_answer + feedback: Correct! + - option: The `{if}` and `{else}` commands should be in the same line. + feedback: No, that's not true. + - option: The variable in line 2 can't be called answer, because it is too similar to the variable correct answer. + feedback: Variable names can be similar, but they can't be 2 words... + hint: Inspect what the variables are called. + correct_answer: B + question_score: '10' + 9: + question_text: Imagine you love football a 10, you've eaten 2 bananas and have washed your hands 3 times today. How smart does the silly fortune teller think you are? + code: |- + {print} 'Im Hedy the silly fortune teller' + {print} 'I will predict how smart you are!' + football = {ask} 'On a scale of 0 to 10 how much do you love football?' + bananas = {ask} 'How many bananas have you eaten this week?' + hygiene = {ask} 'How many times did you wash your hands today??' + result = bananas + hygiene + result = result * football + {print} 'You are ' result 'percent smart.' + mp_choice_options: + - option: 10% + feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + - option: 32% + feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + - option: 50% + feedback: Super! You are 100 percent smart! + - option: 100% + feedback: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + hint: (2 bananas + 3 hygiene) * 10 football = 5*10 =? + correct_answer: C + question_score: '10' + 10: + question_text: Which statement is true? + code: |- + name _ Hedy + {print} name 'is walking trough the forrest' + mp_choice_options: + - option: You can only fill in the word is on the `_` + feedback: You are allowed to use the `=` sign as well + - option: You can fill in either the word is or the `=` sign on the `_` + feedback: Amazing! + - option: You have to fill in =is= on the `_` + feedback: No, one `=` sign is enough + - option: You can only use the `=` sign when working with numbers, not with words. + feedback: You can also use `=` with words. + hint: '`{is}` and `=` are both allowed' + correct_answer: B + question_score: '10' + 7: + 1: + question_text: How many lines can you repeat at once with the repeat command at this level? + mp_choice_options: + - option: '0' + feedback: No you can repeat a line. + - option: '1' + feedback: Correct, one line at a time + - option: '3' + feedback: In this level only one line at a time + - option: infinite + feedback: In this level you can only repeat one line at a time + hint: You can only repeat one line at a time + correct_answer: B + question_score: '10' + 2: + question_text: Which code is right? + mp_choice_options: + - option: |- + ``` + {print} 100 {times} 'hello' + ``` + feedback: '`{repeat}` 100 `{times}` `{print}` ''hello''' + - option: |- + ``` + {print} {repeat} 100 {times} 'hello' + ``` + feedback: '{repeat} 100 {times} {print} ''hello''' + - option: |- + ``` + {repeat} 'hello' 100 {times} + ``` + feedback: '{repeat} 100 {times} {print} ''hello''' + - option: |- + ``` + {repeat} 100 {times} {print} 'hello' + ``` + feedback: That's right! + hint: First the `{repeat}` command, then the `{print}` command + correct_answer: D + question_score: '10' + 3: + question_text: Is this code right or wrong? + code: '{repeat} 100 {times} ''Hello!''' + mp_choice_options: + - option: Right + feedback: No, a word is missing + - option: Wrong, the word `{repeat}` is missing + feedback: The word `{repeat}` is there, another word is missing + - option: Wrong, the word `{times}` is missing + feedback: The word `{times}` is there, another word is missing. + - option: Wrong, the word `{print}` is missing + feedback: Correct + hint: 'It should be: `{repeat}` 100 `{times}` `{print}` ''Hello''' + correct_answer: D + question_score: '10' + 4: + question_text: Which word is wrong in the code? + code: |- + {print} 'I'm blue' + {repeat} 7 {times} {print} 'da ba dee, da ba da' + mp_choice_options: + - option: '`I''m`' + feedback: That's right! + - option: '`{print}`' + feedback: '`{print}` is spelled correctly' + - option: '`{repeat}`' + feedback: '`{repeat}` is spelled correctly' + - option: '`{times}`' + feedback: '`{times}` is spelled correctly' + hint: I'm is wrong, you can't use apostrophes in a sentence + correct_answer: A + question_score: '10' + 5: + question_text: Is this code right or wrong? + code: '{repeat} 100 {times} {print} ''Hedy is awesome!''' + mp_choice_options: + - option: Correct + feedback: That's right! + - option: Wrong + feedback: That's not it + hint: The code is correct! + correct_answer: A + question_score: '10' + 6: + question_text: What will be the output from this code? + code: |- + {print} 'The wheels on the bus go' + {repeat} 3 {times} {print} ' round and round' + mp_choice_options: + - option: |- + ``` + the wheels on the bus go + round and round + ``` + feedback: Only the second line is repeated 3 times + - option: |- + ``` + the wheels on the bus go + the wheels on the bus go + the wheels on the bus go + round and round + ``` + feedback: Only the second line is repeated 3 times + - option: |- + ``` + the wheels on the bus go + round and round + the wheels on the bus go + round and round + the wheels on the bus go + round and round + ``` + feedback: Only the second line is repeated 3 times + - option: |- + ``` + the wheels on the bus go + round and round + round and round + round and round + ``` + feedback: All through the town! Perfect! + hint: Only 'round and round' is repeated 3 times. + correct_answer: D + question_score: '10' + 7: + question_text: What will be the output from this code? + code: |- + {repeat} 2 {times} {print} 'We will' + {print} 'ROCK YOU!' + mp_choice_options: + - option: |- + ``` + We will We will + ROCK YOU! + ``` + feedback: '''We will'' won''t appear twice in the same line' + - option: |- + ``` + We will + We will + ROCK YOU! + ``` + feedback: Great! + - option: |- + ``` + We will + ROCK YOU! + We will + ROCK YOU! + ``` + feedback: ROCK YOU! won't be repeated + - option: |- + ``` + We will + ROCK YOU! + feedback: Mind the `{repeat}` command + hint: Mind the `{repeat}` command. + correct_answer: B + question_score: '10' + 8: + question_text: What Hedy code belongs to this output? + code: |- + Here comes the sun + Do do do do + Here comes the sun + And I say + Its alright + mp_choice_options: + - option: |- + ``` + {print} 'Here comes the sun' + {print} 'Do do do do' + {print} 'Here comes the sun' + {print} 'And I say' + {print} 'Its alright' + ``` + feedback: Awesome, you can't use the `{repeat}` command here. + - option: |- + ``` + {repeat} 2 {times} {print} 'Here comes the sun' + {print} 'And I say' + {print} 'Its alright' + feedback: Where did you leave 'Do do do do'? + - option: |- + ``` + {repeat} 2 {times} {print} 'Here comes the sun' + {print} 'Do do do do' + {print} 'And I say' + {print} 'Its alright' + ``` + feedback: This is not the correct order.. + - option: |- + ``` + {repeat} 2 {times} {print} 'Here comes the sun' + {repeat} 2 {times} {print} 'Do do' + {print} 'And I say' + {print} 'Its alright' + ``` + feedback: This is not the correct order.. + hint: '`{repeat}` can only be used if you want to execute the same line multiple times in a row.' + correct_answer: A + question_score: '10' + 9: + question_text: What Hedy code belongs to this output? + code: |- + Batman was flying through Gotham. + When suddenly he heard someone screaming... + Help! + Help! + Help! + Please help me! + mp_choice_options: + - option: |- + ``` + {print} 'Batman was flying through Gotham. ' + {print} 'When suddenly he heard someone screaming!' + {print} 'Help!' + {repeat} 3 {times} {print} 'Please help me!' + ``` + feedback: Your repeated line is incorrect. + - option: |- + ``` + {print} 'Batman was flying through Gotham.' + {print} 'When suddenly he heard someone screaming!' + {repeat} 3 {times} 'Help!' + {print} 'Please help me!' + ``` + feedback: The `{print}` command is missing on line 3. + - option: |- + ``` + {print} Batman was flying through Gotham. + {print} When suddenly he heard someone screaming! + {repeat} 3 {times} {print} Help! + {print} Please help me! + ``` + feedback: You're missing the quotation marks + - option: |- + ``` + {print} 'Batman was flying through Gotham.' + {print} 'When suddenly he heard someone screaming!' + {repeat} 3 {times} {print} 'Help!' + {print} 'Please help me!' + ``` + feedback: Perfect + hint: '''Help!'' is repeated 3 times.' + correct_answer: D + question_score: '10' + 10: + question_text: Which code belongs to this output? + code: |- + if youre happy and you know it clap your hands + if youre happy and you know it clap your hands + if youre happy and you know it and you really want to show it + if youre happy and you know it clap your hands + mp_choice_options: + - option: |- + ``` + {repeat} 2 {times} 'if youre happy and you know it clap your hands' + {print} 'if youre happy and you know it and you really want to show it' + {print} 'if youre happy and you know it clap your hands' + ``` + feedback: Almost! the first line needs an extra word + - option: |- + ``` + {repeat} 2 {times} {print} 'if youre happy and you know it clap your hands' + {print} 'if youre happy and you know it and you really want to show it' + {print} 'if youre happy and you know it clap your hands' + ``` + feedback: Great! + - option: |- + ``` + {repeat} 3 {times} {print} 'if youre happy and you know it clap your hands' + {print} 'if youre happy and you know it and you really want to show it' + ``` + feedback: This is not in the right order. + - option: |- + ``` + {repeat} 4 {times} 'if youre happy and you know it' + {repeat} 2 {times} 'clap your hands' + {print} 'and you really want to show it' + {print} 'clap your hands' + ``` + feedback: This is not in the right order. + hint: Mind the order of the sentences. + correct_answer: B + question_score: '10' + 8: + 1: + question_text: Which output will be produced by this code? + code: |- + {repeat} 2 {times} + {print} 'Hello' + {print} 'Im Hedy!' + mp_choice_options: + - option: |- + Hello + Im Hedy! + feedback: Everything is printed twice. + - option: |- + Hello + Hello + Im Hedy + feedback: The second line is repeated twice as well. + - option: |- + Hello + Im Hedy! + Hello + Im Hedy! + feedback: Super! + - option: |- + Hello + Hello + Im Hedy! + Im Hedy! + feedback: Everything is printed twice + hint: Both lines are repeated twice. + correct_answer: C + question_score: '10' + 2: + question_text: What is wrong with this code? + code: |- + {repeat} 5 {times} + {print} 'Hedy is cool!' + mp_choice_options: + - option: This should be only one line, not 2. + feedback: No it should be 2 lines. + - option: This `{print}` command has to be removed. + feedback: No, you need it. + - option: There is a spelling mistake in the `{repeat}` command. + feedback: No, `{repeat}` is the correct spelling + - option: The second line needs to start with 4 spaces as indentation. + feedback: Correct! + hint: Something is missing in the second line? + correct_answer: D + question_score: '10' + 3: + question_text: What output will be produced when you run this program? + code: |- + {repeat} 3 {times} + {print} 'Baby shark tututudutudu' + {print} 'Baby shark' + mp_choice_options: + - option: |- + Baby shark tututudutudu + Baby shark + feedback: Mind the `{repeat}` command! + - option: |- + Baby shark tututudutudu + Baby shark + Baby shark tututudutudu + Baby shark + Baby shark tututudutudu + Baby shark + feedback: The last line has no indentation, so it's not repeated. + - option: |- + Baby shark tututudutudu + Baby shark tututudutudu + Baby shark tututudutudu + Baby shark + feedback: Right! + - option: |- + Baby shark tututudutudu + Baby shark + Baby shark + Baby shark + feedback: What is being repeated and what isn't ? + hint: What is being repeated and what is not? + correct_answer: C + question_score: '10' + 4: + question_text: Which output is correct? + code: |- + {print} 'The children went:' + {repeat} 2 {times} + {print} 'Yay!' + {print} 'We are going on vacation!' + mp_choice_options: + - option: |- + The children went: + Yay! + We are going on vacation! + feedback: Mind the `{repeat}` command! + - option: |- + The children went: + Yay! + We are going on vacation! + Yay! + We are going on vacation! + feedback: Correct! + - option: |- + The children went: + Yay! + Yay! + We are going on vacation! + We are going on vacation! + feedback: This order is incorrect. + - option: |- + The children went: + Yay! + Yay! + We are going on vacation! + feedback: The last line is repeated too. + hint: The block under the `{repeat}` command is repeated twice. + correct_answer: B + question_score: '10' + 5: + question_text: What is wrong with this code? + code: |- + end = {ask} 'Do you want a happy or a sad ending?' + {if} end {is} happy {print} 'They lived happily ever after' + {else} {print} 'The world exploded. The end.' + mp_choice_options: + - option: The `{print}` commands on the last two lines should start on new lines and start with 4 spaces. + feedback: That's right! + - option: '`{else}` is not a command!' + feedback: It is! + - option: Lines that start with `{if}` should start with 4 spaces + feedback: That's not true + - option: '`{ask}` is no longer a command' + feedback: That's not true + hint: Something is wrong with indentation + correct_answer: A + question_score: '10' + 6: + question_text: What will be the output of this code when we enter pancakes? + code: |- + {print} 'Welcome to restaurant Hedy' + {repeat} 2 {times} + food {is} {ask} 'What do you want to eat?' + {print} food + mp_choice_options: + - option: |- + Welcome to restaurant Hedy + Pancakes + feedback: There is no repetition in this answer. + - option: |- + Welcome to restaurant Hedy + Welcome to restaurant Hedy + Pancakes + Pancakes + feedback: This answer also repeats the welcome message + - option: |- + Welcome to restaurant Hedy + What do you want to eat? + What do you want to eat? + Pancakes + Pancakes + feedback: Almost! But look at the question, it is not repeated. + - option: |- + Welcome to restaurant Hedy + Pancakes + Pancakes + feedback: Well done! + hint: The first sentence and question will not be repeated + correct_answer: D + question_score: '10' + 7: + question_text: What is wrong with this code? + code: |- + food = {ask} 'What would you like to eat?' + {if} food {is} fries + sauce = {ask} 'What sauce would you like?' + {print} 'One fries with ' sauce + {if} food {is} pizza + topping = {ask} 'What topping would you like?' + {print} 'One pizza with ' topping + {print} 'Thank you for your order' + mp_choice_options: + - option: Nothing. This code is correct! + feedback: Something is wrong! + - option: You're not allowed to use an `{if}` command after an `{ask}` command. + feedback: You are! + - option: You don't have to use indentation twice. Only in the first `{if}` command. + feedback: You always have to use indentation. + - option: The indentation is wrong in the first `{if}` command. + feedback: That's right. + hint: Take a careful look at the indentation. + correct_answer: D + question_score: '10' + 8: + question_text: In which of the codes is the indentation done right? + mp_choice_options: + - option: |- + ``` + {if} answer {is} 32 + {print} 'You are...' + {sleep} + {print} 'right!' + {else} + {print} 'You are wrong!' + ``` + feedback: You are wrong! + - option: |- + ``` + {if} answer {is} 32 + {print} 'You are...' + {sleep} + {print} 'right!' + {else} + {print} 'You are wrong!' + ``` + feedback: You are wrong! + - option: |- + ``` + {if} answer {is} 32 + {print} 'You are...' + {sleep} + {print} 'right!' + {else} + {print} 'You are wrong!' + ``` + feedback: You are... right! + - option: |- + ``` + {if} answer {is} 32 + {print} 'You are...' + {sleep} + {print} 'right!' + {else} + {print} 'You are wrong!' + ``` + feedback: You are wrong! + hint: What should happen if the person is right? And what else? + correct_answer: C + question_score: '10' + 9: + question_text: What line(s) in this code should start with 4 spaces? + code: |- + 1 music = {ask} 'What is your favorite music genre?' + 2 {if} music {is} rock + 3 {print} '🤘' + 4 {else} + 5 {print} '👎' + mp_choice_options: + - option: Line 2 and 4 + feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces + - option: Only line 3 + feedback: Not only 3... + - option: Line 3, 4 and 5 + feedback: Line 4 shouldn't + - option: Line 3 and 5 + feedback: Great job! + hint: The lines after an `{if}` or `{else}` command should start with 4 spaces. + correct_answer: D + question_score: '10' + 10: + question_text: Which statement is true? + code: |- + 1 level = {ask} 'What level are you on?' + 2 {if} level {is} 8 + 3 {print} 'Great job!' + mp_choice_options: + - option: All lines should start with 4 spaces + feedback: That's not true + - option: Line 2 and 3 should start with 4 spaces + feedback: That's not true + - option: Line 2 should start with 4 spaces + feedback: That's not true + - option: Line 3 should start with 4 spaces + feedback: You are correct! + hint: Only one line starts with 4 spaces, but which one...? + correct_answer: D + question_score: '10' + 9: + 1: + question_text: What is wrong with this code? + code: |- + {repeat} 3 {times} + food = {ask} 'What would you like to eat?' + {if} food {is} fries + sauce = {ask} 'What sauce would you like?' + {print} 'One fries with ' sauce + {if} food {is} pizza + topping = {ask} 'What topping would you like?' + {print} 'One pizza with ' topping + {print} 'Thank you for your order' + mp_choice_options: + - option: Nothing, this code is correct! + feedback: That's right! + - option: You're not allowed to use an `{if}` command after an `{ask}` command. + feedback: You are! + - option: You don't have to use indentation twice. + feedback: You always have to use indentation. + - option: The indentation is wrong in the last `{if}` command. + feedback: It is not the indentation. + hint: All the indentation is done correctly. + correct_answer: A + question_score: '10' + 2: + question_text: What will be printed after entering the correct password? + code: |- + password = {ask} 'What is the password?' + correct_password = Hedy + {if} password {is} correct_password + {repeat} 2 {times} + {print} 'Good job!' + {print} 'You can use the computer!' + {else} + {print} 'The computer will explode in 5... 4... 3... 2... 1...' + mp_choice_options: + - option: |- + ``` + Good job! + Good job! + ``` + feedback: That's not it! + - option: |- + ``` + The computer will explode in 5... 4... 3... 2... 1... + ``` + feedback: That's not it! + - option: |- + ``` + Good job! + Good job! + You can use the computer! + ``` + feedback: That's not it! + - option: |- + ``` + Good job! + You can use the computer! + Good job! + You can use the computer! + ``` + feedback: Correct! + hint: Everything under the `{repeat}` command is repeated twice. + correct_answer: D + question_score: '10' + 3: + question_text: Which case should you choose to win a million dollars? + code: |- + {print} 'Choose the right case and win!' + case = {ask} 'Which case will you pick? 1 or 2?' + {if} case {is} 1 + action = {ask} 'Open it or sell it?' + {if} action {is} sell + {print} 'You sell your case for 10 dollars' + {if} action {is} open + {print} 'You open the case and win an apple pie' + {if} case {is} 2 + action = {ask} 'Open it or sell it?' + {if} action {is} sell + {print} 'You sell the case for 500 dollars' + {if} action {is} open + {print} 'You open the case and win a million dollars!' + mp_choice_options: + - option: case 1, sell + feedback: You don't win a million! + - option: case 1, open + feedback: You don't win a million + - option: case 2, sell + feedback: You don't win a million + - option: case 2, open + feedback: Great job! You win! + hint: Follow the right path + correct_answer: D + question_score: '10' + 4: + question_text: Which statement is true? + code: |- + name = {ask} 'What is your name?' + size = {ask} 'What is your shoe size?' + {if} size {is} 38 + {if} name {is} Cinderella + {print} '❤️❤️❤️' + {else} + {print} 'You are not the one!' + {else} + {print} 'Ill keep looking' + mp_choice_options: + - option: Sleeping Beauty with shoe size 38 gets the output 'Ill keep looking' + feedback: No, she gets 'You are not the one!' + - option: Cinderella with shoe size 40 gets the output '❤️❤️❤️' + feedback: No, she gets 'Ill keep looking' + - option: Sleeping Beauty with shoe size 40 gets the output 'Ill keep looking' + feedback: That's right! + - option: Cinderella with shoe size 38 gets the output 'Ill keep looking' + feedback: No she gets '❤️❤️❤️' + hint: No matter what your name is, if you have shoe size 40 you will get the message 'Ill keep looking'. + correct_answer: C + question_score: '10' + 5: + question_text: Which code produced this output? + output: |- + Icecream is the best! + Icecream is the best! + Icecream is the best! + mp_choice_options: + - option: |- + ``` + dessert = {ask} 'What is your favorite type of dessert?' + {if} dessert {is} icecream + {repeat} 3 {times} + {print} 'Icecream is the best!' + ``` + feedback: Don't forget the indentation after `{repeat}` commands. + - option: |- + ``` + dessert = {ask} 'What is your favorite type of dessert?' + {if} dessert {is} icecream + {repeat} 3 {times} + {print} 'Icecream is the best!' + ``` + feedback: Use indentation after an `{if}` command + - option: |- + ``` + dessert = {ask} 'What is your favorite type of dessert?' + {if} dessert {is} icecream + {repeat} 3 {times} + {print} 'Icecream is the best!' + ``` + feedback: Perfect + - option: |- + ``` + {repeat} 3 {times} + dessert = {ask} 'What is your favorite type of dessert?' + {if} dessert {is} icecream + {repeat} 3 {times} + {print} 'Icecream is the best!' + ``` + feedback: There are 2 `{repeat}` commands in this code. + hint: Watch the indentation + correct_answer: C + question_score: '10' + 6: + question_text: After which command(s) should you use indentation (starting the next line with 4 spaces)? + mp_choice_options: + - option: '`{if}`' + feedback: Don't forget the others + - option: '`{if}` `{repeat}`' + feedback: Don't forget `{else}`! + - option: '`{if}` `{else}` `{repeat}`' + feedback: Keep it up! + - option: '`{if}` `{else}` `{repeat}` `{print}`' + feedback: Not with `{print}` + hint: Indentation happens on the line below some commands + correct_answer: C + question_score: '10' + 7: + question_text: You'll get a 5 dollar discount if you order a medium pizza with coke.
But the code has a mistake! How to debug it? + code: |- + {if} food {is} pizza + {if} size {is} medium + {if} drink {is} coke + price = price - 5 + mp_choice_options: + - option: |- + ``` + {if} food {is} pizza + {if} size {is} medium + {if} drink {is} coke + price = price - 5 + ``` + feedback: Amazing! + - option: |- + ``` + {if} food {is} pizza + {if} size {is} medium + {if} drink {is} coke + price = price - 5 + ``` + feedback: The second `{if}` misses code! + - option: |- + ``` + {if} food {is} pizza + {if} size {is} medium + {if} drink {is} coke + price = price - 5 + ``` + feedback: Two consecutive `{if}`s is never correct. + - option: |- + ``` + {if} food {is} pizza + {if} size {is} medium + {if} drink {is} coke + price = price - 5 + ``` + feedback: Almost right. Take another look at the last line + hint: After each `{if}` command, the line below should indent + correct_answer: A + question_score: '10' + 8: + question_text: What is wrong in this code? + code: |- + age = {ask} 'Happy Birthday! How old are you?' + singing = {ask} 'Would you like us to sing?' + {if} singing {is} yes + {repeat} years {times} + {print} 'Hip Hip Hooray' + mp_choice_options: + - option: You can't put two questions in a row + feedback: Yes you can. + - option: The variable called 'age' is later on used as 'years' + feedback: Keen eye! Good job! + - option: You're not allowed to start with 8 spaces, like line 5 does + feedback: You actually must start like that. + - option: A code must always start with a `{print}` command in the first line + feedback: That's not true. + hint: The indentation is done right this time + correct_answer: B + question_score: '10' + 9: + question_text: How many `{if}` commands can be placed inside another `{if}` command? + mp_choice_options: + - option: None, that is not allowed + feedback: You are allowed to + - option: Only 1 + feedback: You could use more if you like + - option: '3' + feedback: You could use more if you like + - option: Infinite, as long as you keep using indentation correctly + feedback: That is true + hint: You can put an `{if}` command inside an `{if}` command. + correct_answer: D + question_score: '10' + 10: + question_text: Which statement is true? + code: |- + 1 {repeat} 2 {times} + 2 {if} level {is} 9 + 3 {print} 'Great job!' + mp_choice_options: + - option: All lines should start with 4 spaces + feedback: Only line 2 and 3 start with spaces + - option: Line 2 and 3 should start with 4 spaces + feedback: Line 3 should start with 8 + - option: Line 2 and 3 should start with 8 spaces + feedback: Line 2 should start with 4 + - option: line 2 should start with 4 spaces and line 3 with 8 + feedback: You are correct! + hint: The first line doesn't start with any spaces + correct_answer: D + question_score: '10' + 10: + 1: + question_text: What do we need to fill in on the `_` if we want to print each compliment? + code: |- + compliments = perfect, great job, amazing + _ + {print} compliment + mp_choice_options: + - option: |- + ``` + {for} each compliment + ``` + feedback: That's not it + - option: |- + ``` + {for} compliment {in} compliments + ``` + feedback: You deserve all those compliments! + - option: |- + ``` + {if} compliment {in} compliments + ``` + feedback: That's not it + - option: |- + ``` + {for} compliments {in} compliment + ``` + feedback: Almost there! + hint: '`{for}` each compliment in the lists of compliments...' + correct_answer: B + question_score: '10' + 2: + question_text: Which output is correct? + code: |- + meals = pizza, pasta, pancakes + {for} meal {in} meals + {print} 'I love ' meal + mp_choice_options: + - option: I love pizza + feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + - option: I love pasta + feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + - option: I love pancakes + feedback: Line 2 says `{for}` each meal in the list of meals. So each meal is printed. + - option: |- + I love pizza + I love pasta + I love pancakes + feedback: Great! + hint: Line 2 says for each meal in the list of meals. So each meal is printed. + correct_answer: D + question_score: '10' + 3: + question_text: Which output is correct? + code: |- + animals = dogs, cats, hamsters, chickens + {for} animal {in} animals + {print} animal ' are lovely pets' + mp_choice_options: + - option: dogs are lovely pets + feedback: Line 2 says {for} each animal in the list of animals. So each animal is {print}ed. + - option: dogs, cats, hamsters, chickens are lovely pets + feedback: Each animal gets their own line in the output. + - option: |- + dogs are lovely pets + cats are lovely pets + hamsters are lovely pets + chickens are lovely pets + feedback: Great! + - option: You don't know yet. Because it chooses one of the animals {at} {random}. + feedback: Line 2 says {for} each animal in the list of animals. So each animal is {print}ed. + hint: Line 2 says {for} each animal in the list of animals. So each animal is printed + correct_answer: C + question_score: '10' + 4: + question_text: What's wrong with this code? + code: |- + groceries = apples, bread, milk + {for} item {in} groceries + {print} 'We need ' groceries + mp_choice_options: + - option: Line 2 needs to start with 4 spaces as indentation + feedback: No it doesn't. Only line 3 needs indentation, which it has. + - option: Line 3 does not need to start with 4 spaces as indentation + feedback: Line 2 is a `{for}`command so line 3 does need to start with an indent. + - option: Line 3 should say item instead of groceries + feedback: Good job! + - option: Line 2 should say groceries instead of item + feedback: No it does not. + hint: Line 2 says `{for}` each item in the list of groceries + correct_answer: C + question_score: '10' + 5: + question_text: What word should be on the `_` with these digital dice? + code: |- + {print} 'Welcome to the digital dice!' + players = Ann, John, Jesse + choices = 1, 2, 3, 4, 5, 6 + {for} player {in} players + {print} player ' throws ' _ {at} {random} + mp_choice_options: + - option: players + feedback: It would say 'Ann throws Jesse', instead of 'Ann throws 6'. + - option: choices + feedback: That's right! + - option: choice + feedback: You are very close. But you need Hedy to pick from the list called 'choices' not 'choice'... + - option: dice + feedback: Look at the names of the variables. + hint: Hedy needs to pick a number `{at} {random}` + correct_answer: B + question_score: '10' + 6: + question_text: Which of the answers below is a possible outcome when you run the code? + code: |- + choices = rock, paper, scissors + players = Kelly, Meredith + {for} player {in} players + {print} player ' chooses ' choices {at} {random} + mp_choice_options: + - option: |- + ``` + Kelly chooses rock + ``` + feedback: Meredith wants to play too! + - option: |- + ``` + Meredith chooses scissors + Kelly chooses rock + ``` + feedback: So close! But Kelly is first in the list, so she goes first + - option: |- + ``` + Meredith chooses paper + ``` + feedback: Kelly wants to play too! + - option: |- + ``` + Kelly chooses paper + Meredith chooses scissors + ``` + feedback: Amazing! + hint: Each player will pick an option. The player that's first on the list will go first. + correct_answer: D + question_score: '10' + 7: + question_text: What line should be on the `_` in this code that decides what these people will have for dinner? + code: |- + names = Ron, Leslie, April, Andy + food = pasta, fries, salad + _ + {print} name ' has to eat ' food {at} {random} ' for dinner' + mp_choice_options: + - option: |- + ``` + {for} name {in} names + ``` + feedback: You are on fire! + - option: |- + ``` + {for} names {in} name + ``` + feedback: No it should be for each name in the list nameS, so the other way around + - option: |- + ``` + {for} food {in} food + ``` + feedback: Each name should be told what they will have for dinner. + - option: |- + ``` + {for} name {in} food + ``` + feedback: Each name should be told what they will have for dinner. + hint: Each name should be told what they will have for dinner. + correct_answer: A + question_score: '10' + 8: + question_text: What should be on the `_` in this code that decides which color shirt you get? + code: |- + names = Donna, Tommy, Ben + colors = blue, red, purple + {for} name {in} names + {print} _ + mp_choice_options: + - option: |- + ``` + 'name gets a color shirt' + ``` + feedback: That's not it! + - option: |- + ``` + name 'gets a ' colors {at} {random} ' shirt' + ``` + feedback: Great job! This was a hard one! + - option: |- + ``` + names 'gets a ' color {at} {random} ' shirt' + ``` + feedback: You want each name printed. So the first word should not be names but... + - option: |- + ``` + people ' gets a colors shirt' + ``` + feedback: There is no variable named people.. + hint: Mind the quotation marks and the names of the variables + correct_answer: B + question_score: '10' + 9: + question_text: What is the first question Hedy will ask you when you run the program? + code: |- + courses = appetizer, main course, dessert + names = Timon, Onno + {for} name {in} names + {for} course {in} courses + food = {ask} name ', what would you like to eat as your ' course '?' + {print} name ' orders ' food ' as their ' course + mp_choice_options: + - option: Timon, what would you like to eat as your appetizer? + feedback: Perfect! + - option: Onno, what would you like to eat as your appetizer? + feedback: Timon is first on the list! + - option: Timon, what would you like to eat as your dessert? + feedback: Appetizers are first in the list + - option: You don't know that. Hedy will choose `{at} {random}`. + feedback: There is no `{at} {random}` in this code... + hint: The first options from both lists are chosen. + correct_answer: A + question_score: '10' + 10: + question_text: What is true about this code? + code: |- + prizes = 1 million dollars, car, sandwich + names = Bob, Patrick, Sandy, Larry + {for} prize {in} prizes + {print} 'The ' prize ' is won by ' names {at} {random} + mp_choice_options: + - option: Everybody will always win a prize. + feedback: That is not true, you could end up without a prize. + - option: All the prizes always go to one single person. + feedback: That is not true. All the prizes are given away, but to random people + - option: Larry will never win a prize + feedback: That is not true. Larry has the same odds as the others + - option: Someone might win two prizes + feedback: You get it! + hint: Try to imagine the output of this code. + correct_answer: D + question_score: '10' + 11: + 1: + question_text: What word should be at the place of the blank? + code: |- + {for} i {in} _ 1 {to} 10 + {print} i + mp_choice_options: + - option: '`counter`' + feedback: 'No' + - option: '`{range}`' + feedback: Correct + - option: '`{if}`' + feedback: 'No' + - option: '`{for}`' + feedback: 'No' + hint: What did you learn in this level? + correct_answer: B + question_score: '10' + 2: + question_text: What will be the output from this code? + code: |- + {for} i {in} {range} 1 {to} 3 + {print} i + mp_choice_options: + - option: |- + ``` + 1 + 2 + 3 + ``` + feedback: Correct! + - option: |- + ``` + 1 2 3 + ``` + feedback: That's not it + - option: |- + ``` + 1, 2, 3 + ``` + feedback: That's not it + - option: |- + ``` + 123 + ``` + feedback: That's not it + hint: How do the numbers appear in the screen? + correct_answer: A + question_score: '10' + 3: + question_text: Which code was used to get this output? + output: |- + 1 + 2 + 3 + 4 + 5 + Once I caught a fish alive! + mp_choice_options: + - option: |- + ``` + {for} i {in} {range} 1 {to} 5 + {print} i + {print} 'Once I caught a fish alive!' + ``` + feedback: Perfect + - option: |- + ``` + {for} i {in} {range} 1 {to} 5 + {print} i + {print} 'Once I caught a fish alive!' + ``` + feedback: This code won't work. You need an indent after {for}. + - option: |- + ``` + {for} i {in} {range} 1 {to} 5 + {print} i + {print} 'Once I caught a fish alive!' + ``` + feedback: Now Hedy will count '1 Once I caught a fish alive!, 2 Once I caught a fish alive! etc. + - option: |- + ``` + {for} i {in} {range} 1 {to} 5 + {print} 'i' + {print} 'Once I caught a fish alive!' + ``` + feedback: i is a variable and shouldn't have quotation marks + hint: First all the numbers, then the sentence + correct_answer: A + question_score: '10' + 4: + question_text: Which code was used to get this output? + output: |- + 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 + 0 + mp_choice_options: + - option: |- + ``` + {for} i {in} {range} 0 {to} 10 + {print} i + ``` + feedback: Now Hedy prints the numbers from 0 to 10 instead of 10 to 0. + - option: |- + ``` + {for} i {in} {range} 0 {to} 10 + {print} -1 * i + ``` + feedback: Hedy would print negative numbers in this case. + - option: |- + ``` + {for} i {in} {range} 10 {to} 0 + {print} i + ``` + feedback: Unfortunately this does not exist. + - option: |- + ``` + {for} i {in} {range} 0 {to} 10 + {print} 10 - i + ``` + feedback: That's right! + hint: It has to be a calculation… + correct_answer: D + question_score: '10' + 5: + question_text: What's wrong with this code? + code: |- + {for} i {in} {range} 1 {to} 10 + {print} i + mp_choice_options: + - option: The i in the last line need quotation marks + feedback: No it doesn't. + - option: You can't use `{range}` 1 `{to}` 5 only `{range}` 1 `{to}` 10 + feedback: You could use 1 to 5 just as well! + - option: Line 1 needs to start with an indention. + feedback: Not line 1... + - option: Line 2 needs to start with an indention + feedback: Perfect! + hint: There is something wrong with the indention + correct_answer: D + question_score: '10' + 6: + question_text: How many times does the word Hello appear on your screen when you run the code? + code: |- + {for} i {in} {range} 0 {to} 2 + {print} 'Hello' + mp_choice_options: + - option: 1 time + feedback: 'No' + - option: 2 times + feedback: 'No' + - option: 3 times + feedback: That's right! + - option: Never + feedback: 'No' + hint: 0 also counts. So 0,1,2 that's 3 times. + correct_answer: C + question_score: '10' + 7: + question_text: What should be on the place of the blank? + code: |- + {print} 'Welcome to Hedys diner' + people = {ask} 'How many people will be eating here tonight?' + _ + food = {ask} 'What would you like to order?' + {print} food + mp_choice_options: + - option: |- + ``` + {for} i {in} {range} 0 {to} 3 + ``` + feedback: There's not always 3 people + - option: |- + ``` + {for} i {in} {range} 1 {to} guests + ``` + feedback: The variable is not named guests + - option: |- + ``` + {for} i {in} {range} 1 {to} people + ``` + feedback: Great! + - option: |- + ``` + {for} i {in} {range} 0 {to} people + ``` + feedback: That's one order too many! + hint: Use the variable 'people' + correct_answer: C + question_score: '10' + 8: + question_text: What will be the output from this code? + code: |- + {for} i {in} {range} 23 {to} 25 + {print} 'hi' + mp_choice_options: + - option: |- + ``` + 23 + 24 + 25 + ``` + feedback: The numbers don't appear. It doesn't say `{print}` i. + - option: |- + ``` + 23 hi 24 hi 25 hi + ``` + feedback: The numbers don't appear. It doesn't say `{print}` i + - option: |- + ``` + hi + hi + hi + ``` + feedback: Correct + - option: The word 'hi' will appear 25 times in a row. + feedback: No it will only appear 3 times. + hint: It doesn't say `{print}` i + correct_answer: C + question_score: '10' + 9: + question_text: How many times does Hedy chant Hip Hip Hooray? + code: |- + age = {ask} 'How old are you?' + {for} i {in} {range} 1 {to} age + {print} 'Hip Hip Hoorray!' + mp_choice_options: + - option: 1 time + feedback: Try again + - option: 2 times + feedback: Try again + - option: Never + feedback: Try again + - option: That depends on how old you are + feedback: That's right! + hint: '`{for}` i `{in}` `{range}` 1 `{to}` age' + correct_answer: D + question_score: '10' + 10: + question_text: Which code belongs to this output? + output: |- + Baby shark tututudutudu + Baby shark tututudutudu + Baby shark tututudutudu + Baby shark + mp_choice_options: + - option: |- + ``` + {for} i {in} {range} 1 {to} 3 + {print} Baby shark tututudutudu + {print} Baby shark + ``` + feedback: Mind the indentation + - option: |- + ``` + {for} i {in} {range} 1 {to} 3 + {print} Baby shark tututudutudu + {print} Baby shark + ``` + feedback: That's right! + - option: |- + ``` + {for} i {in} {range} 0 {to} 3 + {print} Baby shark tututudutudu + {print} Baby shark + ``` + feedback: '`{range}` 0 `{to}` 3 is 4 times.' + - option: |- + ``` + {for} i {in} {range} 0 {to} 3 + {print} Baby shark tututudutudu + {print} Baby shark + ``` + feedback: '`{range}` 0 `{to}` 3 is 4 times.' + hint: Mind the indentation + correct_answer: B + question_score: '10' + 12: + 1: + question_text: Which output is correct? + code: |- + {print} 'three and a half plus one and a half is...' + {print} 3.5 + 1.5 + mp_choice_options: + - option: '5' + feedback: Don't forget the first line of code! + - option: 3.5 + 1.5 + feedback: This is not the one! + - option: |- + three and a half plus one and a half is... + five + feedback: Take a close look at the second line... + - option: |- + three and a half plus one and a half is... + 5 + feedback: Great job! + hint: Both lines are printed! + correct_answer: D + question_score: '10' + 2: + question_text: Which of these codes is correct? + mp_choice_options: + - option: |- + ``` + flavors {is} vanilla, strawberry, chocolate + {print} 'I would like a ' flavors {at} {random} ' cake.' + ``` + feedback: All the different values of flavors should be in quotation marks. + - option: |- + ``` + 'flavors = vanilla, strawberry, chocolate' + {print} 'I would like a ' flavors {at} {random} ' cake.' + ``` + feedback: All the different values of flavors should be in quotation marks. + - option: |- + ``` + flavors = 'vanilla', 'strawberry', 'chocolate' + {print} 'I would like a ' flavors {at} {random} ' cake.' + ``` + feedback: Alright! + - option: |- + ``` + flavors = 'vanilla, strawberry, chocolate' + {print} 'I would like a ' flavors {at} {random} ' cake.' + ``` + feedback: All the different values of flavors should be in quotation marks. + hint: The second line is the same in each code, pay attention to the first line + correct_answer: C + question_score: '10' + 3: + question_text: What's wrong with this code? + code: |- + favorite_animal = {ask} 'What is your favorite animal?' + {print} 'I like ' favoriteanimal ' too!' + mp_choice_options: + - option: The name of the variable is different in line 1 than in line 2. + feedback: Correct! + - option: The quotation marks aren't used correctly in line 2 + feedback: That's not true + - option: You can't use the = sign when using an {ask} command + feedback: That's not true + - option: Nothing is wrong. + feedback: That's not true + hint: The quotation marks are used correctly + correct_answer: A + question_score: '10' + 4: + question_text: In which lines are quotation marks needed to get the code to work? + code: |- + {print} Welcome to the online shoe shop + category = {ask} What kind of shoes are you looking for? + {if} category = high heels + {print} High heels are 50% off now! + mp_choice_options: + - option: Line 1 and 2 + feedback: 'No' + - option: Line 1, 2 and 3 + feedback: 'No' + - option: Line 1, 2 and 4 + feedback: 'No' + - option: All of the lines + feedback: Perfect! + hint: Does line 3 need quotation marks too? + correct_answer: D + question_score: '10' + 5: + question_text: What output does Agent007 get when they put in the correct password? + code: |- + name {is} {ask} 'What is your name?' + {if} name {is} 'Agent007' + a {is} 'Go to the airport ' + else + a {is} 'Go to the train station ' + password {is} {ask} 'What is the password?' + {if} password {is} 'TOPSECRET' + b {is} 'tomorrow at 02.00' + {else} + b {is} 'today at 10.00' + {print} a + b + mp_choice_options: + - option: Go to the train station today at 10.00 + feedback: The agent won't be catching any bad guys here + - option: Go to the airport tomorrow at 02.00 + feedback: You've cracked the code! + - option: Go to the train station tomorrow at 02.00 + feedback: The agent won't be catching any bad guys here + - option: Go to the airport tomorrow at 10.00 + feedback: The agent won't be catching any bad guys here + hint: The correct password is TOPSECRET + correct_answer: B + question_score: '10' + 6: + question_text: Which line should be filled in at the `_`? + code: |- + {print} 'Welcome to McHedy!' + order = {ask} 'Would you like a hamburger or fries?' + {if} order = 'hamburger' + price = 12 + {if} order = 'fries' + price = 4 + drinks = {ask} 'Would you like a drink with that for 2 dollars?' + {if} drinks = 'yes' + _ + {print} 'That will be ' price ' dollar please' + mp_choice_options: + - option: |- + ``` + price = 14 + ``` + feedback: What if you only order fries and a drink? + - option: |- + ``` + price = '14' + ``` + feedback: What if you only order fries and a drink? + - option: |- + ``` + price = price + 2 + ``` + feedback: Excellent! + - option: |- + ``` + price = + 2 + ``` + feedback: Almost there! + hint: What if you only order fries and a drink? + correct_answer: C + question_score: '10' + 7: + question_text: Which output does a vegan get? + code: |- + menu = 'cookies', 'cheese', 'grapes' + {print} "It's my birthday! I`ve brought some snacks!" + diet = {ask} 'Do you have any dietary restrictions?' + {if} diet = 'gluten free' + {remove} 'cookies' {from} menu + {if} diet = 'vegan' + {remove} 'cheese' {from} menu + {print} 'For you I have brought: ' + {for} snack {in} menu + {print} snack + mp_choice_options: + - option: |- + It's my birthday! I've brought some snacks! + For you I have brought: + cookies + grapes + feedback: Terrific! + - option: |- + It's my birthday! I've brought some snacks! + For you I have brought: + grapes + feedback: There's more options than just one + - option: |- + It's my birthday! I've brought some snacks! + For you I have brought: + cheese + grapes + feedback: A vegan person can't have cheese + - option: |- + It's my birthday! I've brought some snacks! + For you I have brought: + grapes + cookies + feedback: Almost there, but look at the order of snacks in the list + hint: What item is removed from the list when you answer 'vegan'? + correct_answer: A + question_score: '10' + 8: + question_text: Which code was used to create this output? + code: '3.5' + mp_choice_options: + - option: |- + ``` + {print} '7 / 2' + ``` + feedback: 'No' + - option: |- + ``` + {print} 7 / 2 + ``` + feedback: That is right! + - option: |- + ``` + {print} 7 : 2 + ``` + feedback: 'No' + - option: |- + ``` + {print} 7 * 2 + ``` + feedback: 'No' + hint: 7 devided by 2 is 3.5 + correct_answer: B + question_score: '10' + 9: + question_text: Which code should be filled in in line 1 at the `_`? + code: |- + _ + {print} 'You won ' prizes {at} {random} '!' + mp_choice_options: + - option: |- + ``` + prizes = 'one' 'million' 'dollars', 'nothing' + ``` + feedback: You won nothing + - option: |- + ``` + prizes = 'one million dollars, nothing' + ``` + feedback: You won nothing + - option: |- + ``` + prizes = 'one million dollars', 'nothing' + ``` + feedback: Winner! + - option: |- + ``` + 'prizes' = 'one million dollars', 'nothing' + ``` + feedback: You won nothing + hint: The items on the list should be in quotation marks + correct_answer: C + question_score: '10' + 10: + question_text: Which line of code should be filled in at the `_` to complete the song ? + code: |- + actions = 'clap your hands', 'stomp your feet', 'shout Hurray!' + _ + {for} i {in} {range} 0 {to} 1 + {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 + mp_choice_options: + - option: |- + ``` + {for} i {in} {range} 1 {to} 3 + ``` + feedback: This is a hard one! All the actions on the list must be in the song. + - option: |- + ``` + {for} action {in} actions + ``` + feedback: You are amazing! + - option: |- + ``` + {repeat} 3 {times} + ``` + feedback: This is a hard one! All the actions on the list must be in the song. + - option: |- + ``` + {print} actions {at} {random} + ``` + feedback: This is a hard one! All the actions on the list must be in the song. + hint: This is a hard one! All the actions on the list must be in the song. + correct_answer: B + question_score: '10' + 13: + 1: + question_text: Which code should be filled in at the ??? ? + code: |- + name = {ask} 'What is your name?' + song = {ask} 'Whould you like to hear a song?' + birthday = {ask} 'Is today your birthday?' + ??? + {print} 'Happy Birthday to you!' + {print} 'Happy Birthday to you!' + {print} 'Happy Birthday dear ' name + {print} 'Happy Birthday to you!' + mp_choice_options: + - option: |- + ``` + {if} birthday {and} song = 'yes' + ``` + feedback: Almost there + - option: |- + ``` + {if} birthday = 'yes' {and} name = 'Hedy' + ``` + feedback: Hedy only sings for you if you like to hear a song + - option: |- + ``` + {if} song = 'yes' {and} birthday = 'yes' + ``` + feedback: Super! + - option: |- + ``` + {if} song = 'yes' {or} birthday = 'yes' + ``` + feedback: Hedy only sings if both answers are yes + hint: Hedy sings if you want to hear a song and it's you birthday + correct_answer: C + question_score: '10' + 2: + question_text: Which command is missing in the code at the place of the ??? ? + code: |- + menu = 'cheese', 'sausage rolls', 'cookies' + diet = {ask} 'Do you have any dietary restrictions?' + {if} diet = 'vegan' ??? diet = 'halal' + {remove} 'sausage rolls' {from} menu + mp_choice_options: + - option: '`{and}`' + feedback: You don't have to be vegan and muslim + - option: '`{or}`' + feedback: Great thinking! + - option: '`+`' + feedback: 'No' + - option: '`{print}`' + feedback: 'No' + hint: Neither vegans nor muslims can eat sausage rolls. + correct_answer: B + question_score: '10' + 3: + question_text: Which output is given to a member without a discount code? + code: |- + member = {ask} 'Do you have a membership card?' + discount = {ask} 'Do you have a discount code?' + {if} member = 'yes' {or} discount = 'yes' + {print} 'You get a free apple pie!' + {else} + {print} 'That will be 5 dollars please' + mp_choice_options: + - option: You get a free apple pie! + feedback: Great job! + - option: That will be 5 dollars please + feedback: That is not true + - option: This code won't work, so there is no output + feedback: There is nothing wrong with the code + - option: There is no way of knowing + feedback: There is! Read the question carefully + hint: Mind the command `{or}` in line 3 + correct_answer: A + question_score: '10' + 4: + question_text: Which line of code should follow this line in rock-paper-scissors game? + code: '{if} computer_choice {is} ''rock'' {and} your_choice {is} ''paper''' + mp_choice_options: + - option: |- + ``` + {print} 'you win' + ``` + feedback: You win! + - option: |- + ``` + {print} 'you lose' + ``` + feedback: You lose! + - option: |- + ``` + {print} 'tie' + ``` + feedback: It's only a tie if both choices are the same + - option: |- + ``` + {print} 'try again' + ``` + feedback: Try again! + hint: Paper beats rock + correct_answer: A + question_score: '10' + 5: + question_text: Which statement is true about this code? + code: |- + {if} name = 'Cinderella' {and} shoe_size = 38 + {print} 'You are my one true love!' + mp_choice_options: + - option: Every person with shoe size 38 is this prince's one true love + feedback: The prince is a little more picky than that! + - option: Every person named Cinderella is this prince's one true love + feedback: The prince is a little more picky than that! + - option: Every person that is named Cinderella and has shoe size 38 is this prince's one true love + feedback: Fantastic! + - option: Every person that's not named Cinderella and does not have shoe size 38 is this prince's one true love + feedback: The prince is a little more picky than that! + hint: Both statements have to be true + correct_answer: C + question_score: '10' + 6: + question_text: Which statement about this code is true? + code: |- + {print} 'Let me guess which family member you are!' + glasses = {ask} 'Do you wear glasses?' + female = {ask} 'Are you female?' + {if} glasses = 'yes' {and} female = 'yes' + {print} 'You must be Sophie!' + {if} glasses = 'no' {and} female = 'yes' + {print} 'You must be Marleen!' + {if} glasses = 'yes' {and} female = 'no' + {print} 'You must be Wouter!' + {if} glasses = 'no' {and} female = 'no' + {print} 'You must be Michael!' + mp_choice_options: + - option: Michael is a boy with glasses + feedback: Try again + - option: Marleen is a girl with glasses + feedback: Try again + - option: Wouter is a boy without glasses + feedback: Try again + - option: Sophie is a girl with glasses + feedback: Great job! + hint: Take a good look! Or do you need glasses? + correct_answer: D + question_score: '10' + 7: + question_text: Which statement is false? + code: |- + {print} 'Thank you for helping me take care of my pets' + {print} 'Here is a program to help feed them' + animal = {ask} 'What kind of animal are they?' + color = {ask} 'What colour are they?' + {if} animal = 'cat' {and} color = 'grey' + {print} 'That is Abby. She eats 3 scoops of cat nibbles' + {if} animal = 'cat' {and} color = 'orange' + {print} 'That is Milo. He eats 4 scoops of cat nibbles' + {if} animal = 'bird' {or} color = 'black' + {print} 'I fed them this moring! They do not need more food today' + {if} animal = 'hamster' {and} color = 'brown' + {print} 'You can feed them a piece of carrot' + mp_choice_options: + - option: The grey cat is called Abby + feedback: This is true! + - option: Milo the orange cat eats 4 scoops of cat nibbles + feedback: This is true + - option: The black hamster needs to be fed a piece of carrot + feedback: Great job! + - option: The yellow bird was fed this morning + feedback: This is true + hint: Read the last 4 lines carefully + correct_answer: C + question_score: '10' + 8: + question_text: What output do you get if you order popcorn but no drink? + code: |- + {print} 'Welcome to the movie theater' + popcorn = {ask} 'Would you like some popcorn?' + drink = {ask} 'Would you like a drink?' + {if} popcorn = 'yes' {and} drink = 'yes' + {print} 'That will be 8 dollars please' + {if} popcorn = 'no' {and} drink = 'yes' + {print} 'That will be 3 dollars please' + {if} popcorn = 'yes' {and} drink = 'no' + {print} 'That will be 5 dollars please' + {if} popcorn = 'no' {and} drink = 'no' + {print} 'Ok' + {print} 'Enjoy the movie' + mp_choice_options: + - option: |- + Welcome to the movie theater + That will be 8 dollars please + Enjoy the movie + feedback: You have paid too much! + - option: |- + Welcome to the movie theater + That will be 5 dollars please + Enjoy the movie + feedback: Amazing! + - option: |- + Welcome to the movie theater + That will be 3 dollars please + Enjoy the movie + feedback: That's not enough money! + - option: |- + Welcome to the movie theater + Ok + Enjoy the movie + feedback: You have to pay for your popcorn! + hint: popcorn = yes and drink = no + correct_answer: B + question_score: '10' + 9: + question_text: What is wrong with this code? + code: |- + 1 chocolate = {ask} 'Would you like chocolate sauce on your ice cream?' + 2 sprinkles = {ask} 'Would you like sprinkles on your ice cream?' + 3 {if} chocolate {and} sprinkles = 'yes' + 4 {print} 'Ice cream with chocolate sauce and sprinkles, coming up!' + 5 {if} chocolate = 'yes' {and} sprinkles = 'no' + 6 {print} 'Ice cream with chocolate sauce, coming up!' + 7 {if} chocolate = 'no' {and} sprinkles = 'yes' + 8 {print} 'Ice cream with sprinkles, coming up' + 9 {if} chocolate = 'no' {and} sprinkles = 'no' + 10 {print} 'Just plain icecream, coming up!' + mp_choice_options: + - option: |- + Line 3 should be: + ``` + {if} chocolate = 'yes' {and} sprinkles = 'yes' + ``` + feedback: Correct! + - option: "Line 3 should be: \n```\n{if} chocolate = 'no' {and} sprinkles = 'no'\n```" + feedback: This is not what I ordered! + - option: "Line 5 should be: \n```\n{if} chocolate = 'yes' {and} sprinkles = 'yes'\n```" + feedback: This is not what I ordered! + - option: |- + Line 7 should be: + ``` + {if} chocolate = 'yes' {and} sprinkles = 'no' + ``` + feedback: This is not what I ordered! + hint: There is a mistake in line 3 + correct_answer: A + question_score: '10' + 10: + question_text: Which command needs to be in line 8 at the place of the ??? ? + code: |- + {print} 'Welcome to the product finder of this supermarkt' + item = {ask} 'What product are you looking for?' + bakery = 'bread', 'buns', 'muffins' + drinks = 'soda', 'water', 'lemonade' + snacks = 'chips', 'nuts', 'dips' + frozen = 'fries', 'icecream', 'pizza' + fruit = 'bananas', 'apples', 'oranges' + {if} item {in} snacks ??? item {in} drinks + {print} 'This item is in aisle 3' + {if} item {in} bakery {or} item {in} bakery + {print} 'This item in in the back of the store' + {if} item {in} fruit + {print} 'The fruit is sold near the register' + mp_choice_options: + - option: '`{and}`' + feedback: There are no items that are both the list of snacks and the list of drinks + - option: '`{or}`' + feedback: Great job! + - option: '`{in}`' + feedback: 'No' + - option: '`{if}`' + feedback: 'No' + hint: The item is either in the list of snacks, or in the list of drinks + correct_answer: B + question_score: '10' + 14: + 1: + question_text: Which symbol should be used on the blank? + code: |- + name _ {ask} 'Who are you?' + {if} name == 'Hedy' + {print} 'Me too!' + mp_choice_options: + - option: '`=>`' + feedback: This is not a symbol. + - option: '`==`' + feedback: We are not comparing anything, just asking. + - option: '`!=`' + feedback: We are not comparing anything, just asking + - option: '`=`' + feedback: Right! + hint: We are not comparing anything, we are just asking a name. + correct_answer: D + question_score: '10' + 2: + question_text: Which of these codes has used the correct = or == symbol? + mp_choice_options: + - option: '{if} name = Hedy' + feedback: 'No' + - option: '{if} age = 24' + feedback: 'No' + - option: answer = {ask} 'What is your answer' + feedback: Yes! + - option: answer == {ask} 'How are you doing?' + feedback: 'No' + hint: When you are comparing two answers you should use == + correct_answer: C + question_score: '10' + 3: + question_text: Which symbols should be filled in on the two blanks? + code: |- + guests = {ask} 'How many people are at the party?' + {if} guests _ 130 + {print} 'You can come in!' + {if} guests _ 130 + {print} 'Im sorry, the club is full. ' + {print} 'You have to wait for a guest to leave' + mp_choice_options: + - option: '`>` and `<`' + feedback: That's not it + - option: '`=` and `>=`' + feedback: That's not it + - option: '`<` and `>=`' + feedback: You are right + - option: '`+` and `==`' + hint: There are 130 people allowed in the club + correct_answer: C + question_score: '10' + feedback: That's not it + 4: + question_text: What's wrong with this code? + code: |- + price = 10 + money = {ask} How much money do you have? + buy = {ask} 'Would you like to buy this teddy bear?' + {if} money >= price {and} buy == 'yes' + {print} 'You can buy the bear!' + {else} + {print} 'You cannot buy this bear!' + mp_choice_options: + - option: In line 1 == should be used instead of = + feedback: No that's not it + - option: Line 2 misses quotation marks + feedback: You are correct + - option: In line 4 = should have been used instead of == + feedback: No that's not it + - option: In line 4 <= should have been used instead of >= + feedback: No that's not it + hint: The symbols are right + correct_answer: B + question_score: '10' + 5: + question_text: Which symbol should be filled in on the blanks if the movie is suitable for kids for the age of 12 and up? + code: |- + age = {ask} 'How old are you?' + ticket = {ask} 'Do you have a ticket?' + {if} age _ {and} ticket == 'yes' + {print} 'You can enter the movie theater.' + {else} + {print} 'You are not allowed to come in!' + mp_choice_options: + - option: '`> 12`' + feedback: 12 year olds are allowed too + - option: '`>= 12`' + feedback: Great! + - option: '`< 12`' + feedback: These kids are too young! + - option: '`<= 12`' + feedback: These kids are too young + hint: '> means greater than' + correct_answer: B + question_score: '10' + 6: + question_text: How many times do you have to say you are annoyed before this annoying game stops? + code: |- + lives = 2 + {repeat} 10 {times} + {if} lives != 0 + answer = {ask} 'Are you annoyed yet?' + {if} answer == 'yes' + lives = lives - 1 + mp_choice_options: + - option: 10 times + feedback: It stops after 2 times + - option: 0 times + feedback: It stops after 2 times + - option: 1 time + feedback: It stops after 2 times + - option: 2 times + feedback: That is correct + hint: '!= means ''is not''' + correct_answer: D + question_score: '10' + 7: + question_text: What should be filled in on the three blanks? + code: |- + {print} 'Guess which number' + numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + number = numbers {at} {random} + game = 'on' + {for} i {in} {range} 1 {to} 10 + {if} game == 'on' + guess = {ask} 'Which number do you think it is?' + {if} guess < number + {print} _ + {if} guess > number + {print} _ + {if} guess == number + {print} _ + game = 'over' + mp_choice_options: + - option: '`''Lower''` and `''Higher''` and `''You win!''`' + feedback: That's not quite right. + - option: '`''Higher''` and `''Lower''` and `''You win!''`' + feedback: You win! + - option: '`''You win!''` and `''Lower!''` and `''Higher''`' + feedback: That's not quite right. + - option: '`''Lower!''` and `''You win!''` and `''Higher!''`' + feedback: That's not quite right. + hint: The last one should say you win. + correct_answer: B + question_score: '10' + 8: + question_text: Which statement is true about this roller coaster? + code: |- + length = {ask} 'Please fill in your length in cm' + {if} length < 120 + {print} 'Sorry, you cannot go on this roller coaster.' + {else} + {print} 'Enjoy the ride' + mp_choice_options: + - option: You must be taller than 120 cm to go on the roller coaster + feedback: True! + - option: You must be taller than 119 cm to go on the roller coaster + feedback: If you are 120 cm you won't get in + - option: You must be shorter than 120 cm to go on the roller coaster + feedback: '> means greater than' + - option: There are no length restrictions to go on the roller coaster + feedback: There are. + hint: '> means greater than' + correct_answer: A + question_score: '10' + 9: + question_text: How many pieces of chocolate will give you a stomach ache according to this fitbit? + code: |- + chocolate = {ask} 'How many pieces of chocolate have you eaten?' + {if} chocolate <= 2 + {print} 'That is a healthy amount' + {if} chocolate > 2 {and} chocolate =< 8 + {print} 'That is a bit much' + {if} chocolate > 8 + {print} 'You will get a stomach ache!' + mp_choice_options: + - option: 1 or more + feedback: 'No' + - option: 2 or more + feedback: 'No' + - option: 8 or more + feedback: Almost + - option: 9 or more + feedback: Great! + hint: '> 8 means more than 8' + correct_answer: D + question_score: '10' + 10: + question_text: What should be filled in in the blanks? + code: |- + {print} 'Whoever gets the most points wins!' + {if} points_player_1 < points_player_2 + {print} _ + mp_choice_options: + - option: '''player 1 wins''' + feedback: Look at who has the highest score! + - option: '''player 2 wins''' + feedback: Yes! + - option: '''player 2 loses''' + feedback: Look at who has the highest score! + - option: '''It is a tie''' + feedback: No it's not, one player has a higher score + hint: You win the game by having the most points + correct_answer: B + question_score: '10' + 15: + 1: + question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.' + code: |- + answer = 0 + {while} answer _ 'Amsterdam' + answer = {ask} 'What is the capital city of the Netherlands?' + {print} 'You have given the correct answer' + mp_choice_options: + - option: '`=!`' + feedback: That is not right. + - option: '`==`' + feedback: You don't have to keep guessing if you've given the right answer. + - option: '`!=`' + feedback: Correct + - option: '`=`' + feedback: That's not it + hint: Keep guessing until you say Amsterdam + correct_answer: C + question_score: '10' + 2: + question_text: Which of these codes has used the correct symbol(s)? + mp_choice_options: + - option: |- + ``` + {while} name = Hedy + ``` + feedback: 'No' + - option: |- + ``` + {while} age = 24 + ``` + feedback: 'No' + - option: |- + ``` + {while} time > 0 + ``` + feedback: Yes! + - option: |- + ``` + {while} answer == yes' + ``` + feedback: A quotation mark is missing + hint: When you are comparing two answers you should use == + correct_answer: C + question_score: '10' + 3: + question_text: Which command should be filled in on the blank? + code: |- + _ age < 18 + {print} 'you are not allowed in this bar' + mp_choice_options: + - option: '`{in}`' + feedback: That's not it + - option: '`{while}`' + feedback: You are right + - option: '`{for}`' + feedback: That's not it + - option: '`{range}`' + feedback: That's not it + hint: You are not allowed in the bar as long as you are 17 or younger + correct_answer: B + question_score: '10' + 4: + question_text: What's wrong with this code? + code: |- + options = 1, 2, 3, 4, 5, 6 + {print} 'Throw 6 as fast as you can!' + thrown = 0 + tries = 0 + {while} thrown == 6 + thrown = options {at} {random} + {print} 'You threw ' thrown + tries = tries + 1 + {print} 'Yes! You have thrown 6 in ' tries ' tries.' + mp_choice_options: + - option: In line 1 `==` should be used instead of `=` + feedback: No that's not it + - option: Line 2 misses quotation marks + feedback: That's not right + - option: In line 5 `{if}` should have been used instead of `{while}` + feedback: That's not it + - option: In line 5 `!=` should have been used instead of `==` + feedback: You are correct + hint: There is something wrong in line 5 + correct_answer: D + question_score: '10' + 5: + question_text: What should be placed on the blank to make this program work correctly? + code: |- + wetness = 10 + {while} wetness != 0 + {print} 'Your hair is still wet, hair dryer on!' + {sleep} 1 + {clear} + wetness _ + + {print} 'All dry!' + mp_choice_options: + - option: |- + ``` + = wetness + ``` + feedback: That will not change anything + - option: |- + ``` + = wetness = 1 + ``` + feedback: You can't have two times = in one line + - option: |- + ``` + = wetness - 1 + ``` + feedback: You are correct! + - option: |- + ``` + = wetness + 1 + ``` + feedback: The program should count down + hint: wetness should get less each time + correct_answer: C + question_score: '10' + 6: + question_text: What is wrong with this code? + code: |- + lives = 100 + {while} lives != 0 + answer = {ask} 'Are you annoyed yet?' + {if} answer == 'yes' + lives = lives - 1 + mp_choice_options: + - option: '`{while}` should be`{if}`' + feedback: No that is not right + - option: '`{if}` should be `{while}`' + feedback: No that is not right + - option: Line 3 should start with more indentation + feedback: No that's not right + - option: Line 2 should start with less indentation + feedback: That is correct + hint: Look closely at the indentation + correct_answer: D + question_score: '10' + 7: + question_text: How should this program be changed so that it works? + code: |- + {print} 'Guess which number' + numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 + number = numbers {at} {random} + game = 'on' + {if} game == 'on' + guess = {ask} 'Which number do you think it is?' + {if} guess < number + {print} _ + {if} guess > number + {print} _ + {if} guess == number + {print} _ + game = 'over' + mp_choice_options: + - option: '... change the first `{if}` into a `{while}`' + feedback: Perfect! + - option: '... change the second `{if}` into a `{while}`' + feedback: That's not quite right. + - option: '... change the third `{if}` into a `{while}`' + feedback: That's not quite right. + - option: '... change the fourth `{if}` into a `{while}`' + feedback: That's not quite right. + hint: The last one should say you win. + correct_answer: A + question_score: '10' + 8: + question_text: Which statement is true about this automated toilet system? + code: |- + {while} toilet == 'occupied' + lights = 'on' + air_freshener_sprays = 'yes' + {sleep} 60 + lights = 'off' + air_freshener_sprays = 'no' + mp_choice_options: + - option: The lights and air freshener will turn off after 1 minute + feedback: False! + - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet + feedback: Great job + - option: The air freshener sprays once you leave the toilet. + feedback: It only sprays when you're in there. + - option: The lights will always stay on. + feedback: That wouldn't be right. + hint: The block after the {while} command keeps happening while the toilet is occupied. + correct_answer: B + question_score: '10' + 9: + question_text: What will the diet app say if you have eaten 1600 calories today? + code: |- + calories = {ask} 'How many calories have you eaten today?' + {while} calories <= 1000 + {print} 'You could eat some more' + {while} calories > 1000 {and} calories =< 2000 + {print} 'That is alright' + {while} calories > 2000 + {print} 'You have had enough for today' + mp_choice_options: + - option: Nothing. 1600 is not programmed into the app. + feedback: 'No' + - option: You could eat some more + feedback: 'No' + - option: That is alright + feedback: Yes! + - option: You have eaten enough for today + feedback: 'No' + hint: 1600 is between 1000 and 2000 + correct_answer: C + question_score: '10' + 10: + question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.' + code: |- + name_player_1 = {ask} 'Name player 1:' + name_player_2 = {ask} 'Name player 2:' + {while} points_player_1 > points_player_2 + {print} _ ' is in the lead right now!' + mp_choice_options: + - option: |- + ``` + name_player_1 + ``` + feedback: You are right! + - option: |- + ``` + name_player_2 + ``` + feedback: No they are losing! + - option: |- + ``` + points_player_1 + ``` + feedback: You should fill in a name, not a number + - option: |- + ``` + points_player_2 + ``` + feedback: You should fill in a name, not a number + hint: You win the game by having the most points. Your name should appear on the screen + correct_answer: A + question_score: '10' + 16: + 1: + question_text: Which command should be filled in on the blanks to print a random snack? + code: |- + snacks = nachos, chips, cucumber, sweets + {print} _ + mp_choice_options: + - option: '`snacks {at} {random}`' + feedback: This is the old way. + - option: '`[{random} snack]`' + feedback: The order is wrong. + - option: '`snacks[{random}]`' + feedback: Correct + - option: '`snacks[{at} {random}]`' + feedback: We do not need `at`anymore + hint: We no longer use {at} + correct_answer: C + question_score: '10' + 2: + question_text: What should be filled in on the blanks if you want a list of what chores are done by whom? + code: |- + friends = ['Wesley', 'Eric', 'Kaylee'] + chores = ['the cooking', 'the cleaning', 'nothing'] + {for} i {in} {range} 1 {to} 3 + {print} _ + mp_choice_options: + - option: |- + ``` + friends[i] has to do chores [i] + ``` + feedback: Mind the spacing. + - option: |- + ``` + friends[1] has to do chores[1] + ``` + feedback: It will print 3 times that Wesley has to do the cooking + - option: |- + ``` + chores[i] ' has to do ' friends[random] + ``` + feedback: The person has to do the chore, not the other way around + - option: |- + ``` + friends[i] ' has to do ' chores[i] + ``` + feedback: Fantastic! + hint: '`i` tells us what item in the list it is. So friend 1 does chore 1 etc.' + correct_answer: D + question_score: '10' + 3: + question_text: What is a possible output for this program? + code: |- + friends = ['Wesley', 'Eric', 'Kaylee'] + chore = ['the cooking', 'the cleaning', 'nothing'] + {for} i {in} {range} 1 {to} 3 + {print} friends[i] has to do chores[i] + mp_choice_options: + - option: |- + ``` + Wesley has to do the cooking + Eric has to do the cleaning + Kaylee has to do nothing + ``` + feedback: Super! + - option: |- + ``` + Kaylee has to do the cooking + Wesley has to do the cleaning + Eric has to do nothing + ``` + feedback: No, it is not random. + - option: |- + ``` + Wesley has to do the cooking + Wesley has to do the cleaning + Wesley has to do the nothing + ``` + feedback: Poor Wesley! + - option: |- + ``` + Wesley has to do the cooking + Wesley has to do the cooking + Wesley has to do the cooking + ``` + feedback: That's not it + hint: It's not random... + correct_answer: A + question_score: '10' + 4: + question_text: What is wrong with this code? + code: |- + friends = ['Jaylee', 'Erin', 'Fay'] + lucky_numbers = [15, 18, 6] + {for} i {in} {range} 0 {to} 3 + print 'the lucky number of ' friends[i] + print 'is ' lucky_numbers[i] + mp_choice_options: + - option: The variable in line 4 should be `friend[i]`, not `friends[i]` + feedback: That is not right. + - option: Line 3 should say `in range 1 to 3` not `in range 0 to 3` + feedback: Good catch! + - option: Line 4 should say 'lucky_number', not 'lucky number + feedback: It's not a variable, it's just text. + - option: '{in} in line 3 should be removed' + feedback: That's not it + hint: There's nothing wrong with line 4 + correct_answer: B + question_score: '10' + 5: + question_text: Which line should be filled in in the blank? + code: |- + animals = ['dog', 'cow', 'horse'] + _ + {for} i {in} {range} 1 {to} 3 + {print} 'the ' animals[i] ' says ' sounds[i] + mp_choice_options: + - option: |- + ``` + noises = ['moo', 'woof', 'neigh'] + ``` + feedback: Mind the variable name and the order of the sounds. + - option: |- + ``` + sounds = '[woof], [moo], [neigh]' + ``` + feedback: Look at line one to see how brackets are supposed to be used. + - option: |- + ``` + sounds = [woof, moo, neigh] + ``` + feedback: Don't forget the quotation marks! + - option: |- + ``` + sounds = ['woof', 'moo', 'neigh'] + ``` + feedback: Great job! + hint: Look at line 1 to see proper use of brackets and quotation marks. + correct_answer: D + question_score: '10' + 6: + question_text: Which statement is true? + code: |- + people = ['Chris', 'Jaylino', 'Ryan'] + games = ['fortnite', 'minecraft', 'fifa'] + {for} o {in} {range} 1 {to} 3 + {print} people[o] ' likes ' games[o] + mp_choice_options: + - option: You are not allowed to use the variable o. It should be named i. + feedback: i is the most commonly used variable name in this case, but it's not mandatory to use i. + - option: The output will say that Jaylino likes fortnite. + feedback: No, he likes minecraft. + - option: The output will say that Ryan likes fifa + feedback: Correct + - option: This code will not work. It will give and error. + feedback: No, the code is correct. + hint: There is nothing wrong with this code. + correct_answer: C + question_score: '10' + 7: + question_text: What's wrong with this code? + code: |- + people = ['Savi', 'Senna', 'Fayenne'] + transportation = ['bike', 'train', 'car'] + {for} i {in} {range} 1 {to} 3 + {print} people[i] goes to school by transportation[i] + mp_choice_options: + - option: Line 1 needs less quotation marks + feedback: That is not right. + - option: Line 3 should start with indentation + feedback: It should not! + - option: Line 4 should start without indentation + feedback: It should not + - option: Line 4 needs more quotation marks. + feedback: Amazing! + hint: There is a mistake made in the usage of quotation marks. + correct_answer: D + question_score: '10' + 8: + question_text: Which of these codes belongs to this output? + code: |- + Macy and Kate get to go first + Lionell and Raj get to go second + Kim and Leroy get to go third + mp_choice_options: + - option: |- + ``` + teams = ['Macy and Kate', 'Lionell and Raj', 'Kim and Leroy'] + position = ['first', 'second', 'third'] + {for} i {in} {range} 0 {to} 3 + {print} teams[random] ' get to go ' position[i] + ``` + feedback: This is not right + - option: |- + ``` + teams = ['Macy and Kate', 'Lionell and Raj', 'Kim and Leroy'] + position = ['first', 'second', 'third'] + {for} i {in} {range} 1 {to} 3 + {print} teams[i] ' get to go ' position[i] + ``` + feedback: Amazing! + - option: |- + ``` + teams = ['Macy', 'Kate', 'Lionell', 'Raj', 'Kim', 'Leroy'] + position = ['first', 'second', 'third'] + {for} i {in} {range} 1 {to} 6 + {print} teams[random] ' get to go ' position[random] + ``` + feedback: This is not it. + - option: |- + ``` + teams = ['Macy and Kate' 'Lionell and Raj' 'Kim and Leroy'] + position = ['first' 'second' 'third'] + {for} teams {in} {range} 0 {to} 3 + {print} teams[i] ' get to go ' position[i] + ``` + feedback: This is not going to work! + hint: If you look carefully at the first line, you'll see that only the first two answers are possibly correct. + correct_answer: B + question_score: '10' + 9: + question_text: What is a possible output for this code? + code: |- + countries = ['Canada', 'Zimbabwe', 'New Zealand'] + {for} i {in} {range} 0 {to} 1 + {print} 'I will travel to ' countries[random] + mp_choice_options: + - option: |- + ``` + I will travel to Canada + I will travel to Canada + ``` + feedback: Great job! + - option: |- + ``` + I will travel to Canada + ``` + feedback: It will be repeated twice + - option: |- + ``` + I will travel to Canada, Zimbabwe and New Zealand + ``` + feedback: This is not it. + - option: |- + ``` + I will travel to Canada + I will travel to Zimbabwe + I will travel to New Zealand + ``` + feedback: It's only repeated twice + hint: Range 0 to 1 is 2 times + correct_answer: A + question_score: '10' + 10: + question_text: Which 3 lines will complete this code correctly? + code: |- + {print} 'The book raffle will start soon' + {print} 'Get your tickets now!' + books = ['Narnia', 'The Hobbit', 'Oliver Twist', 'Harry Potter', 'Green eggs and ham'] + people = {ask} 'How many raffle tickets are sold?' + list_of_numbers = [1, 2] + {for} i {in} {range} 3 {to} people + {add} i {to} list_of_numbers + {for} i {in} {range} 1 {to} 5 + mp_choice_options: + - option: |- + ``` + chosen_number = list_of_numbers at random + print books[i] ' will go to person number ' chosen_number + {add} chosen_number {to} list_of_numbers + ``` + feedback: Almost there... but adding the winner to the list makes this raffle unfair + - option: |- + ``` + print person[i] ' wins ' book[i] + ``` + feedback: There is no list called 'person' + - option: |- + ``` + chosen_number = list_of_numbers[people] + print books[people] ' will go to person number ' chosen_number + {remove} chosen_number {from} list_of_numbers + ``` + feedback: This is not it. + - option: |- + ``` + chosen_number = list_of_numbers[random] + print books[i] ' will go to person number ' chosen_number + {remove} chosen_number {from} list_of_numbers + ``` + feedback: Fantastic! + hint: You need to use the {remove} command + correct_answer: D + question_score: '10' + 17: + 1: + question_text: What is the output of this code? + code: |- + minions = ['Bob', 'Kevin', 'Stuart'] + {for} x in minions: + {print} x + mp_choice_options: + - option: |- + ``` + m i n i o n s + ``` + feedback: This is not it. + - option: |- + ``` + Bob + Kevin + Stuart + ``` + feedback: Correct! + - option: |- + ``` + minions + minions + minions + ``` + feedback: Take a look at the content of your list. + - option: |- + ``` + B o b K e v i n S t u a r t + ``` + feedback: Do not loop through the letters. + hint: Loop through your list. + correct_answer: B + question_score: '10' + 2: + question_text: What is wrong with this code? + code: |- + seconds_minute = 60 + minute_hour = 60 + hour_day = 24 + leap_year = 366 + no_leap_year = 365 + years = ask 'what year is it?' + {if} years = 2024: + print seconds_minute * minute_hour * hour_day * leap_year + {else}: + print seconds_minute * minute_hour * hour_day * noleap_year + mp_choice_options: + - option: You cannot have so many variables. + feedback: This is not it. + - option: The way the variables are multiplied is incorrect. + feedback: Not true! + - option: One of the variables `noleap_year` does not belong with the `{if}` statement. + feedback: Keep looking for the mistake. + - option: The `noleap_year` has to be identical in both cases. + feedback: Correct! + hint: Read the code carefully. + correct_answer: D + question_score: '10' + 3: + question_text: How many hedgehogs will this code print? + code: |- + {for} x in range 1 to 3: + {for} y in range 1 to 2: + {print} 🦔 + mp_choice_options: + - option: |- + ``` + 🦔 + 🦔 + 🦔 + ``` + feedback: Try again. + - option: |- + ``` + 🦔 + 🦔 + ``` + feedback: One more try. + - option: |- + ``` + 🦔 + 🦔 + 🦔 + 🦔 + 🦔 + 🦔 + ``` + feedback: Well done! + - option: |- + ``` + 🦔 + 🦔 + 🦔 + 🦔 + 🦔 + ``` + feedback: That is not it. + hint: Think about how many times you need repeating. + correct_answer: C + question_score: '10' + 4: + question_text: What is wrong with code? + code: |- + name_color = {ask} 'What is your favorite color?' + {if} name_color == 'red': + {print} 'the color of a tomato' + {elif} name_color == 'green': + {print} 'the color of an apple' + {elif} name_color == 'blue': + {print} 'the color of a blueberry' + {elif} name_color == 'yellow': + {print} 'the color of a banana' + {elif}: + {print} 'this fruit-color does not exist' + mp_choice_options: + - option: The first `{elif}` should be used before the `print` command + feedback: Try again. + - option: '`{elif}` can only be used once' + feedback: From now on we can use elif multiple times. + - option: '`==` used with `{elif}` should be replaced by `=`' + feedback: Not correct. + - option: '`{elif}` in the last line should be replaced by `{else}`' + feedback: Great! + hint: Think about `{if}`, `{elif}`, `{else}`. + correct_answer: D + question_score: '10' + 5: + question_text: What is the output of this code? + code: |- + numbers = [7, 19, 29, 41, 53, 71, 79, 97] + {for} prime in numbers: + {if} prime <= 10: + {print} prime + {elif} prime >= 60: + {print} prime + {elif} prime >= 90: + {print} prime + {else}: + {print} 'another number' + mp_choice_options: + - option: |- + ``` + 7 + another number + another number + another number + another number + 71 + 79 + 97 + ``` + feedback: Well done! + - option: |- + ``` + another number + 19 + 29 + 41 + 53 + 71 + 79 + 97 + ``` + feedback: Try again. + - option: |- + ``` + 7 + 19 + 29 + 41 + 53 + 71 + 79 + another number + ``` + feedback: One more try. + - option: |- + ``` + 7 + 19 + 29 + 41 + 53 + 71 + 79 + 97 + ``` + feedback: That is not it. + hint: Think about how many times you need repeating and the values of if and elif. + correct_answer: A + question_score: '10' + 6: + question_text: What is wrong with code? + code: |- + name = {ask} 'What is your name?' + {if} name == 'Hedy': + password = {ask} 'What is your password?' + {if} password =='turtle123': + {print} 'Yey' + {else}: + {print} 'Access denied' + {else}: + {print} 'Go fish' + mp_choice_options: + - option: '`{elif}` is missing.' + feedback: Try again. + - option: '`{else}` can only be used once.' + feedback: From now on we can use elif multiple times. + - option: Nothing! + feedback: There is a mistake. Look carefully! + - option: There is an indentation mistake in the last line. + feedback: Amazing! + hint: There is a mistake somewhere... + correct_answer: D + question_score: '10' + 7: + question_text: Which of the following codes will print five times 'the result is 3' on the screen? + mp_choice_options: + - option: |- + ``` + numbers = [1, 2 , 3, 4, 5] + {for} n in numbers: + result = n * 1 + {print} 'The result is ' result + ``` + feedback: Try again! + - option: |- + ``` + numbers = [1, 2, 3, 4, 5] + {for} u in numbers: + number = u + {print} 'The result is ' number + ``` + feedback: That is not it. + - option: |- + ``` + numbers = [1, 2, 3, 4, 5] + {for} number in numbers: + number = 3 + {print} 'The result is ' number + ``` + feedback: Very good! + - option: |- + ``` + numbers = [1, 2 , 3, 4, 5] + {for} n in numbers: + n = result + {print} 'The result is ' result + ``` + feedback: That is not it. + hint: Think about mathematical symbols. + correct_answer: C + question_score: '10' + 8: + question_text: What is wrong with code? + code: |- + insects = ['🐝', '🦋', '🕷', '🐞'] + your_favorite = {ask} 'what is your favorite insect?' + {for} insect in insects: + {if} your_favorite == '🐝' {or} your_favorite == '🐞': + {print} 'very useful' + {elif} your_favorite == '🕷': + {print} 'it can catch mosquitoes' + {else}: + {print} 'almost all insects can be useful one way or another' + mp_choice_options: + - option: '`{or}` cannot be used with `{if}`.' + feedback: Try again. + - option: In the `{for}` command `insect` should be `insects`. + feedback: Not true. + - option: Nothing! + feedback: Well done! + - option: There is an indentation mistake in the last line. + feedback: Nope. + hint: Read the code carefully. + correct_answer: C + question_score: '10' + 9: + question_text: Which one of the codes below gave this output? + code: |- + -5 is negative + -4 is negative + -3 is negative + -2 is negative + -1 is negative + 0 is positive + 1 is positive + 2 is positive + 3 is positive + mp_choice_options: + - option: "```\n {for} number in range -5 to 3:\n {if} number > 0: \n {print} number ' is positive'\n {elif} number < 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + feedback: Try again! + - option: "```\n {for} number in range -5 to 3:\n {if} number > 0: \n {print} number ' is positive'\n {elif} number <= 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + feedback: That is not it. + - option: "```\n {for} number in range -5 to 3:\n {if} number >= 0: \n {print} number ' is positive'\n {elif} number < 0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + feedback: Very good! + - option: "```\n {for} number in range -5 to 3:\n {if} number < 0: \n {print} number ' is positive'\n {elif} number <=0: \n {print} number ' is negative' \n {else}: \n {print} number ' is zero'\n```" + feedback: That is not it. + hint: Read the code carefully. + correct_answer: C + question_score: '10' + 10: + question_text: What is wrong with this code? + code: |- + {for} number in range 1 to 5: + volume_room = num * num * num + {print} volume_room ' cubic meters' + {if} volume_room > 100: + {print} 'this is a large room' + {elif} volume_room < 100: + {print} 'small room but cosy' + {else}: + {print} 'i will look for something else' + mp_choice_options: + - option: The word num needs quotation marks. + feedback: Try again. + - option: The `{if}` command is not used correctly. + feedback: Not true. + - option: Line 3 should be `volume_room = number * number * number`. + feedback: Well done! + - option: There is an indentation mistake in the last line. + feedback: Nope. + hint: Read the code carefully. + correct_answer: C + question_score: '10' diff --git a/content/slides/da.yaml b/content/slides/da.yaml index fa5f0ab8d6b..f3b12f4e62b 100644 --- a/content/slides/da.yaml +++ b/content/slides/da.yaml @@ -38,7 +38,7 @@ levels: code: '{print} Welcome to Hedy!' 8: header: Programming in Hedy - text: Output appears on the left-hand side. + text: Output appears on the right-hand side. code: '{print} Welcome to Hedy!' 9: header: Programming in Hedy @@ -63,22 +63,21 @@ levels: 3: header: 'Hedy level 1: {ask}' text: |- - The second code that you can use in level 1 is `{ask}`. + You can change the text after the print command to whatever you want. - `{ask}` is used to ask a question that can be answered. + Or you could print multiple lines by adding another line of code that also starts with `{print}`. code: |- - {print} Welcome to your own rock scissors paper! - {ask} What will you choose? + {print} Welcome to Hedy! + {print} Start programming now! 4: header: 'Hedy level 1: {echo}' text: |- - The final text code that you can use in level 1 is `{echo}`. + The second code that you can use in level 1 is `{ask}`. - `{echo}` is used to repeat the answer of an `{ask}`. + `{ask}` is used to ask a question that can be answered. code: |- - {print} Hello! - {ask} What is your name? - {echo} hello + {print} Welcome to your own rock scissors paper! + {ask} What will you choose? 5: header: Programming! text: |- @@ -90,19 +89,19 @@ levels: {echo} hello 6: header: Programming! - text: Adventures are shown in tabs. + text: "With `{print}`, `{ask}` and `{echo}` you can already create a little story.\nThis is a good time to try the Parrot, Story and Rock, Paper Scissors adventures." editor: /hedy/1 7: header: Programming! - text: The yellow arrow buttons can be used to copy examples. - editor: /hedy#print_command + text: Adventures are shown in tabs. + editor: /hedy/1 8: header: Drawing with the turtle text: Now that we have seen at text codes, we will now look at drawing codes next. editor: /hedy#print_command 9: header: 'Drawing with the turtle: {forward}' - text: '`{forward}` is used to move the turtle forward.' + text: 'Now that we have seen at text codes, we will now look at drawing codes next.' 10: header: 'Drawing with the turtle: {forward}' text: '`{forward}` is used to move the turtle forward.' @@ -311,7 +310,7 @@ levels: debug: 'True' 9: header: Ready, Set, Go! - text: Enjoy the adventures in level 4! + text: "In this level you'll also learn the {clear} command.\nWith this command you can wipe all the text from your output screen.\n\nBe careful that you always use a sleep command too. If you don't the computer will wipe all the text before you can read it!" code: |- {print} '3' {clear} diff --git a/content/slides/kab.yaml b/content/slides/kab.yaml new file mode 100644 index 00000000000..3de088e10b5 --- /dev/null +++ b/content/slides/kab.yaml @@ -0,0 +1,565 @@ +levels: + 0: + 2: + header: Programming + text: "Programming is giving instructions to a computer, using the language of the computer.\n\nSuch a language is called a \"programming language\"." + 3: + header: Programming Language + text: "Maybe you already know some programming languages?\nSome examples are:\n* Scratch\n* Python\n* HTML" + 4: + header: Programming + text: "If you can program, you can do many cool things:\n* Build interactive stories\n* Create computer drawings and draw these on paper or fabric\n* Build your own apps to use on your phone" + 7: + header: Programming in Hedy + code: '{print} Welcome to Hedy!' + text: We start the code with the Run code button underneath the code. + 8: + code: '{print} Welcome to Hedy!' + header: Programming in Hedy + text: Output appears on the right-hand side. + 9: + text: The output can also be a drawing. + header: Programming in Hedy + code: "{forward} 100\n{turn} {left}" + 6: + header: Programming in Hedy + text: Code words will be shown in pink. + code: '{print} Welcome to Hedy!' + 5: + header: Programming in Hedy + text: In Hedy we use special codes, like `{print}`. + code: '{print} Welcome to Hedy!' + 1: + header: Welcome to Hedy! + text: Hedy is a programming language. + 1: + 5: + header: '{echo}' + code: "{print} Hello!\n{ask} What is your name?\n{echo} hello" + text: "As you could see in the previous example. If you use the `{ask}` command, you can ask a question.\nThe answer, however doesn't show in the output screen.\n\nIf you do want the answer to show, you can use the final command of this level: `{echo}`.\n`{echo}` is used to repeat the answer of an `{ask}`." + 7: + editor: /hedy/1 + header: Programming! + text: Adventures are shown in tabs. + 12: + header: Debugging + debug: 'True' + code: "I am DJ Hedy\n{print} What song would you like to hear?\n{ask} I like that song too!\n{print} Next up... {echo}" + text: Debugging a code means getting rid of mistakes in the code. Let's debug this code together. Click the ladybug button to start the debugger. + 3: + header: The {print} command + code: "{print} Welcome to Hedy!\n{print} Start programming now!" + text: "You can change the text after the print command to whatever you want.\n\nOr you could print multiple lines by adding another line of code that also starts with `{print}`." + 2: + text: "The first code that you can use in level 1 is `{print}`.\n\n`{print}` is used to show text on the screen." + code: '{print} Show text on the screen' + header: '{print}' + 11: + text: '`{turn}` is used to make the turtle turn left or right.' + header: 'Drawing with the turtle: {turn}' + code: "{forward} 50\n{turn} {left}" + 1: + header: Welcome to level 1! + text: "We will start level 1 by making stories in Hedy!\n\nWe need three text codes to create interactive stories." + 8: + header: Programming! + text: The yellow arrow buttons can be used to copy examples. + editor: /hedy#print_command + 10: + code: '{forward} 50' + text: '`{forward}` is used to move the turtle forward.' + header: 'Drawing with the turtle: {forward}' + 4: + code: "{print} Welcome to your own rock scissors paper!\n{ask} What will you choose?" + header: '{ask}' + text: "The second code that you can use in level 1 is `{ask}`.\n\n`{ask}` is used to ask a question that can be answered." + 9: + header: Drawing with the turtle + text: Now that we have seen at text codes, we will now look at drawing codes next. + 6: + text: "With `{print}`, `{ask}` and `{echo}` you can already create a little story.\nThis is a good time to try the Parrot, Story and Rock, Paper Scissors adventures." + header: Programming! + editor: /hedy/1 + 13: + text: Enjoy the adventures in level 1! + header: Let the programming fun begin! + 2: + 3: + header: Interactive + code: "name {is} {ask} What is your name?\n{print} Hello name" + text: "We can also set a variable by asking questions.\n\nThe answer to the question is stored in the variable.\n\nThis way we don't need the `{echo}` command." + 6: + header: Sleep 5 + code: "pause {is} 10\n{print} My favorite colour is...\n{sleep} pause\n{print} green!" + text: "You can add a number after the `{sleep}` command if you want the pause to be longer.\n\nIf you want, you could even use a variable instead of a number to decide the duration of the sleep command." + 7: + header: Debugging + text: Debugging a code means getting rid of mistakes in the code. Let's debug this code together. Click the ladybug button to start the debugger. + debug: 'True' + code: "{print} Welcome to the donut shop!\nfilling {is} What kind of filling would you like?\n{print} You have chosen... Filling! Yum!\ntopping {ask} What kind of topping would you like?\ntopping is delicious!\n{print} I'll go get your donut. {sleep}\n{print} Here you go! A filling donut with toping!\n{ask} Have a nice day!" + 8: + header: Let the programming fun begin! + text: Enjoy the adventures in level 2! + 4: + text: Now that we use variables, we can use multiple variables instead of just one `{echo}` command. + code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old." + header: Multiple variables + 2: + text: To make or 'set' a variable we use the `{is}` command + code: "name {is} Hedy\nage {is} 15\n{print} name is age years old" + header: Variables + 5: + text: You can also use the `{sleep}` command to pause the code for a while. + header: Sleep + code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!" + 1: + header: Welcome to level 2 + text: "In this level you will learn to use variables.\n\nA variable is a word that can be used to store information.\n\nFor example: a name, age or favorite sports team." + 3: + 1: + header: Welcome to level 3 + text: In this level you'll learn how to make a list, add and remove items form your lists and pick a random item off that list. + 3: + header: At random + text: "You can use the list with the `{at}` `{random}` command.\nThe computer will randomly pick one item of the list.\nEvery time you run this code the output will differ." + code: "animals {is} dogs, cats, kangaroos\n{print} animals {at} {random}" + 5: + header: Add to + text: "You can add items to a list with the `{add}` `{to}` command.\n\nYou can choose what to add to the list or you can use the `{add}` `{to}` command in combination with the `{ask}` command.\nThis way you can let the player decide what to add to the list." + code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\n{print} I choose animals {at} {random}" + 4: + text: You can use the `{at}` `{random}` command in a sentence as well. + header: At random in a sentence + code: "animals {is} dogs, cats, kangaroos\n{print} My favorite animal is animals {at} {random}" + 8: + text: Enjoy the adventures in level 3! + header: Let's get to work! + 7: + debug: 'True' + header: Debugging + editor: "music_genres {is} rock, pop, metal, indie, jazz\nchosen_genre is music {at} {random}\n{print} Let's listen to chosen genre\nnice {ask} Do you like that genre?\n{remove} chosen_genre {from} chosen_genre\nsecond_choice {is} music_genres\n{print} or do you prefer... second_choice {at} {random}\n{remove} second_choice {to} music_genres\n{print} I like music_genre {random} best!" + text: Let's debug this code! + 6: + code: "animals {is} dog, cat, kangaroo\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}" + text: "The opposite of the `{add}` `{to}` command is the `{remove}` `{from}` command.\nThis command removes an item from a list." + header: Remove from + 2: + header: Making a list + text: "You make a list with `{is}`.\n\nSeparate the items on your list with a comma." + code: animals {is} dogs, cats, kangaroos + 4: + 4: + code: "{print} 'print with quotes!'" + text: Each time you use the `{print}` command you need to put the text that you want to appear on the screen in quotation marks. + header: Quotation marks with print + 5: + header: Quotation marks with ask + text: This also goes for the `{ask}` command. + code: name {is} {ask} 'name please?' + 10: + header: Debugging + code: "{clear}\n{print} What a nice day to go to the beach!\n{ask} 'Do you want to build a sandcastle or swim in the ocean?'\n{print} 'You would like to activity '\n{print} 'I'd like to do that too'\n{print} 'Look at these beautiful seashells!'\ncolors {is} 'orange, silver, white, brown'\n{print} 'I love the colors {at} {random} one!'\nchoice {is} {ask} Which one do you like?" + debug: 'True' + text: Let's debug this code! + 9: + code: "{print} '3'\n{clear}\n{print} '2'\n{clear}\n{print} '1'\n{clear}\n{print} 'SURPRISE!'" + header: Clear + text: "In this level you'll also learn the {clear} command.\nWith this command you can wipe all the text from your output screen.\n\nBe careful that you always use a sleep command too. If you don't the computer will wipe all the text before you can read it!" + 2: + text: 'In the previous levels, you might have come across this problem:' + header: Problem + code: "name {is} Sophie\n{print} My name is name" + debug: 'True' + 3: + text: "In this level we will fix this problem by using quotation marks.\n\nThis also makes our code look more like 'real' Python code." + header: Fixing it with quotation marks + 8: + debug: 'True' + code: "{print} 'This won't work!'" + header: Quotation marks and contractions + text: "Be careful! Now that you are using quotation marks, you can't use apostrophes in contractions.\n\nPlease try to print a contraction like \"you're\" or \"I'm\" in the screen below and see what happens...." + 1: + header: Welcome to level 4 + code: "{print} 'print with quotes!'" + text: In this level you will learn how to use quotation marks. + 7: + code: "name {is} Harry\n{print} 'Hello ' name ', how are you?'" + header: Quotation marks and variables + text: "When variable names are used in the middle of a sentence, you have to leave the variables out of the quotation marks.\nThe rest of the sentence however, does need quotation marks. That looks like this:" + 11: + text: Enjoy the adventures in level 4! + header: Ready, Set, Go! + 6: + code: "name {is} Harry\n{print} 'Hello ' name" + text: "You do not want variable names to be printed on the screen.\nThis is why variables should be left out of the quotation marks, like this:" + header: Quotation marks and variables + 5: + 4: + header: else + code: "{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'" + text: "When using an `{if}` command, you can also add an `{else}` command.\nIf the answer is Hedy, the computer will print 'nice'.\nBut if the answer is something else the computer will print 'boo'" + 5: + code: "{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'" + header: Long lines + text: "You might have noticed that your lines can get very long when you have both an `{if}` and an `{else}` command.\n\nYou can choose to separate commands and put them on 2 lines, like this:" + 7: + text: Let's debug this code! + header: Debugging + code: "{print} Welcome to HedyAir Security!\nboarding_pass {is} {ask} 'Do you have your boarding pass?'\n{if} bording_pass yes {print} Great!\n{else} Please, get your boarding pass ready.\npassport {is} 'Can I see your passport, please?'\n{if} passport {is} yes 'thank you'\n{else} 'You can't fly without a passport'\ndeclare {is} {ask} Do you have anything to declare?\n{if} declare {is} yes\nitem_to_declare {is} {ask} 'What would you like to declare'\n{else} Alright\n{print} Thank you. Please head to gate A22.'" + debug: 'True' + 8: + text: Enjoy the adventures in level 5! + header: Let's go! + 2: + code: "name {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'" + header: if + text: "The `{if}` command allows you to choose between two options.\nIn this example the computer will print 'nice' if the given answer is Hedy.\nIf the answer is not Hedy, the computer will do nothing." + 3: + debug: 'True' + text: "When using the `{if}` command, don't forget to use the `{print}` command.\nThis code will not work!" + header: Don't forget to print + code: "{if} name {is} Hedy 'nice'" + 1: + header: Welcome to level 5 + text: 'In this level you will learn to use 3 new commands: `{if}`, `{else}` and `{in}`.' + 6: + text: "If you have practised with the `{if}` and `{else}` commands, you can also try the `{in}` command.\n\nWith `{in}` you can let the computer check if an item is in a list, for example:\n\nPlease note that Hedy is case sensitive. This means that if you answer \"Green\" instead of \"green\", Hedy will print \"meh\"." + header: Another new command + code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'" + 6: + 10: + header: Let's get to work! + text: Enjoy the adventures in level 6! + 2: + code: "{print} '5 plus 5 is ' 5 + 5" + header: Addition + text: If you want to calculate an addition, simply use the plus sign. + 8: + text: 'You can use calculations with numbers, but you can also use variables to do calculations, like this:' + header: Calculations with variables + code: "number_1 = {ask} 'Fill in the first number:'\nnumber_2 = {ask} 'Fill in the second number:'\ncorrect_answer = number_1 * number_2\n{print} number_1 ' times ' number_2 ' is ' correct_answer" + 6: + header: Summary + text: In summary, you can use +, -, * and / to do maths. + code: "{print} '5 plus 5 is ' 5 + 5\n{print} '5 minus 5 is ' 5 - 5\n{print} '5 times 5 is ' 5 * 5\n{print} '5 divided by 5 is ' 5 / 5" + 4: + header: Multiplication + code: "{print} '5 times 5 is ' 5 * 5" + text: If you want to do multiplications, you can use the asterisk. + 5: + header: Division + text: You can use the slash for division. + code: "{print} '5 divided by 5 is ' 5 / 5" + 1: + header: Welcome to level 6 + text: In this level we are adding maths to our codes. + 7: + header: The = symbol + text: "From now on you can also use the = symbol instead of the `{is}` command.\nThis goes for both numbers and words, and it also goes after the `{if}` or `{else}` commands." + code: "name = Hedy\nanswer = 20 + 4" + 3: + code: "{print} '5 minus 5 is ' 5 - 5" + text: If you want to subtract, you can use the minus sign. + header: Subtraction + 9: + text: Let's debug this code! + header: Debugging + debug: 'True' + code: "{print} 'This is the water park ticket machine'\n{print} 'Price list: Children under 12 $3, Adults $5'\n{print} 'Mondays are 25% off'\namount_of_children = 'How many kids tickets would you like?'\namount_of_adults = 'How many adult tickets would you like?'\nday_of_the_week = {ask} 'What day is it?'\n{clear}\nchild_price = amount of children * 3\nadult_price = amount_of_adults + 5\ntotal_price = adult_price * child_price\n{if} day {is} monday\ntotal_price = total_price * 0.25\n{print} 'That will be total_price please'" + 7: + 3: + text: When using the repeat command, do not forget the `{print}` command. + debug: 'True' + header: Don't forget the print command + code: "{repeat} 5 {times} 'Help!'" + 2: + code: "{print} 'The prince kept calling for help'\n{repeat} 5 {times} {print} 'Help!'\n{print} 'Why is nobody helping me?'" + text: "If you want to repeat a line of code, you can use the `{repeat}` 3 `{times}` code.\nIf you want to repeat the line more times, simply change the number.\n\nFor example: If you are programming a story where your character shouts for help for 5 times, it could look like this:" + header: repeat 3 times + 4: + header: Repeat an ask command + text: You can also repeat an `{ask}`, `{if}` or `{else}` command multiple times. + code: "{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'" + 5: + header: Debugging + text: Let's debug this code! + debug: 'True' + code: "{print} You gave stranded on a desert island.\n{repeat} 3 'Help!'\nrescued = {ask} Has anybody come to the rescue?\n{if} rescued yes {is}\n{print} Lucky!\n{else} {repeat} 3 {times} 'HELP!'\nrescued = 'What about now?'\n{if} yes\n{print} 'Hurray!\n{else} 'That's a shame... Oh well... time to build a shelter and find some food.'" + 1: + text: In this level you will learn how to repeat a line of code as many times a you'd like. + header: Welcome to level 7 + 6: + text: Enjoy the adventures in level 7! + header: Ready Set Go! + 8: + 5: + debug: 'True' + text: "The same goes for the `{if}` and `{else}` commands.\nThese were the commands before:" + header: if and else before + code: "{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'" + 8: + header: if statements inside if statements + text: "You might have thought of trying to put an if command inside a repeat command, or inside another if command.\nFor now, this is not possible yet. In the higher levels, it will be allowed, but for now let's focus on practising the `{if}` `{else}` and `{repeat}` commands with proper indentation first." + 9: + code: "{print} 'HedyWheels bus tickets machine'\nzone_1 = Town Hall, Library, Campus, Market Place\nzone_2 = Swimming Pool, Skate Park, Mall, Airport\ndestination = 'Where do you want to go?'\n{if} destination {in} zone 1\n{print} destination 'is in zone 1'\nprice = 3 euros\n {if} destination {is} zone_2\n{print} destination 'is in zone 2'\nprice = 6\nticket_types = {ask} 'Press 1 for a single use ticket.\nPress 2 for a round trip ticket:'\n{if} ticket_type = 1\n{print} 'You chose a single use ticket'\n{else}\n {print} You chose a round trip ticket'\nprice * 2\n{print} 'That will be ' price ' euros please'" + header: Debugging + debug: 'True' + text: Let's debug this code! + 7: + text: Just like with the `{repeat}` command, you can stop using indentation and the lines will always be shown. Not just if the statement is true. + code: "name = {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n{else}\n {print} 'Welcome programmer!' \n{print} '3..2..1.. Start programming!'" + header: stopping the indentation + 2: + debug: 'True' + code: "{repeat} 5 {times} {print} 'Help!'" + header: '{repeat} commands before' + text: "In the previous levels, the `{repeat}` command looked like this:\n\nYou could only repeat one line of code." + 3: + text: "In this level you can repeat multiple lines of code. To do this you must tell the computer which lines belong together and should be repeated.\nYou do this by using indentation.\n\nUse 4 spaces (or one tab) at the beginning of each line that you want to repeat, like this:" + code: "{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This will be printed 5 times'" + header: '{repeat} commands now' + 1: + header: Welcome to level 8 + text: In this level you will learn to use indentation to make the `{repeat}`, `{if}` and `{else}` commands work for multiple lines of code. + 6: + header: if and else now + text: "These are the `{if}` and `{else}` commands now.\nEach line after the `{if}` and `{else}` commands start with indentation." + code: "name = {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n{else}\n {print} 'Welcome programmer!'" + 10: + text: Enjoy the adventures in level 8! + header: Let's check out the adventures! + 4: + header: '{repeat} commands now' + text: "If you want to, you can continue after the `{repeat}` command without indentation.\nThe lines that do not start with indentation will not be repeated." + code: "{repeat} 3 {times}\n {print} 'Hello!'\n{print} 'We are done repeating!'" + 9: + 2: + text: You are allowed to combine `{repeat}` and `{if}` in this level. + code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'" + header: Multiple lines after `{repeat}` + 5: + header: Indentation matters + code: "continue = {ask} 'Do you want to continue?'\n{if} 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'" + text: Again, indentation is still very important and can make a big difference in the code. + 4: + code: "continue = {ask} 'Do you want to continue?'\n{if} 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'\n{else}\n {print} 'You do not want to continue'" + text: You can also use multiple lines after `{if}` + header: Multiple lines after `{if}` + 7: + text: Mind that the fourth and sixth line of this code starts with 8 spaces of indentation. + code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'" + header: Mind the indentation + 8: + text: Let's debug this code! + code: "{print} 'Welcome to HedyJumps, your parachute jump adventure!'\npeople = {ask} 'How many people are you jumping with today?\n{print} 'We'll ask all of you some questions for safety reasons.'\nextra_instructions_people = a, b\n{repeat} 3 {times}\n name = {ask} 'What is your name?'\njumped_before = 'Have you ever done a parachute jump before, ' name '?'\n{if} jumped_before no\n{print} 'No worries, you'll get an extra safety instruction in room 13'\n{add} name {to} extra_instructions_people\n{else}\n{print} 'Fun!'\n{print} 'Thanks for filling in the safety questions everyone. Enjoy your jump!'" + header: Debugging + debug: 'True' + 3: + header: Indentation matters! + text: Indentation is very important to tell the computer which lines should be repeated and which lines should only be ran once. + code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'" + 6: + code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'" + text: "Now that you can use multiple lines of code after these command, you can also put them within each other.\nCheck it out:" + header: An `{if}` inside a `{repeat}` + 1: + header: Welcome to level 9 + text: "In this level you can use multiple lines of code after an `{if}` or after a `{repeat}` command.\n\nYou can even put a `{repeat}` command within another `{repeat}` command." + 9: + text: Enjoy the adventures in level 9! + header: Let's go! + 10: + 3: + header: The for command + text: 'Here you see another example of the `{for}` command:' + code: "days = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday\nnames = mom, dad, Emma, Sophie\n{for} day {in} days\n {print} names {at} {random} ' does the dishes on ' day" + 4: + text: Let's debug this code + header: Debugging + debug: 'True' + code: "{print} 'Ladies and gentlemen!'\n{print} 'For one night and one night only in circus Hedy!'\nacts = shoot out of a canon, walk the tightrope, pack themself in a suitcase,\npeople = Iris the Incredible Achmed the Amazing Francis the Fantastic\n {for} people {in} acts\nchosen_person {is} people {random}\n chosen_person ' will ' act\n{add} chosen_person {from} people\n{print} 'Come and watch our show tonight!'\n{print} 'Tickets are only available at the counter" + 2: + header: The for command + code: "animals = dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal" + text: With for you can make a list and use all items on that list. `{for}` creates a block, like repeat and if so all lines in the block need to start with indentation (4 spaces). + 5: + header: Time to program! + text: Enjoy the adventures in level 10! + 1: + header: Welcome to level 10 + text: 'In this level you will learn a new command: `{for}`.' + 12: + 3: + header: Decimal numbers + text: "From this level on you are also allowed to use decimal numbers. This can make programs like your restaurant even better!\n\nNumbers do not need quotation marks." + code: "{print} 'decimal numbers now need to use a dot'\n{print} 2.5 + 2.5" + 6: + header: Functions + text: As you could see in the example a function is a block of code that can be called anytime. You use `{define}` to set the function and `{call}` to use it. + 5: + header: Twinkle Twinkle little star! + code: "{define} twinkle\n {print} 'Twinkle'\n {print} '...'\n\n{call} twinkle\n{print} 'Up above the world so high'\n{print} 'Like a diamond in the sky'\n{call} twinkle" + text: "In this program you see an example of a function.\nLet's see what happens if you fill in the rest of the song!" + 4: + text: "In this level you'll learn how to use functions. A function is a block of code you can easily use multiple times. Using functions helps us organize pieces of code that we can use again and again. To create a function, use define and give the function a name. Then put all the lines you want in the function in a indented block under the define line. Leave one empty line in your code to make it look nice and neat. Great job! You have created a function!\n\nNow, whenever we need that block of code, we just use call with the function's name to call it up! We don't have to type that block of code again." + header: Functions! + 2: + text: "This level makes some changes to the usage of quotation marks.\nFrom now on, **all texts** need to be in quotation marks. This includes values of variables, items on lists and text after {if} commands." + code: "name = 'Hedy the Robot'\n{print} 'Hello ' name" + header: Quotation marks + 8: + text: Enjoy the adventures in level 12! + header: Ready to try it out? + 7: + debug: 'True' + text: Let's debug this code! + code: "{call} new_member\n{print} 'Hi new member!'\nusername = {ask} 'What is your username?'\npassword = 'What is your password?'\n{print} 'Welcome to our club!'\n\nusername = {ask} 'Please enter your username. Are you a new member? Type New Member'\n{if} username = New Member\n{call} new member\n {else}\n password = {ask} 'Please enter password'" + header: Debugging + 1: + header: Welcome to level 12 + text: "From this level on you are allowed to use decimal numbers and there are some changes to the quotation marks.\nYou can also use functions from this level on!" + 13: + 1: + header: Welcome to level 13 + text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two ifs but can use and and or.\nFrom now on you could also use arguments in your functions." + 5: + header: Example + text: "In this example you see how the argument 'place' is used in the function.\nRun the code and change 'ocean' and 'sea' to something else, and see what happens." + code: "{define} song {with} place\n {print} 'My Bonnie is over the ' place\n\n{call} song {with} 'ocean'\n{call} song {with} 'sea'\n{call} song {with} 'ocean'" + 6: + header: Example with variable + text: "You can also combine functions with a question.\n\nWhat happens if you make these changes:\n```\ndefine song with place\n print 'My Bonnie is ' place\n\nanswer is ask 'Where is my Bonnie?'\ncall song with answer\n```" + code: "{define} song {with} place\n {print} 'My Bonnie is over the ' place\n\n{call} song {with} 'ocean'\n{call} song {with} 'sea'\n{call} song {with} 'ocean'" + 7: + header: Even more questions! + text: "Now we have combined even more question with the function. Type this code and see what happens.\n\nNote how the variables and the arguments have the same name. This is allowed.\nDoes it confuse you? Just use different names, that is allowed as well.\n```\ndefine song with name, place\n print 'My ' name ' is ' place\n\nname is ask 'Who?'\nplace is ask 'Where are they?'\ncall song with name, place\n```" + code: "{define} song {with} place\n {print} 'My Bonnie is over the ' place\n\n{call} song {with} 'ocean'\n{call} song {with} 'sea'\n{call} song {with} 'ocean'" + 8: + header: Debugging + code: "{define} happiness {with} name\n {print} '🥳'\n{play} G\n{play} A\n{play} B\n{print} 'Party on, ' name\n{define} sadness\n{print} '😞'\n{play} E\n{play} D\n{play} C\n{print} 'Hope you feel better, ' name\n\nname = {ask} 'What is your' name '?'\nmood = {ask} 'Are you happy or sad?'\n{if} mood = happy\n {call} happiness {with} person\n{else} mood = sad\n {define} sadness {to} name" + debug: 'True' + text: Let's debug this code! + 9: + text: Enjoy the adventures in level 13! + header: Let's go! + 2: + text: "The `{and}` command is always used in a combination with the {if} command.\nThis way you can check if 2 statements are true. For example:" + header: The and command + code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'" + 3: + code: "name = {ask} 'what is your name?'\n{if} name {is} 'Hedy' {or} name {is} 'hedy'\n {print} 'Welcome!!'" + text: "The `{or}` works in the same way as the `{and}` command, but only 1 of the two statements has to be true.\n\nLet's see what happens when you change the `{and}` for `{or}`." + header: The or command + 4: + header: Functions with arguments + text: Now that you've learned how to use functions, you'll learn how to use a function with an **argument**. An argument is a variable that is used within a function. It is not used outside the function. + 14: + 1: + header: Welcome to level 14 + text: In this level you'll learn some new symbols that can help you improve your programs, like >. You will also learn to work with return values of a function. + 6: + text: Let's debug this code! + debug: 'True' + code: "item = 'not bought'\n{print} 'I would like to buy this item'\nprice == {ask} 'What is the price?'\n{if} price less than or the same as 10\n {print} 'Thats a great deal!'\n item = 'bought'\n{if} price is more than 10 {and} less than or the same as 20\n {print} 'Alright'\n item = 'bought'\n{if} price is more than 20 {and} less than 50\n {print} 'That is a bit much!'\n{if} price is more than or the same as 50\n {print} 'No way!'\n{if} item =! bought\n {print} 'Shame.. I wont buy it'\n{else}\n {print} 'I will buy it! Thank you!'" + header: Debugging + 2: + text: "These are the new symbols you can use:\n\n The > means bigger than...\n\n The >= means bigger than or the same as...\n\n The < means smaller than...\n\n The <= means smaller than or the same as...\n\nYou can use them like this:" + code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'\n{else}\n {print} 'You are older than me!'" + header: Symbols + 4: + header: Return value + text: In the previous levels you have learned to create functions and use arguments with them. Another great use of a function is to let it calculate something for you. You can give the function a calculation and it will give you the answer of the calculation. This answer is called a **return value**. + 5: + header: Return value + code: "{define} calculate_new_price {with} amount, percentage\n percentage = percentage / 100\n discount_amount = amount * percentage\n {return} amount - discount_amount\n\nold_price = {ask} 'How much is on the price tag?'\ndiscount = {ask} 'What percentage is the discount?'\n\nnew_price = {call} calculate_new_price {with} old_price, discount\n{print} 'The new price is ' new_price ' dollar'" + text: For example, in this code the function calculate_new_price will calculate the new price of any item. It will give you the new price as a return value. + 7: + header: Let's get to work! + text: Enjoy the adventures in level 14! + 3: + text: "You can also use:\n\n== is the same as.\n\n!= is not\n\n== is used in `{if}` statements." + header: Symbols + code: "answer = {ask} 'Do you want to learn more?'\n{if} answer == 'yes'\n {print} 'Go to the next adventure!'\n{if} answer != 'yes'\n {print} 'That is a shame!'" + 17: + 5: + header: Let's try it out! + text: Enjoy the adventures in level 17! + 4: + text: Let's debug this code! + debug: 'True' + code: "{define} ask_direction\n direction = {ask} 'Where do you want to go?'\n {if} direction = 'backwards'\n {turn} 180\n {else} direction == 'right'\n {turn} 90\n {else} direction == 'left'\n {turn} 270\n {forward} 100\n\ncontinue = 'yes'\n\n{while} continue == 'yes'\n {print} ask_direction\n {sleep}\n continue = 'do you want to draw some more?'\n {sleep}" + header: Debugging + 1: + header: Welcome to level 17 + text: in this level you will learn how to use a colon and you will learn the elif command. + 3: + code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'" + header: Elif + text: 'In this level you can also use a new command: elif. elif is short for else if and you need it when you want to make 3 (or more!) options. Check it out!' + 2: + header: Colon + text: 'Now we are going to change indentation a little bit. Every time that we need an indentation, we need : at the line before the indentation.' + code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{else}:\n {print} 'Better luck next time..'" + 16: + 3: + code: "{print} 'Friendship test'\n{subjects} = ['song', 'movie', 'food', 'drink']\nanswers_player_1 = []\nanswers_player_2 = []\nscore = 100\n\n{for} i {in} {range} 1 {to} 4\n answer = {ask} 'what is your favorite ' subjects[i]\n{add} answer {to} answers_player_1\n\n{print} 'Player 2, your turn!'\n{for} i {in} {range} 0 {to} 4\n answer_player_2 = {ask} 'what is player 1s favorite ' subjects\n {add} answer_player_2 {in} answers_player_2\n {if} answers_player_2[2] == answers_player_1[1]\n {print} 'Correct!'\n {else}\n {print} 'Wrong!'\n score = score - 25\n\n{print} 'Player 2, you've scored ' score '%'\n\n{if} score = 100\n {print} 'You are an amazing friend'\n{if} score < 100 {or} score >= 50\n {print} 'You could do better'\n{else} score < 50\n {print} 'Do you even know this person?!'" + header: Debugging + debug: 'True' + text: Let's debug this code! + 2: + code: "friends = ['Ahmed', 'Ben', 'Cayden']\n{print} friends[1] ' is the first friend on the list.'\n{print} friends[2] ' is the second friend on the list.'\n{print} friends[3] ' is the third friend on the list.'\n#now we will match 2 lists using the variable i\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} friends[i] 's lucky number is ' lucky_numbers[i]" + header: Square brackets + text: We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels. We use square brackets to point out a place in a list. The at random command can not be used anymore. + 1: + text: In this level you will learn about the [square brackets] and how to use them. + header: Welcome to level 16 + 4: + text: Enjoy the adventures in level 16! + header: Let's try it out! + 15: + 3: + text: Let's debug this code! + code: "numbers = 1, 2\n\n{for} i {in} {range} 3 {to} 50\n {add} x {to} numbers\n i = + 1\n\nrandom_number = numbers {random}\nguesses = 10\n\n{while} guess = 0\n answer = 'Guess my number:'\n {if} answer >= random_number\n {print} 'lower'\n guesses = guesses -1\n {if} answer > random_number\n {print} 'higher!'\n guesses = guesses\n {else} answer = random_number\n {print} 'correct'\n guesses = 10" + debug: 'True' + header: Debugging + 4: + header: Let's try it out! + text: Enjoy the adventures in level 15! + 2: + header: '{while}' + text: "We are going to learn a new loop, the while loop! The loop continues as long as the statement is true. So don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given. If the correct answer is never given, the loop will never end!" + code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'" + 1: + text: In this level you will learn about the `{while}` loop. + header: Welcome to level 15 + 18: + 1: + text: Congratulations! You have reached the last level of Hedy! The code you have created here can be copied to real Python environments like replit or PyCharm, and you can continue learning there! Note however that Python can only read English commands, so if you have been using other languages, you will need to switch to English now. + header: Welcome to level 18 + 2: + editor: /hedy/18 + text: "We arrived at real Python code! That means we need to use parentheses with print and range from now on.\n\nAlso, if you want to print more than one item, you need to separate them by commas.\n\nThe final change we will need to make to get Python code is changing ask into input.\n\nClick on the 'print' tab for all the examples." + header: The Python way + 3: + header: The very last adventures! + text: Enjoy the very last adventures in level 18! + 11: + 1: + text: "In this level, we add a new form of the `{for}` command. In earlier levels, we used for with a list, but we can also use for with numbers.\n\nThis way we don't need the `{repeat}` command anymore." + header: Welcome to level 11 + 2: + header: The for command + code: "{for} counter {in} {range} 1 {to} 10\n {print} counter\n{print} 'Ready or not. Here I come!'" + text: 'This is what the new for command looks like:' + 4: + header: Debugging + debug: 'True' + code: "factor {is} {ask} 'Which table of multiplication do you need?'\n{repeat} {for} numbers {in} {range} 1 {to} 10 {times}\n {print} This is the table of multiplications for factor\n {print} number ' x ' factor ' = ' i * factor" + text: Let's debug this code! + 3: + code: "number = 10\n{for} i {in} {range} 1 {to} 10\n {print} i * number" + header: the variable i + text: "In the previous slide the variable was named 'counter', because it was counting down.\nYou can of course use any name for the variable you want.\nThe standard name for variables in this situation that is used in programming languages like Python is 'i'.\nThat looks like this:" + 5: + text: Enjoy the adventures in level 11! + header: Let's start programming! diff --git a/content/slides/ne.yaml b/content/slides/ne.yaml new file mode 100644 index 00000000000..52df863af4e --- /dev/null +++ b/content/slides/ne.yaml @@ -0,0 +1,565 @@ +levels: + 0: + 4: + text: "If you can program, you can do many cool things:\n* Build interactive stories\n* Create computer drawings and draw these on paper or fabric\n* Build your own apps to use on your phone" + header: Programming + 7: + header: Programming in Hedy + code: '{print} Welcome to Hedy!' + text: We start the code with the Run code button underneath the code. + 6: + header: Programming in Hedy + text: Code words will be shown in pink. + code: '{print} Welcome to Hedy!' + 8: + code: '{print} Welcome to Hedy!' + header: Programming in Hedy + text: Output appears on the right-hand side. + 9: + text: The output can also be a drawing. + header: Programming in Hedy + code: "{forward} 100\n{turn} {left}" + 3: + header: Programming Language + text: "Maybe you already know some programming languages?\nSome examples are:\n* Scratch\n* Python\n* HTML" + 5: + header: Programming in Hedy + text: In Hedy we use special codes, like `{print}`. + code: '{print} Welcome to Hedy!' + 2: + text: "Programming is giving instructions to a computer, using the language of the computer.\n\nSuch a language is called a \"programming language\"." + header: Programming + 1: + header: Welcome to Hedy! + text: Hedy is a programming language. + 1: + 2: + text: "The first code that you can use in level 1 is `{print}`.\n\n`{print}` is used to show text on the screen." + header: '{print}' + code: '{print} Show text on the screen' + 1: + header: Welcome to level 1! + text: "We will start level 1 by making stories in Hedy!\n\nWe need three text codes to create interactive stories." + 3: + header: The {print} command + code: "{print} Welcome to Hedy!\n{print} Start programming now!" + text: "You can change the text after the print command to whatever you want.\n\nOr you could print multiple lines by adding another line of code that also starts with `{print}`." + 11: + text: '`{turn}` is used to make the turtle turn left or right.' + header: 'Drawing with the turtle: {turn}' + code: "{forward} 50\n{turn} {left}" + 8: + header: Programming! + text: The yellow arrow buttons can be used to copy examples. + editor: /hedy#print_command + 12: + debug: 'True' + code: "I am DJ Hedy\n{print} What song would you like to hear?\n{ask} I like that song too!\n{print} Next up... {echo}" + header: Debugging + text: Debugging a code means getting rid of mistakes in the code. Let's debug this code together. Click the ladybug button to start the debugger. + 13: + text: Enjoy the adventures in level 1! + header: Let the programming fun begin! + 5: + code: "{print} Hello!\n{ask} What is your name?\n{echo} hello" + text: "As you could see in the previous example. If you use the `{ask}` command, you can ask a question.\nThe answer, however doesn't show in the output screen.\n\nIf you do want the answer to show, you can use the final command of this level: `{echo}`.\n`{echo}` is used to repeat the answer of an `{ask}`." + header: '{echo}' + 7: + editor: /hedy/1 + header: Programming! + text: Adventures are shown in tabs. + 10: + code: '{forward} 50' + text: '`{forward}` is used to move the turtle forward.' + header: 'Drawing with the turtle: {forward}' + 4: + code: "{print} Welcome to your own rock scissors paper!\n{ask} What will you choose?" + header: '{ask}' + text: "The second code that you can use in level 1 is `{ask}`.\n\n`{ask}` is used to ask a question that can be answered." + 9: + header: Drawing with the turtle + text: Now that we have seen at text codes, we will now look at drawing codes next. + 6: + text: "With `{print}`, `{ask}` and `{echo}` you can already create a little story.\nThis is a good time to try the Parrot, Story and Rock, Paper Scissors adventures." + header: Programming! + editor: /hedy/1 + 2: + 2: + text: To make or 'set' a variable we use the `{is}` command + header: Variables + code: "name {is} Hedy\nage {is} 15\n{print} name is age years old" + 1: + header: Welcome to level 2 + text: "In this level you will learn to use variables.\n\nA variable is a word that can be used to store information.\n\nFor example: a name, age or favorite sports team." + 4: + text: Now that we use variables, we can use multiple variables instead of just one `{echo}` command. + code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old." + header: Multiple variables + 8: + header: Let the programming fun begin! + text: Enjoy the adventures in level 2! + 7: + text: Debugging a code means getting rid of mistakes in the code. Let's debug this code together. Click the ladybug button to start the debugger. + debug: 'True' + header: Debugging + code: "{print} Welcome to the donut shop!\nfilling {is} What kind of filling would you like?\n{print} You have chosen... Filling! Yum!\ntopping {ask} What kind of topping would you like?\ntopping is delicious!\n{print} I'll go get your donut. {sleep}\n{print} Here you go! A filling donut with toping!\n{ask} Have a nice day!" + 3: + code: "name {is} {ask} What is your name?\n{print} Hello name" + header: Interactive + text: "We can also set a variable by asking questions.\n\nThe answer to the question is stored in the variable.\n\nThis way we don't need the `{echo}` command." + 5: + text: You can also use the `{sleep}` command to pause the code for a while. + header: Sleep + code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!" + 6: + header: Sleep 5 + code: "pause {is} 10\n{print} My favorite colour is...\n{sleep} pause\n{print} green!" + text: "You can add a number after the `{sleep}` command if you want the pause to be longer.\n\nIf you want, you could even use a variable instead of a number to decide the duration of the sleep command." + 3: + 1: + header: Welcome to level 3 + text: In this level you'll learn how to make a list, add and remove items form your lists and pick a random item off that list. + 3: + header: At random + text: "You can use the list with the `{at}` `{random}` command.\nThe computer will randomly pick one item of the list.\nEvery time you run this code the output will differ." + code: "animals {is} dogs, cats, kangaroos\n{print} animals {at} {random}" + 2: + header: Making a list + text: "You make a list with `{is}`.\n\nSeparate the items on your list with a comma." + code: animals {is} dogs, cats, kangaroos + 8: + text: Enjoy the adventures in level 3! + header: Let's get to work! + 7: + debug: 'True' + header: Debugging + editor: "music_genres {is} rock, pop, metal, indie, jazz\nchosen_genre is music {at} {random}\n{print} Let's listen to chosen genre\nnice {ask} Do you like that genre?\n{remove} chosen_genre {from} chosen_genre\nsecond_choice {is} music_genres\n{print} or do you prefer... second_choice {at} {random}\n{remove} second_choice {to} music_genres\n{print} I like music_genre {random} best!" + text: Let's debug this code! + 6: + code: "animals {is} dog, cat, kangaroo\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}" + text: "The opposite of the `{add}` `{to}` command is the `{remove}` `{from}` command.\nThis command removes an item from a list." + header: Remove from + 4: + header: At random in a sentence + code: "animals {is} dogs, cats, kangaroos\n{print} My favorite animal is animals {at} {random}" + text: You can use the `{at}` `{random}` command in a sentence as well. + 5: + header: Add to + text: "You can add items to a list with the `{add}` `{to}` command.\n\nYou can choose what to add to the list or you can use the `{add}` `{to}` command in combination with the `{ask}` command.\nThis way you can let the player decide what to add to the list." + code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\n{print} I choose animals {at} {random}" + 4: + 4: + code: "{print} 'print with quotes!'" + text: Each time you use the `{print}` command you need to put the text that you want to appear on the screen in quotation marks. + header: Quotation marks with print + 3: + text: "In this level we will fix this problem by using quotation marks.\n\nThis also makes our code look more like 'real' Python code." + header: Fixing it with quotation marks + 5: + header: Quotation marks with ask + text: This also goes for the `{ask}` command. + code: name {is} {ask} 'name please?' + 6: + code: "name {is} Harry\n{print} 'Hello ' name" + text: "You do not want variable names to be printed on the screen.\nThis is why variables should be left out of the quotation marks, like this:" + header: Quotation marks and variables + 7: + code: "name {is} Harry\n{print} 'Hello ' name ', how are you?'" + header: Quotation marks and variables + text: "When variable names are used in the middle of a sentence, you have to leave the variables out of the quotation marks.\nThe rest of the sentence however, does need quotation marks. That looks like this:" + 8: + header: Quotation marks and contractions + debug: 'True' + text: "Be careful! Now that you are using quotation marks, you can't use apostrophes in contractions.\n\nPlease try to print a contraction like \"you're\" or \"I'm\" in the screen below and see what happens...." + code: "{print} 'This won't work!'" + 9: + header: Clear + code: "{print} '3'\n{clear}\n{print} '2'\n{clear}\n{print} '1'\n{clear}\n{print} 'SURPRISE!'" + text: "In this level you'll also learn the {clear} command.\nWith this command you can wipe all the text from your output screen.\n\nBe careful that you always use a sleep command too. If you don't the computer will wipe all the text before you can read it!" + 10: + header: Debugging + code: "{clear}\n{print} What a nice day to go to the beach!\n{ask} 'Do you want to build a sandcastle or swim in the ocean?'\n{print} 'You would like to activity '\n{print} 'I'd like to do that too'\n{print} 'Look at these beautiful seashells!'\ncolors {is} 'orange, silver, white, brown'\n{print} 'I love the colors {at} {random} one!'\nchoice {is} {ask} Which one do you like?" + debug: 'True' + text: Let's debug this code! + 11: + text: Enjoy the adventures in level 4! + header: Ready, Set, Go! + 2: + text: 'In the previous levels, you might have come across this problem:' + header: Problem + code: "name {is} Sophie\n{print} My name is name" + debug: 'True' + 1: + header: Welcome to level 4 + code: "{print} 'print with quotes!'" + text: In this level you will learn how to use quotation marks. + 5: + 4: + code: "{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'" + header: else + text: "When using an `{if}` command, you can also add an `{else}` command.\nIf the answer is Hedy, the computer will print 'nice'.\nBut if the answer is something else the computer will print 'boo'" + 2: + code: "name {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'" + header: if + text: "The `{if}` command allows you to choose between two options.\nIn this example the computer will print 'nice' if the given answer is Hedy.\nIf the answer is not Hedy, the computer will do nothing." + 8: + text: Enjoy the adventures in level 5! + header: Let's go! + 7: + text: Let's debug this code! + header: Debugging + code: "{print} Welcome to HedyAir Security!\nboarding_pass {is} {ask} 'Do you have your boarding pass?'\n{if} bording_pass yes {print} Great!\n{else} Please, get your boarding pass ready.\npassport {is} 'Can I see your passport, please?'\n{if} passport {is} yes 'thank you'\n{else} 'You can't fly without a passport'\ndeclare {is} {ask} Do you have anything to declare?\n{if} declare {is} yes\nitem_to_declare {is} {ask} 'What would you like to declare'\n{else} Alright\n{print} Thank you. Please head to gate A22.'" + debug: 'True' + 3: + debug: 'True' + text: "When using the `{if}` command, don't forget to use the `{print}` command.\nThis code will not work!" + header: Don't forget to print + code: "{if} name {is} Hedy 'nice'" + 5: + header: Long lines + code: "{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'" + text: "You might have noticed that your lines can get very long when you have both an `{if}` and an `{else}` command.\n\nYou can choose to separate commands and put them on 2 lines, like this:" + 1: + header: Welcome to level 5 + text: 'In this level you will learn to use 3 new commands: `{if}`, `{else}` and `{in}`.' + 6: + text: "If you have practised with the `{if}` and `{else}` commands, you can also try the `{in}` command.\n\nWith `{in}` you can let the computer check if an item is in a list, for example:\n\nPlease note that Hedy is case sensitive. This means that if you answer \"Green\" instead of \"green\", Hedy will print \"meh\"." + header: Another new command + code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'" + 6: + 2: + code: "{print} '5 plus 5 is ' 5 + 5" + header: Addition + text: If you want to calculate an addition, simply use the plus sign. + 6: + header: Summary + text: In summary, you can use +, -, * and / to do maths. + code: "{print} '5 plus 5 is ' 5 + 5\n{print} '5 minus 5 is ' 5 - 5\n{print} '5 times 5 is ' 5 * 5\n{print} '5 divided by 5 is ' 5 / 5" + 4: + header: Multiplication + code: "{print} '5 times 5 is ' 5 * 5" + text: If you want to do multiplications, you can use the asterisk. + 5: + header: Division + text: You can use the slash for division. + code: "{print} '5 divided by 5 is ' 5 / 5" + 7: + header: The = symbol + code: "name = Hedy\nanswer = 20 + 4" + text: "From now on you can also use the = symbol instead of the `{is}` command.\nThis goes for both numbers and words, and it also goes after the `{if}` or `{else}` commands." + 10: + header: Let's get to work! + text: Enjoy the adventures in level 6! + 9: + debug: 'True' + text: Let's debug this code! + header: Debugging + code: "{print} 'This is the water park ticket machine'\n{print} 'Price list: Children under 12 $3, Adults $5'\n{print} 'Mondays are 25% off'\namount_of_children = 'How many kids tickets would you like?'\namount_of_adults = 'How many adult tickets would you like?'\nday_of_the_week = {ask} 'What day is it?'\n{clear}\nchild_price = amount of children * 3\nadult_price = amount_of_adults + 5\ntotal_price = adult_price * child_price\n{if} day {is} monday\ntotal_price = total_price * 0.25\n{print} 'That will be total_price please'" + 8: + text: 'You can use calculations with numbers, but you can also use variables to do calculations, like this:' + header: Calculations with variables + code: "number_1 = {ask} 'Fill in the first number:'\nnumber_2 = {ask} 'Fill in the second number:'\ncorrect_answer = number_1 * number_2\n{print} number_1 ' times ' number_2 ' is ' correct_answer" + 1: + header: Welcome to level 6 + text: In this level we are adding maths to our codes. + 3: + code: "{print} '5 minus 5 is ' 5 - 5" + text: If you want to subtract, you can use the minus sign. + header: Subtraction + 7: + 2: + code: "{print} 'The prince kept calling for help'\n{repeat} 5 {times} {print} 'Help!'\n{print} 'Why is nobody helping me?'" + text: "If you want to repeat a line of code, you can use the `{repeat}` 3 `{times}` code.\nIf you want to repeat the line more times, simply change the number.\n\nFor example: If you are programming a story where your character shouts for help for 5 times, it could look like this:" + header: repeat 3 times + 1: + text: In this level you will learn how to repeat a line of code as many times a you'd like. + header: Welcome to level 7 + 5: + debug: 'True' + header: Debugging + text: Let's debug this code! + code: "{print} You gave stranded on a desert island.\n{repeat} 3 'Help!'\nrescued = {ask} Has anybody come to the rescue?\n{if} rescued yes {is}\n{print} Lucky!\n{else} {repeat} 3 {times} 'HELP!'\nrescued = 'What about now?'\n{if} yes\n{print} 'Hurray!\n{else} 'That's a shame... Oh well... time to build a shelter and find some food.'" + 6: + text: Enjoy the adventures in level 7! + header: Ready Set Go! + 3: + text: When using the repeat command, do not forget the `{print}` command. + debug: 'True' + header: Don't forget the print command + code: "{repeat} 5 {times} 'Help!'" + 4: + text: You can also repeat an `{ask}`, `{if}` or `{else}` command multiple times. + code: "{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'" + header: Repeat an ask command + 8: + 1: + header: Welcome to level 8 + text: In this level you will learn to use indentation to make the `{repeat}`, `{if}` and `{else}` commands work for multiple lines of code. + 2: + debug: 'True' + code: "{repeat} 5 {times} {print} 'Help!'" + header: '{repeat} commands before' + text: "In the previous levels, the `{repeat}` command looked like this:\n\nYou could only repeat one line of code." + 3: + header: '{repeat} commands now' + code: "{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This will be printed 5 times'" + text: "In this level you can repeat multiple lines of code. To do this you must tell the computer which lines belong together and should be repeated.\nYou do this by using indentation.\n\nUse 4 spaces (or one tab) at the beginning of each line that you want to repeat, like this:" + 4: + header: '{repeat} commands now' + text: "If you want to, you can continue after the `{repeat}` command without indentation.\nThe lines that do not start with indentation will not be repeated." + code: "{repeat} 3 {times}\n {print} 'Hello!'\n{print} 'We are done repeating!'" + 7: + header: stopping the indentation + text: Just like with the `{repeat}` command, you can stop using indentation and the lines will always be shown. Not just if the statement is true. + code: "name = {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n{else}\n {print} 'Welcome programmer!' \n{print} '3..2..1.. Start programming!'" + 9: + code: "{print} 'HedyWheels bus tickets machine'\nzone_1 = Town Hall, Library, Campus, Market Place\nzone_2 = Swimming Pool, Skate Park, Mall, Airport\ndestination = 'Where do you want to go?'\n{if} destination {in} zone 1\n{print} destination 'is in zone 1'\nprice = 3 euros\n {if} destination {is} zone_2\n{print} destination 'is in zone 2'\nprice = 6\nticket_types = {ask} 'Press 1 for a single use ticket.\nPress 2 for a round trip ticket:'\n{if} ticket_type = 1\n{print} 'You chose a single use ticket'\n{else}\n {print} You chose a round trip ticket'\nprice * 2\n{print} 'That will be ' price ' euros please'" + debug: 'True' + header: Debugging + text: Let's debug this code! + 10: + text: Enjoy the adventures in level 8! + header: Let's check out the adventures! + 5: + debug: 'True' + text: "The same goes for the `{if}` and `{else}` commands.\nThese were the commands before:" + header: if and else before + code: "{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'" + 8: + text: "You might have thought of trying to put an if command inside a repeat command, or inside another if command.\nFor now, this is not possible yet. In the higher levels, it will be allowed, but for now let's focus on practising the `{if}` `{else}` and `{repeat}` commands with proper indentation first." + header: if statements inside if statements + 6: + header: if and else now + text: "These are the `{if}` and `{else}` commands now.\nEach line after the `{if}` and `{else}` commands start with indentation." + code: "name = {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n{else}\n {print} 'Welcome programmer!'" + 9: + 1: + header: Welcome to level 9 + text: "In this level you can use multiple lines of code after an `{if}` or after a `{repeat}` command.\n\nYou can even put a `{repeat}` command within another `{repeat}` command." + 4: + code: "continue = {ask} 'Do you want to continue?'\n{if} 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'\n{else}\n {print} 'You do not want to continue'" + text: You can also use multiple lines after `{if}` + header: Multiple lines after `{if}` + 7: + text: Mind that the fourth and sixth line of this code starts with 8 spaces of indentation. + header: Mind the indentation + code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'" + 6: + code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'" + header: An `{if}` inside a `{repeat}` + text: "Now that you can use multiple lines of code after these command, you can also put them within each other.\nCheck it out:" + 2: + code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'" + text: You are allowed to combine `{repeat}` and `{if}` in this level. + header: Multiple lines after `{repeat}` + 8: + text: Let's debug this code! + code: "{print} 'Welcome to HedyJumps, your parachute jump adventure!'\npeople = {ask} 'How many people are you jumping with today?\n{print} 'We'll ask all of you some questions for safety reasons.'\nextra_instructions_people = a, b\n{repeat} 3 {times}\n name = {ask} 'What is your name?'\njumped_before = 'Have you ever done a parachute jump before, ' name '?'\n{if} jumped_before no\n{print} 'No worries, you'll get an extra safety instruction in room 13'\n{add} name {to} extra_instructions_people\n{else}\n{print} 'Fun!'\n{print} 'Thanks for filling in the safety questions everyone. Enjoy your jump!'" + header: Debugging + debug: 'True' + 3: + header: Indentation matters! + text: Indentation is very important to tell the computer which lines should be repeated and which lines should only be ran once. + code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'" + 5: + header: Indentation matters + code: "continue = {ask} 'Do you want to continue?'\n{if} 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'" + text: Again, indentation is still very important and can make a big difference in the code. + 9: + text: Enjoy the adventures in level 9! + header: Let's go! + 10: + 4: + debug: 'True' + header: Debugging + text: Let's debug this code + code: "{print} 'Ladies and gentlemen!'\n{print} 'For one night and one night only in circus Hedy!'\nacts = shoot out of a canon, walk the tightrope, pack themself in a suitcase,\npeople = Iris the Incredible Achmed the Amazing Francis the Fantastic\n {for} people {in} acts\nchosen_person {is} people {random}\n chosen_person ' will ' act\n{add} chosen_person {from} people\n{print} 'Come and watch our show tonight!'\n{print} 'Tickets are only available at the counter" + 2: + header: The for command + code: "animals = dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal" + text: With for you can make a list and use all items on that list. `{for}` creates a block, like repeat and if so all lines in the block need to start with indentation (4 spaces). + 5: + header: Time to program! + text: Enjoy the adventures in level 10! + 3: + header: The for command + text: 'Here you see another example of the `{for}` command:' + code: "days = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday\nnames = mom, dad, Emma, Sophie\n{for} day {in} days\n {print} names {at} {random} ' does the dishes on ' day" + 1: + header: Welcome to level 10 + text: 'In this level you will learn a new command: `{for}`.' + 11: + 3: + code: "number = 10\n{for} i {in} {range} 1 {to} 10\n {print} i * number" + header: the variable i + text: "In the previous slide the variable was named 'counter', because it was counting down.\nYou can of course use any name for the variable you want.\nThe standard name for variables in this situation that is used in programming languages like Python is 'i'.\nThat looks like this:" + 5: + text: Enjoy the adventures in level 11! + header: Let's start programming! + 1: + text: "In this level, we add a new form of the `{for}` command. In earlier levels, we used for with a list, but we can also use for with numbers.\n\nThis way we don't need the `{repeat}` command anymore." + header: Welcome to level 11 + 2: + header: The for command + code: "{for} counter {in} {range} 1 {to} 10\n {print} counter\n{print} 'Ready or not. Here I come!'" + text: 'This is what the new for command looks like:' + 4: + header: Debugging + debug: 'True' + code: "factor {is} {ask} 'Which table of multiplication do you need?'\n{repeat} {for} numbers {in} {range} 1 {to} 10 {times}\n {print} This is the table of multiplications for factor\n {print} number ' x ' factor ' = ' i * factor" + text: Let's debug this code! + 12: + 3: + text: "From this level on you are also allowed to use decimal numbers. This can make programs like your restaurant even better!\n\nNumbers do not need quotation marks." + code: "{print} 'decimal numbers now need to use a dot'\n{print} 2.5 + 2.5" + header: Decimal numbers + 2: + text: "This level makes some changes to the usage of quotation marks.\nFrom now on, **all texts** need to be in quotation marks. This includes values of variables, items on lists and text after {if} commands." + header: Quotation marks + code: "name = 'Hedy the Robot'\n{print} 'Hello ' name" + 4: + header: Functions! + text: "In this level you'll learn how to use functions. A function is a block of code you can easily use multiple times. Using functions helps us organize pieces of code that we can use again and again. To create a function, use define and give the function a name. Then put all the lines you want in the function in a indented block under the define line. Leave one empty line in your code to make it look nice and neat. Great job! You have created a function!\n\nNow, whenever we need that block of code, we just use call with the function's name to call it up! We don't have to type that block of code again." + 5: + header: Twinkle Twinkle little star! + text: "In this program you see an example of a function.\nLet's see what happens if you fill in the rest of the song!" + code: "{define} twinkle\n {print} 'Twinkle'\n {print} '...'\n\n{call} twinkle\n{print} 'Up above the world so high'\n{print} 'Like a diamond in the sky'\n{call} twinkle" + 6: + header: Functions + text: As you could see in the example a function is a block of code that can be called anytime. You use `{define}` to set the function and `{call}` to use it. + 8: + text: Enjoy the adventures in level 12! + header: Ready to try it out? + 7: + debug: 'True' + text: Let's debug this code! + code: "{call} new_member\n{print} 'Hi new member!'\nusername = {ask} 'What is your username?'\npassword = 'What is your password?'\n{print} 'Welcome to our club!'\n\nusername = {ask} 'Please enter your username. Are you a new member? Type New Member'\n{if} username = New Member\n{call} new member\n {else}\n password = {ask} 'Please enter password'" + header: Debugging + 1: + header: Welcome to level 12 + text: "From this level on you are allowed to use decimal numbers and there are some changes to the quotation marks.\nYou can also use functions from this level on!" + 13: + 1: + header: Welcome to level 13 + text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two ifs but can use and and or.\nFrom now on you could also use arguments in your functions." + 2: + text: "The `{and}` command is always used in a combination with the {if} command.\nThis way you can check if 2 statements are true. For example:" + header: The and command + code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'" + 5: + text: "In this example you see how the argument 'place' is used in the function.\nRun the code and change 'ocean' and 'sea' to something else, and see what happens." + header: Example + code: "{define} song {with} place\n {print} 'My Bonnie is over the ' place\n\n{call} song {with} 'ocean'\n{call} song {with} 'sea'\n{call} song {with} 'ocean'" + 6: + header: Example with variable + text: "You can also combine functions with a question.\n\nWhat happens if you make these changes:\n```\ndefine song with place\n print 'My Bonnie is ' place\n\nanswer is ask 'Where is my Bonnie?'\ncall song with answer\n```" + code: "{define} song {with} place\n {print} 'My Bonnie is over the ' place\n\n{call} song {with} 'ocean'\n{call} song {with} 'sea'\n{call} song {with} 'ocean'" + 7: + header: Even more questions! + text: "Now we have combined even more question with the function. Type this code and see what happens.\n\nNote how the variables and the arguments have the same name. This is allowed.\nDoes it confuse you? Just use different names, that is allowed as well.\n```\ndefine song with name, place\n print 'My ' name ' is ' place\n\nname is ask 'Who?'\nplace is ask 'Where are they?'\ncall song with name, place\n```" + code: "{define} song {with} place\n {print} 'My Bonnie is over the ' place\n\n{call} song {with} 'ocean'\n{call} song {with} 'sea'\n{call} song {with} 'ocean'" + 8: + code: "{define} happiness {with} name\n {print} '🥳'\n{play} G\n{play} A\n{play} B\n{print} 'Party on, ' name\n{define} sadness\n{print} '😞'\n{play} E\n{play} D\n{play} C\n{print} 'Hope you feel better, ' name\n\nname = {ask} 'What is your' name '?'\nmood = {ask} 'Are you happy or sad?'\n{if} mood = happy\n {call} happiness {with} person\n{else} mood = sad\n {define} sadness {to} name" + debug: 'True' + header: Debugging + text: Let's debug this code! + 9: + text: Enjoy the adventures in level 13! + header: Let's go! + 3: + code: "name = {ask} 'what is your name?'\n{if} name {is} 'Hedy' {or} name {is} 'hedy'\n {print} 'Welcome!!'" + text: "The `{or}` works in the same way as the `{and}` command, but only 1 of the two statements has to be true.\n\nLet's see what happens when you change the `{and}` for `{or}`." + header: The or command + 4: + header: Functions with arguments + text: Now that you've learned how to use functions, you'll learn how to use a function with an **argument**. An argument is a variable that is used within a function. It is not used outside the function. + 14: + 4: + header: Return value + text: In the previous levels you have learned to create functions and use arguments with them. Another great use of a function is to let it calculate something for you. You can give the function a calculation and it will give you the answer of the calculation. This answer is called a **return value**. + 5: + header: Return value + code: "{define} calculate_new_price {with} amount, percentage\n percentage = percentage / 100\n discount_amount = amount * percentage\n {return} amount - discount_amount\n\nold_price = {ask} 'How much is on the price tag?'\ndiscount = {ask} 'What percentage is the discount?'\n\nnew_price = {call} calculate_new_price {with} old_price, discount\n{print} 'The new price is ' new_price ' dollar'" + text: For example, in this code the function calculate_new_price will calculate the new price of any item. It will give you the new price as a return value. + 6: + text: Let's debug this code! + header: Debugging + debug: 'True' + code: "item = 'not bought'\n{print} 'I would like to buy this item'\nprice == {ask} 'What is the price?'\n{if} price less than or the same as 10\n {print} 'Thats a great deal!'\n item = 'bought'\n{if} price is more than 10 {and} less than or the same as 20\n {print} 'Alright'\n item = 'bought'\n{if} price is more than 20 {and} less than 50\n {print} 'That is a bit much!'\n{if} price is more than or the same as 50\n {print} 'No way!'\n{if} item =! bought\n {print} 'Shame.. I wont buy it'\n{else}\n {print} 'I will buy it! Thank you!'" + 7: + header: Let's get to work! + text: Enjoy the adventures in level 14! + 2: + text: "These are the new symbols you can use:\n\n The > means bigger than...\n\n The >= means bigger than or the same as...\n\n The < means smaller than...\n\n The <= means smaller than or the same as...\n\nYou can use them like this:" + code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'\n{else}\n {print} 'You are older than me!'" + header: Symbols + 1: + text: In this level you'll learn some new symbols that can help you improve your programs, like >. You will also learn to work with return values of a function. + header: Welcome to level 14 + 3: + text: "You can also use:\n\n== is the same as.\n\n!= is not\n\n== is used in `{if}` statements." + header: Symbols + code: "answer = {ask} 'Do you want to learn more?'\n{if} answer == 'yes'\n {print} 'Go to the next adventure!'\n{if} answer != 'yes'\n {print} 'That is a shame!'" + 15: + 2: + header: '{while}' + text: "We are going to learn a new loop, the while loop! The loop continues as long as the statement is true. So don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given. If the correct answer is never given, the loop will never end!" + code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'" + 1: + text: In this level you will learn about the `{while}` loop. + header: Welcome to level 15 + 3: + text: Let's debug this code! + header: Debugging + debug: 'True' + code: "numbers = 1, 2\n\n{for} i {in} {range} 3 {to} 50\n {add} x {to} numbers\n i = + 1\n\nrandom_number = numbers {random}\nguesses = 10\n\n{while} guess = 0\n answer = 'Guess my number:'\n {if} answer >= random_number\n {print} 'lower'\n guesses = guesses -1\n {if} answer > random_number\n {print} 'higher!'\n guesses = guesses\n {else} answer = random_number\n {print} 'correct'\n guesses = 10" + 4: + header: Let's try it out! + text: Enjoy the adventures in level 15! + 16: + 1: + header: Welcome to level 16 + text: In this level you will learn about the [square brackets] and how to use them. + 2: + header: Square brackets + code: "friends = ['Ahmed', 'Ben', 'Cayden']\n{print} friends[1] ' is the first friend on the list.'\n{print} friends[2] ' is the second friend on the list.'\n{print} friends[3] ' is the third friend on the list.'\n#now we will match 2 lists using the variable i\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} friends[i] 's lucky number is ' lucky_numbers[i]" + text: We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels. We use square brackets to point out a place in a list. The at random command can not be used anymore. + 3: + header: Debugging + text: Let's debug this code! + code: "{print} 'Friendship test'\n{subjects} = ['song', 'movie', 'food', 'drink']\nanswers_player_1 = []\nanswers_player_2 = []\nscore = 100\n\n{for} i {in} {range} 1 {to} 4\n answer = {ask} 'what is your favorite ' subjects[i]\n{add} answer {to} answers_player_1\n\n{print} 'Player 2, your turn!'\n{for} i {in} {range} 0 {to} 4\n answer_player_2 = {ask} 'what is player 1s favorite ' subjects\n {add} answer_player_2 {in} answers_player_2\n {if} answers_player_2[2] == answers_player_1[1]\n {print} 'Correct!'\n {else}\n {print} 'Wrong!'\n score = score - 25\n\n{print} 'Player 2, you've scored ' score '%'\n\n{if} score = 100\n {print} 'You are an amazing friend'\n{if} score < 100 {or} score >= 50\n {print} 'You could do better'\n{else} score < 50\n {print} 'Do you even know this person?!'" + debug: 'True' + 4: + text: Enjoy the adventures in level 16! + header: Let's try it out! + 17: + 1: + header: Welcome to level 17 + text: in this level you will learn how to use a colon and you will learn the elif command. + 2: + header: Colon + code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{else}:\n {print} 'Better luck next time..'" + text: 'Now we are going to change indentation a little bit. Every time that we need an indentation, we need : at the line before the indentation.' + 3: + header: Elif + text: 'In this level you can also use a new command: elif. elif is short for else if and you need it when you want to make 3 (or more!) options. Check it out!' + code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'" + 4: + text: Let's debug this code! + header: Debugging + debug: 'True' + code: "{define} ask_direction\n direction = {ask} 'Where do you want to go?'\n {if} direction = 'backwards'\n {turn} 180\n {else} direction == 'right'\n {turn} 90\n {else} direction == 'left'\n {turn} 270\n {forward} 100\n\ncontinue = 'yes'\n\n{while} continue == 'yes'\n {print} ask_direction\n {sleep}\n continue = 'do you want to draw some more?'\n {sleep}" + 5: + header: Let's try it out! + text: Enjoy the adventures in level 17! + 18: + 2: + text: "We arrived at real Python code! That means we need to use parentheses with print and range from now on.\n\nAlso, if you want to print more than one item, you need to separate them by commas.\n\nThe final change we will need to make to get Python code is changing ask into input.\n\nClick on the 'print' tab for all the examples." + editor: /hedy/18 + header: The Python way + 1: + text: Congratulations! You have reached the last level of Hedy! The code you have created here can be copied to real Python environments like replit or PyCharm, and you can continue learning there! Note however that Python can only read English commands, so if you have been using other languages, you will need to switch to English now. + header: Welcome to level 18 + 3: + header: The very last adventures! + text: Enjoy the very last adventures in level 18! diff --git a/content/slides/ta.yaml b/content/slides/ta.yaml new file mode 100644 index 00000000000..d8450538917 --- /dev/null +++ b/content/slides/ta.yaml @@ -0,0 +1,1203 @@ +levels: + 0: + 1: + header: Welcome to Hedy! + text: Hedy is a programming language. + 2: + header: Programming + text: |- + Programming is giving instructions to a computer, using the language of the computer. + + Such a language is called a "programming language". + 3: + header: Programming Language + text: |- + Maybe you already know some programming languages? + Some examples are: + * Scratch + * Python + * HTML + 4: + header: Programming + text: |- + If you can program, you can do many cool things: + * Build interactive stories + * Create computer drawings and draw these on paper or fabric + * Build your own apps to use on your phone + 5: + header: Programming in Hedy + text: In Hedy we use special codes, like `{print}`. + code: '{print} Welcome to Hedy!' + 6: + header: Programming in Hedy + text: Code words will be shown in pink. + code: '{print} Welcome to Hedy!' + 7: + header: Programming in Hedy + text: We start the code with the Run code button underneath the code. + code: '{print} Welcome to Hedy!' + 8: + header: Programming in Hedy + text: Output appears on the right-hand side. + code: '{print} Welcome to Hedy!' + 9: + header: Programming in Hedy + text: The output can also be a drawing. + code: |- + {forward} 100 + {turn} {left} + 1: + 1: + header: Welcome to level 1! + text: |- + We will start level 1 by making stories in Hedy! + + We need three text codes to create interactive stories. + 2: + header: '{print}' + text: |- + The first code that you can use in level 1 is `{print}`. + + `{print}` is used to show text on the screen. + code: '{print} Show text on the screen' + 3: + header: The {print} command + text: |- + You can change the text after the print command to whatever you want. + + Or you could print multiple lines by adding another line of code that also starts with `{print}`. + code: |- + {print} Welcome to Hedy! + {print} Start programming now! + 4: + header: '{ask}' + text: |- + The second code that you can use in level 1 is `{ask}`. + + `{ask}` is used to ask a question that can be answered. + code: |- + {print} Welcome to your own rock scissors paper! + {ask} What will you choose? + 5: + header: '{echo}' + text: |- + As you could see in the previous example. If you use the `{ask}` command, you can ask a question. + The answer, however doesn't show in the output screen. + + If you do want the answer to show, you can use the final command of this level: `{echo}`. + `{echo}` is used to repeat the answer of an `{ask}`. + code: |- + {print} Hello! + {ask} What is your name? + {echo} hello + 6: + header: Programming! + text: |- + With `{print}`, `{ask}` and `{echo}` you can already create a little story. + This is a good time to try the Parrot, Story and Rock, Paper Scissors adventures. + editor: /hedy/1 + 7: + header: Programming! + text: Adventures are shown in tabs. + editor: /hedy/1 + 8: + header: Programming! + text: The yellow arrow buttons can be used to copy examples. + editor: /hedy#print_command + 9: + header: Drawing with the turtle + text: Now that we have seen at text codes, we will now look at drawing codes next. + 10: + header: 'Drawing with the turtle: {forward}' + text: '`{forward}` is used to move the turtle forward.' + code: '{forward} 50' + 11: + header: 'Drawing with the turtle: {turn}' + text: '`{turn}` is used to make the turtle turn left or right.' + code: |- + {forward} 50 + {turn} {left} + 12: + header: Debugging + text: Debugging a code means getting rid of mistakes in the code. Let's debug this code together. Click the ladybug button to start the debugger. + code: |- + I am DJ Hedy + {print} What song would you like to hear? + {ask} I like that song too! + {print} Next up... {echo} + debug: 'True' + 13: + header: Let the programming fun begin! + text: Enjoy the adventures in level 1! + 2: + 1: + header: Welcome to level 2 + text: |- + In this level you will learn to use variables. + + A variable is a word that can be used to store information. + + For example: a name, age or favorite sports team. + 2: + header: Variables + text: To make or 'set' a variable we use the `{is}` command + code: |- + name {is} Hedy + age {is} 15 + {print} name is age years old + 3: + header: Interactive + text: |- + We can also set a variable by asking questions. + + The answer to the question is stored in the variable. + + This way we don't need the `{echo}` command. + code: |- + name {is} {ask} What is your name? + {print} Hello name + 4: + header: Multiple variables + text: Now that we use variables, we can use multiple variables instead of just one `{echo}` command. + code: |- + name {is} {ask} What is your name? + {print} Hello name + age {is} {ask} How old are you? + {print} name is age years old. + 5: + header: Sleep + text: You can also use the `{sleep}` command to pause the code for a while. + code: |- + {print} My favorite colour is... + {sleep} 2 + {print} green! + 6: + header: Sleep 5 + text: |- + You can add a number after the `{sleep}` command if you want the pause to be longer. + + If you want, you could even use a variable instead of a number to decide the duration of the sleep command. + code: |- + pause {is} 10 + {print} My favorite colour is... + {sleep} pause + {print} green! + 7: + header: Debugging + text: Debugging a code means getting rid of mistakes in the code. Let's debug this code together. Click the ladybug button to start the debugger. + code: |- + {print} Welcome to the donut shop! + filling {is} What kind of filling would you like? + {print} You have chosen... Filling! Yum! + topping {ask} What kind of topping would you like? + topping is delicious! + {print} I'll go get your donut. {sleep} + {print} Here you go! A filling donut with toping! + {ask} Have a nice day! + debug: 'True' + 8: + header: Let the programming fun begin! + text: Enjoy the adventures in level 2! + 3: + 1: + header: Welcome to level 3 + text: In this level you'll learn how to make a list, add and remove items form your lists and pick a random item off that list. + 2: + header: Making a list + text: |- + You make a list with `{is}`. + + Separate the items on your list with a comma. + code: animals {is} dogs, cats, kangaroos + 3: + header: At random + text: |- + You can use the list with the `{at}` `{random}` command. + The computer will randomly pick one item of the list. + Every time you run this code the output will differ. + code: |- + animals {is} dogs, cats, kangaroos + {print} animals {at} {random} + 4: + header: At random in a sentence + text: You can use the `{at}` `{random}` command in a sentence as well. + code: |- + animals {is} dogs, cats, kangaroos + {print} My favorite animal is animals {at} {random} + 5: + header: Add to + text: |- + You can add items to a list with the `{add}` `{to}` command. + + You can choose what to add to the list or you can use the `{add}` `{to}` command in combination with the `{ask}` command. + This way you can let the player decide what to add to the list. + code: |- + animals {is} dog, cat, kangaroo + like {is} {ask} What is your favorite animal? + {add} like {to_list} animals + {print} I choose animals {at} {random} + 6: + header: Remove from + text: |- + The opposite of the `{add}` `{to}` command is the `{remove}` `{from}` command. + This command removes an item from a list. + code: |- + animals {is} dog, cat, kangaroo + dislike {is} {ask} What animal do you not like? + {remove} dislike {from} animals + {print} I choose animals {at} {random} + 7: + header: Debugging + text: Let's debug this code! + editor: |- + music_genres {is} rock, pop, metal, indie, jazz + chosen_genre is music {at} {random} + {print} Let's listen to chosen genre + nice {ask} Do you like that genre? + {remove} chosen_genre {from} chosen_genre + second_choice {is} music_genres + {print} or do you prefer... second_choice {at} {random} + {remove} second_choice {to} music_genres + {print} I like music_genre {random} best! + debug: 'True' + 8: + header: Let's get to work! + text: Enjoy the adventures in level 3! + 4: + 1: + header: Welcome to level 4 + text: In this level you will learn how to use quotation marks. + code: '{print} ''print with quotes!''' + 2: + header: Problem + text: 'In the previous levels, you might have come across this problem:' + code: |- + name {is} Sophie + {print} My name is name + debug: 'True' + 3: + header: Fixing it with quotation marks + text: |- + In this level we will fix this problem by using quotation marks. + + This also makes our code look more like 'real' Python code. + 4: + header: Quotation marks with print + text: Each time you use the `{print}` command you need to put the text that you want to appear on the screen in quotation marks. + code: '{print} ''print with quotes!''' + 5: + header: Quotation marks with ask + text: This also goes for the `{ask}` command. + code: name {is} {ask} 'name please?' + 6: + header: Quotation marks and variables + text: |- + You do not want variable names to be printed on the screen. + This is why variables should be left out of the quotation marks, like this: + code: |- + name {is} Harry + {print} 'Hello ' name + 7: + header: Quotation marks and variables + text: |- + When variable names are used in the middle of a sentence, you have to leave the variables out of the quotation marks. + The rest of the sentence however, does need quotation marks. That looks like this: + code: |- + name {is} Harry + {print} 'Hello ' name ', how are you?' + 8: + header: Quotation marks and contractions + text: |- + Be careful! Now that you are using quotation marks, you can't use apostrophes in contractions. + + Please try to print a contraction like "you're" or "I'm" in the screen below and see what happens.... + code: '{print} ''This won''t work!''' + debug: 'True' + 9: + header: Clear + text: |- + In this level you'll also learn the {clear} command. + With this command you can wipe all the text from your output screen. + + Be careful that you always use a sleep command too. If you don't the computer will wipe all the text before you can read it! + code: |- + {print} '3' + {clear} + {print} '2' + {clear} + {print} '1' + {clear} + {print} 'SURPRISE!' + 10: + header: Debugging + text: Let's debug this code! + code: |- + {clear} + {print} What a nice day to go to the beach! + {ask} 'Do you want to build a sandcastle or swim in the ocean?' + {print} 'You would like to activity ' + {print} 'I'd like to do that too' + {print} 'Look at these beautiful seashells!' + colors {is} 'orange, silver, white, brown' + {print} 'I love the colors {at} {random} one!' + choice {is} {ask} Which one do you like? + debug: 'True' + 11: + header: Ready, Set, Go! + text: Enjoy the adventures in level 4! + 5: + 1: + header: Welcome to level 5 + text: 'In this level you will learn to use 3 new commands: `{if}`, `{else}` and `{in}`.' + 2: + header: if + text: |- + The `{if}` command allows you to choose between two options. + In this example the computer will print 'nice' if the given answer is Hedy. + If the answer is not Hedy, the computer will do nothing. + code: |- + name {is} {ask} 'what is your name?' + {if} name {is} Hedy {print} 'nice' + 3: + header: Don't forget to print + text: |- + When using the `{if}` command, don't forget to use the `{print}` command. + This code will not work! + code: '{if} name {is} Hedy ''nice''' + debug: 'True' + 4: + header: else + text: |- + When using an `{if}` command, you can also add an `{else}` command. + If the answer is Hedy, the computer will print 'nice'. + But if the answer is something else the computer will print 'boo' + code: '{if} name {is} Hedy {print} ''nice'' {else} {print} ''boo!''' + 5: + header: Long lines + text: |- + You might have noticed that your lines can get very long when you have both an `{if}` and an `{else}` command. + + You can choose to separate commands and put them on 2 lines, like this: + code: |- + {if} name {is} Hedy {print} 'nice' + {else} {print} 'boo!' + 6: + header: Another new command + text: |- + If you have practised with the `{if}` and `{else}` commands, you can also try the `{in}` command. + + With `{in}` you can let the computer check if an item is in a list, for example: + + Please note that Hedy is case sensitive. This means that if you answer "Green" instead of "green", Hedy will print "meh". + code: |- + pretty_colors {is} green, yellow + favorite_color {is} {ask} 'What is your favorite color?' + {if} favorite_color {in} pretty_colors {print} 'pretty!' + {else} {print} 'meh' + 7: + header: Debugging + text: Let's debug this code! + code: |- + {print} Welcome to HedyAir Security! + boarding_pass {is} {ask} 'Do you have your boarding pass?' + {if} bording_pass yes {print} Great! + {else} Please, get your boarding pass ready. + passport {is} 'Can I see your passport, please?' + {if} passport {is} yes 'thank you' + {else} 'You can't fly without a passport' + declare {is} {ask} Do you have anything to declare? + {if} declare {is} yes + item_to_declare {is} {ask} 'What would you like to declare' + {else} Alright + {print} Thank you. Please head to gate A22.' + debug: 'True' + 8: + header: Let's go! + text: Enjoy the adventures in level 5! + 6: + 1: + header: Welcome to level 6 + text: In this level we are adding maths to our codes. + 2: + header: Addition + text: If you want to calculate an addition, simply use the plus sign. + code: '{print} ''5 plus 5 is '' 5 + 5' + 3: + header: Subtraction + text: If you want to subtract, you can use the minus sign. + code: '{print} ''5 minus 5 is '' 5 - 5' + 4: + header: Multiplication + text: If you want to do multiplications, you can use the asterisk. + code: '{print} ''5 times 5 is '' 5 * 5' + 5: + header: Division + text: You can use the slash for division. + code: '{print} ''5 divided by 5 is '' 5 / 5' + 6: + header: Summary + text: In summary, you can use +, -, * and / to do maths. + code: |- + {print} '5 plus 5 is ' 5 + 5 + {print} '5 minus 5 is ' 5 - 5 + {print} '5 times 5 is ' 5 * 5 + {print} '5 divided by 5 is ' 5 / 5 + 7: + header: The = symbol + text: |- + From now on you can also use the = symbol instead of the `{is}` command. + This goes for both numbers and words, and it also goes after the `{if}` or `{else}` commands. + code: |- + name = Hedy + answer = 20 + 4 + 8: + header: Calculations with variables + text: 'You can use calculations with numbers, but you can also use variables to do calculations, like this:' + code: |- + number_1 = {ask} 'Fill in the first number:' + number_2 = {ask} 'Fill in the second number:' + correct_answer = number_1 * number_2 + {print} number_1 ' times ' number_2 ' is ' correct_answer + 9: + header: Debugging + text: Let's debug this code! + code: |- + {print} 'This is the water park ticket machine' + {print} 'Price list: Children under 12 $3, Adults $5' + {print} 'Mondays are 25% off' + amount_of_children = 'How many kids tickets would you like?' + amount_of_adults = 'How many adult tickets would you like?' + day_of_the_week = {ask} 'What day is it?' + {clear} + child_price = amount of children * 3 + adult_price = amount_of_adults + 5 + total_price = adult_price * child_price + {if} day {is} monday + total_price = total_price * 0.25 + {print} 'That will be total_price please' + debug: 'True' + 10: + header: Let's get to work! + text: Enjoy the adventures in level 6! + 7: + 1: + header: Welcome to level 7 + text: In this level you will learn how to repeat a line of code as many times a you'd like. + 2: + header: repeat 3 times + text: |- + If you want to repeat a line of code, you can use the `{repeat}` 3 `{times}` code. + If you want to repeat the line more times, simply change the number. + + For example: If you are programming a story where your character shouts for help for 5 times, it could look like this: + code: |- + {print} 'The prince kept calling for help' + {repeat} 5 {times} {print} 'Help!' + {print} 'Why is nobody helping me?' + 3: + header: Don't forget the print command + text: When using the repeat command, do not forget the `{print}` command. + code: '{repeat} 5 {times} ''Help!''' + debug: 'True' + 4: + header: Repeat an ask command + text: You can also repeat an `{ask}`, `{if}` or `{else}` command multiple times. + code: |- + {repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?' + {if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!' + {else} {repeat} 3 {times} {print} 'You have learned something new!' + 5: + header: Debugging + text: Let's debug this code! + code: |- + {print} You gave stranded on a desert island. + {repeat} 3 'Help!' + rescued = {ask} Has anybody come to the rescue? + {if} rescued yes {is} + {print} Lucky! + {else} {repeat} 3 {times} 'HELP!' + rescued = 'What about now?' + {if} yes + {print} 'Hurray! + {else} 'That's a shame... Oh well... time to build a shelter and find some food.' + debug: 'True' + 6: + header: Ready Set Go! + text: Enjoy the adventures in level 7! + 8: + 1: + header: Welcome to level 8 + text: In this level you will learn to use indentation to make the `{repeat}`, `{if}` and `{else}` commands work for multiple lines of code. + 2: + header: '{repeat} commands before' + text: |- + In the previous levels, the `{repeat}` command looked like this: + + You could only repeat one line of code. + code: '{repeat} 5 {times} {print} ''Help!''' + debug: 'True' + 3: + header: '{repeat} commands now' + text: |- + In this level you can repeat multiple lines of code. To do this you must tell the computer which lines belong together and should be repeated. + You do this by using indentation. + + Use 4 spaces (or one tab) at the beginning of each line that you want to repeat, like this: + code: |- + {repeat} 5 {times} + {print} 'Hello everyone' + {print} 'This will be printed 5 times' + 4: + header: '{repeat} commands now' + text: |- + If you want to, you can continue after the `{repeat}` command without indentation. + The lines that do not start with indentation will not be repeated. + code: |- + {repeat} 3 {times} + {print} 'Hello!' + {print} 'We are done repeating!' + 5: + header: if and else before + text: |- + The same goes for the `{if}` and `{else}` commands. + These were the commands before: + code: |- + {if} name {is} Hedy {print} 'nice' + {else} {print} 'boo!' + debug: 'True' + 6: + header: if and else now + text: |- + These are the `{if}` and `{else}` commands now. + Each line after the `{if}` and `{else}` commands start with indentation. + code: |- + name = {ask} 'What is your name?' + {if} name {is} Hedy + {print} 'Welcome Hedy' + {else} + {print} 'Welcome programmer!' + 7: + header: stopping the indentation + text: Just like with the `{repeat}` command, you can stop using indentation and the lines will always be shown. Not just if the statement is true. + code: "name = {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n{else}\n {print} 'Welcome programmer!' \n{print} '3..2..1.. Start programming!'" + 8: + header: if statements inside if statements + text: |- + You might have thought of trying to put an if command inside a repeat command, or inside another if command. + For now, this is not possible yet. In the higher levels, it will be allowed, but for now let's focus on practising the `{if}` `{else}` and `{repeat}` commands with proper indentation first. + 9: + header: Debugging + text: Let's debug this code! + code: |- + {print} 'HedyWheels bus tickets machine' + zone_1 = Town Hall, Library, Campus, Market Place + zone_2 = Swimming Pool, Skate Park, Mall, Airport + destination = 'Where do you want to go?' + {if} destination {in} zone 1 + {print} destination 'is in zone 1' + price = 3 euros + {if} destination {is} zone_2 + {print} destination 'is in zone 2' + price = 6 + ticket_types = {ask} 'Press 1 for a single use ticket. + Press 2 for a round trip ticket:' + {if} ticket_type = 1 + {print} 'You chose a single use ticket' + {else} + {print} You chose a round trip ticket' + price * 2 + {print} 'That will be ' price ' euros please' + debug: 'True' + 10: + header: Let's check out the adventures! + text: Enjoy the adventures in level 8! + 9: + 1: + header: Welcome to level 9 + text: |- + In this level you can use multiple lines of code after an `{if}` or after a `{repeat}` command. + + You can even put a `{repeat}` command within another `{repeat}` command. + 2: + header: Multiple lines after `{repeat}` + text: You are allowed to combine `{repeat}` and `{if}` in this level. + code: |- + {repeat} 3 {times} + food = {ask} 'What do you want?' + {if} food {is} pizza + {print} 'nice!' + {else} + {print} 'pizza is better' + 3: + header: Indentation matters! + text: Indentation is very important to tell the computer which lines should be repeated and which lines should only be ran once. + code: |- + {repeat} 3 {times} + {print} 'This line will be repeated...' + {print} 'This one too...' + {print} 'but this one will not!' + 4: + header: Multiple lines after `{if}` + text: You can also use multiple lines after `{if}` + code: |- + continue = {ask} 'Do you want to continue?' + {if} continue = yes + sure = {ask} 'Are you sure?' + {if} sure {is} yes + {print} 'We will continue' + {else} + {print} 'You are not sure' + {else} + {print} 'You do not want to continue' + 5: + header: Indentation matters + text: Again, indentation is still very important and can make a big difference in the code. + code: |- + continue = {ask} 'Do you want to continue?' + {if} continue = yes + sure = {ask} 'Are you sure?' + {if} sure {is} yes + {print} 'We will continue' + {else} + {print} 'You are not sure' + 6: + header: An `{if}` inside a `{repeat}` + text: |- + Now that you can use multiple lines of code after these command, you can also put them within each other. + Check it out: + code: |- + {repeat} 3 {times} + food = {ask} 'What do you want?' + {if} food {is} pizza + {print} 'nice!' + {else} + {print} 'pizza is better' + 7: + header: Mind the indentation + text: Mind that the fourth and sixth line of this code starts with 8 spaces of indentation. + code: |- + {repeat} 3 {times} + food = {ask} 'What do you want?' + {if} food {is} pizza + {print} 'nice!' + {else} + {print} 'pizza is better' + 8: + header: Debugging + text: Let's debug this code! + code: |- + {print} 'Welcome to HedyJumps, your parachute jump adventure!' + people = {ask} 'How many people are you jumping with today? + {print} 'We'll ask all of you some questions for safety reasons.' + extra_instructions_people = a, b + {repeat} 3 {times} + name = {ask} 'What is your name?' + jumped_before = 'Have you ever done a parachute jump before, ' name '?' + {if} jumped_before no + {print} 'No worries, you'll get an extra safety instruction in room 13' + {add} name {to} extra_instructions_people + {else} + {print} 'Fun!' + {print} 'Thanks for filling in the safety questions everyone. Enjoy your jump!' + debug: 'True' + 9: + header: Let's go! + text: Enjoy the adventures in level 9! + 10: + 1: + header: Welcome to level 10 + text: 'In this level you will learn a new command: `{for}`.' + 2: + header: The for command + text: With for you can make a list and use all items on that list. `{for}` creates a block, like repeat and if so all lines in the block need to start with indentation (4 spaces). + code: |- + animals = dog, cat, blobfish + {for} animal {in} animals + {print} 'I love ' animal + 3: + header: The for command + text: 'Here you see another example of the `{for}` command:' + code: |- + days = Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday + names = mom, dad, Emma, Sophie + {for} day {in} days + {print} names {at} {random} ' does the dishes on ' day + 4: + header: Debugging + text: Let's debug this code + code: |- + {print} 'Ladies and gentlemen!' + {print} 'For one night and one night only in circus Hedy!' + acts = shoot out of a canon, walk the tightrope, pack themself in a suitcase, + people = Iris the Incredible Achmed the Amazing Francis the Fantastic + {for} people {in} acts + chosen_person {is} people {random} + chosen_person ' will ' act + {add} chosen_person {from} people + {print} 'Come and watch our show tonight!' + {print} 'Tickets are only available at the counter + debug: 'True' + 5: + header: Time to program! + text: Enjoy the adventures in level 10! + 11: + 1: + header: Welcome to level 11 + text: |- + In this level, we add a new form of the `{for}` command. In earlier levels, we used for with a list, but we can also use for with numbers. + + This way we don't need the `{repeat}` command anymore. + 2: + header: The for command + text: 'This is what the new for command looks like:' + code: |- + {for} counter {in} {range} 1 {to} 10 + {print} counter + {print} 'Ready or not. Here I come!' + 3: + header: the variable i + text: |- + In the previous slide the variable was named 'counter', because it was counting down. + You can of course use any name for the variable you want. + The standard name for variables in this situation that is used in programming languages like Python is 'i'. + That looks like this: + code: |- + number = 10 + {for} i {in} {range} 1 {to} 10 + {print} i * number + 4: + header: Debugging + text: Let's debug this code! + code: |- + factor {is} {ask} 'Which table of multiplication do you need?' + {repeat} {for} numbers {in} {range} 1 {to} 10 {times} + {print} This is the table of multiplications for factor + {print} number ' x ' factor ' = ' i * factor + debug: 'True' + 5: + header: Let's start programming! + text: Enjoy the adventures in level 11! + 12: + 1: + header: Welcome to level 12 + text: |- + From this level on you are allowed to use decimal numbers and there are some changes to the quotation marks. + You can also use functions from this level on! + 2: + header: Quotation marks + text: |- + This level makes some changes to the usage of quotation marks. + From now on, **all texts** need to be in quotation marks. This includes values of variables, items on lists and text after {if} commands. + code: |- + name = 'Hedy the Robot' + {print} 'Hello ' name + 3: + header: Decimal numbers + text: |- + From this level on you are also allowed to use decimal numbers. This can make programs like your restaurant even better! + + Numbers do not need quotation marks. + code: |- + {print} 'decimal numbers now need to use a dot' + {print} 2.5 + 2.5 + 4: + header: Functions! + text: |- + In this level you'll learn how to use functions. A function is a block of code you can easily use multiple times. Using functions helps us organize pieces of code that we can use again and again. To create a function, use define and give the function a name. Then put all the lines you want in the function in a indented block under the define line. Leave one empty line in your code to make it look nice and neat. Great job! You have created a function! + + Now, whenever we need that block of code, we just use call with the function's name to call it up! We don't have to type that block of code again. + 5: + header: Twinkle Twinkle little star! + text: |- + In this program you see an example of a function. + Let's see what happens if you fill in the rest of the song! + code: |- + {define} twinkle + {print} 'Twinkle' + {print} '...' + + {call} twinkle + {print} 'Up above the world so high' + {print} 'Like a diamond in the sky' + {call} twinkle + 6: + header: Functions + text: As you could see in the example a function is a block of code that can be called anytime. You use `{define}` to set the function and `{call}` to use it. + 7: + header: Debugging + text: Let's debug this code! + code: |- + {call} new_member + {print} 'Hi new member!' + username = {ask} 'What is your username?' + password = 'What is your password?' + {print} 'Welcome to our club!' + + username = {ask} 'Please enter your username. Are you a new member? Type New Member' + {if} username = New Member + {call} new member + {else} + password = {ask} 'Please enter password' + debug: 'True' + 8: + header: Ready to try it out? + text: Enjoy the adventures in level 12! + 13: + 1: + header: Welcome to level 13 + text: |- + We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two ifs but can use and and or. + From now on you could also use arguments in your functions. + 2: + header: The and command + text: |- + The `{and}` command is always used in a combination with the {if} command. + This way you can check if 2 statements are true. For example: + code: |- + name = {ask} 'what is your name?' + age = {ask} 'what is your age?' + {if} name {is} 'Hedy' {and} age {is} 2 + {print} 'You are the real Hedy!' + 3: + header: The or command + text: |- + The `{or}` works in the same way as the `{and}` command, but only 1 of the two statements has to be true. + + Let's see what happens when you change the `{and}` for `{or}`. + code: |- + name = {ask} 'what is your name?' + {if} name {is} 'Hedy' {or} name {is} 'hedy' + {print} 'Welcome!!' + 4: + header: Functions with arguments + text: Now that you've learned how to use functions, you'll learn how to use a function with an **argument**. An argument is a variable that is used within a function. It is not used outside the function. + 5: + header: Example + text: |- + In this example you see how the argument 'place' is used in the function. + Run the code and change 'ocean' and 'sea' to something else, and see what happens. + code: |- + {define} song {with} place + {print} 'My Bonnie is over the ' place + + {call} song {with} 'ocean' + {call} song {with} 'sea' + {call} song {with} 'ocean' + 6: + header: Example with variable + text: |- + You can also combine functions with a question. + + What happens if you make these changes: + ``` + define song with place + print 'My Bonnie is ' place + + answer is ask 'Where is my Bonnie?' + call song with answer + ``` + code: |- + {define} song {with} place + {print} 'My Bonnie is over the ' place + + {call} song {with} 'ocean' + {call} song {with} 'sea' + {call} song {with} 'ocean' + 7: + header: Even more questions! + text: |- + Now we have combined even more question with the function. Type this code and see what happens. + + Note how the variables and the arguments have the same name. This is allowed. + Does it confuse you? Just use different names, that is allowed as well. + ``` + define song with name, place + print 'My ' name ' is ' place + + name is ask 'Who?' + place is ask 'Where are they?' + call song with name, place + ``` + code: |- + {define} song {with} place + {print} 'My Bonnie is over the ' place + + {call} song {with} 'ocean' + {call} song {with} 'sea' + {call} song {with} 'ocean' + 8: + header: Debugging + text: Let's debug this code! + code: |- + {define} happiness {with} name + {print} '🥳' + {play} G + {play} A + {play} B + {print} 'Party on, ' name + {define} sadness + {print} '😞' + {play} E + {play} D + {play} C + {print} 'Hope you feel better, ' name + + name = {ask} 'What is your' name '?' + mood = {ask} 'Are you happy or sad?' + {if} mood = happy + {call} happiness {with} person + {else} mood = sad + {define} sadness {to} name + debug: 'True' + 9: + header: Let's go! + text: Enjoy the adventures in level 13! + 14: + 1: + header: Welcome to level 14 + text: In this level you'll learn some new symbols that can help you improve your programs, like >. You will also learn to work with return values of a function. + 2: + header: Symbols + text: |- + These are the new symbols you can use: + + The > means bigger than... + + The >= means bigger than or the same as... + + The < means smaller than... + + The <= means smaller than or the same as... + + You can use them like this: + code: |- + age = {ask} 'How old are you?' + {if} age < 13 + {print} 'You are younger than me!' + {else} + {print} 'You are older than me!' + 3: + header: Symbols + text: |- + You can also use: + + == is the same as. + + != is not + + == is used in `{if}` statements. + code: |- + answer = {ask} 'Do you want to learn more?' + {if} answer == 'yes' + {print} 'Go to the next adventure!' + {if} answer != 'yes' + {print} 'That is a shame!' + 4: + header: Return value + text: In the previous levels you have learned to create functions and use arguments with them. Another great use of a function is to let it calculate something for you. You can give the function a calculation and it will give you the answer of the calculation. This answer is called a **return value**. + 5: + header: Return value + text: For example, in this code the function calculate_new_price will calculate the new price of any item. It will give you the new price as a return value. + code: |- + {define} calculate_new_price {with} amount, percentage + percentage = percentage / 100 + discount_amount = amount * percentage + {return} amount - discount_amount + + old_price = {ask} 'How much is on the price tag?' + discount = {ask} 'What percentage is the discount?' + + new_price = {call} calculate_new_price {with} old_price, discount + {print} 'The new price is ' new_price ' dollar' + 6: + header: Debugging + text: Let's debug this code! + code: |- + item = 'not bought' + {print} 'I would like to buy this item' + price == {ask} 'What is the price?' + {if} price less than or the same as 10 + {print} 'Thats a great deal!' + item = 'bought' + {if} price is more than 10 {and} less than or the same as 20 + {print} 'Alright' + item = 'bought' + {if} price is more than 20 {and} less than 50 + {print} 'That is a bit much!' + {if} price is more than or the same as 50 + {print} 'No way!' + {if} item =! bought + {print} 'Shame.. I wont buy it' + {else} + {print} 'I will buy it! Thank you!' + debug: 'True' + 7: + header: Let's get to work! + text: Enjoy the adventures in level 14! + 15: + 1: + header: Welcome to level 15 + text: In this level you will learn about the `{while}` loop. + 2: + header: '{while}' + text: |- + We are going to learn a new loop, the while loop! The loop continues as long as the statement is true. So don't forget to change the value in the loop. + + In the example code, we continue until a correct answer has been given. If the correct answer is never given, the loop will never end! + code: |- + answer = 0 + {while} answer != 25 + answer = {ask} 'What is 5 times 5?' + {print} 'A correct answer has been given' + 3: + header: Debugging + text: Let's debug this code! + code: |- + numbers = 1, 2 + + {for} i {in} {range} 3 {to} 50 + {add} x {to} numbers + i = + 1 + + random_number = numbers {random} + guesses = 10 + + {while} guess = 0 + answer = 'Guess my number:' + {if} answer >= random_number + {print} 'lower' + guesses = guesses -1 + {if} answer > random_number + {print} 'higher!' + guesses = guesses + {else} answer = random_number + {print} 'correct' + guesses = 10 + + debug: 'True' + 4: + header: Let's try it out! + text: Enjoy the adventures in level 15! + 16: + 1: + header: Welcome to level 16 + text: In this level you will learn about the [square brackets] and how to use them. + 2: + header: Square brackets + text: We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels. We use square brackets to point out a place in a list. The at random command can not be used anymore. + code: |- + friends = ['Ahmed', 'Ben', 'Cayden'] + {print} friends[1] ' is the first friend on the list.' + {print} friends[2] ' is the second friend on the list.' + {print} friends[3] ' is the third friend on the list.' + #now we will match 2 lists using the variable i + lucky_numbers = [15, 18, 6] + {for} i {in} {range} 1 {to} 3 + {print} friends[i] 's lucky number is ' lucky_numbers[i] + 3: + header: Debugging + text: Let's debug this code! + code: |- + {print} 'Friendship test' + {subjects} = ['song', 'movie', 'food', 'drink'] + answers_player_1 = [] + answers_player_2 = [] + score = 100 + + {for} i {in} {range} 1 {to} 4 + answer = {ask} 'what is your favorite ' subjects[i] + {add} answer {to} answers_player_1 + + {print} 'Player 2, your turn!' + {for} i {in} {range} 0 {to} 4 + answer_player_2 = {ask} 'what is player 1s favorite ' subjects + {add} answer_player_2 {in} answers_player_2 + {if} answers_player_2[2] == answers_player_1[1] + {print} 'Correct!' + {else} + {print} 'Wrong!' + score = score - 25 + + {print} 'Player 2, you've scored ' score '%' + + {if} score = 100 + {print} 'You are an amazing friend' + {if} score < 100 {or} score >= 50 + {print} 'You could do better' + {else} score < 50 + {print} 'Do you even know this person?!' + debug: 'True' + 4: + header: Let's try it out! + text: Enjoy the adventures in level 16! + 17: + 1: + header: Welcome to level 17 + text: in this level you will learn how to use a colon and you will learn the elif command. + 2: + header: Colon + text: 'Now we are going to change indentation a little bit. Every time that we need an indentation, we need : at the line before the indentation.' + code: |- + prices = ['1 million dollars', 'an apple pie', 'nothing'] + your_price = prices[{random}] + {print} 'You win ' your_price + {if} your_price == '1 million dollars' : + {print} 'Yeah! You are rich!' + {else}: + {print} 'Better luck next time..' + 3: + header: Elif + text: 'In this level you can also use a new command: elif. elif is short for else if and you need it when you want to make 3 (or more!) options. Check it out!' + code: |- + prices = ['1 million dollars', 'an apple pie', 'nothing'] + your_price = prices[{random}] + {print} 'You win ' your_price + {if} your_price == '1 million dollars' : + {print} 'Yeah! You are rich!' + {elif} your_price == 'an apple pie' : + {print} 'Lovely, an apple pie!' + {else}: + {print} 'Better luck next time..' + 4: + header: Debugging + text: Let's debug this code! + code: |- + {define} ask_direction + direction = {ask} 'Where do you want to go?' + {if} direction = 'backwards' + {turn} 180 + {else} direction == 'right' + {turn} 90 + {else} direction == 'left' + {turn} 270 + {forward} 100 + + continue = 'yes' + + {while} continue == 'yes' + {print} ask_direction + {sleep} + continue = 'do you want to draw some more?' + {sleep} + debug: 'True' + 5: + header: Let's try it out! + text: Enjoy the adventures in level 17! + 18: + 1: + header: Welcome to level 18 + text: Congratulations! You have reached the last level of Hedy! The code you have created here can be copied to real Python environments like replit or PyCharm, and you can continue learning there! Note however that Python can only read English commands, so if you have been using other languages, you will need to switch to English now. + 2: + header: The Python way + text: |- + We arrived at real Python code! That means we need to use parentheses with print and range from now on. + + Also, if you want to print more than one item, you need to separate them by commas. + + The final change we will need to make to get Python code is changing ask into input. + + Click on the 'print' tab for all the examples. + editor: /hedy/18 + 3: + header: The very last adventures! + text: Enjoy the very last adventures in level 18! diff --git a/content/tutorials/ca.yaml b/content/tutorials/ca.yaml index 1be2d9c2405..8f504600658 100644 --- a/content/tutorials/ca.yaml +++ b/content/tutorials/ca.yaml @@ -41,7 +41,7 @@ intro: text: Podeu desar i compartir tots els vostres programes creats amb altres usuaris de Hedy. 14: title: Full de trucs - text: Si heu oblidat una ordre, sempre podeu utilitzar el full de trucs. Mostra una llista de totes les ordres que podeu utilitzar al nivell actual. + text: Si heu oblidat una ordre, sempre podeu utilitzar el full de trucs. Mostra una llista de totes les ordres que podeu utilitzar al nivell actual. Podeu trobar el full de trucs al botó 🤔 15: title: Fi! text: Feu clic al 'pas següent' per començar a programar amb Hedy! diff --git a/content/tutorials/kab.yaml b/content/tutorials/kab.yaml new file mode 100644 index 00000000000..50ab0f63a75 --- /dev/null +++ b/content/tutorials/kab.yaml @@ -0,0 +1,70 @@ +intro: + steps: + 12: + title: Quiz + text: At the end of each level you can make the quiz. This way you can verify if you understand everything. + 11: + title: Puzzles + text: Do you think you understand the level quite well? Try the puzzles! You get lines of code in the wrong order, fix the order to get the program running. + 3: + title: The output window + text: The result of the code you execute will be shown here, you just created this! + 13: + title: Saving & sharing + text: You can save and share all your created programs with other Hedy users. + 10: + text: The other tabs contain adventures, which you can code for each level. They go from easy to hard. + title: Adventures + 6: + text: Choose a voice below the run button to let your program be read aloud. + title: Read aloud your program + 7: + text: Select a voice from the dropdown menu and run your program again to hear it being read aloud. + title: Run & listen + 9: + title: Level explanation + text: The first tab always contains the level explanation. In each level new commands will be explained here. + 15: + text: Click on 'next step' to really start coding with Hedy! + title: The end! + 1: + title: Welcome to Hedy! + text: In this tutorial we will explain all the Hedy features step-by-step. + 5: + title: Try it out! + text: Run the program, click 'next step' when you're done. + 8: + title: To the next level + text: When you think you understand everything and have practiced enough you can continue with the next level. When there is also a previous level there will be a button next to it to go back. + 4: + title: The run button + text: With this button you can run your program! Shall we give it a try in the next step? + 14: + title: Cheatsheet + text: If you forgot a command you can always use the cheatsheet. It shows a list of all commands you can use in the current level. You can find the cheatsheet at the 🤔 button + 2: + title: The code editor + text: In this window you write all the code, try typing something on the place of the underscores! +teacher: + steps: + 1: + title: Welcome to Hedy! + text: In this tutorial we will explain all the Hedy features step-by-step. + 3: + title: Customize classes + text: You can customize classes by hiding specific levels and/or adventures as well as making them available on a specific date. + 6: + title: Hedy documentation + text: Here you find a more extensive documentation with tips and tricks on how to use Hedy in the classroom. + 2: + text: As a teacher you can created classes and invite student or let them join through a link. You can view the programs and statistics of all your students. + title: Class management + 4: + text: You can create your own adventures and use them as assignments for your students. Create them here and add them to your classes in the class customization section. + title: Creating adventures + 7: + title: The end! + text: Click on 'next step' to get started as a Hedy teacher! + 5: + title: Creating accounts + text: You can create multiple accounts at once, only needing to provide an username and password. You can also directly add these accounts to one of your classes. diff --git a/content/tutorials/ne.yaml b/content/tutorials/ne.yaml new file mode 100644 index 00000000000..9b6143b606b --- /dev/null +++ b/content/tutorials/ne.yaml @@ -0,0 +1,70 @@ +intro: + steps: + 11: + title: Puzzles + text: Do you think you understand the level quite well? Try the puzzles! You get lines of code in the wrong order, fix the order to get the program running. + 3: + title: The output window + text: The result of the code you execute will be shown here, you just created this! + 13: + title: Saving & sharing + text: You can save and share all your created programs with other Hedy users. + 10: + text: The other tabs contain adventures, which you can code for each level. They go from easy to hard. + title: Adventures + 6: + text: Choose a voice below the run button to let your program be read aloud. + title: Read aloud your program + 7: + text: Select a voice from the dropdown menu and run your program again to hear it being read aloud. + title: Run & listen + 9: + title: Level explanation + text: The first tab always contains the level explanation. In each level new commands will be explained here. + 12: + title: Quiz + text: At the end of each level you can make the quiz. This way you can verify if you understand everything. + 15: + text: Click on 'next step' to really start coding with Hedy! + title: The end! + 1: + title: Welcome to Hedy! + text: In this tutorial we will explain all the Hedy features step-by-step. + 5: + title: Try it out! + text: Run the program, click 'next step' when you're done. + 8: + title: To the next level + text: When you think you understand everything and have practiced enough you can continue with the next level. When there is also a previous level there will be a button next to it to go back. + 4: + title: The run button + text: With this button you can run your program! Shall we give it a try in the next step? + 14: + title: Cheatsheet + text: If you forgot a command you can always use the cheatsheet. It shows a list of all commands you can use in the current level. You can find the cheatsheet at the 🤔 button + 2: + title: The code editor + text: In this window you write all the code, try typing something on the place of the underscores! +teacher: + steps: + 1: + title: Welcome to Hedy! + text: In this tutorial we will explain all the Hedy features step-by-step. + 2: + text: As a teacher you can created classes and invite student or let them join through a link. You can view the programs and statistics of all your students. + title: Class management + 3: + text: You can customize classes by hiding specific levels and/or adventures as well as making them available on a specific date. + title: Customize classes + 4: + text: You can create your own adventures and use them as assignments for your students. Create them here and add them to your classes in the class customization section. + title: Creating adventures + 5: + title: Creating accounts + text: You can create multiple accounts at once, only needing to provide an username and password. You can also directly add these accounts to one of your classes. + 6: + title: Hedy documentation + text: Here you find a more extensive documentation with tips and tricks on how to use Hedy in the classroom. + 7: + title: The end! + text: Click on 'next step' to get started as a Hedy teacher! diff --git a/content/tutorials/ta.yaml b/content/tutorials/ta.yaml new file mode 100644 index 00000000000..055e69a736d --- /dev/null +++ b/content/tutorials/ta.yaml @@ -0,0 +1,70 @@ +intro: + steps: + 1: + title: Welcome to Hedy! + text: In this tutorial we will explain all the Hedy features step-by-step. + 2: + title: The code editor + text: In this window you write all the code, try typing something on the place of the underscores! + 3: + title: The output window + text: The result of the code you execute will be shown here, you just created this! + 4: + title: The run button + text: With this button you can run your program! Shall we give it a try in the next step? + 5: + title: Try it out! + text: Run the program, click 'next step' when you're done. + 6: + title: Read aloud your program + text: Choose a voice below the run button to let your program be read aloud. + 7: + title: Run & listen + text: Select a voice from the dropdown menu and run your program again to hear it being read aloud. + 8: + title: To the next level + text: When you think you understand everything and have practiced enough you can continue with the next level. When there is also a previous level there will be a button next to it to go back. + 9: + title: Level explanation + text: The first tab always contains the level explanation. In each level new commands will be explained here. + 10: + title: Adventures + text: The other tabs contain adventures, which you can code for each level. They go from easy to hard. + 11: + title: Puzzles + text: Do you think you understand the level quite well? Try the puzzles! You get lines of code in the wrong order, fix the order to get the program running. + 12: + title: Quiz + text: At the end of each level you can make the quiz. This way you can verify if you understand everything. + 13: + title: Saving & sharing + text: You can save and share all your created programs with other Hedy users. + 14: + title: Cheatsheet + text: If you forgot a command you can always use the cheatsheet. It shows a list of all commands you can use in the current level. You can find the cheatsheet at the 🤔 button + 15: + title: The end! + text: Click on 'next step' to really start coding with Hedy! +teacher: + steps: + 1: + title: Welcome to Hedy! + text: In this tutorial we will explain all the Hedy features step-by-step. + 2: + title: Class management + text: As a teacher you can created classes and invite student or let them join through a link. You can view the programs and statistics of all your students. + 3: + title: Customize classes + text: You can customize classes by hiding specific levels and/or adventures as well as making them available on a specific date. + 4: + title: Creating adventures + text: You can create your own adventures and use them as assignments for your students. Create them here and add them to your classes in the class customization section. + 5: + title: Creating accounts + text: You can create multiple accounts at once, only needing to provide an username and password. You can also directly add these accounts to one of your classes. + 6: + title: Hedy documentation + text: Here you find a more extensive documentation with tips and tricks on how to use Hedy in the classroom. + 7: + title: The end! + text: Click on 'next step' to get started as a Hedy teacher! diff --git a/content/workbooks/lesson1/les1a.md b/content/workbooks/lesson1/les1a.md index f930d419853..c710f8a9201 100644 --- a/content/workbooks/lesson1/les1a.md +++ b/content/workbooks/lesson1/les1a.md @@ -1,6 +1,11 @@ # Hedy - Les 1a -[Teacher] Het doel van deze les is om de vijf codes uit level 1 van Hedy te leren kennen: `print`, `echo` en `ask` voor tekst en `forward` en `turn` voor het tekenen. [/Teacher] + +{ + "teacher_note": " Het doel van deze les is om de vijf codes uit level 1 van Hedy te leren kennen: `print`, `echo` en `ask` voor tekst en `forward` en `turn` voor het tekenen. " +} + + ## Printen en invoer @@ -101,7 +106,8 @@ Voorspel wat de uitvoer van deze codes is. Doe alsof je je eigen naam hebt ingev { "assignment": "output", "icon" : "💻", - "code" : "ask Hoe heet jij?\necho dus jij heet:", + "code" : "ask Hoe heet jij?\n + echo dus jij heet:", "answer" : "dus jij heet: **naam**", "lines" : 2 } @@ -109,7 +115,8 @@ Voorspel wat de uitvoer van deze codes is. Doe alsof je je eigen naam hebt ingev { "assignment": "output", "icon" : "💻", - "code" : "ask Hoe heet jij?\necho Leuk om je te ontmoeten,", + "code" : "ask Hoe heet jij?\n + echo Leuk om je te ontmoeten,", "answer" : "Leuk om je te ontmoeten, **naam**", "lines" : 2 } @@ -228,7 +235,14 @@ Voorspel wat de uitvoer van deze codes is. Dat is bij de turtle of tekenschildpa "assignment": "output", "icon" : "💻", "type" : "turtle", - "code" : "forward 100\nturn left\nforward 100\nturn left\nforward 100\nturn left\nforward 100\nturn left\n", + "code" : "forward 100\n + turn left\n + forward 100\n + turn left\n + forward 100\n + turn left\n + forward 100\n + turn left\n", "answer" : "een vierkant", "lines" : 5 } @@ -237,7 +251,14 @@ Voorspel wat de uitvoer van deze codes is. Dat is bij de turtle of tekenschildpa "assignment": "output", "icon" : "💻", "type" : "turtle", - "code" : "forward 100\nturn left\nforward 100\nturn right\nforward 100\nturn left\nforward 100\nturn right\n", + "code" : "forward 100\n + turn left\n + forward 100\n + turn right\n + forward 100\n + turn left\n + forward 100\n + turn right\n", "answer" : "een trapje (zonder onderkant)", "lines" : 5 } @@ -246,7 +267,14 @@ Voorspel wat de uitvoer van deze codes is. Dat is bij de turtle of tekenschildpa "assignment": "output", "icon" : "💻", "type" : "turtle", - "code" : "forward 100\nturn right\nforward 5\nturn right\nforward 100\nturn right\nforward 5\nturn right\n", + "code" : "forward 100\n + turn right\n + forward 5\n + turn right\n + forward 100\n + turn right\n + forward 5\n + turn right\n", "answer" : "een hele smalle vierkant", "lines" : 6 } @@ -260,7 +288,11 @@ We draaien het nu om! Je krijg een uitvoer en jij moet de code erbij schrijven. "assignment": "input", "icon" : "🧑‍💻", "output" : "_\n |\n |_________", - "answer" : "forward 5\nturn right\nforward 10\nturn left\nforward 50\n", + "answer" : "forward 5\n + turn right\n + forward 10\n + turn left\n + forward 50\n", "lines" : 5 } @@ -275,7 +307,12 @@ We draaien het nu om! Je krijg een uitvoer en jij moet de code erbij schrijven. | |\n | |\n ---------\n", - "answer" : "forward 50\nturn left\nforward 50\nturn left\nforward 50\nturn left\n", + "answer" : "forward 50\n + turn left\n + forward 50\n + turn left\n + forward 50\n + turn left\n", "lines" : 8 } diff --git a/content/workbooks/lesson2/les2a.md b/content/workbooks/lesson2/les2a.md index ec72175b697..d93d5f60582 100644 --- a/content/workbooks/lesson2/les2a.md +++ b/content/workbooks/lesson2/les2a.md @@ -1,6 +1,8 @@ # Hedy - Les 2a -[Teacher] In level 2 leren leerlingen de codes `is` en `is ask` [/Teacher] +{ + "teacher_note": "In level 2 leren leerlingen de codes `is` en `is ask`." +} ## Variabelen @@ -26,7 +28,10 @@ print naam "assignment": "element selection", "question" : "Omcirkel alle variabelen in deze code.", "icon" : "◯", - "code" : "naam is Hedy\nprint Hallo naam\nleeftijd is 17\nprint Jij bent leeftijd jaar oud", + "code" : "naam is Hedy\n + print Hallo naam\n + leeftijd is 17\n + print Jij bent leeftijd jaar oud", "answer" : "Op alle regels" } @@ -34,7 +39,10 @@ print naam "assignment": "element selection", "question" : "Omcirkel nu de stukken code waarin een variabele **wordt ingesteld.**", "icon" : "◯", - "code" : "naam is Hedy\nprint Hallo naam\nleeftijd is 17\nprint Jij bent leeftijd jaar oud", + "code" : "naam is Hedy\n + print Hallo naam\n + leeftijd is 17\n + print Jij bent leeftijd jaar oud", "answer" : "Op regel 1 en 3" } @@ -42,7 +50,10 @@ print naam "assignment": "element selection", "question" : "Omcirkel nu de stukken code waarin de waarde van een variabele **wordt gebruikt.**", "icon" : "◯", - "code" : "naam is Hedy\nprint Hallo naam\nleeftijd is 17\nprint Jij bent leeftijd jaar oud", + "code" : "naam is Hedy\n + print Hallo naam\n + leeftijd is 17\n + print Jij bent leeftijd jaar oud", "answer" : "Op regel 2 en 4" } @@ -64,7 +75,8 @@ Voorbeeld: { "assignment": "output", "icon" : "💻", - "code" : "naam is Mo\nprint Goed bezig naam!", + "code" : "naam is Mo\n + print Goed bezig naam!", "answer" : "Goed bezig Mo!", "lines" : 1 } @@ -72,7 +84,8 @@ Voorbeeld: { "assignment": "output", "icon" : "💻", - "code" : "naam is Mo\nprint Goed bezig Mo!", + "code" : "naam is Mo\n + print Goed bezig Mo!", "answer" : "Goed bezig Mo!", "lines" : 1 } @@ -80,7 +93,8 @@ Voorbeeld: { "assignment": "output", "icon" : "💻", - "code" : "voornaam is Layla\nprint Goedemorgen naam!", + "code" : "voornaam is Layla\n + print Goedemorgen naam!", "answer" : "Goedemorgen naam!", "lines" : 1 } @@ -94,7 +108,8 @@ Lees de codes goed! Welke zijn er goed of fout. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "achternaam is Jansen\nprint Goedemorgen naam!", + "code" : "achternaam is Jansen\n + print Goedemorgen naam!", "answer" : "Goed" } @@ -103,7 +118,8 @@ Lees de codes goed! Welke zijn er goed of fout. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "naam is\nprint Goedemorgen naam!", + "code" : "naam is\n + print Goedemorgen naam!", "answer" : "Fout" } @@ -112,7 +128,9 @@ Lees de codes goed! Welke zijn er goed of fout. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "naam is Jansen\nprint Goedemorgen meneer naam!\nprint Hallo meneer naam!", + "code" : "naam is Jansen\n + print Goedemorgen meneer naam!\n + print Hallo meneer naam!", "answer" : "Goed" } @@ -148,7 +166,8 @@ Voorspel wat de uitvoer van deze codes is. Doe alsof je je eigen naam hebt ingev { "assignment": "output", "icon" : "💻", - "code" : "naam is ask Hoe heet jij?\nprint dus jij heet: naam", + "code" : "naam is ask Hoe heet jij?\n + print dus jij heet: naam", "answer" : "dus jij heet: **naam**", "lines" : 1 } @@ -156,7 +175,8 @@ Voorspel wat de uitvoer van deze codes is. Doe alsof je je eigen naam hebt ingev { "assignment": "output", "icon" : "💻", - "code" : "toestand is ask Hoe gaat het met jou?\nprint Dus het gaat toestand met jou", + "code" : "toestand is ask Hoe gaat het met jou?\n + print Dus het gaat toestand met jou", "answer" : " Dus het gaat **goed** met jou", "lines" : 1 } diff --git a/content/workbooks/lesson3/les3a-autogenerated.md b/content/workbooks/lesson3/les3a-autogenerated.md index b1c080cd766..2ca7a6ef3cb 100644 --- a/content/workbooks/lesson3/les3a-autogenerated.md +++ b/content/workbooks/lesson3/les3a-autogenerated.md @@ -1,5 +1,7 @@ # Hedy - Les 3a + + ## Lijsten en willekeurigheid Aan het einde van de les kun jij: @@ -20,17 +22,17 @@ print Ik ga vandaag naar vrienden at random #### Opdracht 1: Omcirkel het juiste stukje code -**◯ Opdracht**: Omcircel alle lijsten in deze code +**◯ Opdracht**: Omcircel alle lijsten in deze code ```hedy vandaag is maandag klassen is 1HC, 1HB, 1HA -lokalen is 011, 304, 305, OLC +lokalen is 011, 304, 305, OLC ``` -**◯ Opdracht**: Op welke plek in de code wordt er tekst uit een lijst gebruikt? +**◯ Opdracht**: Op welke plek in de code wordt er tekst uit een lijst gebruikt? ```hedy klassen is 1HC, 1HB, 1HA -print vandaag heeft klassen at random vrij! +print vandaag heeft klassen at random vrij! ``` #### Opdracht 2: Voorspel de uitvoer @@ -45,25 +47,25 @@ Vind je het lastig? Gebruik dan weer het stappenplan om variabele-uitvoer te voo **💻 Vraag**: Wat is de uitvoer van deze code?
Code: Uitvoer: ```hedy -docenten is Hermans, Merbis, Bagci, Senkal __________________________ +docenten is Hermans, Merbis, Bagci, Senkal ________________________________________ print Vandaag les van docenten at random! - + ``` **💻 Vraag**: Wat is de uitvoer van deze code?
Code: Uitvoer: ```hedy -docenten is Hermans, Merbis, Bagci, Senkal __________________________ +docenten is Hermans, Merbis, Bagci, Senkal ________________________________________ print De docent vandaag is Hermans. - + ``` **💻 Vraag**: Wat is de uitvoer van deze code?
Code: Uitvoer: ```hedy -weer is zonnig, regen, wolken, onweer __________________________ +weer is zonnig, regen, wolken, onweer ________________________________________ print Wat is het lekker weer vandaag! - + ``` #### Opdracht 3: Foutje? @@ -72,26 +74,27 @@ Lees de codes goed! Welke zijn er goed of fout. **🤔 Vraag**: Is deze code goed of fout? ```hedy weer is zonnig, regen, wolken, onweer -print Bah! De computer loopt weer vast. +print Bah! De computer loopt weer vast. ``` Antwoord:
〇 Goed
〇 Fout **🤔 Vraag**: Is deze code goed of fout? ```hedy docenten is Hermans -print Vandaag alweer docenten at random +print Vandaag alweer docenten at random ``` Antwoord:
〇 Goed
〇 Fout **🤔 Vraag**: Is deze code goed of fout? ```hedy docenten is onweer, regen, ijzel -print Vandaag alweer docenten at random! +print Vandaag alweer docenten at random! ``` Antwoord:
〇 Goed
〇 Fout ### Avonturen +[Teacher] Dit zijn alle avonturen zonder `add to` en `remove from`.[/Teacher] Dit is een goed moment voor deze avonturen: Introductie willekeurig @@ -129,21 +132,21 @@ Je kan ook iets uit een lijst verwijderen, met `remove` en `from`. **🤔 Vraag**: Is deze code goed of fout? ```hedy letters is a,b,c,d -remove a to letters +remove a to letters ``` Antwoord:
〇 Goed
〇 Fout **🤔 Vraag**: Is deze code goed of fout? ```hedy eten is pizza, friet, kapsalon -remove kroket from eten +remove kroket from eten ``` Antwoord:
〇 Goed
〇 Fout **🤔 Vraag**: Is deze code goed of fout? ```hedy eten is pizza, friet, kapsalon -add pizza to eten +add pizza to eten ``` Antwoord:
〇 Goed
〇 Fout @@ -160,7 +163,7 @@ ________________________________________ Welkom bij de bingoavond ________________________________________ De drie geluksnummers zijn: ________________________________________ 5 en 3 en 10 ________________________________________ - + ``` @@ -170,7 +173,7 @@ Code: Uitvoer: ________________________________________ We gaan vanavond naar de film. ________________________________________ We kiezen: Inside Out ________________________________________ - + ``` @@ -190,7 +193,7 @@ Antwoord: ______________________________________________________________________ #### Opdracht 7: Codes -De code `is` is in dit leven veranderd, en we hebben ook nieuwe codes geleerd. +De code `is` is in dit level veranderd, en we hebben ook nieuwe codes geleerd. Wat doen die? Leg het uit in je eigen woorden. **📖 Vraag**: Wat doet het commando `is`? (Let op: `is` kan dus meerdere dingen doen!) @@ -237,5 +240,3 @@ ________________________________________________________________________________ ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

- -`` diff --git a/content/workbooks/lesson3/les3a.md b/content/workbooks/lesson3/les3a.md index 383305174a7..217bcc93fdc 100644 --- a/content/workbooks/lesson3/les3a.md +++ b/content/workbooks/lesson3/les3a.md @@ -1,6 +1,9 @@ # Hedy - Les 3a -[Teacher] In level 3 leren leerlingen werken met lijsten. Die worden ingesteld zoals een variabele, met `is`, en kan je uitlezen met `at random`. [/Teacher] +{ + "teacher_note": " In level 3 leren leerlingen werken met lijsten. Die worden ingesteld zoals een variabele, met `is`, en kan je uitlezen met `at random`." +} + ## Lijsten en willekeurigheid @@ -26,7 +29,9 @@ print Ik ga vandaag naar vrienden at random "assignment": "element selection", "question" : "Omcircel alle lijsten in deze code", "icon" : "◯", - "code" : "vandaag is maandag\nklassen is 1HC, 1HB, 1HA\nlokalen is 011, 304, 305, OLC", + "code" : "vandaag is maandag\n + klassen is 1HC, 1HB, 1HA\n + lokalen is 011, 304, 305, OLC", "answer" : "klassen en lokalen" } @@ -34,7 +39,8 @@ print Ik ga vandaag naar vrienden at random "assignment": "element selection", "question" : "Op welke plek in de code wordt er tekst uit een lijst gebruikt?", "icon" : "◯", - "code" : "klassen is 1HC, 1HB, 1HA\nprint vandaag heeft klassen at random vrij!", + "code" : "klassen is 1HC, 1HB, 1HA\n + print vandaag heeft klassen at random vrij!", "answer" : "Op het einde van regel 2" } @@ -50,7 +56,8 @@ Vind je het lastig? Gebruik dan weer het stappenplan om variabele-uitvoer te voo { "assignment": "output", "icon" : "💻", - "code" : "docenten is Hermans, Merbis, Bagci, Senkal\nprint Vandaag les van docenten at random!", + "code" : "docenten is Hermans, Merbis, Bagci, Senkal\n + print Vandaag les van docenten at random!", "answer" : "Vandaag les van **keuze uit docenten**", "lines" : 1 } @@ -58,7 +65,8 @@ Vind je het lastig? Gebruik dan weer het stappenplan om variabele-uitvoer te voo { "assignment": "output", "icon" : "💻", - "code" : "docenten is Hermans, Merbis, Bagci, Senkal\nprint De docent vandaag is Hermans.", + "code" : "docenten is Hermans, Merbis, Bagci, Senkal\n + print De docent vandaag is Hermans.", "answer" : "De docent vandaag is Hermans", "lines" : 1 } @@ -66,9 +74,8 @@ Vind je het lastig? Gebruik dan weer het stappenplan om variabele-uitvoer te voo { "assignment": "output", "icon" : "💻", - "code" : -"weer is zonnig, regen, wolken, onweer\n -print Wat is het lekker weer vandaag!", + "code" : "weer is zonnig, regen, wolken, onweer\n + print Wat is het lekker weer vandaag!", "answer" : "Wat is het lekker weer vandaag!", "lines" : 1 } @@ -81,7 +88,8 @@ Lees de codes goed! Welke zijn er goed of fout. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "weer is zonnig, regen, wolken, onweer\nprint Bah! De computer loopt weer vast.", + "code" : "weer is zonnig, regen, wolken, onweer\n + print Bah! De computer loopt weer vast.", "answer" : "Fout. Je kan een lijst niet printen" } @@ -90,7 +98,8 @@ Lees de codes goed! Welke zijn er goed of fout. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "docenten is Hermans\nprint Vandaag alweer docenten at random", + "code" : "docenten is Hermans\n + print Vandaag alweer docenten at random", "answer" : "Fout, docenten is geen lijst" } @@ -99,7 +108,8 @@ Lees de codes goed! Welke zijn er goed of fout. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "docenten is onweer, regen, ijzel\nprint Vandaag alweer docenten at random!", + "code" : "docenten is onweer, regen, ijzel\n + print Vandaag alweer docenten at random!", "answer" : "Goed, de naam hoeft niet te kloppen voor de computer." } @@ -145,7 +155,8 @@ Je kan ook iets uit een lijst verwijderen, met `remove` en `from`. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "letters is a,b,c,d\nremove a to letters", + "code" : "letters is a,b,c,d\n + remove a to letters", "answer" : "Fout. Bij remove hoort from, niet to." } @@ -154,7 +165,8 @@ Je kan ook iets uit een lijst verwijderen, met `remove` en `from`. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "eten is pizza, friet, kapsalon\nremove kroket from eten", + "code" : "eten is pizza, friet, kapsalon\n + remove kroket from eten", "answer" : "Goed, je mag iets verwijderen dat niet in de lijst zit." } @@ -163,7 +175,8 @@ Je kan ook iets uit een lijst verwijderen, met `remove` en `from`. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "eten is pizza, friet, kapsalon\nadd pizza to eten", + "code" : "eten is pizza, friet, kapsalon\n + add pizza to eten", "answer" : "Goed, je mag iets toevoegen dat al in de lijst zit." } @@ -176,8 +189,13 @@ Kijk goed naar de uitvoer, en schrijf er een passende code bij. { "assignment": "input", "icon" : "🧑‍💻", - "output" : "Welkom bij de bingoavond\nDe drie geluksnummers zijn:\n5 en 3 en 10", - "answer" : "getallen is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nprint Welkom bij de bingoavond\nprint De drie geluksnummers zijn:\nprint nummers at random en print nummers at random en print nummers at random", + "output" : "Welkom bij de bingoavond\n + De drie geluksnummers zijn:\n + 5 en 3 en 10", + "answer" : "getallen is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n + print Welkom bij de bingoavond\n + print De drie geluksnummers zijn:\n + print nummers at random en print nummers at random en print nummers at random", "lines" : 4 } @@ -185,8 +203,11 @@ Kijk goed naar de uitvoer, en schrijf er een passende code bij. { "assignment": "input", "icon" : "🧑‍💻", - "output" : "We gaan vanavond naar de film.\nWe kiezen: Inside Out", - "answer" : "films is Avengers, Barbie, Inside Out\nprint We gaan vanavond naar de film.\nWe kiezen: films at random", + "output" : "We gaan vanavond naar de film.\n + We kiezen: Inside Out", + "answer" : "films is Avengers, Barbie, Inside Out\n + print We gaan vanavond naar de film.\n + We kiezen: films at random", "lines" : 2 } @@ -289,5 +310,3 @@ Wat doen die? Leg het uit in je eigen woorden. "lines" : 5 } - -`` diff --git a/content/workbooks/lesson4/les4a-autogenerated.md b/content/workbooks/lesson4/les4a-autogenerated.md index c1b457826a5..4c05cf9db22 100644 --- a/content/workbooks/lesson4/les4a-autogenerated.md +++ b/content/workbooks/lesson4/les4a-autogenerated.md @@ -1,7 +1,6 @@ # Hedy - Les 4a -[Teacher] In level 4 leren leerlingen aanhalingstekens gebruiken in code. Dat is niet altijd de meest leuke les maar goed oefenen is wel nodig om latere frustratie te voorkomen. -Om het leuker te maken kan je in deze les andere features aanbieden, zoals `clear` of een muziekopdracht.[/Teacher] + ## Aanhalingstekens @@ -30,11 +29,15 @@ Deze opdrachten doe je in twee stappen: **💻 Vraag**: Wat is de uitvoer van deze code?
Code: Uitvoer: ```hedy -print Hallo allemaal!nprint Welkom bij Hedy ________________________________________ - ________________________________________ +print Hallo allemaal! ________________________________________ +print Welkom bij Hedy ________________________________________ + ``` +Vergeet niet deze opdrachten in twe stappen te doen, eerst de aanhalingstekens links. +Dan de code rechts! + **💻 Vraag**: Wat is de uitvoer van deze code?
Code: Uitvoer: @@ -110,7 +113,17 @@ naam is ask 'Hoe heet jij?' ``` Antwoord:
〇 Goed
〇 Fout +**🤔 Vraag**: Is deze code goed of fout? +```hedy +aantal is ask "Hoeveel capibara's lopen daar?" +``` +Antwoord:
〇 Goed
〇 Fout +**🤔 Vraag**: Is deze code goed of fout? +```hedy +aantal is ask "Hoeveel capibara's lopen daar?"print 'Dat zijn er aantal' +``` +Antwoord:
〇 Goed
〇 Fout #### Opdracht 4: Schrijf de code @@ -146,11 +159,11 @@ Antwoord: ______________________________________________________________________ -#### Opdracht 7: Codes +#### Opdracht 6: Codes We hebben ook nieuwe codes geleerd in level 4. -**📖 Vraag**: Wat doet het commando `clear`? (Let op: `is` kan dus meerdere dingen doen!) +**📖 Vraag**: Wat doet het commando `clear`? Antwoord: ____________________________________________________________________________________________________
**📖 Vraag**: Wat doet het commando `color`? @@ -186,5 +199,3 @@ ________________________________________________________________________________ ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

- -`` diff --git a/content/workbooks/lesson4/les4a-autogenerated.pdf b/content/workbooks/lesson4/les4a-autogenerated.pdf index 694d8ffa347..6344e0729d0 100644 Binary files a/content/workbooks/lesson4/les4a-autogenerated.pdf and b/content/workbooks/lesson4/les4a-autogenerated.pdf differ diff --git a/content/workbooks/lesson4/les4a.md b/content/workbooks/lesson4/les4a.md index 3d918cc7594..8972ebc2f56 100644 --- a/content/workbooks/lesson4/les4a.md +++ b/content/workbooks/lesson4/les4a.md @@ -1,7 +1,9 @@ # Hedy - Les 4a -[Teacher] In level 4 leren leerlingen aanhalingstekens gebruiken in code. Dat is niet altijd de meest leuke les maar goed oefenen is wel nodig om latere frustratie te voorkomen. -Om het leuker te maken kan je in deze les andere features aanbieden, zoals `clear` of een muziekopdracht.[/Teacher] +{ + "teacher_note": "In level 4 leren leerlingen aanhalingstekens gebruiken in code. Dat is niet altijd de meest leuke les maar goed oefenen is wel nodig om latere frustratie te voorkomen. Om het leuker te maken kan je in deze les andere features aanbieden, zoals `clear` of een muziekopdracht." +} + ## Aanhalingstekens @@ -31,7 +33,7 @@ Deze opdrachten doe je in twee stappen: "assignment": "output", "icon" : "💻", "code" : - "print Hallo allemaal!n + "print Hallo allemaal!\n print Welkom bij Hedy\n", "answer" : "Hallo allemaal\n @@ -39,6 +41,9 @@ Deze opdrachten doe je in twee stappen: "lines" : 2 } +Vergeet niet deze opdrachten in twe stappen te doen, eerst de aanhalingstekens links. +Dan de code rechts! + { "assignment": "output", @@ -115,7 +120,8 @@ Lees de codes goed! Welke zijn er goed of fout. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "print 'De lama wandelt op straat'\nprint \"Wat een avontuur\"", + "code" : "print 'De lama wandelt op straat'\n + print \"Wat een avontuur\"", "answer" : "Goed. Je mag aanhalingstekens door elkaar gebruiken, als ze per regel maar hetzelfde zijn!" } @@ -149,10 +155,19 @@ Lees de codes goed! Welke zijn er goed of fout. "options" : ["Goed" , "Fout"], "question" : "Is deze code goed of fout?", "icon" : "🤔", - "code" : "aantal is ask "Hoeveel capibara's lopen daar?\""", + "code" : "aantal is ask \"Hoeveel capibara's lopen daar?\"", "answer" : "Goed." } +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "aantal is ask \"Hoeveel capibara's lopen daar?\" + print 'Dat zijn er aantal'", + "answer" : "Fout. Het woord aantal wordt geprint en niet de variabele" +} #### Opdracht 4: Schrijf de code @@ -161,8 +176,10 @@ Kijk goed naar de uitvoer, en schrijf er een passende code bij. { "assignment": "input", "icon" : "🧑‍💻", - "output" : "Welkom bij de bingoavond\nHier komt het eerste getal...!", - "answer" : "print 'Welkom bij de bingoavond'\nprint 'Hier komt het eerste getal!'", + "output" : "Welkom bij de bingoavond\n + Hier komt het eerste getal...!", + "answer" : "print 'Welkom bij de bingoavond'\n + print 'Hier komt het eerste getal!'", "lines" : 2 } @@ -170,8 +187,10 @@ Kijk goed naar de uitvoer, en schrijf er een passende code bij. { "assignment": "input", "icon" : "🧑‍💻", - "output" : "We gaan vanavond naar de film.\nWaar heb jij zin in?", - "answer" : "print 'We gaan vanavond naar de film.'\nfilm is ask 'Waar heb jij zin in?'", + "output" : "We gaan vanavond naar de film.\n + Waar heb jij zin in?", + "answer" : "print 'We gaan vanavond naar de film.'\n + film is ask 'Waar heb jij zin in?'", "lines" : 2 } @@ -198,14 +217,14 @@ We hebben deze les weer nieuwe programmeerwoorden geleerd! Leg ze uit je eigen w -#### Opdracht 7: Codes +#### Opdracht 6: Codes We hebben ook nieuwe codes geleerd in level 4. { "assignment": "define", "icon" : "📖", - "question" : "Wat doet het commando `clear`? (Let op: `is` kan dus meerdere dingen doen!)", + "question" : "Wat doet het commando `clear`?", "lines" : 1, "answer" : "Maakt het scherm leeg" } @@ -248,5 +267,3 @@ We hebben ook nieuwe codes geleerd in level 4. "lines" : 5 } - -`` diff --git a/content/workbooks/lesson5/les5a-autogenerated.md b/content/workbooks/lesson5/les5a-autogenerated.md new file mode 100644 index 00000000000..af61345c862 --- /dev/null +++ b/content/workbooks/lesson5/les5a-autogenerated.md @@ -0,0 +1,204 @@ +# Hedy - Les 5a + + + + +## if else + +Aan het einde van de les: + +* hoe je de computer kan laten reageren op invoer. + +### Keuzes maken + +Tot nu toe voerde Hedy altijd alle regels code uit. Vanaf nu kan je met een `if` bepaalde regels uitvoeren, alleen in bepaalde gevallen. +De code die je na `if` schrijft, noem je een conditie. +In dit voorbeeld is de conditie `vriend is Jasmijn.` + +```hedy +vriend is ask 'Hoe heet jij?' +if vriend is Jasmijn print 'Hallo!' else print 'Nee, jij niet!' +``` + +#### Opdracht 1: Onderstreep de condities + +Wat is een conditie? Onderstreep in deze codes steeds de conditie. + +**◯ Opdracht**: Onderstreep de conditie +```hedy +vandaag is ask 'Welke dag is het?' +if vandaag is vrijdag print 'Ja' else print 'Nee' +``` + +**◯ Opdracht**: Onderstreep de conditie +```hedy +vandaag is ask 'Welke dag is het?' +if vandaag is zaterdag print 'Geen school vandaag' else print 'Helaas wel' +``` + +**◯ Opdracht**: Onderstreep de conditie +```hedy +leeftijd is ask 'Hoe oud ben jij?' +if leeftijd is 16 print 'Perfecto' else print 'Jij bent te jong!' +``` + +#### Opdracht 2: Omcirkel de juiste regels + +Welke code wordt uitgevoerd? Omcirkel alleen die stukken. +Doe alsof het vandaag vrijdag is, en jij 12 jaar bent. + +**◯ Opdracht**: Omcircel de code die wordt uitgevoerd +```hedy +vandaag is ask 'Welke dag is het?' +if vandaag is vrijdag print 'Ja' else print 'Nee' +``` + +**◯ Opdracht**: Omcircel de code die wordt uitgevoerd +```hedy +vandaag is ask 'Welke dag is het?' +if vandaag is zaterdag print 'Geen school vandaag' else print 'Helaas wel' +``` + +**◯ Opdracht**: Omcircel de code die wordt uitgevoerd +```hedy +leeftijd is ask 'Hoe oud ben jij?' +if leeftijd is 16 print 'Perfecto' else print 'Jij bent te jong!' +``` + + +#### Opdracht 3: Foutje? +Lees de codes goed! Welke zijn er goed of fout. + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +leeftijd is ask 'Hoe oud ben jij?' +if leeftijd is 16 print 'Perfecto' else 'Jij bent te jong!' +``` +Antwoord:
〇 Goed
〇 Fout + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +dier is ask 'Wat voor dier is dat?' +if dier is Lama print 'Beeeee' +``` +Antwoord:
〇 Goed
〇 Fout + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +print "Daar lopen twee oma's" +``` +Antwoord:
〇 Goed
〇 Fout + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +if naam Hedyprint 'Programmeren is leuk!' +``` +Antwoord:
〇 Goed
〇 Fout + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +ask 'Hoe heet deze school?'if school is LK print 'Ja!' +``` +Antwoord:
〇 Goed
〇 Fout + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +aantal is ask "Hoeveel capibara's lopen daar?"if aantal is 5 print 'Dat zijn er dan aantal' +``` +Antwoord:
〇 Goed
〇 Fout + + +#### Opdracht 4: Voorspel de uitvoer + +Wat is de uitvoer van deze programma's? +Let op! Soms staat er random in een programma. Dan moet je zelf kiezen wat Hedy zou kiezen. +Er kunnen dan dus meerdere antwoorden goed zijn! + +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +docenten is Hermans, Merbis, Bagci, Senkal ________________________________________ +docent is docenten at random +if docent is Hermans print 'Hoera!' + +``` + +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +docenten is Hermans, Merbis, Bagci, Senkal ________________________________________ +docent is docenten at random +if docent is Hermans print 'Jammer!' else print 'Hoera!' + +``` + +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +getallen is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ________________________________________ +print 'Welkom bij de bingoavond' ________________________________________ +getal is getallen at random +if getal is 10 print 'Gewonnen!' else print 'Helaas' + + +``` + +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +getal is ask 'Wat is jouw lievelingsgetal?' ________________________________________ +if getal is 10 print 'Mijne ook!' + + +``` + + + +#### Opdracht 5: Programmeerwoorden + +We hebben deze les weer nieuwe programmeerwoorden geleerd! Leg ze uit je eigen woorden. + +**📖 Vraag**: Wat is een conditie? +Antwoord: ____________________________________________________________________________________________________
+ + + +#### Opdracht 6: Codes + +We hebben ook nieuwe codes geleerd in level 5. + +**📖 Vraag**: Wat doet het commando `if`? +Antwoord: ____________________________________________________________________________________________________
+ +**📖 Vraag**: Wat doet het commando `else`? +Antwoord: ____________________________________________________________________________________________________
+ +### Wat vond jij? + +**✍️ Vraag**: Wat was de leukste opdracht van dit level?
+ +____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+
+ +**✍️ Vraag**: Waarom vond je juist die opdracht leuk?
+ +____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+
+ +**✍️ Vraag**: Welke opdracht was het minst leuk?
+ +____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+
+ +**✍️ Vraag**: Waarom vond je juist die opdracht niet leuk?
+ +____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+
diff --git a/content/workbooks/lesson5/les5a-autogenerated.pdf b/content/workbooks/lesson5/les5a-autogenerated.pdf new file mode 100644 index 00000000000..2b26427a58b Binary files /dev/null and b/content/workbooks/lesson5/les5a-autogenerated.pdf differ diff --git a/content/workbooks/lesson5/les5a.md b/content/workbooks/lesson5/les5a.md new file mode 100644 index 00000000000..60c998425b3 --- /dev/null +++ b/content/workbooks/lesson5/les5a.md @@ -0,0 +1,264 @@ +# Hedy - Les 5a + +{ + "teacher_note": "In level 5 leren leerlingen de `if` en `else` codes, die zijn vrij lastig omdat nu niet meer alles regels altijd worden uitgevoerd." +} + + + +## if else + +Aan het einde van de les: + +* hoe je de computer kan laten reageren op invoer. + +### Keuzes maken + +Tot nu toe voerde Hedy altijd alle regels code uit. Vanaf nu kan je met een `if` bepaalde regels uitvoeren, alleen in bepaalde gevallen. +De code die je na `if` schrijft, noem je een conditie. +In dit voorbeeld is de conditie `vriend is Jasmijn.` + +```hedy +vriend is ask 'Hoe heet jij?' +if vriend is Jasmijn print 'Hallo!' else print 'Nee, jij niet!' +``` + +#### Opdracht 1: Onderstreep de condities + +Wat is een conditie? Onderstreep in deze codes steeds de conditie. + +{ + "assignment": "element selection", + "question" : "Onderstreep de conditie", + "icon" : "◯", + "code" : "vandaag is ask 'Welke dag is het?'\n + if vandaag is vrijdag print 'Ja' else print 'Nee'", + "answer" : "print 'Ja'" +} + +{ + "assignment": "element selection", + "question" : "Onderstreep de conditie", + "icon" : "◯", + "code" : "vandaag is ask 'Welke dag is het?'\n + if vandaag is zaterdag print 'Geen school vandaag' else print 'Helaas wel'", + "answer" : "print 'Helaas wel'" +} + +{ + "assignment": "element selection", + "question" : "Onderstreep de conditie", + "icon" : "◯", + "code" : "leeftijd is ask 'Hoe oud ben jij?'\n + if leeftijd is 16 print 'Perfecto' else print 'Jij bent te jong!'", + "answer" : "print 'Jij bent te jong!'" + "answer" : "leeftijd is 18" +} + +#### Opdracht 2: Omcirkel de juiste regels + +Welke code wordt uitgevoerd? Omcirkel alleen die stukken. +Doe alsof het vandaag vrijdag is, en jij 12 jaar bent. + +{ + "assignment": "element selection", + "question" : "Omcircel de code die wordt uitgevoerd", + "icon" : "◯", + "code" : "vandaag is ask 'Welke dag is het?'\n + if vandaag is vrijdag print 'Ja' else print 'Nee'", + "answer" : "print 'Ja'" +} + +{ + "assignment": "element selection", + "question" : "Omcircel de code die wordt uitgevoerd", + "icon" : "◯", + "code" : "vandaag is ask 'Welke dag is het?'\n + if vandaag is zaterdag print 'Geen school vandaag' else print 'Helaas wel'", + "answer" : "print 'Helaas wel'" +} + +{ + "assignment": "element selection", + "question" : "Omcircel de code die wordt uitgevoerd", + "icon" : "◯", + "code" : "leeftijd is ask 'Hoe oud ben jij?'\n + if leeftijd is 16 print 'Perfecto' else print 'Jij bent te jong!'", + "answer" : "print 'Jij bent te jong!'" +} + + +#### Opdracht 3: Foutje? +Lees de codes goed! Welke zijn er goed of fout. + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "leeftijd is ask 'Hoe oud ben jij?'\n + if leeftijd is 16 print 'Perfecto' else 'Jij bent te jong!'", + "answer" : "Fout. Er staat geen print achter else" +} + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "dier is ask 'Wat voor dier is dat?'\n + if dier is Lama print 'Beeeee'", + "answer" : "Goed! Er hoeft geen else code te staan" +} + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "print \"Daar lopen twee oma's\"", + "answer" : "Goed! Als je twee aanhalingstekens gebruikt dan kan je wel oma's schrijven." +} + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "if naam Hedy + print 'Programmeren is leuk!'", + "answer" : "Fout, de is mist." +} + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "ask 'Hoe heet deze school?' + if school is LK print 'Ja!' ", + "answer" : "Fout. Er staat geen variabele bij ask." +} + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "aantal is ask \"Hoeveel capibara's lopen daar?\" + if aantal is 5 print 'Dat zijn er dan aantal'", + "answer" : "Fout. Het woord aantal wordt geprint en niet de variabele" +} + + +#### Opdracht 4: Voorspel de uitvoer + +Wat is de uitvoer van deze programma's? +Let op! Soms staat er random in een programma. Dan moet je zelf kiezen wat Hedy zou kiezen. +Er kunnen dan dus meerdere antwoorden goed zijn! + +{ + "assignment": "output", + "icon" : "💻", + "code" : "docenten is Hermans, Merbis, Bagci, Senkal\n + docent is docenten at random\n + if docent is Hermans print 'Hoera!'", + "answer" : "Hoera! of niks", + "lines" : 1 +} + +{ + "assignment": "output", + "icon" : "💻", + "code" : "docenten is Hermans, Merbis, Bagci, Senkal\n + docent is docenten at random\n + if docent is Hermans print 'Jammer!' else print 'Hoera!'", + "answer" : "Hoera! of 'Jammer'", + "lines" : 1 +} + +{ + "assignment": "output", + "icon" : "💻", + "code" : "getallen is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n + print 'Welkom bij de bingoavond'\n + getal is getallen at random\n + if getal is 10 print 'Gewonnen!' else print 'Helaas'\n", + "answer" : "Welkom bij de bingoavond\nGewonnen! of 'Helaas'", + "lines" : 2 +} + +{ + "assignment": "output", + "icon" : "💻", + "code" : "getal is ask 'Wat is jouw lievelingsgetal?'\n + if getal is 10 print 'Mijne ook!'\n", + "answer" : "'Mijne ook!' of niks", + "lines" : 1 +} + + + +#### Opdracht 5: Programmeerwoorden + +We hebben deze les weer nieuwe programmeerwoorden geleerd! Leg ze uit je eigen woorden. + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat is een conditie?", + "lines" : 1, + "answer" : "Iets dat waar of niet waar is" +} + + + +#### Opdracht 6: Codes + +We hebben ook nieuwe codes geleerd in level 5. + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat doet het commando `if`? ", + "lines" : 1, + "answer" : "Bepalen welke regel wordt uigevoerd." +} + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat doet het commando `else`?", + "lines" : 1, + "answer" : "Wordt uitgevoerd als de conditie niet waar is." +} + +### Wat vond jij? + +{ + "assignment": "text", + "icon" : "✍️", + "question" : "Wat was de leukste opdracht van dit level?", + "lines" : 1 +} + +{ + "assignment": "text", + "icon" : "✍️", + "question" : "Waarom vond je juist die opdracht leuk?", + "lines" : 5 +} + +{ + "assignment": "text", + "icon" : "✍️", + "question" : "Welke opdracht was het minst leuk?", + "lines" : 1 +} + +{ + "assignment": "text", + "icon" : "✍️", + "question" : "Waarom vond je juist die opdracht niet leuk?", + "lines" : 5 +} diff --git a/content/workbooks/lesson6/les6a-autogenerated.md b/content/workbooks/lesson6/les6a-autogenerated.md new file mode 100644 index 00000000000..376aab81acd --- /dev/null +++ b/content/workbooks/lesson6/les6a-autogenerated.md @@ -0,0 +1,207 @@ +# Hedy - Toets Les 1 tot 5 + + +## SO + +We maken vandaag een SO op papier. Lees dit goed voor je begint: + +* De toets telt voor 1/6e mee voor je cijfer +* We beginnen vandaag ook aan een huiswerk-opdracht. Die telt ook 1/6e mee. +* Lees goed wat je moet doen! Soms moet je twee dingen doen, vergeet dat dan niet! + +#### Codes herkennen + +Voor deze vragen moet jij stukjes code zoeken bij de juiste programmeerwoorden. +Kijk goed **wat** je moet vinden, en omcirkel dat. + +**◯ Opdracht**: Omcirkel alle **variabelen** in deze code. +```hedy +naam is Michael +print 'Hallo ' naam +leeftijd is 17 +print 'Jij bent ' leeftijd ' jaar oud' +``` + +**◯ Opdracht**: Omcirkel alle **variabelen** in deze code. +```hedy +print 'welkom bij dit avontuur' naamnaam is Harry +``` + +**◯ Opdracht**: Omcirkel nu de stukken code waarin de waarde van een variabele **wordt gebruikt.** +```hedy +weer is zonnig +print 'het wordt vandaag ' weer +``` + + +**◯ Opdracht**: Omcirkel nu de stukken code waarin de waarde van een variabele **wordt gebruikt.** +```hedy +naam is Ben +print 'Hallo ik ben Ben' +``` + +**◯ Opdracht**: Op welke plek in de code wordt **er tekst uit een lijst geprint**? +```hedy +winst is 10 euro, 5 euro, niks +print 'Jij wint ' winst at random +``` + +**◯ Opdracht**: Op welke plek in de code wordt **er tekst uit een lijst geprint**? +```hedy +vrienden is Mo, Layla, Sem +print vrienden at random ' gaat ook mee,' +``` + + +**◯ Opdracht**: Op welke plek in de code staat er een **conditie**? +```hedy +leeftijd is ask 'Hoe oud ben jij?' +if leeftijd is 18 print 'Jij mag nu een biertje' else print 'Jij bent te jong!' +``` + +**◯ Opdracht**: Op welke plek in de code staat er een **conditie**? +```hedy +naam is Bert +if naam is Ernie print 'Jij bent oranje' else print 'Jij bent geel!' +``` + +### Goed of fout? + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +concierge is Michael +print Vandaag is concierge at random bij de receptie +``` +Antwoord:
〇 Goed
〇 Fout + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +klassen is 1, 2, 5, 8, 12, 24 +print De prijs valt op nummer .... klassen at random +``` +Antwoord:
〇 Goed
〇 Fout + + + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +naam is Gea +print 'Goedemorgen ' voornaam! +``` +Antwoord:
〇 Goed
〇 Fout + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +print 'Daar staat een auto, fout geparkeerd! +``` +Antwoord:
〇 Goed
〇 Fout + +**🤔 Vraag**: Is deze code goed of fout? +```hedy +print "De auto's staan op straat" +print 'Dat mag niet!!' +``` +Antwoord:
〇 Goed
〇 Fout + +### Voorspel de uitvoer + +Bij deze opdracht moet je voorspellen wat de computer gaat doen. +Denk eraan dat computers heel precies zijn, iedere spatie of punt of komma telt! + +* Zit er een `ask` in de code? Kies dan zelf een antwoord. +* Zit er een `random` in de code? Kies dan een mogelijke keus van de computer. + +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +weer is zonnig, regen, wolken, onweer ______________________________ +print 'Vandaag wordt het... ' weer at random! + +``` + +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +docenten is Hermans, Merbis, Bagci, Senkal ___________________________ +docent is docenten at random +if docent is Hermans print 'Jammer!' + +``` + +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +toestand is ask Hoe gaat het met jou? ___________________________ +print 'Dus het gaat ' toestand ' met jou.' + +``` + +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +getallen is 1, 2, 3 ___________________________ +print 'Welkom bij de bingoavond' ___________________________ +getal is getallen at random +if getal is 10 print 'Gewonnen!' else print 'Helaas' +``` + +### Commando's en programmeerwoorden + +We hebben deze lessen veel nieuwe commando's en woorden geleerd. +In deze opdracht mag je er twee commando's uitleggen (is en if). Kies er daarna drie die je nog weet, en leg die uit. + +**📖 Vraag**: Wat doet het commando `is`? +Antwoord: ____________________________________________________________________________________________________
+ +**📖 Vraag**: Wat doet het commando `if`? +Antwoord: ____________________________________________________________________________________________________
+ +**📖 Vraag**: Wat doet het commando `______`? +Antwoord: ____________________________________________________________________________________________________
+ +**📖 Vraag**: Wat doet het commando `______`? +Antwoord: ____________________________________________________________________________________________________
+ +**📖 Vraag**: Wat doet het commando `______`? +Antwoord: ____________________________________________________________________________________________________
+ +Hetzelfde voor woorden. Eerst leg je twee woorden uit (variabele en lijst), dan kies je er zelf nog drie die je kan uitleggen. + +**📖 Vraag**: Wat betekent het woord variabele? +Antwoord: ____________________________________________________________________________________________________
+ +**📖 Vraag**: Wat betekent het woord lijst? +Antwoord: ____________________________________________________________________________________________________
+ +**📖 Vraag**: Wat betekent het woord __________? +Antwoord: ____________________________________________________________________________________________________
+ + +**📖 Vraag**: Wat betekent het woord __________? +Antwoord: ____________________________________________________________________________________________________
+ + +**📖 Vraag**: Wat betekent het woord __________? +Antwoord: ____________________________________________________________________________________________________
+ +### De laatste vragen! + + + +**✍️ Vraag**: Weet jij nog meer over programmeren met Hedy dan er in deze toets staat? +Noem iets dat jij weet, maar niet in deze toets stond. Als het klopt, krijg je bonus.
+ +____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+
+ +**✍️ Vraag**: Verzin een goede toetsvraag +Wat had jij een goede vraag gevonden voor deze toets? Zet er ook het antwoord bij!
+ +____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+ + diff --git a/content/workbooks/lesson6/les6a-autogenerated.pdf b/content/workbooks/lesson6/les6a-autogenerated.pdf new file mode 100644 index 00000000000..774ca7a1c9f Binary files /dev/null and b/content/workbooks/lesson6/les6a-autogenerated.pdf differ diff --git a/content/workbooks/lesson6/les6a.md b/content/workbooks/lesson6/les6a.md new file mode 100644 index 00000000000..086fc19cf73 --- /dev/null +++ b/content/workbooks/lesson6/les6a.md @@ -0,0 +1,306 @@ +# Hedy - Toets Les 1 tot 5 + +{ + "teacher_note": "Dit is een toets voor leerlingen over level 1 t/m 5. We gebruiken wel overal de syntax van level 5, dus aanhalingstekens, en geen `echo` meer, anders wordt het verwarrend." +} + +## SO + +We maken vandaag een SO op papier. Lees dit goed voor je begint: + +* De toets telt voor 1/6e mee voor je cijfer +* We beginnen vandaag ook aan een huiswerk-opdracht. Die telt ook 1/6e mee. +* Lees goed wat je moet doen! Soms moet je twee dingen doen, vergeet dat dan niet! + +#### Codes herkennen + +Voor deze vragen moet jij stukjes code zoeken bij de juiste programmeerwoorden. +Kijk goed **wat** je moet vinden, en omcirkel dat. + +{ + "assignment": "element selection", + "question" : "Omcirkel alle **variabelen** in deze code.", + "icon" : "◯", + "code" : "naam is Michael\n + print 'Hallo ' naam\n + leeftijd is 17\n + print 'Jij bent ' leeftijd ' jaar oud'", + "answer" : "Op alle regels" +} + +{ + "assignment": "element selection", + "question" : "Omcirkel alle **variabelen** in deze code.", + "icon" : "◯", + "code" : "print 'welkom bij dit avontuur' naam + naam is Harry", + "answer" : "Op regel 2, maar niet op regel 1! Naam is namelijk nog niet ingesteld" +} + +{ + "assignment": "element selection", + "question" : "Omcirkel nu de stukken code waarin de waarde van een variabele **wordt gebruikt.**", + "icon" : "◯", + "code" : "weer is zonnig\n + print 'het wordt vandaag ' weer", + "answer" : "Op regel 2" +} + + +{ + "assignment": "element selection", + "question" : "Omcirkel nu de stukken code waarin de waarde van een variabele **wordt gebruikt.**", + "icon" : "◯", + "code" : "naam is Ben\n + print 'Hallo ik ben Ben'", + "answer" : "Op geen regel" +} + +{ + "assignment": "element selection", + "question" : "Op welke plek in de code wordt **er tekst uit een lijst geprint**?", + "icon" : "◯", + "code" : "winst is 10 euro, 5 euro, niks\n + print 'Jij wint ' winst at random", + "answer" : "Op het einde van regel 2" +} + +{ + "assignment": "element selection", + "question" : "Op welke plek in de code wordt **er tekst uit een lijst geprint**?", + "icon" : "◯", + "code" : "vrienden is Mo, Layla, Sem\n + print vrienden at random ' gaat ook mee,'", + "answer" : "Op het begin van regel 2" +} + + +{ + "assignment": "element selection", + "question" : "Op welke plek in de code staat er een **conditie**?", + "note" : "Bij een conditie kijkt de computer of iets waar is of niet waar", + "icon" : "◯", + "code" : "leeftijd is ask 'Hoe oud ben jij?'\n + if leeftijd is 18 print 'Jij mag nu een biertje' else print 'Jij bent te jong!'", + "answer" : "leeftijd is 18" +} + +{ + "assignment": "element selection", + "question" : "Op welke plek in de code staat er een **conditie**?", + "icon" : "◯", + "code" : "naam is Bert\n + if naam is Ernie print 'Jij bent oranje' else print 'Jij bent geel!'", + "answer" : "naam is Ernie" +} + +### Goed of fout? + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "concierge is Michael\n + print Vandaag is concierge at random bij de receptie", + "answer" : "Fout, concierge is geen lijst" +} + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "klassen is 1, 2, 5, 8, 12, 24\n + print De prijs valt op nummer .... klassen at random", + "answer" : "Goed, de naam hoeft niet te kloppen voor de computer." +} + + + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "naam is Gea\n + print 'Goedemorgen ' voornaam!", + "answer" : "Fout (geen variabele gebruikt)" +} + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "print 'Daar staat een auto, fout geparkeerd!", + "answer" : "Fout. De aanhalingstekens moeten altijd in paren gebruikt worden." +} + +{ + "assignment": "MC-code", + "options" : ["Goed" , "Fout"], + "question" : "Is deze code goed of fout?", + "icon" : "🤔", + "code" : "print \"De auto's staan op straat\"\n + print 'Dat mag niet!!'", + "answer" : "Goed. Je mag aanhalingstekens door elkaar gebruiken, als ze per regel maar hetzelfde zijn. Op de eerste regel moeten de dubbele door het woord auto's." +} + +### Voorspel de uitvoer + +Bij deze opdracht moet je voorspellen wat de computer gaat doen. +Denk eraan dat computers heel precies zijn, iedere spatie of punt of komma telt! + +* Zit er een `ask` in de code? Kies dan zelf een antwoord. +* Zit er een `random` in de code? Kies dan een mogelijke keus van de computer. + +{ + "assignment": "output", + "icon" : "💻", + "code" : "weer is zonnig, regen, wolken, onweer\n + print 'Vandaag wordt het... ' weer at random!", + "answer" : "Wat is het **keuze uit zonnig, regen, wolken, onweer**!", + "lines" : 1 +} + +{ + "assignment": "output", + "icon" : "💻", + "code" : "docenten is Hermans, Merbis, Bagci, Senkal\n + docent is docenten at random\n + if docent is Hermans print 'Jammer!'", + "answer" : "Jammer! of niks", + "lines" : 1 +} + +{ + "assignment": "output", + "icon" : "💻", + "code" : "toestand is ask Hoe gaat het met jou?\n + print 'Dus het gaat ' toestand ' met jou.'", + "answer" : " Dus het gaat **goed(bijv)** met jou", + "lines" : 1 +} + +{ + "assignment": "output", + "icon" : "💻", + "code" : "getallen is 1, 2, 3\n + print 'Welkom bij de bingoavond'\n + getal is getallen at random\n + if getal is 10 print 'Gewonnen!' else print 'Helaas'\n", + "answer" : "Welkom bij de bingoavond\n**'Helaas'** (want het kan nooit 10 worden)", + "lines" : 2 +} + +### Commando's en programmeerwoorden + +We hebben deze lessen veel nieuwe commando's en woorden geleerd. +In deze opdracht mag je er twee commando's uitleggen (is en if). Kies er daarna drie die je nog weet, en leg die uit. + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat doet het commando `is`?", + "lines" : 1, + "answer" : "Stelt een variabele of lijst in" +} + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat doet het commando `if`?", + "lines" : 1, + "answer" : "Maakt een keuze op basis van een conditie" +} + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat doet het commando `______`?", + "lines" : 1, + "answer" : "" +} + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat doet het commando `______`?", + "lines" : 1, + "answer" : "Maakt een keuze op basis van een conditie" +} + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat doet het commando `______`?", + "lines" : 1, + "answer" : "Maakt een keuze op basis van een conditie" +} + +Hetzelfde voor woorden. Eerst leg je twee woorden uit (variabele en lijst), dan kies je er zelf nog drie die je kan uitleggen. + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat betekent het woord variabele?", + "lines" : 1, + "answer" : "Een waarde die een naam krijgt" +} + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat betekent het woord lijst?", + "lines" : 1, + "answer" : "Een groepje waardes die samen een naam krijgt." +} + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat betekent het woord __________?", + "lines" : 1, + "answer" : "" +} + + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat betekent het woord __________?", + "lines" : 1, + "answer" : "" +} + + +{ + "assignment": "define", + "icon" : "📖", + "question" : "Wat betekent het woord __________?", + "lines" : 1, + "answer" : "" +} + +### De laatste vragen! + + + +{ + "assignment": "text", + "icon" : "✍️", + "question" : "Weet jij nog meer over programmeren met Hedy dan er in deze toets staat?\n + Noem iets dat jij weet, maar niet in deze toets stond. Als het klopt, krijg je bonus.", + "lines" : 2 +} + +{ + "assignment": "text", + "icon" : "✍️", + "question" : "Verzin een goede toetsvraag\n + Wat had jij een goede vraag gevonden voor deze toets? Zet er ook het antwoord bij! ", + "lines" : 6 +} + + diff --git a/content/workbooks/rewrite_all_workbooks.py b/content/workbooks/rewrite_all_workbooks.py index 21375da03ef..b320732bb23 100644 --- a/content/workbooks/rewrite_all_workbooks.py +++ b/content/workbooks/rewrite_all_workbooks.py @@ -3,8 +3,8 @@ current_directory = os.path.dirname(os.path.abspath(__file__)) -min_lesson = 4 -max_lesson = 5 +min_lesson = 6 +max_lesson = 7 for lesson in range(min_lesson, max_lesson): json_data = process_workbook(lesson, current_directory) diff --git a/content/workbooks/workbook_rewriter.py b/content/workbooks/workbook_rewriter.py index a6affc277ee..24fceb90ff8 100644 --- a/content/workbooks/workbook_rewriter.py +++ b/content/workbooks/workbook_rewriter.py @@ -45,6 +45,9 @@ def convert_json(json): + if 'teacher_note' in json.keys(): + return '' # do not do anyhting for now + assignment_type = json['assignment'] template = templates[assignment_type] @@ -79,7 +82,7 @@ def convert_json(json): if i < number_of_output_lines and not turtle: if i == 0 and turtle: output_line += '🐢' - output_line = output_line.ljust(90, '_') + output_line = output_line.ljust(80, '_') textfields += output_line + '\n' diff --git a/content/workbookstester.md b/content/workbookstester.md index 89eb0a4332e..00c9c0949b4 100644 --- a/content/workbookstester.md +++ b/content/workbookstester.md @@ -1,187 +1,209 @@ -# Hedy - Les 4a +# Hedy - Toets Les 1 tot 5 -[Teacher] In level 4 leren leerlingen aanhalingstekens gebruiken in code. Dat is niet altijd de meest leuke les maar goed oefenen is wel nodig om latere frustratie te voorkomen. -Om het leuker te maken kan je in deze les andere features aanbieden, zoals `clear` of een muziekopdracht.[/Teacher] -## Aanhalingstekens +## SO -Aan het einde van de les: +We maken vandaag een SO op papier. Lees dit goed voor je begint: -* snap jij waarom aanhalingstekens nodig zijn in programmeren. -* kan jij aanhalingstekens op de goede plek in code zetten. -* kan jij foutmeldingen over aanhalingstekens goed lezen. +* De toets telt voor 1/6e mee voor je cijfer +* We beginnen vandaag ook aan een huiswerk-opdracht. Die telt ook 1/6e mee. +* Lees goed wat je moet doen! Soms moet je twee dingen doen, vergeet dat dan niet! -### Aanhalingstekens +#### Codes herkennen -We hebben geleerd om aanhalingstekens te gebruiken, als iets letterlijk zo in beeld moet komen. -We gebruiken aanhalingstekens bij `print` en bij `ask`. +Voor deze vragen moet jij stukjes code zoeken bij de juiste programmeerwoorden. +Kijk goed **wat** je moet vinden, en omcirkel dat. +**◯ Opdracht**: Omcirkel alle **variabelen** in deze code. ```hedy -vriend is ask 'Hoe heet jij?' -print 'Leuk! Ik ga naar de stad met ' vriend +naam is Michael +print 'Hallo ' naam +leeftijd is 17 +print 'Jij bent ' leeftijd ' jaar oud' ``` -#### Opdracht 1: Maak de code af. - -Deze opdrachten doe je in twee stappen: -1. Zet op de juiste plekken aanhalingstekens in de code. -2. Staat alles goed? Voorspel dan wat de uitvoer van de code is. - -**💻 Vraag**: Wat is de uitvoer van deze code?
-Code: Uitvoer: +**◯ Opdracht**: Omcirkel alle **variabelen** in deze code. ```hedy -print Hallo allemaal!nprint Welkom bij Hedy ________________________________________ - ________________________________________ +print 'welkom bij dit avontuur' naamnaam is Harry +``` +**◯ Opdracht**: Omcirkel nu de stukken code waarin de waarde van een variabele **wordt gebruikt.** +```hedy +weer is zonnig +print 'het wordt vandaag ' weer ``` -**💻 Vraag**: Wat is de uitvoer van deze code?
-Code: Uitvoer: +**◯ Opdracht**: Omcirkel nu de stukken code waarin de waarde van een variabele **wordt gebruikt.** ```hedy -naam is Hermans ________________________________________ -lokaal is 305 -print Vandaag hebben we les van naam in lokaal! - +naam is Ben +print 'Hallo ik ben Ben' ``` -**💻 Vraag**: Wat is de uitvoer van deze code?
-Code: Uitvoer: +**◯ Opdracht**: Op welke plek in de code wordt **er tekst uit een lijst geprint**? ```hedy -docenten is Hermans, Merbis, Bagci, Senkal ________________________________________ -print De docent vandaag is docenten at random. - +winst is 10 euro, 5 euro, niks +print 'Jij wint ' winst at random ``` -**💻 Vraag**: Wat is de uitvoer van deze code?
-Code: Uitvoer: +**◯ Opdracht**: Op welke plek in de code wordt **er tekst uit een lijst geprint**? ```hedy -weer is zonnig, regen, wolken, onweer ________________________________________ -print Wat is het lekker weer vandaag! - +vrienden is Mo, Layla, Sem +print vrienden at random ' gaat ook mee,' ``` -**💻 Vraag**: Wat is de uitvoer van deze code?
-Code: Uitvoer: + +**◯ Opdracht**: Op welke plek in de code staat er een **conditie**? ```hedy -print Wat is het lekker weer vandaag! ________________________________________ -naam is Bassie +leeftijd is ask 'Hoe oud ben jij?' +if leeftijd is 18 print 'Jij mag nu een biertje' else print 'Jij bent te jong!' +``` +**◯ Opdracht**: Op welke plek in de code staat er een **conditie**? +```hedy +naam is Bert +if naam is Ernie print 'Jij bent oranje' else print 'Jij bent geel!' ``` -#### Opdracht 2: Foutje? -Lees de codes goed! Welke zijn er goed of fout. +### Goed of fout? **🤔 Vraag**: Is deze code goed of fout? ```hedy -print 'Daar lopen twee lama's' +concierge is Michael +print Vandaag is concierge at random bij de receptie ``` Antwoord:
〇 Goed
〇 Fout **🤔 Vraag**: Is deze code goed of fout? ```hedy -print 'De lama wandelt op straat +klassen is 1, 2, 5, 8, 12, 24 +print De prijs valt op nummer .... klassen at random ``` Antwoord:
〇 Goed
〇 Fout + + **🤔 Vraag**: Is deze code goed of fout? ```hedy -print 'De lama wandelt op straat' -print "Wat een avontuur" +naam is Gea +print 'Goedemorgen ' voornaam! ``` Antwoord:
〇 Goed
〇 Fout -#### Ask - -Vergeet niet dat je ook bij `ask` aanhalingstekens gebruikt! - -#### Opdracht 3: Foutje? -Lees de codes goed! Welke zijn er goed of fout. - **🤔 Vraag**: Is deze code goed of fout? ```hedy -ask 'Daar lopen twee konijnen' +print 'Daar staat een auto, fout geparkeerd! ``` Antwoord:
〇 Goed
〇 Fout **🤔 Vraag**: Is deze code goed of fout? ```hedy -naam is ask 'Hoe heet jij?' +print "De auto's staan op straat" +print 'Dat mag niet!!' ``` Antwoord:
〇 Goed
〇 Fout +### Voorspel de uitvoer +Bij deze opdracht moet je voorspellen wat de computer gaat doen. +Denk eraan dat computers heel precies zijn, iedere spatie of punt of komma telt! -#### Opdracht 4: Schrijf de code +* Zit er een `ask` in de code? Kies dan zelf een antwoord. +* Zit er een `random` in de code? Kies dan een mogelijke keus van de computer. -Kijk goed naar de uitvoer, en schrijf er een passende code bij. +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +weer is zonnig, regen, wolken, onweer ______________________________ +print 'Vandaag wordt het... ' weer at random! -**🧑‍💻 Vraag**: Welke code hoort bij deze uitvoer?
+``` + +**💻 Vraag**: Wat is de uitvoer van deze code?
Code: Uitvoer: ```hedy -________________________________________ Welkom bij de bingoavond -________________________________________ Hier komt het eerste getal...! +docenten is Hermans, Merbis, Bagci, Senkal ______________________________ +docent is docenten at random +if docent is Hermans print 'Jammer!' ``` +**💻 Vraag**: Wat is de uitvoer van deze code?
+Code: Uitvoer: +```hedy +toestand is ask Hoe gaat het met jou? ______________________________ +print 'Dus het gaat ' toestand ' met jou.' + +``` -**🧑‍💻 Vraag**: Welke code hoort bij deze uitvoer?
+**💻 Vraag**: Wat is de uitvoer van deze code?
Code: Uitvoer: ```hedy -________________________________________ We gaan vanavond naar de film. -________________________________________ Waar heb jij zin in? +getallen is 1, 2, 3 ______________________________ +print 'Welkom bij de bingoavond' ______________________________ +getal is getallen at random +if getal is 10 print 'Gewonnen!' else print 'Helaas' + ``` +### Commando's en programmeerwoorden -#### Opdracht 5: Programmeerwoorden +We hebben deze lessen veel nieuwe commando's en woorden geleerd. +In deze opdracht mag je er twee commando's uitleggen (is en if). Kies er daarna drie die je nog weet, en leg die uit. -We hebben deze les weer nieuwe programmeerwoorden geleerd! Leg ze uit je eigen woorden. +**📖 Vraag**: Wat doet het commando `is`? +Antwoord: ____________________________________________________________________________________________________
-**📖 Vraag**: Wat zijn aanhalingstekens? +**📖 Vraag**: Wat doet het commando `if`? Antwoord: ____________________________________________________________________________________________________
-**📖 Vraag**: Waarvoor gebruiken we in Hedy aanhalingstekens? +**📖 Vraag**: Wat doet het commando `______`? Antwoord: ____________________________________________________________________________________________________
+**📖 Vraag**: Wat doet het commando `______`? +Antwoord: ____________________________________________________________________________________________________
+**📖 Vraag**: Wat doet het commando `______`? +Antwoord: ____________________________________________________________________________________________________
-#### Opdracht 7: Codes +Hetzelfde voor woorden. Eerst leg je twee woorden uit (variabele en lijst), dan kies je er zelf nog drie die je kan uitleggen. -We hebben ook nieuwe codes geleerd in level 4. +**📖 Vraag**: Wat betekent het woord variabele? +Antwoord: ____________________________________________________________________________________________________
-**📖 Vraag**: Wat doet het commando `clear`? (Let op: `is` kan dus meerdere dingen doen!) +**📖 Vraag**: Wat betekent het woord lijst? Antwoord: ____________________________________________________________________________________________________
-**📖 Vraag**: Wat doet het commando `color`? +**📖 Vraag**: Wat betekent het woord __________? Antwoord: ____________________________________________________________________________________________________
-### Wat vond jij? -**✍️ Vraag**: Wat was de leukste opdracht van dit level?
+**📖 Vraag**: Wat betekent het woord __________? +Antwoord: ____________________________________________________________________________________________________
-____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
-
-**✍️ Vraag**: Waarom vond je juist die opdracht leuk?
+**📖 Vraag**: Wat betekent het woord __________? +Antwoord: ____________________________________________________________________________________________________
+ +### De laatste vragen! -____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
-____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
-____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
-____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
-____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
-
-**✍️ Vraag**: Welke opdracht was het minst leuk?
+**✍️ Vraag**: Weet jij nog meer over programmeren met Hedy dan er in deze toets staat? +Noem iets dat jij weet, maar niet in deze toets stond. Als het klopt, krijg je bonus.
+ +____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

-**✍️ Vraag**: Waarom vond je juist die opdracht niet leuk?
+**✍️ Vraag**: Verzin een goede toetsvraag +Wat had jij een goede vraag gevonden voor deze toets? Zet er ook het antwoord bij!
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
+____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

diff --git a/data-for-testing.json b/data-for-testing.json index f8fe912fba4..08d1e23c870 100644 --- a/data-for-testing.json +++ b/data-for-testing.json @@ -102,7 +102,7 @@ "is_teacher": true, "third_party": null, "verification_pending": "$2b$09$TrfAq86Hl0akKmFPO.gCQu.JHJYFIp3Tf7iCy9SU4mB61ESG393NO", - "last_login": 1667491121184, + "last_login": 1727539539146, "country": "VE", "birth_year": 1999, "gender": "f", @@ -212,14 +212,15 @@ "keyword_language": "en", "created": 1667489872364, "teacher": "teacher1", - "last_login": 1667489976659, + "last_login": 1727543192005, "epoch": 1, "classes": { "$type": "set", "elements": [ "5c39c2a936f24db1a4935c52fab77cd7" ] - } + }, + "program_count": 9 }, { "username": "student3", @@ -228,14 +229,15 @@ "keyword_language": "en", "created": 1667489872408, "teacher": "teacher1", - "last_login": 1667490885882, + "last_login": 1727726024225, "epoch": 1, "classes": { "$type": "set", "elements": [ "5c39c2a936f24db1a4935c52fab77cd7" ] - } + }, + "program_count": 6 }, { "username": "student4", @@ -261,7 +263,7 @@ "keyword_language": "en", "created": 1667489872497, "teacher": "teacher1", - "last_login": 1667492170463, + "last_login": 1727711630834, "epoch": 1, "classes": { "$type": "set", @@ -269,7 +271,7 @@ "5c39c2a936f24db1a4935c52fab77cd7" ] }, - "program_count": 1 + "program_count": 20 }, { "username": "student2", @@ -293,6 +295,21 @@ "id": "$2b$09$R0tt4aYqsOUqVb.y66WSyu", "username": "student5", "ttl": 1668701770 + }, + { + "id": "$2b$09$ot86mCX5S29QS0f/EeFjYO", + "username": "teacher1", + "ttl": 1728749139 + }, + { + "id": "$2b$09$FSvukQjf4Dt0d6MTuq9UI.", + "username": "student1", + "ttl": 1728752792 + }, + { + "id": "$2b$09$EW1c0OGdZTGk.TmEBAHKlO", + "username": "student3", + "ttl": 1728935624 } ], "program-stats": [ @@ -415,308 +432,1247 @@ "level": 1, "number_of_lines": 0, "successful_runs": 1 - } - ], - "achievements": [ - { - "username": "admin", - "run_programs": 4, - "commands": [ - "print" - ], - "achieved": [ - "getting_started_I", - "one_to_remember_I", - "adventure_is_worthwhile", - "double_check" - ], - "saved_programs": 4 }, { - "username": "user1", - "achieved": [ - "go_live" + "id#level": "@all-anonymous#13", + "week": "2024-39", + "id": "@all-anonymous", + "level": 13, + "number_of_lines": 24, + "UnquotedTextException": 1, + "chart_history": [ + 0 ] }, { - "username": "user2", - "achieved": [ - "well_begun_is_half_done", - "getting_started_I", - "one_to_remember_I", - "adventure_is_worthwhile", - "double_check" - ], - "run_programs": 1, - "commands": [ - "print", - "for", - "is" - ], - "saved_programs": 2 - }, - { - "username": "user3", - "run_programs": 2, - "commands": [ - "print", - "for", - "ask", - "if", - "is", - "else" - ], - "achieved": [ - "getting_started_I", - "one_to_remember_I", - "adventure_is_worthwhile", - "double_check", - "go_live", - "did_you_say_please", - "hedy_honor", - "indiana_jones", - "next_question", - "quiz_master" - ], - "saved_programs": 3 - }, - { - "username": "teacher1", - "achieved": [ - "ready_set_education", - "my_class_my_rules" + "id#level": "student1#1", + "week": "2024-39", + "id": "student1", + "level": 1, + "number_of_lines": 20, + "successful_runs": 44, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 ] }, { - "username": "student1", - "run_programs": 3, - "commands": [ - "print", - "echo", - "ask" - ], - "achieved": [ - "getting_started_I", - "did_you_say_please" + "id#level": "@all-students#1", + "week": "2024-39", + "id": "@all-students", + "level": 1, + "number_of_lines": 20, + "successful_runs": 44, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 ] }, { - "username": "student2", - "achieved": [ - "well_begun_is_half_done", - "getting_started_I" - ], - "run_programs": 1, - "commands": [ - "print" + "id#level": "student5#1", + "week": "2024-40", + "id": "student5", + "level": 1, + "number_of_lines": 24, + "successful_runs": 35, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 ] }, { - "username": "student5", - "run_programs": 5, - "commands": [ - "print", - "ask", - "echo", - "turn", - "forward" - ], - "achieved": [ - "getting_started_I", - "did_you_say_please", - "hedy_honor", - "one_to_remember_I", - "adventure_is_worthwhile", - "double_check", - "ninja_turtle", - "next_question", - "next_question", - "quiz_master", - "quiz_master" - ], - "saved_programs": 2 - }, - { - "username": "student3", - "achieved": [ - "well_begun_is_half_done" - ] + "id#level": "@all-students#1", + "week": "2024-40", + "id": "@all-students", + "level": 1, + "number_of_lines": 24, + "successful_runs": 50, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + }, + { + "id#level": "student5#2", + "week": "2024-40", + "id": "student5", + "level": 2, + "number_of_lines": 24, + "successful_runs": 10, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + }, + { + "id#level": "@all-students#2", + "week": "2024-40", + "id": "@all-students", + "level": 2, + "number_of_lines": 24, + "successful_runs": 10, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + }, + { + "id#level": "student5#3", + "week": "2024-40", + "id": "student5", + "level": 3, + "number_of_lines": 24, + "successful_runs": 9, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + }, + { + "id#level": "@all-students#3", + "week": "2024-40", + "id": "@all-students", + "level": 3, + "number_of_lines": 24, + "successful_runs": 9, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + }, + { + "id#level": "student5#7", + "week": "2024-40", + "id": "student5", + "level": 7, + "number_of_lines": 24, + "UnquotedTextException": 4, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0 + ] + }, + { + "id#level": "@all-students#7", + "week": "2024-40", + "id": "@all-students", + "level": 7, + "number_of_lines": 24, + "UnquotedTextException": 4, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0 + ] + }, + { + "id#level": "student3#1", + "week": "2024-40", + "id": "student3", + "level": 1, + "number_of_lines": 24, + "successful_runs": 15, + "chart_history": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } + ], + "achievements": [ + { + "username": "admin", + "run_programs": 4, + "commands": [ + "print" + ], + "achieved": [ + "getting_started_I", + "one_to_remember_I", + "adventure_is_worthwhile", + "double_check" + ], + "saved_programs": 4 + }, + { + "username": "user1", + "achieved": [ + "go_live" + ] + }, + { + "username": "user2", + "achieved": [ + "well_begun_is_half_done", + "getting_started_I", + "one_to_remember_I", + "adventure_is_worthwhile", + "double_check" + ], + "run_programs": 1, + "commands": [ + "print", + "for", + "is" + ], + "saved_programs": 2 + }, + { + "username": "user3", + "run_programs": 2, + "commands": [ + "print", + "for", + "ask", + "if", + "is", + "else" + ], + "achieved": [ + "getting_started_I", + "one_to_remember_I", + "adventure_is_worthwhile", + "double_check", + "go_live", + "did_you_say_please", + "hedy_honor", + "indiana_jones", + "next_question", + "quiz_master" + ], + "saved_programs": 3 + }, + { + "username": "teacher1", + "achieved": [ + "ready_set_education", + "my_class_my_rules" + ] + }, + { + "username": "student1", + "run_programs": 3, + "commands": [ + "print", + "echo", + "ask" + ], + "achieved": [ + "getting_started_I", + "did_you_say_please" + ] + }, + { + "username": "student2", + "achieved": [ + "well_begun_is_half_done", + "getting_started_I" + ], + "run_programs": 1, + "commands": [ + "print" + ] + }, + { + "username": "student5", + "run_programs": 5, + "commands": [ + "print", + "ask", + "echo", + "turn", + "forward" + ], + "achieved": [ + "getting_started_I", + "did_you_say_please", + "hedy_honor", + "one_to_remember_I", + "adventure_is_worthwhile", + "double_check", + "ninja_turtle", + "next_question", + "next_question", + "quiz_master", + "quiz_master" + ], + "saved_programs": 2 + }, + { + "username": "student3", + "achieved": [ + "well_begun_is_half_done" + ] } ], "programs": [ { - "id": "0e538f041638423297420216385fbd02", + "id": "0e538f041638423297420216385fbd02", + "session": "d88c181e6a0c4f43919130d42f279f2f", + "date": 1667488047709, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print This is a saved program\nprint this is a test!!!", + "name": "Level 1", + "username": "admin", + "public": 1, + "error": false, + "adventure_name": "default" + }, + { + "id": "30bd4e4ce84f40bca40b24b9295e1483", + "session": "d88c181e6a0c4f43919130d42f279f2f", + "date": 1667488252222, + "lang": "en", + "version": "DEV", + "level": 10, + "code": "friends is robert, peter, carlos, juan, eli\nfor friend in friends\n print 'Whats up ' friend", + "name": "Level 10", + "username": "user2", + "public": 1, + "error": false, + "adventure_name": "default" + }, + { + "id": "a24e2453366248fb9359fffa3089d209", + "session": "d88c181e6a0c4f43919130d42f279f2f", + "date": 1667488320813, + "lang": "en", + "version": "DEV", + "level": 18, + "code": "print('Hello!')\nfor i in range(1, 10):\n print('This is line ', i)", + "name": "Level 18", + "username": "user3", + "public": 1, + "error": false, + "adventure_name": "default" + }, + { + "id": "01c1af908479409390cd0c4dc3444eec", + "session": "d88c181e6a0c4f43919130d42f279f2f", + "date": 1667488660769, + "lang": "en", + "version": "DEV", + "level": 6, + "code": "print 'Welcome to Hedys restaurant'\nprint 'Here is our menu:'\nprint 'Our starters are salad, soup, or carpaccio'\nprint 'Our main courses are pizza, lasagne, or spaghetti'\nprint 'Our desserts are brownie, icecream, or milkshake'\nstarter = ask 'Which starter would you like to have?'\nmain = ask 'Which main course would you like?'\ndessert = ask 'Which dessert do you pick?'\nprice = 0\nif starter is soup price = price + 6 else price = price + 7\nif main is pizza price = price + 10\nif main is lasagne price = price + 12\nif main is spaghetti price = price + 8\nif dessert is brownie price = price + 7\nif dessert is icecream price = price + 5\nif dessert is milkshake price = price + 4\nprint 'You have ordered ' starter ' , ' main ' and ' dessert\nprint 'That will be ' price ' dollars, please'\nprint 'Thank you, enjoy your meal!'", + "name": "Restaurant - Level 6", + "username": "user3", + "public": 1, + "error": false, + "adventure_name": "restaurant", + "hedy_choice": 1 + }, + { + "id": "18c9161454324622a9c5dfa06f2981ac", + "session": "d88c181e6a0c4f43919130d42f279f2f", + "date": 1667490487613, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Welcome to Hedy's restaurant \ud83c\udf5f\nask What would you like to order?\necho So you would like to order\nprint Thanks you for your order!\nprint It's on its way!", + "name": "Restaurant - Level 1", + "username": "student5", + "public": 1, + "error": false, + "adventure_name": "restaurant" + }, + { + "id": "0e538f041638423297420216385fbd02", + "session": "d88c181e6a0c4f43919130d42f279f2f", + "date": 1667488047709, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print This is a saved program\nprint it has been modified!!!", + "name": "Level 1", + "username": "teacher1", + "public": 1, + "error": false, + "adventure_name": "default", + "is_modified": true + }, + { + "id": "18c9161454324622a9c5dfa06f2981ac", + "session": "d88c181e6a0c4f43919130d42f279f2f", + "date": 1667490487613, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Welcome to Hedy's restaurant \ud83c\udf5f\nask What would you like to order?\necho So you would like to order\nprint Thanks you for your order!\nprint It's on its way!", + "name": "Restaurant - Level 1", + "username": "teacher1", + "public": 1, + "error": false, + "adventure_name": "restaurant" + }, + { + "id": "94aae222be5a49388e9899f3d9b3d4ab", "session": "d88c181e6a0c4f43919130d42f279f2f", "date": 1667488047709, "lang": "en", "version": "DEV", - "level": 1, - "code": "print This is a saved program\nprint this is a test!!!", - "name": "Level 1", - "username": "admin", - "public": 1, - "error": false, - "adventure_name": "default" + "level": 1, + "code": "print Hi there, programmer!\nprint Welcome to Hedy!", + "name": "Level 1", + "username": "teacher1", + "public": 0, + "error": false, + "adventure_name": "print", + "is_modified": false + }, + { + "session": "fac24066d19f4fd8ac44508ac4a7fdae", + "date": 1716482478177, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hi there, programmer!\nprint Welcome to Hedy!\nprint Hi there, programmer!\nprint Welcome to Hedy!\nprint Hi there, programmer!\nprint Welcome to Hedy!\nprint Hi there, programmer!\nprint Welcome to Hedy!\nprint Hi there, programmer!\nprint Welcome to Hedy!\n", + "name": "print 1", + "username": "teacher1", + "error": false, + "adventure_name": "print_command", + "id": "4c426ff4cd5a40d7bb65bfbb35907f8b", + "username_level": "teacher1-1", + "is_modified": true + }, + { + "session": "fac24066d19f4fd8ac44508ac4a7fdae", + "date": 1716484205262, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "ask hello world", + "name": "Introducci\u00f3n 2", + "username": "teacher1", + "error": null, + "adventure_name": "default", + "id": "195d94e733ff49b08079848409e664b6", + "username_level": "teacher1-2", + "is_modified": true + }, + { + "session": "fac24066d19f4fd8ac44508ac4a7fdae", + "date": 1716486094966, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "var1 is 1\nvar2 is 2\nvar3 is 3\nprint var1 var2 var3\n", + "name": "Story 2", + "username": "teacher1", + "error": false, + "adventure_name": "story", + "id": "3e8926c0515d47a5aeb116164b1278c9", + "username_level": "teacher1-2", + "is_modified": true + }, + { + "session": "fac24066d19f4fd8ac44508ac4a7fdae", + "date": 1716493926819, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello!\nask What is your name?\nprint Hello!\nask What is your name?\nprint Hello!\nask What is your name?\nprint Hello!\nask What is your name?\n", + "name": "ask_command 1", + "username": "teacher1", + "error": false, + "adventure_name": "ask_command", + "id": "e1d94726655947c5b0309abb18cc17ca", + "username_level": "teacher1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543218089, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Introduction 1", + "username": "student1", + "error": false, + "adventure_name": "default", + "id": "1e29e08e54644e2f81d4e96fa3f0572f", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543225548, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "adventure1", + "username": "student1", + "error": false, + "adventure_name": "3f8aea42eb324f08a16776671498dd1b", + "id": "f3412588eeb245609f6c4067800a28bb", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543231865, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Parrot 1", + "username": "student1", + "error": false, + "adventure_name": "parrot", + "id": "b0b5822d859e4025ac45212ef8b8fb6e", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543234556, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Fortune Teller 1", + "username": "student1", + "error": false, + "adventure_name": "fortune", + "id": "3f9720d9495249df8c83efeb9ed1a89e", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543238360, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Haunted House 1", + "username": "student1", + "error": false, + "adventure_name": "haunted", + "id": "0fec58f3e1b34588aee7a3bf478dac23", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543242117, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Restaurant 1", + "username": "student1", + "error": false, + "adventure_name": "restaurant", + "id": "60a3eb541cf64f95a42d576a05db5ec0", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543245458, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Story 1", + "username": "student1", + "error": false, + "adventure_name": "story", + "id": "1276a87cb5fa4c9e83b627592420d364", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543250029, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Turtle 1", + "username": "student1", + "error": false, + "adventure_name": "turtle", + "id": "e00e95248f0d4edb823c2b5dbce31254", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "a7bed8139a064612a64a5e1df83fc249", + "date": 1727543253652, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Rock_2 1", + "username": "student1", + "error": false, + "adventure_name": "rock", + "id": "0dc61ace147b46ecbd2c71f1c3fc6c88", + "username_level": "student1-1", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727711706894, + "lang": "en", + "version": "DEV", + "level": 1, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Rock_2 1", + "username": "student5", + "error": false, + "adventure_name": "rock", + "id": "8f24af7e4185492087ba697ca3f56190", + "username_level": "student5-1", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712395430, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Rock_2 2", + "username": "student5", + "error": false, + "adventure_name": "rock", + "id": "641ce96348504ba4b891ce981ba2775f", + "username_level": "student5-2", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712396919, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Rock_2 2", + "username": "student5", + "error": false, + "adventure_name": "rock", + "id": "4defa229da8d4af984fe6b9351f29567", + "username_level": "student5-2", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712397286, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Rock_2 2", + "username": "student5", + "error": false, + "adventure_name": "rock", + "id": "735fab044f024bc5880c488a01e933cd", + "username_level": "student5-2", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712397392, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Rock_2 2", + "username": "student5", + "error": false, + "adventure_name": "rock", + "id": "282a23d192ca47e69ebe383bf32a0de5", + "username_level": "student5-2", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712398450, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Introduction 2", + "username": "student5", + "error": false, + "adventure_name": "default", + "id": "4d86425cc5324caeba917caa139fa52a", + "username_level": "student5-2", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712398243, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Introduction 2", + "username": "student5", + "error": false, + "adventure_name": "default", + "id": "620ddd04547b424b98ef7e7452d817e3", + "username_level": "student5-2", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712401750, + "lang": "en", + "version": "DEV", + "level": 2, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Haunted House 2", + "username": "student5", + "error": false, + "adventure_name": "haunted", + "id": "33534135dd434726980a46a7ad2b087f", + "username_level": "student5-2", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712410596, + "lang": "en", + "version": "DEV", + "level": 3, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Haunted House 3", + "username": "student5", + "error": false, + "adventure_name": "haunted", + "id": "f78b86d9f79c49cfa9d3626b78dd82fa", + "username_level": "student5-3", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712410096, + "lang": "en", + "version": "DEV", + "level": 3, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Haunted House 3", + "username": "student5", + "error": false, + "adventure_name": "haunted", + "id": "4fe5cca9da354add9b33b11ae1845a51", + "username_level": "student5-3", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712414310, + "lang": "en", + "version": "DEV", + "level": 3, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Introduction 3", + "username": "student5", + "error": false, + "adventure_name": "default", + "id": "507c1c830a0f4e1fb35862ffc4948e76", + "username_level": "student5-3", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712416525, + "lang": "en", + "version": "DEV", + "level": 3, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Turtle 3", + "username": "student5", + "error": false, + "adventure_name": "turtle", + "id": "c08be9c5367046c79c97b2954ca14956", + "username_level": "student5-3", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712424976, + "lang": "en", + "version": "DEV", + "level": 7, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Introduction 7", + "username": "student5", + "error": true, + "adventure_name": "default", + "id": "2078caff4a714951b89df1542555dea9", + "username_level": "student5-7", + "is_modified": true + }, + { + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712425644, + "lang": "en", + "version": "DEV", + "level": 7, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Introduction 7", + "username": "student5", + "error": true, + "adventure_name": "default", + "id": "c3152d0250cf4df3bc5e8e18261174eb", + "username_level": "student5-7", + "is_modified": true }, { - "id": "30bd4e4ce84f40bca40b24b9295e1483", - "session": "d88c181e6a0c4f43919130d42f279f2f", - "date": 1667488252222, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712426030, "lang": "en", "version": "DEV", - "level": 10, - "code": "friends is robert, peter, carlos, juan, eli\nfor friend in friends\n print 'Whats up ' friend", - "name": "Level 10", - "username": "user2", - "public": 1, - "error": false, - "adventure_name": "default" + "level": 7, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Introduction 7", + "username": "student5", + "error": true, + "adventure_name": "default", + "id": "53c131e5be9f4eea9aa01d1dbde5c95c", + "username_level": "student5-7", + "is_modified": true }, { - "id": "a24e2453366248fb9359fffa3089d209", - "session": "d88c181e6a0c4f43919130d42f279f2f", - "date": 1667488320813, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727712426124, "lang": "en", "version": "DEV", - "level": 18, - "code": "print('Hello!')\nfor i in range(1, 10):\n print('This is line ', i)", - "name": "Level 18", - "username": "user3", - "public": 1, - "error": false, - "adventure_name": "default" + "level": 7, + "code": "print what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\nprint what do you choose?\n", + "name": "Introduction 7", + "username": "student5", + "error": true, + "adventure_name": "default", + "id": "8c8269ecce6f4983832b24d39f124dec", + "username_level": "student5-7", + "is_modified": true }, { - "id": "01c1af908479409390cd0c4dc3444eec", - "session": "d88c181e6a0c4f43919130d42f279f2f", - "date": 1667488660769, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727725996205, "lang": "en", "version": "DEV", - "level": 6, - "code": "print 'Welcome to Hedys restaurant'\nprint 'Here is our menu:'\nprint 'Our starters are salad, soup, or carpaccio'\nprint 'Our main courses are pizza, lasagne, or spaghetti'\nprint 'Our desserts are brownie, icecream, or milkshake'\nstarter = ask 'Which starter would you like to have?'\nmain = ask 'Which main course would you like?'\ndessert = ask 'Which dessert do you pick?'\nprice = 0\nif starter is soup price = price + 6 else price = price + 7\nif main is pizza price = price + 10\nif main is lasagne price = price + 12\nif main is spaghetti price = price + 8\nif dessert is brownie price = price + 7\nif dessert is icecream price = price + 5\nif dessert is milkshake price = price + 4\nprint 'You have ordered ' starter ' , ' main ' and ' dessert\nprint 'That will be ' price ' dollars, please'\nprint 'Thank you, enjoy your meal!'", - "name": "Restaurant - Level 6", - "username": "user3", - "public": 1, + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Introduction 1", + "username": "student5", "error": false, - "adventure_name": "restaurant", - "hedy_choice": 1 + "adventure_name": "default", + "id": "67b0098c0fc6495d96d7b5a6ba693f87", + "username_level": "student5-1", + "is_modified": true }, { - "id": "18c9161454324622a9c5dfa06f2981ac", - "session": "d88c181e6a0c4f43919130d42f279f2f", - "date": 1667490487613, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727726006578, "lang": "en", "version": "DEV", "level": 1, - "code": "print Welcome to Hedy's restaurant \ud83c\udf5f\nask What would you like to order?\necho So you would like to order\nprint Thanks you for your order!\nprint It's on its way!", - "name": "Restaurant - Level 1", + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Fortune Teller 1", "username": "student5", - "public": 1, "error": false, - "adventure_name": "restaurant" + "adventure_name": "fortune", + "id": "9676bb4a856e4025b5d6a7c60123f616", + "username_level": "student5-1", + "is_modified": true }, { - "id": "0e538f041638423297420216385fbd02", - "session": "d88c181e6a0c4f43919130d42f279f2f", - "date": 1667488047709, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727726010272, "lang": "en", "version": "DEV", "level": 1, - "code": "print This is a saved program\nprint it has been modified!!!", - "name": "Level 1", - "username": "teacher1", - "public": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Haunted House 1", + "username": "student5", "error": false, - "adventure_name": "default", + "adventure_name": "haunted", + "id": "c5dba732996344a095f0f5615376bd31", + "username_level": "student5-1", "is_modified": true }, { - "id": "18c9161454324622a9c5dfa06f2981ac", - "session": "d88c181e6a0c4f43919130d42f279f2f", - "date": 1667490487613, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727726027871, "lang": "en", "version": "DEV", "level": 1, - "code": "print Welcome to Hedy's restaurant \ud83c\udf5f\nask What would you like to order?\necho So you would like to order\nprint Thanks you for your order!\nprint It's on its way!", - "name": "Restaurant - Level 1", - "username": "teacher1", - "public": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Introduction 1", + "username": "student3", "error": false, - "adventure_name": "restaurant" + "adventure_name": "default", + "id": "02930e0a15894bc68331775f08e12a32", + "username_level": "student3-1", + "is_modified": true }, { - "id": "94aae222be5a49388e9899f3d9b3d4ab", - "session": "d88c181e6a0c4f43919130d42f279f2f", - "date": 1667488047709, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727726030492, "lang": "en", "version": "DEV", "level": 1, - "code": "print Hi there, programmer!\nprint Welcome to Hedy!", - "name": "Level 1", - "username": "teacher1", - "public": 0, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Parrot 1", + "username": "student3", "error": false, - "adventure_name": "print", - "is_modified": false + "adventure_name": "parrot", + "id": "7a229194799f47ba940de9e9071fcec7", + "username_level": "student3-1", + "is_modified": true }, { - "session": "fac24066d19f4fd8ac44508ac4a7fdae", - "date": 1716482478177, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727726032876, "lang": "en", "version": "DEV", "level": 1, - "code": "print Hi there, programmer!\nprint Welcome to Hedy!\nprint Hi there, programmer!\nprint Welcome to Hedy!\nprint Hi there, programmer!\nprint Welcome to Hedy!\nprint Hi there, programmer!\nprint Welcome to Hedy!\nprint Hi there, programmer!\nprint Welcome to Hedy!\n", - "name": "print 1", - "username": "teacher1", + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Fortune Teller 1", + "username": "student3", "error": false, - "adventure_name": "print_command", - "id": "4c426ff4cd5a40d7bb65bfbb35907f8b", - "username_level": "teacher1-1", + "adventure_name": "fortune", + "id": "a999d6d38c7c411095a2571e784d40aa", + "username_level": "student3-1", "is_modified": true }, { - "session": "fac24066d19f4fd8ac44508ac4a7fdae", - "date": 1716484205262, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727726035636, "lang": "en", "version": "DEV", - "level": 2, - "code": "ask hello world", - "name": "Introducci\u00f3n 2", - "username": "teacher1", - "error": null, - "adventure_name": "default", - "id": "195d94e733ff49b08079848409e664b6", - "username_level": "teacher1-2", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Story 1", + "username": "student3", + "error": false, + "adventure_name": "story", + "id": "9ea5a534bc6047fdb17c20e4c98259ae", + "username_level": "student3-1", "is_modified": true }, { - "session": "fac24066d19f4fd8ac44508ac4a7fdae", - "date": 1716486094966, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727726037481, "lang": "en", "version": "DEV", - "level": 2, - "code": "var1 is 1\nvar2 is 2\nvar3 is 3\nprint var1 var2 var3\n", - "name": "Story 2", - "username": "teacher1", + "level": 1, + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Turtle 1", + "username": "student3", "error": false, - "adventure_name": "story", - "id": "3e8926c0515d47a5aeb116164b1278c9", - "username_level": "teacher1-2", + "adventure_name": "turtle", + "id": "c70631ec3b2d410596f813c9d6b57709", + "username_level": "student3-1", "is_modified": true }, { - "session": "fac24066d19f4fd8ac44508ac4a7fdae", - "date": 1716493926819, + "session": "8198996e0606458999482d1a1a7cbe9c", + "date": 1727726040001, "lang": "en", "version": "DEV", "level": 1, - "code": "print Hello!\nask What is your name?\nprint Hello!\nask What is your name?\nprint Hello!\nask What is your name?\nprint Hello!\nask What is your name?\n", - "name": "ask_command 1", - "username": "teacher1", + "code": "print Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\nprint Hello world!\n", + "name": "Rock_2 1", + "username": "student3", "error": false, - "adventure_name": "ask_command", - "id": "e1d94726655947c5b0309abb18cc17ca", - "username_level": "teacher1-1", + "adventure_name": "rock", + "id": "48ec04d60a4c4990a60b9e5e81121e71", + "username_level": "student3-1", "is_modified": true } ], @@ -923,11 +1879,11 @@ "students": { "$type": "set", "elements": [ - "student5", - "student3", "student2", + "student4", "student1", - "student4" + "student3", + "student5" ] }, "second_teachers": [ @@ -935,7 +1891,8 @@ "username": "teacher4", "role": "teacher" } - ] + ], + "last_viewed_level": 1 } ], "class_customizations": [ @@ -1005,7 +1962,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1039,7 +2000,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1085,7 +2050,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1127,7 +2096,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1177,7 +2150,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1215,7 +2192,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1253,7 +2234,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1283,7 +2268,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1313,7 +2302,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1355,7 +2348,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1377,7 +2374,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1415,7 +2416,11 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", + "from_teacher": false + }, + { + "name": "parsons", "from_teacher": false } ], @@ -1445,7 +2450,7 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", "from_teacher": false } ], @@ -1475,7 +2480,7 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", "from_teacher": false } ], @@ -1509,7 +2514,7 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", "from_teacher": false } ], @@ -1531,7 +2536,7 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", "from_teacher": false } ], @@ -1549,7 +2554,7 @@ "from_teacher": false }, { - "name": "next", + "name": "quiz", "from_teacher": false } ], @@ -1557,13 +2562,31 @@ { "name": "default", "from_teacher": false - }, - { - "name": "next", - "from_teacher": false } ] - } + }, + "available_levels": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18 + ], + "quiz_parsons_tabs_migrated": 1, + "updated_by": "teacher1" } ], "adventures": [ @@ -1573,7 +2596,10 @@ "creator": "teacher1", "name": "adventure1", "level": "1", - "levels": ["1", "2"], + "levels": [ + "1", + "2" + ], "content": "This is the explanation of my adventure!\n\nThis way I can show a command: print\n\nBut sometimes I might want to show a piece of code, like this:\n
ask What's your name?\necho so your name is \n
", "public": 1, "tags": [ @@ -1621,5 +2647,147 @@ ], "popularity": 1 } + ], + "surveys": [ + { + "id": "class_5c39c2a936f24db1a4935c52fab77cd7" + } + ], + "student_adventures": [ + { + "id": "student5-restaurant-1", + "ticked": true, + "program_id": "18c9161454324622a9c5dfa06f2981ac" + }, + { + "id": "student1-rock-1", + "ticked": true, + "program_id": "0dc61ace147b46ecbd2c71f1c3fc6c88" + }, + { + "id": "student1-turtle-1", + "ticked": false, + "program_id": "e00e95248f0d4edb823c2b5dbce31254" + }, + { + "id": "student1-story-1", + "ticked": false, + "program_id": "1276a87cb5fa4c9e83b627592420d364" + }, + { + "id": "student1-restaurant-1", + "ticked": true, + "program_id": "60a3eb541cf64f95a42d576a05db5ec0" + }, + { + "id": "student1-haunted-1", + "ticked": true, + "program_id": "0fec58f3e1b34588aee7a3bf478dac23" + }, + { + "id": "student1-fortune-1", + "ticked": true, + "program_id": "3f9720d9495249df8c83efeb9ed1a89e" + }, + { + "id": "student1-parrot-1", + "ticked": true, + "program_id": "b0b5822d859e4025ac45212ef8b8fb6e" + }, + { + "id": "student1-3f8aea42eb324f08a16776671498dd1b-1", + "ticked": true, + "program_id": "f3412588eeb245609f6c4067800a28bb" + }, + { + "id": "student1-default-1", + "ticked": true, + "program_id": "1e29e08e54644e2f81d4e96fa3f0572f" + }, + { + "id": "student5-rock-1", + "ticked": true, + "program_id": "8f24af7e4185492087ba697ca3f56190" + }, + { + "id": "student5-haunted-2", + "ticked": true, + "program_id": "33534135dd434726980a46a7ad2b087f" + }, + { + "id": "student5-default-2", + "ticked": false, + "program_id": "4d86425cc5324caeba917caa139fa52a" + }, + { + "id": "student5-rock-2", + "ticked": false, + "program_id": "282a23d192ca47e69ebe383bf32a0de5" + }, + { + "id": "student5-turtle-3", + "ticked": false, + "program_id": "c08be9c5367046c79c97b2954ca14956" + }, + { + "id": "student5-default-3", + "ticked": true, + "program_id": "507c1c830a0f4e1fb35862ffc4948e76" + }, + { + "id": "student5-haunted-3", + "ticked": false, + "program_id": "f78b86d9f79c49cfa9d3626b78dd82fa" + }, + { + "id": "student5-default-7", + "ticked": false, + "program_id": "8c8269ecce6f4983832b24d39f124dec" + }, + { + "id": "student5-default-1", + "ticked": false, + "program_id": "67b0098c0fc6495d96d7b5a6ba693f87" + }, + { + "id": "student5-haunted-1", + "ticked": false, + "program_id": "c5dba732996344a095f0f5615376bd31" + }, + { + "id": "student5-fortune-1", + "ticked": false, + "program_id": "9676bb4a856e4025b5d6a7c60123f616" + }, + { + "id": "student3-rock-1", + "ticked": false, + "program_id": "48ec04d60a4c4990a60b9e5e81121e71" + }, + { + "id": "student3-turtle-1", + "ticked": false, + "program_id": "c70631ec3b2d410596f813c9d6b57709" + }, + { + "id": "student3-story-1", + "ticked": false, + "program_id": "9ea5a534bc6047fdb17c20e4c98259ae" + }, + { + "id": "student3-fortune-1", + "ticked": false, + "program_id": "a999d6d38c7c411095a2571e784d40aa" + }, + { + "id": "student3-parrot-1", + "ticked": false, + "program_id": "7a229194799f47ba940de9e9071fcec7" + }, + { + "id": "student3-default-1", + "ticked": false, + "program_id": "02930e0a15894bc68331775f08e12a32" + } ] } \ No newline at end of file diff --git a/grammars/keywords-ar.lark b/grammars/keywords-ar.lark index c77928285f8..c8c03b4ff6f 100644 --- a/grammars/keywords-ar.lark +++ b/grammars/keywords-ar.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("هو" | "هي" | "is") _SPACE _STANDALONE_IS: ("هو" | "هي" | "is") _SLEEP: ( "ـ"* "ا" "ـ"* "ن" "ـ"* "ت" "ـ"* "ظ" "ـ"* "ر" "ـ"* | "sleep") _SPACE? _ADD_LIST: ( "ـ"* "ا" "ـ"* "ض" "ـ"* "ف" "ـ"* | "add") _SPACE -_TO_LIST: _SPACE? ( "ـ"* "ا" "ـ"* "ل" "ـ"* "ى" "ـ"* | "to") _SPACE +_TO_LIST: _SPACE? ( "ـ"* "ا" "ـ"* "ل" "ـ"* "ى" "ـ"* | "to") _REMOVE: ( "ـ"* "ا" "ـ"* "ز" "ـ"* "ل" "ـ"* | "remove") _SPACE -_FROM: _SPACE? ( "ـ"* "م" "ـ"* "ن" "ـ"* | "from") _SPACE +_FROM: _SPACE? ( "ـ"* "م" "ـ"* "ن" "ـ"* | "from") _AT: _SPACE ( "ـ"* "ب" "ـ"* "ش" "ـ"* "ك" "ـ"* "ل" "ـ"* | "at") _SPACE random: ( "ـ"* "ع" "ـ"* "ش" "ـ"* "و" "ـ"* "ا" "ـ"* "ئ" "ـ"* "ي" "ـ"* | "random") _SPACE? _IN: _SPACE ( "ـ"* "ف" "ـ"* "ي" "ـ"* | "in") _SPACE diff --git a/grammars/keywords-bg.lark b/grammars/keywords-bg.lark index b67be01e835..29f5a14adee 100644 --- a/grammars/keywords-bg.lark +++ b/grammars/keywords-bg.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("е" | "is") _SPACE _STANDALONE_IS: ("е" | "is") _SLEEP: ("спи" | "sleep") _SPACE? _ADD_LIST: ("добави" | "add") _SPACE -_TO_LIST: _SPACE? ("до" | "to") _SPACE +_TO_LIST: _SPACE? ("до" | "to") _REMOVE: ("премахни" | "remove") _SPACE -_FROM: _SPACE? ("от" | "from") _SPACE +_FROM: _SPACE? ("от" | "from") _AT: _SPACE ("в" | "at") _SPACE random: ("произволно" | "random") _SPACE? _IN: _SPACE ("в" | "in") _SPACE diff --git a/grammars/keywords-bn.lark b/grammars/keywords-bn.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-bn.lark +++ b/grammars/keywords-bn.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-ca.lark b/grammars/keywords-ca.lark index 3d4f8c7b412..a632c76c8f7 100644 --- a/grammars/keywords-ca.lark +++ b/grammars/keywords-ca.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("és" | "is") _SPACE _STANDALONE_IS: ("és" | "is") _SLEEP: ("dorm" | "sleep") _SPACE? _ADD_LIST: ("afegeix" | "add") _SPACE -_TO_LIST: _SPACE? ("a" | "to") _SPACE +_TO_LIST: _SPACE? ("a" | "to") _REMOVE: ("esborra" | "remove") _SPACE -_FROM: _SPACE? ("de" | "from") _SPACE +_FROM: _SPACE? ("de" | "from") _AT: _SPACE ("a" | "at") _SPACE random: ("aleatori" | "random") _SPACE? _IN: _SPACE ("dins" | "in") _SPACE diff --git a/grammars/keywords-cs.lark b/grammars/keywords-cs.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-cs.lark +++ b/grammars/keywords-cs.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-cy.lark b/grammars/keywords-cy.lark index 0c7677cc17a..4ee7c093591 100644 --- a/grammars/keywords-cy.lark +++ b/grammars/keywords-cy.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("yw" | "is") _SPACE _STANDALONE_IS: ("yw" | "is") _SLEEP: ("cysgu" | "sleep") _SPACE? _ADD_LIST: ("adio" | "add") _SPACE -_TO_LIST: _SPACE? ("i" | "to") _SPACE +_TO_LIST: _SPACE? ("i" | "to") _REMOVE: ("dileu" | "remove") _SPACE -_FROM: _SPACE? ("o" | "from") _SPACE +_FROM: _SPACE? ("o" | "from") _AT: _SPACE ("ar" | "at") _SPACE random: ("hap" | "random") _SPACE? _IN: _SPACE ("mewn" | "in") _SPACE diff --git a/grammars/keywords-da.lark b/grammars/keywords-da.lark index 0abc85da562..df0a0dae1ad 100644 --- a/grammars/keywords-da.lark +++ b/grammars/keywords-da.lark @@ -1,16 +1,16 @@ _DEFINE: ("definer" | "define") _SPACE? -_CALL: ("call" | "call") _SPACE? -_WITH: ("with" | "with") _SPACE? +_CALL: ("kald" | "call") _SPACE? +_WITH: ("med" | "with") _SPACE? _DEF: ("def" | "def") _SPACE? -_RETURN: ("return" | "return") _SPACE? -_PRINT: ("print" | "print") _SPACE? -_PLAY: ("play" | "play") _SPACE +_RETURN: ("returner" | "return") _SPACE? +_PRINT: ("skriv" | "print") _SPACE? +_PLAY: ("spil" | "play") _SPACE _ASK: ("spørg" | "ask") _ECHO: ("ekko" | "echo") _SPACE? _FORWARD: ("fremad" | "forward") _SPACE? _TURN: ("drej" | "turn") _SPACE? -left: ("left" | "left") _SPACE? -right: ("right" | "right") _SPACE? +left: ("venstre" | "left") _SPACE? +right: ("højre" | "right") _SPACE? black: ("sort" | "black") _SPACE? blue: ("blå" | "blue") _SPACE? brown: ("brun" | "brown") _SPACE? @@ -19,36 +19,36 @@ green: ("grøn" | "green") _SPACE? orange: ("orange" | "orange") _SPACE? pink: ("lyserød" | "pink") _SPACE? purple: ("lila" | "purple") _SPACE? -red: ("red" | "red") _SPACE? -white: ("white" | "white") _SPACE? -yellow: ("yellow" | "yellow") _SPACE? -_IS: _SPACE ("is" | "is") _SPACE -_STANDALONE_IS: ("is" | "is") -_SLEEP: ("sleep" | "sleep") _SPACE? +red: ("rød" | "red") _SPACE? +white: ("hvid" | "white") _SPACE? +yellow: ("gul" | "yellow") _SPACE? +_IS: _SPACE ("er" | "is") _SPACE +_STANDALONE_IS: ("er" | "is") +_SLEEP: ("sov" | "sleep") _SPACE? _ADD_LIST: ("tilføj" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE -_REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_TO_LIST: _SPACE? ("til" | "to") +_REMOVE: ("fjern" | "remove") _SPACE +_FROM: _SPACE? ("fra" | "from") _AT: _SPACE ("ved" | "at") _SPACE -random: ("random" | "random") _SPACE? -_IN: _SPACE ("in" | "in") _SPACE -_NOT_IN: _SPACE ("not in" | "not in") _SPACE -_IF: ("if" | "if") _SPACE +random: ("tilfældighed" | "random") _SPACE? +_IN: _SPACE ("i" | "in") _SPACE +_NOT_IN: _SPACE ("ikke i" | "not in") _SPACE +_IF: ("hvis" | "if") _SPACE _ELSE: "ellers" | "else" _AND: _SPACE? ("og" | "and") _SPACE -_REPEAT: ("repeat" | "repeat") _SPACE -_TIMES: _SPACE ("times" | "times") +_REPEAT: ("gentag" | "repeat") _SPACE +_TIMES: _SPACE ("gange" | "times") _FOR: ("for" | "for") _SPACE -_RANGE: ("range" | "range") _SPACE? -_TO: _SPACE ("to" | "to") _SPACE -_STEP: "step" | "step" -_ELIF: _SPACE? ("elif" | "elif") _SPACE +_RANGE: ("interval" | "range") _SPACE? +_TO: _SPACE ("til" | "to") _SPACE +_STEP: "skridt" | "step" +_ELIF: _SPACE? ("ellers hvis" | "elif") _SPACE _INPUT: ("input" | "input") -_OR: _SPACE? ("or" | "or") _SPACE -_WHILE: ("while" | "while") _SPACE -_LENGTH: "length" | "length" +_OR: _SPACE? ("eller" | "or") _SPACE +_WHILE: ("mens" | "while") _SPACE +_LENGTH: "længde" | "length" _COLOR : ("farve" | "color") _SPACE? -_PRESSED: ("pressed" | "pressed") _SPACE? +_PRESSED: ("trykket ned" | "pressed") _SPACE? clear: ("rens" | "clear") _SPACE? -TRUE: ("true" | "True" | "true" | "True") _SPACE? -FALSE: ("false" | "False" | "false" | "False") _SPACE? +TRUE: ("sand" | "Sand" | "true" | "True") _SPACE? +FALSE: ("falsk" | "Falsk" | "false" | "False") _SPACE? diff --git a/grammars/keywords-de.lark b/grammars/keywords-de.lark index b0eb9737715..d8c250e1dbc 100644 --- a/grammars/keywords-de.lark +++ b/grammars/keywords-de.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("ist" | "is") _SPACE _STANDALONE_IS: ("ist" | "is") _SLEEP: ("schlafe" | "sleep") _SPACE? _ADD_LIST: ("addiere" | "add") _SPACE -_TO_LIST: _SPACE? ("zu" | "to") _SPACE +_TO_LIST: _SPACE? ("zu" | "to") _REMOVE: ("entferne" | "remove") _SPACE -_FROM: _SPACE? ("aus" | "from") _SPACE +_FROM: _SPACE? ("aus" | "from") _AT: _SPACE ("an" | "at") _SPACE random: ("zufällig" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-el.lark b/grammars/keywords-el.lark index 4cfde45e46c..fbb3bae759d 100644 --- a/grammars/keywords-el.lark +++ b/grammars/keywords-el.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-en.lark b/grammars/keywords-en.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-en.lark +++ b/grammars/keywords-en.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-eo.lark b/grammars/keywords-eo.lark index 07930172c29..46e3329584c 100644 --- a/grammars/keywords-eo.lark +++ b/grammars/keywords-eo.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("estas" | "is") _SPACE _STANDALONE_IS: ("estas" | "is") _SLEEP: ("dormu" | "sleep") _SPACE? _ADD_LIST: ("aldonu" | "add") _SPACE -_TO_LIST: _SPACE? ("al" | "to") _SPACE +_TO_LIST: _SPACE? ("al" | "to") _REMOVE: ("forigu" | "remove") _SPACE -_FROM: _SPACE? ("el" | "from") _SPACE +_FROM: _SPACE? ("el" | "from") _AT: _SPACE ("laŭ" | "lau" | "laux" | "at") _SPACE random: ("hazardo" | "random") _SPACE? _IN: _SPACE ("en" | "in") _SPACE diff --git a/grammars/keywords-es.lark b/grammars/keywords-es.lark index 4419329df22..255e5a03640 100644 --- a/grammars/keywords-es.lark +++ b/grammars/keywords-es.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("es" | "is") _SPACE _STANDALONE_IS: ("es" | "is") _SLEEP: ("dormir" | "sleep") _SPACE? _ADD_LIST: ("añadir" | "add") _SPACE -_TO_LIST: _SPACE? ("a" | "to") _SPACE +_TO_LIST: _SPACE? ("a" | "to") _REMOVE: ("borrar" | "remove") _SPACE -_FROM: _SPACE? ("de" | "from") _SPACE +_FROM: _SPACE? ("de" | "from") _AT: _SPACE ("en" | "at") _SPACE random: ("aleatorio" | "random") _SPACE? _IN: _SPACE ("en" | "in") _SPACE diff --git a/grammars/keywords-et.lark b/grammars/keywords-et.lark index b793aac7bbe..3ce21bd73f5 100644 --- a/grammars/keywords-et.lark +++ b/grammars/keywords-et.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("on" | "is") _SPACE _STANDALONE_IS: ("on" | "is") _SLEEP: ("oota" | "sleep") _SPACE? _ADD_LIST: ("lisa" | "add") _SPACE -_TO_LIST: _SPACE? ("nimistusse" | "to") _SPACE +_TO_LIST: _SPACE? ("nimistusse" | "to") _REMOVE: ("kustuta" | "remove") _SPACE -_FROM: _SPACE? ("nimistust" | "from") _SPACE +_FROM: _SPACE? ("nimistust" | "from") _AT: _SPACE ("täitsa" | "at") _SPACE random: ("juhuslikult" | "random") _SPACE? _IN: _SPACE ("nimistus" | "in") _SPACE diff --git a/grammars/keywords-fa.lark b/grammars/keywords-fa.lark index f66580ae591..8059ef57fe9 100644 --- a/grammars/keywords-fa.lark +++ b/grammars/keywords-fa.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-fi.lark b/grammars/keywords-fi.lark index 4e000de9a42..c8694495e2b 100644 --- a/grammars/keywords-fi.lark +++ b/grammars/keywords-fi.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("on" | "is") _SPACE _STANDALONE_IS: ("on" | "is") _SLEEP: ("nuku" | "sleep") _SPACE? _ADD_LIST: ("lisää" | "add") _SPACE -_TO_LIST: _SPACE? ("listaksi" | "to") _SPACE +_TO_LIST: _SPACE? ("listaksi" | "to") _REMOVE: ("poista" | "remove") _SPACE -_FROM: _SPACE? ("listasta" | "from") _SPACE +_FROM: _SPACE? ("listasta" | "from") _AT: _SPACE ("ota" | "at") _SPACE random: ("satunnainen" | "random") _SPACE? _IN: _SPACE ("listassa" | "in") _SPACE diff --git a/grammars/keywords-fr.lark b/grammars/keywords-fr.lark index c85b54e4b40..636a861694c 100644 --- a/grammars/keywords-fr.lark +++ b/grammars/keywords-fr.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("est" | "is") _SPACE _STANDALONE_IS: ("est" | "is") _SLEEP: ("dors" | "sleep") _SPACE? _ADD_LIST: ("ajoute" | "add") _SPACE -_TO_LIST: _SPACE? ("à" | "to") _SPACE +_TO_LIST: _SPACE? ("à" | "to") _REMOVE: ("supprime" | "remove") _SPACE -_FROM: _SPACE? ("de" | "from") _SPACE +_FROM: _SPACE? ("de" | "from") _AT: _SPACE ("au" | "at") _SPACE random: ("hasard" | "random") _SPACE? _IN: _SPACE ("dans" | "in") _SPACE diff --git a/grammars/keywords-fr_CA.lark b/grammars/keywords-fr_CA.lark index c85b54e4b40..636a861694c 100644 --- a/grammars/keywords-fr_CA.lark +++ b/grammars/keywords-fr_CA.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("est" | "is") _SPACE _STANDALONE_IS: ("est" | "is") _SLEEP: ("dors" | "sleep") _SPACE? _ADD_LIST: ("ajoute" | "add") _SPACE -_TO_LIST: _SPACE? ("à" | "to") _SPACE +_TO_LIST: _SPACE? ("à" | "to") _REMOVE: ("supprime" | "remove") _SPACE -_FROM: _SPACE? ("de" | "from") _SPACE +_FROM: _SPACE? ("de" | "from") _AT: _SPACE ("au" | "at") _SPACE random: ("hasard" | "random") _SPACE? _IN: _SPACE ("dans" | "in") _SPACE diff --git a/grammars/keywords-fy.lark b/grammars/keywords-fy.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-fy.lark +++ b/grammars/keywords-fy.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-he.lark b/grammars/keywords-he.lark index a54b016f3b1..730b16e17c9 100644 --- a/grammars/keywords-he.lark +++ b/grammars/keywords-he.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("הוא" | "is") _SPACE _STANDALONE_IS: ("הוא" | "is") _SLEEP: ("המתן" | "sleep") _SPACE? _ADD_LIST: ("הוסף" | "add") _SPACE -_TO_LIST: _SPACE? ("אל" | "to") _SPACE +_TO_LIST: _SPACE? ("אל" | "to") _REMOVE: ("הסר" | "remove") _SPACE -_FROM: _SPACE? ("מ" | "from") _SPACE +_FROM: _SPACE? ("מ" | "from") _AT: _SPACE ("ב" | "at") _SPACE random: ("אקראי" | "random") _SPACE? _IN: _SPACE ("בתוך" | "in") _SPACE diff --git a/grammars/keywords-hi.lark b/grammars/keywords-hi.lark index dc319070e9f..c8f71b4be65 100644 --- a/grammars/keywords-hi.lark +++ b/grammars/keywords-hi.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("है" | "is") _SPACE _STANDALONE_IS: ("है" | "is") _SLEEP: ("नींद" | "sleep") _SPACE? _ADD_LIST: ("जोड़ना" | "add") _SPACE -_TO_LIST: _SPACE? ("से" | "to") _SPACE +_TO_LIST: _SPACE? ("से" | "to") _REMOVE: ("हटाना" | "remove") _SPACE -_FROM: _SPACE? ("से" | "from") _SPACE +_FROM: _SPACE? ("से" | "from") _AT: _SPACE ("पर" | "at") _SPACE random: ("अनियमित" | "random") _SPACE? _IN: _SPACE ("में" | "in") _SPACE diff --git a/grammars/keywords-hr.lark b/grammars/keywords-hr.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-hr.lark +++ b/grammars/keywords-hr.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-hu.lark b/grammars/keywords-hu.lark index 418102c3805..0a629011aac 100644 --- a/grammars/keywords-hu.lark +++ b/grammars/keywords-hu.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("egyenlő" | "is") _SPACE _STANDALONE_IS: ("egyenlő" | "is") _SLEEP: ("szundi" | "sleep") _SPACE? _ADD_LIST: ("beszúr" | "add") _SPACE -_TO_LIST: _SPACE? ("ebbe" | "to") _SPACE +_TO_LIST: _SPACE? ("ebbe" | "to") _REMOVE: ("kivesz" | "remove") _SPACE -_FROM: _SPACE? ("ebből" | "from") _SPACE +_FROM: _SPACE? ("ebből" | "from") _AT: _SPACE ("listából" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("eleme" | "in") _SPACE diff --git a/grammars/keywords-ia.lark b/grammars/keywords-ia.lark index 7695819051a..2caa52da590 100644 --- a/grammars/keywords-ia.lark +++ b/grammars/keywords-ia.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("es" | "is") _SPACE _STANDALONE_IS: ("es" | "is") _SLEEP: ("dormir" | "sleep") _SPACE? _ADD_LIST: ("adde" | "add") _SPACE -_TO_LIST: _SPACE? ("a" | "to") _SPACE +_TO_LIST: _SPACE? ("a" | "to") _REMOVE: ("removere" | "remove") _SPACE -_FROM: _SPACE? ("de" | "from") _SPACE +_FROM: _SPACE? ("de" | "from") _AT: _SPACE ("a" | "at") _SPACE random: ("aleatori" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-iba.lark b/grammars/keywords-iba.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-iba.lark +++ b/grammars/keywords-iba.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-id.lark b/grammars/keywords-id.lark index cc9404e9ea2..ed26d07471d 100644 --- a/grammars/keywords-id.lark +++ b/grammars/keywords-id.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("adalah" | "is") _SPACE _STANDALONE_IS: ("adalah" | "is") _SLEEP: ("tidur" | "sleep") _SPACE? _ADD_LIST: ("tambah" | "add") _SPACE -_TO_LIST: _SPACE? ("ke" | "to") _SPACE +_TO_LIST: _SPACE? ("ke" | "to") _REMOVE: ("hapus" | "remove") _SPACE -_FROM: _SPACE? ("dari" | "from") _SPACE +_FROM: _SPACE? ("dari" | "from") _AT: _SPACE ("secara" | "at") _SPACE random: ("acak" | "random") _SPACE? _IN: _SPACE ("dalam" | "in") _SPACE diff --git a/grammars/keywords-it.lark b/grammars/keywords-it.lark index 3aafeec9843..a2388ff4fc6 100644 --- a/grammars/keywords-it.lark +++ b/grammars/keywords-it.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("dormi" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("rimuovi" | "remove") _SPACE -_FROM: _SPACE? ("da" | "from") _SPACE +_FROM: _SPACE? ("da" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("a caso" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-ja.lark b/grammars/keywords-ja.lark index b2615370c95..db404bebf88 100644 --- a/grammars/keywords-ja.lark +++ b/grammars/keywords-ja.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("やすめ" | "sleep") _SPACE? _ADD_LIST: ("たす" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-kab.lark b/grammars/keywords-kab.lark new file mode 100644 index 00000000000..32f596bf693 --- /dev/null +++ b/grammars/keywords-kab.lark @@ -0,0 +1,54 @@ +_DEFINE: ("sbadu" | "define") _SPACE? +_CALL: ("asiwel" | "call") _SPACE? +_WITH: ("akked" | "with") _SPACE? +_DEF: ("def" | "def") _SPACE? +_RETURN: ("uɣal ɣer deffir" | "return") _SPACE? +_PRINT: ("siggez" | "print") _SPACE? +_PLAY: ("urar" | "play") _SPACE +_ASK: ("ssuter" | "ask") +_ECHO: ("yerra-d" | "echo") _SPACE? +_FORWARD: ("welleh" | "forward") _SPACE? +_TURN: ("zzi" | "turn") _SPACE? +left: ("ayeffus" | "left") _SPACE? +right: ("ayeffus" | "right") _SPACE? +black: ("aberkan" | "black") _SPACE? +blue: ("amidadi" | "blue") _SPACE? +brown: ("aqehwi" | "brown") _SPACE? +gray: ("gray" | "gray") _SPACE? +green: ("azegzaw" | "green") _SPACE? +orange: ("aččinawi" | "orange") _SPACE? +pink: ("axuxi" | "pink") _SPACE? +purple: ("purple" | "purple") _SPACE? +red: ("azeggaɣ" | "red") _SPACE? +white: ("amellal" | "white") _SPACE? +yellow: ("awreɣ" | "yellow") _SPACE? +_IS: _SPACE ("d" | "is") _SPACE +_STANDALONE_IS: ("d" | "is") +_SLEEP: ("gen" | "sleep") _SPACE? +_ADD_LIST: ("rnu" | "add") _SPACE +_TO_LIST: _SPACE? ("ɣer" | "to") +_REMOVE: ("kkes" | "remove") _SPACE +_FROM: _SPACE? ("seg" | "from") +_AT: _SPACE ("ar" | "at") _SPACE +random: ("random" | "random") _SPACE? +_IN: _SPACE ("deg" | "in") _SPACE +_NOT_IN: _SPACE ("mačči deg" | "not in") _SPACE +_IF: ("ma yella" | "if") _SPACE +_ELSE: "neɣ" | "else" +_AND: _SPACE? ("akked" | "and") _SPACE +_REPEAT: ("ales" | "repeat") _SPACE +_TIMES: _SPACE ("tikkal" | "times") +_FOR: ("i" | "for") _SPACE +_RANGE: ("range" | "range") _SPACE? +_TO: _SPACE ("ɣer" | "to") _SPACE +_STEP: "takkayt" | "step" +_ELIF: _SPACE? ("neɣ ma yella" | "elif") _SPACE +_INPUT: ("sekcem" | "input") +_OR: _SPACE? ("neɣ" | "or") _SPACE +_WHILE: ("imi" | "while") _SPACE +_LENGTH: "teɣzi" | "length" +_COLOR : ("ini" | "color") _SPACE? +_PRESSED: ("pressed" | "pressed") _SPACE? +clear: ("sfeḍ" | "clear") _SPACE? +TRUE: ("true" | "True" | "true" | "True") _SPACE? +FALSE: ("false" | "False" | "false" | "False") _SPACE? diff --git a/grammars/keywords-kmr.lark b/grammars/keywords-kmr.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-kmr.lark +++ b/grammars/keywords-kmr.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-ko.lark b/grammars/keywords-ko.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-ko.lark +++ b/grammars/keywords-ko.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-mi.lark b/grammars/keywords-mi.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-mi.lark +++ b/grammars/keywords-mi.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-ms.lark b/grammars/keywords-ms.lark index 1116b51582b..509bd437eb1 100644 --- a/grammars/keywords-ms.lark +++ b/grammars/keywords-ms.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("tambah" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-nb_NO.lark b/grammars/keywords-nb_NO.lark index c19073eff75..b55583c4558 100644 --- a/grammars/keywords-nb_NO.lark +++ b/grammars/keywords-nb_NO.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("er" | "is") _SPACE _STANDALONE_IS: ("er" | "is") _SLEEP: ("sov" | "sleep") _SPACE? _ADD_LIST: ("legg" | "add") _SPACE -_TO_LIST: _SPACE? ("til" | "to") _SPACE +_TO_LIST: _SPACE? ("til" | "to") _REMOVE: ("fjern" | "remove") _SPACE -_FROM: _SPACE? ("fra" | "from") _SPACE +_FROM: _SPACE? ("fra" | "from") _AT: _SPACE ("på" | "at") _SPACE random: ("tilfeldig" | "random") _SPACE? _IN: _SPACE ("i" | "in") _SPACE diff --git a/grammars/keywords-ne.lark b/grammars/keywords-ne.lark new file mode 100644 index 00000000000..78416af8f90 --- /dev/null +++ b/grammars/keywords-ne.lark @@ -0,0 +1,54 @@ +_DEFINE: ("define" | "define") _SPACE? +_CALL: ("call" | "call") _SPACE? +_WITH: ("with" | "with") _SPACE? +_DEF: ("def" | "def") _SPACE? +_RETURN: ("return" | "return") _SPACE? +_PRINT: ("print" | "print") _SPACE? +_PLAY: ("play" | "play") _SPACE +_ASK: ("ask" | "ask") +_ECHO: ("echo" | "echo") _SPACE? +_FORWARD: ("forward" | "forward") _SPACE? +_TURN: ("turn" | "turn") _SPACE? +left: ("left" | "left") _SPACE? +right: ("right" | "right") _SPACE? +black: ("black" | "black") _SPACE? +blue: ("blue" | "blue") _SPACE? +brown: ("brown" | "brown") _SPACE? +gray: ("gray" | "gray") _SPACE? +green: ("green" | "green") _SPACE? +orange: ("orange" | "orange") _SPACE? +pink: ("pink" | "pink") _SPACE? +purple: ("purple" | "purple") _SPACE? +red: ("red" | "red") _SPACE? +white: ("white" | "white") _SPACE? +yellow: ("yellow" | "yellow") _SPACE? +_IS: _SPACE ("is" | "is") _SPACE +_STANDALONE_IS: ("is" | "is") +_SLEEP: ("sleep" | "sleep") _SPACE? +_ADD_LIST: ("add" | "add") _SPACE +_TO_LIST: _SPACE? ("to" | "to") +_REMOVE: ("remove" | "remove") _SPACE +_FROM: _SPACE? ("from" | "from") +_AT: _SPACE ("at" | "at") _SPACE +random: ("random" | "random") _SPACE? +_IN: _SPACE ("in" | "in") _SPACE +_NOT_IN: _SPACE ("not in" | "not in") _SPACE +_IF: ("if" | "if") _SPACE +_ELSE: "else" | "else" +_AND: _SPACE? ("and" | "and") _SPACE +_REPEAT: ("repeat" | "repeat") _SPACE +_TIMES: _SPACE ("times" | "times") +_FOR: ("for" | "for") _SPACE +_RANGE: ("range" | "range") _SPACE? +_TO: _SPACE ("to" | "to") _SPACE +_STEP: "step" | "step" +_ELIF: _SPACE? ("elif" | "elif") _SPACE +_INPUT: ("input" | "input") +_OR: _SPACE? ("or" | "or") _SPACE +_WHILE: ("while" | "while") _SPACE +_LENGTH: "length" | "length" +_COLOR : ("color" | "color") _SPACE? +_PRESSED: ("pressed" | "pressed") _SPACE? +clear: ("clear" | "clear") _SPACE? +TRUE: ("true" | "True" | "true" | "True") _SPACE? +FALSE: ("false" | "False" | "false" | "False") _SPACE? diff --git a/grammars/keywords-nl.lark b/grammars/keywords-nl.lark index ded5ce099bf..8441d5df9bb 100644 --- a/grammars/keywords-nl.lark +++ b/grammars/keywords-nl.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("slaap" | "sleep") _SPACE? _ADD_LIST: ("voeg" | "add") _SPACE -_TO_LIST: _SPACE? ("toe aan" | "to") _SPACE +_TO_LIST: _SPACE? ("toe aan" | "to") _REMOVE: ("verwijder" | "remove") _SPACE -_FROM: _SPACE? ("uit" | "from") _SPACE +_FROM: _SPACE? ("uit" | "from") _AT: _SPACE ("op" | "at") _SPACE random: ("willekeurig" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-pa_PK.lark b/grammars/keywords-pa_PK.lark index 11f58e5c782..a9a13eaf83c 100644 --- a/grammars/keywords-pa_PK.lark +++ b/grammars/keywords-pa_PK.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("سمان" | "is") _SPACE _STANDALONE_IS: ("سمان" | "is") _SLEEP: ("نیند" | "sleep") _SPACE? _ADD_LIST: ("دھن" | "add") _SPACE -_TO_LIST: _SPACE? ("منزل" | "to") _SPACE +_TO_LIST: _SPACE? ("منزل" | "to") _REMOVE: ("مٹاکے" | "remove") _SPACE -_FROM: _SPACE? ("سروت" | "from") _SPACE +_FROM: _SPACE? ("سروت" | "from") _AT: _SPACE ("ستھتی" | "at") _SPACE random: ("رلوان" | "random") _SPACE? _IN: _SPACE ("اندر" | "in") _SPACE diff --git a/grammars/keywords-pap.lark b/grammars/keywords-pap.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-pap.lark +++ b/grammars/keywords-pap.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-peo.lark b/grammars/keywords-peo.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-peo.lark +++ b/grammars/keywords-peo.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-pl.lark b/grammars/keywords-pl.lark index eb4706a63b3..46e45359207 100644 --- a/grammars/keywords-pl.lark +++ b/grammars/keywords-pl.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("to" | "is") _SPACE _STANDALONE_IS: ("to" | "is") _SLEEP: ("śpij" | "sleep") _SPACE? _ADD_LIST: ("dodaj" | "add") _SPACE -_TO_LIST: _SPACE? ("do" | "to") _SPACE +_TO_LIST: _SPACE? ("do" | "to") _REMOVE: ("usuń" | "remove") _SPACE -_FROM: _SPACE? ("z" | "from") _SPACE +_FROM: _SPACE? ("z" | "from") _AT: _SPACE ("pozycja" | "at") _SPACE random: ("losowa" | "random") _SPACE? _IN: _SPACE ("w" | "in") _SPACE diff --git a/grammars/keywords-pt_BR.lark b/grammars/keywords-pt_BR.lark index ebf38058eb2..c007bf7a454 100644 --- a/grammars/keywords-pt_BR.lark +++ b/grammars/keywords-pt_BR.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("é" | "is") _SPACE _STANDALONE_IS: ("é" | "is") _SLEEP: ("durma" | "sleep") _SPACE? _ADD_LIST: ("some" | "add") _SPACE -_TO_LIST: _SPACE? ("a" | "to") _SPACE +_TO_LIST: _SPACE? ("a" | "to") _REMOVE: ("remova" | "remove") _SPACE -_FROM: _SPACE? ("de" | "from") _SPACE +_FROM: _SPACE? ("de" | "from") _AT: _SPACE ("'em'" | "at") _SPACE random: ("aleatório" | "random") _SPACE? _IN: _SPACE ("em" | "in") _SPACE diff --git a/grammars/keywords-pt_PT.lark b/grammars/keywords-pt_PT.lark index f08ed3463db..bdab866b83c 100644 --- a/grammars/keywords-pt_PT.lark +++ b/grammars/keywords-pt_PT.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("é" | "is") _SPACE _STANDALONE_IS: ("é" | "is") _SLEEP: ("dormir" | "sleep") _SPACE? _ADD_LIST: ("adicionar" | "add") _SPACE -_TO_LIST: _SPACE? ("para" | "to") _SPACE +_TO_LIST: _SPACE? ("para" | "to") _REMOVE: ("remover" | "remove") _SPACE -_FROM: _SPACE? ("de" | "from") _SPACE +_FROM: _SPACE? ("de" | "from") _AT: _SPACE ("'no'" | "at") _SPACE random: ("aleatório" | "random") _SPACE? _IN: _SPACE ("em" | "in") _SPACE diff --git a/grammars/keywords-ro.lark b/grammars/keywords-ro.lark index 3b9f8791afa..f00757181a1 100644 --- a/grammars/keywords-ro.lark +++ b/grammars/keywords-ro.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("adună" | "add") _SPACE -_TO_LIST: _SPACE? ("către" | "to") _SPACE +_TO_LIST: _SPACE? ("către" | "to") _REMOVE: ("elimină" | "remove") _SPACE -_FROM: _SPACE? ("de la" | "from") _SPACE +_FROM: _SPACE? ("de la" | "from") _AT: _SPACE ("la" | "at") _SPACE random: ("aleatoriu" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-ru.lark b/grammars/keywords-ru.lark index 8c1bac4fd05..e744d678e45 100644 --- a/grammars/keywords-ru.lark +++ b/grammars/keywords-ru.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("это" | "is") _SPACE _STANDALONE_IS: ("это" | "is") _SLEEP: ("заснуть" | "sleep") _SPACE? _ADD_LIST: ("добавить" | "add") _SPACE -_TO_LIST: _SPACE? ("в" | "to") _SPACE +_TO_LIST: _SPACE? ("в" | "to") _REMOVE: ("удалить" | "remove") _SPACE -_FROM: _SPACE? ("из" | "from") _SPACE +_FROM: _SPACE? ("из" | "from") _AT: _SPACE ("в" | "at") _SPACE random: ("случайном" | "random") _SPACE? _IN: _SPACE ("в" | "in") _SPACE diff --git a/grammars/keywords-sl.lark b/grammars/keywords-sl.lark index c8c4af8adae..e24924a3c02 100644 --- a/grammars/keywords-sl.lark +++ b/grammars/keywords-sl.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("je" | "is") _SPACE _STANDALONE_IS: ("je" | "is") _SLEEP: ("zaspi" | "sleep") _SPACE? _ADD_LIST: ("dodaj" | "add") _SPACE -_TO_LIST: _SPACE? ("do" | "to") _SPACE +_TO_LIST: _SPACE? ("do" | "to") _REMOVE: ("odstrani" | "remove") _SPACE -_FROM: _SPACE? ("od" | "from") _SPACE +_FROM: _SPACE? ("od" | "from") _AT: _SPACE ("pri" | "at") _SPACE random: ("naključno" | "random") _SPACE? _IN: _SPACE ("v" | "in") _SPACE diff --git a/grammars/keywords-sq.lark b/grammars/keywords-sq.lark index 2157e4a3955..999d087630e 100644 --- a/grammars/keywords-sq.lark +++ b/grammars/keywords-sq.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("është" | "is") _SPACE _STANDALONE_IS: ("është" | "is") _SLEEP: ("fle" | "sleep") _SPACE? _ADD_LIST: ("shtoni" | "add") _SPACE -_TO_LIST: _SPACE? ("deri" | "to") _SPACE +_TO_LIST: _SPACE? ("deri" | "to") _REMOVE: ("hiqni" | "remove") _SPACE -_FROM: _SPACE? ("nga" | "from") _SPACE +_FROM: _SPACE? ("nga" | "from") _AT: _SPACE ("në" | "at") _SPACE random: ("rastësi" | "random") _SPACE? _IN: _SPACE ("në" | "in") _SPACE diff --git a/grammars/keywords-sr.lark b/grammars/keywords-sr.lark index f70fc846881..b6d79107b89 100644 --- a/grammars/keywords-sr.lark +++ b/grammars/keywords-sr.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("је" | "is") _SPACE _STANDALONE_IS: ("је" | "is") _SLEEP: ("спавање" | "sleep") _SPACE? _ADD_LIST: ("додај" | "add") _SPACE -_TO_LIST: _SPACE? ("до" | "to") _SPACE +_TO_LIST: _SPACE? ("до" | "to") _REMOVE: ("обриши" | "remove") _SPACE -_FROM: _SPACE? ("од" | "from") _SPACE +_FROM: _SPACE? ("од" | "from") _AT: _SPACE ("на" | "at") _SPACE random: ("насумично" | "random") _SPACE? _IN: _SPACE ("у" | "in") _SPACE diff --git a/grammars/keywords-sv.lark b/grammars/keywords-sv.lark index 13e208153cd..499c55b6fd8 100644 --- a/grammars/keywords-sv.lark +++ b/grammars/keywords-sv.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("är" | "is") _SPACE _STANDALONE_IS: ("är" | "is") _SLEEP: ("sov" | "sleep") _SPACE? _ADD_LIST: ("addera" | "add") _SPACE -_TO_LIST: _SPACE? ("till" | "to") _SPACE +_TO_LIST: _SPACE? ("till" | "to") _REMOVE: ("radera" | "remove") _SPACE -_FROM: _SPACE? ("från" | "from") _SPACE +_FROM: _SPACE? ("från" | "from") _AT: _SPACE ("vid" | "at") _SPACE random: ("slump" | "random") _SPACE? _IN: _SPACE ("i" | "in") _SPACE diff --git a/grammars/keywords-sw.lark b/grammars/keywords-sw.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-sw.lark +++ b/grammars/keywords-sw.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-ta.lark b/grammars/keywords-ta.lark new file mode 100644 index 00000000000..78416af8f90 --- /dev/null +++ b/grammars/keywords-ta.lark @@ -0,0 +1,54 @@ +_DEFINE: ("define" | "define") _SPACE? +_CALL: ("call" | "call") _SPACE? +_WITH: ("with" | "with") _SPACE? +_DEF: ("def" | "def") _SPACE? +_RETURN: ("return" | "return") _SPACE? +_PRINT: ("print" | "print") _SPACE? +_PLAY: ("play" | "play") _SPACE +_ASK: ("ask" | "ask") +_ECHO: ("echo" | "echo") _SPACE? +_FORWARD: ("forward" | "forward") _SPACE? +_TURN: ("turn" | "turn") _SPACE? +left: ("left" | "left") _SPACE? +right: ("right" | "right") _SPACE? +black: ("black" | "black") _SPACE? +blue: ("blue" | "blue") _SPACE? +brown: ("brown" | "brown") _SPACE? +gray: ("gray" | "gray") _SPACE? +green: ("green" | "green") _SPACE? +orange: ("orange" | "orange") _SPACE? +pink: ("pink" | "pink") _SPACE? +purple: ("purple" | "purple") _SPACE? +red: ("red" | "red") _SPACE? +white: ("white" | "white") _SPACE? +yellow: ("yellow" | "yellow") _SPACE? +_IS: _SPACE ("is" | "is") _SPACE +_STANDALONE_IS: ("is" | "is") +_SLEEP: ("sleep" | "sleep") _SPACE? +_ADD_LIST: ("add" | "add") _SPACE +_TO_LIST: _SPACE? ("to" | "to") +_REMOVE: ("remove" | "remove") _SPACE +_FROM: _SPACE? ("from" | "from") +_AT: _SPACE ("at" | "at") _SPACE +random: ("random" | "random") _SPACE? +_IN: _SPACE ("in" | "in") _SPACE +_NOT_IN: _SPACE ("not in" | "not in") _SPACE +_IF: ("if" | "if") _SPACE +_ELSE: "else" | "else" +_AND: _SPACE? ("and" | "and") _SPACE +_REPEAT: ("repeat" | "repeat") _SPACE +_TIMES: _SPACE ("times" | "times") +_FOR: ("for" | "for") _SPACE +_RANGE: ("range" | "range") _SPACE? +_TO: _SPACE ("to" | "to") _SPACE +_STEP: "step" | "step" +_ELIF: _SPACE? ("elif" | "elif") _SPACE +_INPUT: ("input" | "input") +_OR: _SPACE? ("or" | "or") _SPACE +_WHILE: ("while" | "while") _SPACE +_LENGTH: "length" | "length" +_COLOR : ("color" | "color") _SPACE? +_PRESSED: ("pressed" | "pressed") _SPACE? +clear: ("clear" | "clear") _SPACE? +TRUE: ("true" | "True" | "true" | "True") _SPACE? +FALSE: ("false" | "False" | "false" | "False") _SPACE? diff --git a/grammars/keywords-te.lark b/grammars/keywords-te.lark index c75731d8b14..dfaee795bbb 100644 --- a/grammars/keywords-te.lark +++ b/grammars/keywords-te.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("ఉంది" | "is") _SPACE _STANDALONE_IS: ("ఉంది" | "is") _SLEEP: ("నిద్ర" | "sleep") _SPACE? _ADD_LIST: ("జోడించు" | "add") _SPACE -_TO_LIST: _SPACE? ("కు" | "to") _SPACE +_TO_LIST: _SPACE? ("కు" | "to") _REMOVE: ("తొలగించు" | "remove") _SPACE -_FROM: _SPACE? ("నుండి" | "from") _SPACE +_FROM: _SPACE? ("నుండి" | "from") _AT: _SPACE ("వద్ద" | "at") _SPACE random: ("యాదృచ్ఛికంగా" | "random") _SPACE? _IN: _SPACE ("मेలో" | "in") _SPACE diff --git a/grammars/keywords-template.lark b/grammars/keywords-template.lark index 19ed7d32eb0..949a7649f3b 100644 --- a/grammars/keywords-template.lark +++ b/grammars/keywords-template.lark @@ -26,9 +26,9 @@ _IS: _SPACE ({is} | "is") _SPACE _STANDALONE_IS: ({is} | "is") _SLEEP: ({sleep} | "sleep") _SPACE? _ADD_LIST: ({add} | "add") _SPACE -_TO_LIST: _SPACE? ({to_list} | "to") _SPACE +_TO_LIST: _SPACE? ({to_list} | "to") _REMOVE: ({remove} | "remove") _SPACE -_FROM: _SPACE? ({from} | "from") _SPACE +_FROM: _SPACE? ({from} | "from") _AT: _SPACE ({at} | "at") _SPACE random: ({random} | "random") _SPACE? _IN: _SPACE ({in} | "in") _SPACE diff --git a/grammars/keywords-th.lark b/grammars/keywords-th.lark index 63a8a4bf961..9ee12deb625 100644 --- a/grammars/keywords-th.lark +++ b/grammars/keywords-th.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("คือ" | "is") _SPACE _STANDALONE_IS: ("คือ" | "is") _SLEEP: ("รอ" | "sleep") _SPACE? _ADD_LIST: ("เพิ่ม" | "add") _SPACE -_TO_LIST: _SPACE? ("ไปยัง" | "to") _SPACE +_TO_LIST: _SPACE? ("ไปยัง" | "to") _REMOVE: ("ลบ" | "remove") _SPACE -_FROM: _SPACE? ("จาก" | "from") _SPACE +_FROM: _SPACE? ("จาก" | "from") _AT: _SPACE ("แบบ" | "at") _SPACE random: ("สุ่ม" | "random") _SPACE? _IN: _SPACE ("อยู่ใน" | "in") _SPACE diff --git a/grammars/keywords-tl.lark b/grammars/keywords-tl.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-tl.lark +++ b/grammars/keywords-tl.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-tn.lark b/grammars/keywords-tn.lark index 35a56f799a1..169453e03d1 100644 --- a/grammars/keywords-tn.lark +++ b/grammars/keywords-tn.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("tsenya" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-tr.lark b/grammars/keywords-tr.lark index 8a856bf64b8..b7191f6165a 100644 --- a/grammars/keywords-tr.lark +++ b/grammars/keywords-tr.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("eşit" | "is") _SPACE _STANDALONE_IS: ("eşit" | "is") _SLEEP: ("uyu" | "sleep") _SPACE? _ADD_LIST: ("ekle" | "add") _SPACE -_TO_LIST: _SPACE? ("şuraya" | "to") _SPACE +_TO_LIST: _SPACE? ("şuraya" | "to") _REMOVE: ("kaldır" | "remove") _SPACE -_FROM: _SPACE? ("şuradan" | "from") _SPACE +_FROM: _SPACE? ("şuradan" | "from") _AT: _SPACE ("içinden" | "at") _SPACE random: ("rastgele" | "random") _SPACE? _IN: _SPACE ("şunda" | "in") _SPACE diff --git a/grammars/keywords-uk.lark b/grammars/keywords-uk.lark index bf570e6a8e0..a7c4d640433 100644 --- a/grammars/keywords-uk.lark +++ b/grammars/keywords-uk.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("це" | "is") _SPACE _STANDALONE_IS: ("це" | "is") _SLEEP: ("почекай" | "sleep") _SPACE? _ADD_LIST: ("додай" | "add") _SPACE -_TO_LIST: _SPACE? ("до" | "to") _SPACE +_TO_LIST: _SPACE? ("до" | "to") _REMOVE: ("видали" | "remove") _SPACE -_FROM: _SPACE? ("iз" | "з" | "from") _SPACE +_FROM: _SPACE? ("iз" | "з" | "from") _AT: _SPACE ("на позиції" | "at") _SPACE random: ("випадковий" | "випадковій" | "random") _SPACE? _IN: _SPACE ("в" | "in") _SPACE diff --git a/grammars/keywords-ur.lark b/grammars/keywords-ur.lark index 3af8f38ca2f..ace96feba82 100644 --- a/grammars/keywords-ur.lark +++ b/grammars/keywords-ur.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("ہے" | "is") _SPACE _STANDALONE_IS: ("ہے" | "is") _SLEEP: ("آرام" | "sleep") _SPACE? _ADD_LIST: ("شامل" | "add") _SPACE -_TO_LIST: _SPACE? ("اندر" | "to") _SPACE +_TO_LIST: _SPACE? ("اندر" | "to") _REMOVE: ("نکالو" | "remove") _SPACE -_FROM: _SPACE? ("سے" | "from") _SPACE +_FROM: _SPACE? ("سے" | "from") _AT: _SPACE ("کوئی" | "at") _SPACE random: ("سا" | "random") _SPACE? _IN: _SPACE ("میں" | "in") _SPACE diff --git a/grammars/keywords-uz.lark b/grammars/keywords-uz.lark index 2f844c60471..78416af8f90 100644 --- a/grammars/keywords-uz.lark +++ b/grammars/keywords-uz.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("is" | "is") _SPACE _STANDALONE_IS: ("is" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("random" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-vi.lark b/grammars/keywords-vi.lark index a12ce2386bd..ca790927185 100644 --- a/grammars/keywords-vi.lark +++ b/grammars/keywords-vi.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("là" | "is") _SPACE _STANDALONE_IS: ("là" | "is") _SLEEP: ("sleep" | "sleep") _SPACE? _ADD_LIST: ("add" | "add") _SPACE -_TO_LIST: _SPACE? ("to" | "to") _SPACE +_TO_LIST: _SPACE? ("to" | "to") _REMOVE: ("remove" | "remove") _SPACE -_FROM: _SPACE? ("from" | "from") _SPACE +_FROM: _SPACE? ("from" | "from") _AT: _SPACE ("at" | "at") _SPACE random: ("ngẫu_nhiên" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/keywords-zh_Hans.lark b/grammars/keywords-zh_Hans.lark index 3c6a652e8f2..66922a9f384 100644 --- a/grammars/keywords-zh_Hans.lark +++ b/grammars/keywords-zh_Hans.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("是" | "is") _SPACE _STANDALONE_IS: ("是" | "is") _SLEEP: ("睡眠" | "sleep") _SPACE? _ADD_LIST: ("加" | "add") _SPACE -_TO_LIST: _SPACE? ("到" | "to") _SPACE +_TO_LIST: _SPACE? ("到" | "to") _REMOVE: ("移除" | "remove") _SPACE -_FROM: _SPACE? ("从" | "from") _SPACE +_FROM: _SPACE? ("从" | "from") _AT: _SPACE ("在" | "at") _SPACE random: ("随机" | "random") _SPACE? _IN: _SPACE ("在里面" | "in") _SPACE diff --git a/grammars/keywords-zh_Hant.lark b/grammars/keywords-zh_Hant.lark index 3162699f25a..f81a048df05 100644 --- a/grammars/keywords-zh_Hant.lark +++ b/grammars/keywords-zh_Hant.lark @@ -26,9 +26,9 @@ _IS: _SPACE ("是" | "is") _SPACE _STANDALONE_IS: ("是" | "is") _SLEEP: ("睡眠" | "sleep") _SPACE? _ADD_LIST: ("加" | "add") _SPACE -_TO_LIST: _SPACE? ("到" | "to") _SPACE +_TO_LIST: _SPACE? ("到" | "to") _REMOVE: ("移除" | "remove") _SPACE -_FROM: _SPACE? ("從" | "from") _SPACE +_FROM: _SPACE? ("從" | "from") _AT: _SPACE ("在" | "at") _SPACE random: ("隨機" | "random") _SPACE? _IN: _SPACE ("in" | "in") _SPACE diff --git a/grammars/level12-Additions.lark b/grammars/level12-Additions.lark index 9c4a3941e34..f045d4b7f87 100644 --- a/grammars/level12-Additions.lark +++ b/grammars/level12-Additions.lark @@ -35,6 +35,6 @@ function_name: NAME -> text ?simple_expression:+= call ?turtle_color:+= call -add: _ADD_LIST (atom | list_access | call) _TO_LIST var_access -remove: _REMOVE (atom | list_access | call) _FROM var_access +add: _ADD_LIST (atom | list_access | call) _TO_LIST _SPACE var_access +remove: _REMOVE (atom | list_access | call) _FROM _SPACE var_access // ================================================================================ diff --git a/grammars/level16-Additions.lark b/grammars/level16-Additions.lark index fc784267403..a8e2407a022 100644 --- a/grammars/level16-Additions.lark +++ b/grammars/level16-Additions.lark @@ -4,7 +4,7 @@ command:+= change_list_item | error_assign_list_missing_brackets ?atom: NUMBER | _MINUS NUMBER | boolean | list_access | text_in_quotes | var_access list_access: var_access _LEFT_SQUARE_BRACKET (INT | random | var_access) _RIGHT_SQUARE_BRACKET -change_list_item: var_access _LEFT_SQUARE_BRACKET (INT | var_access) _RIGHT_SQUARE_BRACKET _EQUALS (var_access | quoted_text | NUMBER | boolean) +change_list_item: var_access _LEFT_SQUARE_BRACKET (INT | var_access) _RIGHT_SQUARE_BRACKET _EQUALS (var_access | quoted_text | NUMBER | boolean | list_access) assign_list: var (_IS | _EQUALS) _LEFT_SQUARE_BRACKET ((quoted_text | NUMBER | boolean) (_COMMA (quoted_text | NUMBER | boolean))*)? _RIGHT_SQUARE_BRACKET error_assign_list_missing_brackets: var (_IS | _EQUALS) (_LEFT_SQUARE_BRACKET)? ((quoted_text | NUMBER | boolean) _COMMA (quoted_text | NUMBER | boolean) (_COMMA (quoted_text | NUMBER | boolean))*)? (_RIGHT_SQUARE_BRACKET)? diff --git a/grammars/level3-Additions.lark b/grammars/level3-Additions.lark index 09c842c43be..4590a04d2fb 100644 --- a/grammars/level3-Additions.lark +++ b/grammars/level3-Additions.lark @@ -1,4 +1,4 @@ -command:+= assign_list | add | remove | error_add_missing_to | error_remove_missing_from >> error_invalid +command:+= assign_list | add | remove | error_add_missing_to | error_remove_missing_from | error_add_missing_list | error_remove_missing_list >> error_invalid _print_ask_argument: (_SPACE | (list_access textwithoutspaces?) | textwithoutspaces)* assign: var _IS (list_access | text) -> assign @@ -18,7 +18,9 @@ text_list: /([^\n,،,、#]+)/ -> text // list elements are another exception s // It means that a space cannot be not followed by a 'to' or 'from' for the given language text_add_remove_list: /(?:[^\n,،,、# ]| (?!|))+/ -> text -add: _ADD_LIST text_add_remove_list _TO_LIST var_access -remove: _REMOVE text_add_remove_list _FROM var_access -error_add_missing_to: _ADD_LIST var_access -error_remove_missing_from: _REMOVE var_access +add: _ADD_LIST text_add_remove_list _TO_LIST _SPACE var_access +remove: _REMOVE text_add_remove_list _FROM _SPACE var_access +error_add_missing_to: _ADD_LIST text_add_remove_list _SPACE? +error_remove_missing_from: _REMOVE text_add_remove_list _SPACE? +error_add_missing_list: _ADD_LIST text_add_remove_list _TO_LIST _SPACE? +error_remove_missing_list: _REMOVE text_add_remove_list _FROM _SPACE? diff --git a/grammars/level4-Additions.lark b/grammars/level4-Additions.lark index a716ff75a82..8e15a8fbd40 100644 --- a/grammars/level4-Additions.lark +++ b/grammars/level4-Additions.lark @@ -1,5 +1,5 @@ // redefining it entirely since it has many order-depending rules (e.g ask_no_quotes should be after ask and before assign) -command: clear | error_non_decimal | print | ask | play | turtle | assign_list | add | remove | error_add_missing_to | error_remove_missing_from | sleep | error_list_access | error_ask_no_quotes| assign | error_invalid_space | error_print_no_quotes | error_print_one_quote_only | error_text_no_print |error_invalid | empty_line +command: clear | error_non_decimal | print | ask | play | turtle | assign_list | add | remove | error_add_missing_to | error_remove_missing_from | error_add_missing_list | error_remove_missing_list | sleep | error_list_access | error_ask_no_quotes| assign | error_invalid_space | error_print_no_quotes | error_print_one_quote_only | error_text_no_print |error_invalid | empty_line _print_ask_argument.1: (_SPACE | list_access | error_list_access | quoted_text | var_access_print)* diff --git a/grammars/level6-Additions.lark b/grammars/level6-Additions.lark index b7380837ecd..5108c8a54e3 100644 --- a/grammars/level6-Additions.lark +++ b/grammars/level6-Additions.lark @@ -2,7 +2,7 @@ _print_ask_argument.1: (_SPACE | quoted_text | list_access | expression | print_ ?print_expression: var_access_print | error_unsupported_number | INT // redefining it entirely since it has many order-depending rules -command: clear | error_non_decimal | print | turtle | play | add | remove | error_add_missing_to | error_remove_missing_from | sleep | error_print_no_quotes | error_print_one_quote_only | if_pressed_else | error_if_pressed_missing_else | if_pressed_without_else | ifelse | ifs | error_else_no_if | ask | error_ask_no_quotes | assign | assign_list | error_invalid_space | error_text_no_print | empty_line +command: clear | error_non_decimal | print | turtle | play | add | remove | error_add_missing_to | error_remove_missing_from | error_add_missing_list | error_remove_missing_list | sleep | error_print_no_quotes | error_print_one_quote_only | if_pressed_else | error_if_pressed_missing_else | if_pressed_without_else | ifelse | ifs | error_else_no_if | ask | error_ask_no_quotes | assign | assign_list | error_invalid_space | error_text_no_print | empty_line _if_less_command: print | turtle | play | add | remove | sleep | error_print_no_quotes | error_print_one_quote_only | ask | error_ask_no_quotes | assign | assign_list ask: var (_IS | _EQUALS) _ASK _SPACE? (_print_ask_argument)? @@ -16,8 +16,8 @@ condition: >> equality_check assign_list: var (_IS | _EQUALS) (INT | textwithspaces) (_COMMA (INT | textwithspaces))+ assign: var (_IS | _EQUALS) (INT | list_access | expression | textwithoutspaces | textwithspaces) -add: _ADD_LIST (INT | text_add_remove_list) _TO_LIST var_access -remove: _REMOVE (INT | text_add_remove_list) _FROM var_access +add: _ADD_LIST (INT | text_add_remove_list) _TO_LIST _SPACE var_access +remove: _REMOVE (INT | text_add_remove_list) _FROM _SPACE var_access sleep: _SLEEP (INT | list_access | var_access | expression)? diff --git a/hedy.py b/hedy.py index 121ff774a9d..797fbe49324 100644 --- a/hedy.py +++ b/hedy.py @@ -1308,6 +1308,13 @@ def error_add_missing_to(self, meta, args): def error_remove_missing_from(self, meta, args): raise exceptions.MissingAdditionalCommand(command='remove', missing_command='from', line_number=meta.line) + def error_add_missing_list(self, meta, args): + raise exceptions.IncompleteCommandException(incomplete_command='add', level=self.level, line_number=meta.line) + + def error_remove_missing_list(self, meta, args): + raise exceptions.IncompleteCommandException(incomplete_command='remove', level=self.level, + line_number=meta.line) + def error_non_decimal(self, meta, args): raise exceptions.NonDecimalVariable(line_number=meta.line) diff --git a/hedy_content.py b/hedy_content.py index 30e1b87253e..ca01570ec80 100644 --- a/hedy_content.py +++ b/hedy_content.py @@ -30,7 +30,9 @@ CUSTOM_LANGUAGE_TRANSLATIONS = {'kmr': 'Kurdî (Tirkiye)', 'tl': 'ᜆᜄᜎᜓᜄ᜔', 'peo': 'Old Persian', - 'iba': 'Iban'} + 'iba': 'Iban', + 'kab': 'Taqbaylit', + } customize_babel_locale(CUSTOM_BABEL_LANGUAGES) diff --git a/highlighting/highlighting-trad.json b/highlighting/highlighting-trad.json index f19c553fe7f..5fb7b8d1d92 100644 --- a/highlighting/highlighting-trad.json +++ b/highlighting/highlighting-trad.json @@ -354,8 +354,8 @@ "DIGIT": "0123456789" }, "da": { - "False": "False", - "True": "True", + "False": "Falsk|False", + "True": "Sand|True", "add": "tilføj|add", "and": "og|and", "ask": "spørg|ask", @@ -363,53 +363,53 @@ "black": "sort|black", "blue": "blå|blue", "brown": "brun|brown", - "call": "call", + "call": "kald|call", "clear": "rens|clear", "color": "farve|color", "comma": ",", "def": "def", "define": "definer|define", "echo": "ekko|echo", - "elif": "elif", + "elif": "ellers hvis|elif", "else": "ellers|else", - "false": "false", + "false": "falsk|false", "for": "for", "forward": "fremad|forward", - "from": "from", + "from": "fra|from", "gray": "grå|gray", "green": "grøn|green", - "if": "if", - "in": "in", + "if": "hvis|if", + "in": "i|in", "input": "input", - "is": "is", - "left": "left", - "length": "length", - "not_in": "not in", - "or": "or", + "is": "er|is", + "left": "venstre|left", + "length": "længde|length", + "not_in": "ikke i|not in", + "or": "eller|or", "orange": "orange", "pink": "lyserød|pink", - "play": "play", - "pressed": "pressed", - "print": "print", + "play": "spil|play", + "pressed": "trykket ned|pressed", + "print": "skriv|print", "purple": "lila|purple", - "random": "random", - "range": "range", - "red": "red", - "remove": "remove", - "repeat": "repeat", - "return": "return", - "right": "right", - "sleep": "sleep", - "step": "step", - "times": "times", - "to": "to", - "to_list": "to", - "true": "true", + "random": "tilfældighed|random", + "range": "interval|range", + "red": "rød|red", + "remove": "fjern|remove", + "repeat": "gentag|repeat", + "return": "returner|return", + "right": "højre|right", + "sleep": "sov|sleep", + "step": "skridt|step", + "times": "gange|times", + "to": "til|to", + "to_list": "til|to", + "true": "sand|true", "turn": "drej|turn", - "while": "while", - "white": "white", - "with": "with", - "yellow": "yellow", + "while": "mens|while", + "white": "hvid|white", + "with": "med|with", + "yellow": "gul|yellow", "DIGIT": "0123456789" }, "de": { @@ -1592,6 +1592,65 @@ "yellow": "きいろ|yellow", "DIGIT": "0123456789" }, + "kab": { + "False": "False", + "True": "True", + "add": "rnu|add", + "and": "akked|and", + "ask": "ssuter|ask", + "at": "ar|at", + "black": "aberkan|black", + "blue": "amidadi|blue", + "brown": "aqehwi|brown", + "call": "asiwel|call", + "clear": "sfeḍ|clear", + "color": "ini|color", + "comma": ",", + "def": "def", + "define": "sbadu|define", + "echo": "yerra-d|echo", + "elif": "neɣ ma yella|elif", + "else": "neɣ|else", + "false": "false", + "for": "i|for", + "forward": "welleh|forward", + "from": "seg|from", + "gray": "gray", + "green": "azegzaw|green", + "if": "ma yella|if", + "in": "deg|in", + "input": "sekcem|input", + "is": "d|is", + "left": "ayeffus|left", + "length": "teɣzi|length", + "not_in": "mačči deg|not in", + "or": "neɣ|or", + "orange": "aččinawi|orange", + "pink": "axuxi|pink", + "play": "urar|play", + "pressed": "pressed", + "print": "siggez|print", + "purple": "purple", + "random": "random", + "range": "range", + "red": "azeggaɣ|red", + "remove": "kkes|remove", + "repeat": "ales|repeat", + "return": "uɣal ɣer deffir|return", + "right": "ayeffus|right", + "sleep": "gen|sleep", + "step": "takkayt|step", + "times": "tikkal|times", + "to": "ɣer|to", + "to_list": "ɣer|to", + "true": "true", + "turn": "zzi|turn", + "while": "imi|while", + "white": "amellal|white", + "with": "akked|with", + "yellow": "awreɣ|yellow", + "DIGIT": "0123456789" + }, "kmr": { "False": "False", "True": "True", @@ -1887,6 +1946,65 @@ "yellow": "yellow", "DIGIT": "0123456789" }, + "ne": { + "False": "False", + "True": "True", + "add": "add", + "and": "and", + "ask": "ask", + "at": "at", + "black": "black", + "blue": "blue", + "brown": "brown", + "call": "call", + "clear": "clear", + "color": "color", + "comma": ",", + "def": "def", + "define": "define", + "echo": "echo", + "elif": "elif", + "else": "else", + "false": "false", + "for": "for", + "forward": "forward", + "from": "from", + "gray": "gray", + "green": "green", + "if": "if", + "in": "in", + "input": "input", + "is": "is", + "left": "left", + "length": "length", + "not_in": "not in", + "or": "or", + "orange": "orange", + "pink": "pink", + "play": "play", + "pressed": "pressed", + "print": "print", + "purple": "purple", + "random": "random", + "range": "range", + "red": "red", + "remove": "remove", + "repeat": "repeat", + "return": "return", + "right": "right", + "sleep": "sleep", + "step": "step", + "times": "times", + "to": "to", + "to_list": "to", + "true": "true", + "turn": "turn", + "while": "while", + "white": "white", + "with": "with", + "yellow": "yellow", + "DIGIT": "0123456789" + }, "nl": { "False": "False", "True": "True", @@ -2713,6 +2831,65 @@ "yellow": "yellow", "DIGIT": "0123456789" }, + "ta": { + "False": "False", + "True": "True", + "add": "add", + "and": "and", + "ask": "ask", + "at": "at", + "black": "black", + "blue": "blue", + "brown": "brown", + "call": "call", + "clear": "clear", + "color": "color", + "comma": ",", + "def": "def", + "define": "define", + "echo": "echo", + "elif": "elif", + "else": "else", + "false": "false", + "for": "for", + "forward": "forward", + "from": "from", + "gray": "gray", + "green": "green", + "if": "if", + "in": "in", + "input": "input", + "is": "is", + "left": "left", + "length": "length", + "not_in": "not in", + "or": "or", + "orange": "orange", + "pink": "pink", + "play": "play", + "pressed": "pressed", + "print": "print", + "purple": "purple", + "random": "random", + "range": "range", + "red": "red", + "remove": "remove", + "repeat": "repeat", + "return": "return", + "right": "right", + "sleep": "sleep", + "step": "step", + "times": "times", + "to": "to", + "to_list": "to", + "true": "true", + "turn": "turn", + "while": "while", + "white": "white", + "with": "with", + "yellow": "yellow", + "DIGIT": "0123456789" + }, "te": { "False": "False", "True": "True", diff --git a/messages.pot b/messages.pot index 69952278e0c..a6a684b889f 100644 --- a/messages.pot +++ b/messages.pot @@ -149,12 +149,6 @@ msgstr "" msgid "account_overview" msgstr "" -msgid "accounts_created" -msgstr "" - -msgid "accounts_intro" -msgstr "" - msgid "actions" msgstr "" @@ -254,6 +248,9 @@ msgstr "" msgid "all_class_highscores" msgstr "" +msgid "all_rows_missing_separator" +msgstr "" + msgid "already_account" msgstr "" @@ -269,6 +266,9 @@ msgstr "" msgid "available_in" msgstr "" +msgid "back_to_class" +msgstr "" + msgid "become_a_sponsor" msgstr "" @@ -395,6 +395,9 @@ msgstr "" msgid "contributor" msgstr "" +msgid "copy_accounts_to_clipboard" +msgstr "" + msgid "copy_clipboard" msgstr "" @@ -428,6 +431,9 @@ msgstr "" msgid "create_accounts" msgstr "" +msgid "create_accounts_placeholder" +msgstr "" + msgid "create_accounts_prompt" msgstr "" @@ -437,21 +443,33 @@ msgstr "" msgid "create_class" msgstr "" -msgid "create_multiple_accounts" -msgstr "" - msgid "create_student_account" msgstr "" msgid "create_student_account_explanation" msgstr "" +msgid "create_student_accounts" +msgstr "" + msgid "create_teacher_account" msgstr "" msgid "create_teacher_account_explanation" msgstr "" +msgid "create_usernames_and_passwords_desc" +msgstr "" + +msgid "create_usernames_and_passwords_title" +msgstr "" + +msgid "create_usernames_desc" +msgstr "" + +msgid "create_usernames_title" +msgstr "" + msgid "creator" msgstr "" @@ -554,9 +572,6 @@ msgstr "" msgid "download" msgstr "" -msgid "download_login_credentials" -msgstr "" - msgid "duplicate" msgstr "" @@ -689,9 +704,6 @@ msgstr "" msgid "general_settings" msgstr "" -msgid "generate_passwords" -msgstr "" - msgid "get_certificate" msgstr "" @@ -1034,6 +1046,9 @@ msgstr "" msgid "newline" msgstr "" +msgid "next_adventure" +msgstr "" + msgid "next_exercise" msgstr "" @@ -1043,6 +1058,9 @@ msgstr "" msgid "next_step_tutorial" msgstr "" +msgid "next_student" +msgstr "" + msgid "no" msgstr "" @@ -1196,6 +1214,9 @@ msgstr "" msgid "passwords_six" msgstr "" +msgid "passwords_too_short" +msgstr "" + msgid "pending_invites" msgstr "" @@ -1217,9 +1238,6 @@ msgstr "" msgid "phone_number" msgstr "" -msgid "postfix_classname" -msgstr "" - msgid "preferred_keyword_language" msgstr "" @@ -1244,6 +1262,9 @@ msgstr "" msgid "previous_page" msgstr "" +msgid "print_accounts" +msgstr "" + msgid "print_logo" msgstr "" @@ -1286,6 +1307,9 @@ msgstr "" msgid "prompt_join_class" msgstr "" +msgid "provided_username_duplicates" +msgstr "" + msgid "public" msgstr "" @@ -1400,9 +1424,6 @@ msgstr "" msgid "reset_password" msgstr "" -msgid "reset_view" -msgstr "" - msgid "restart" msgstr "" @@ -1529,6 +1550,9 @@ msgstr "" msgid "solution_example_explanation" msgstr "" +msgid "some_rows_missing_separator" +msgstr "" + msgid "something_went_wrong_keyword_parsing" msgstr "" @@ -1565,6 +1589,9 @@ msgstr "" msgid "student" msgstr "" +msgid "student_accounts_created" +msgstr "" + msgid "student_adventures_table" msgstr "" @@ -1745,6 +1772,9 @@ msgstr "" msgid "token_invalid" msgstr "" +msgid "too_many_accounts" +msgstr "" + msgid "tooltip_level_locked" msgstr "" @@ -1781,9 +1811,6 @@ msgstr "" msgid "unfavourite_success" msgstr "" -msgid "unique_usernames" -msgstr "" - msgid "unknown_variable_role" msgstr "" @@ -1811,6 +1838,12 @@ msgstr "" msgid "updating_indicator" msgstr "" +msgid "use_custom_passwords" +msgstr "" + +msgid "use_generated_passwords" +msgstr "" + msgid "use_of_blanks_exception" msgstr "" @@ -1832,6 +1865,12 @@ msgstr "" msgid "username" msgstr "" +msgid "username_contains_invalid_symbol" +msgstr "" + +msgid "username_contains_separator" +msgstr "" + msgid "username_empty" msgstr "" @@ -1844,7 +1883,10 @@ msgstr "" msgid "username_three" msgstr "" -msgid "usernames_exist" +msgid "usernames_too_short" +msgstr "" + +msgid "usernames_unavailable" msgstr "" msgid "value" diff --git a/prefixes/turtle.py b/prefixes/turtle.py index 14d90316537..dcca7e6a930 100644 --- a/prefixes/turtle.py +++ b/prefixes/turtle.py @@ -10,5 +10,5 @@ t.penup() t.left(90) t.pendown() -t.speed(3) +t.speed(10) t.showturtle() diff --git a/requirements.txt b/requirements.txt index a1ba2d68eb6..2d900fa785d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ Flask==3.0.2 -Werkzeug==3.0.3 +Werkzeug==3.0.6 lark==1.1.1 gunicorn==22.0.0 flask-compress==1.4.0 diff --git a/static/css/additional.css b/static/css/additional.css index d17aa301c7b..4098b086e29 100644 --- a/static/css/additional.css +++ b/static/css/additional.css @@ -301,4 +301,35 @@ kbd { pre { text-align: start; } -} \ No newline at end of file +} + + +#loading_spinner { + border: 16px solid #f7f7f7; + border-top: 16px solid #2977ff; + border-radius: 50%; + width: 120px; + height: 120px; + z-index: 101; + animation: spin 2s linear infinite; + position: fixed; + top: calc(50% - 60px); + left: calc(50% - 60px); +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +#loading_mask { + display: block; + position: absolute; + top: 0; + left: 0; + z-index: 100; + width: 100vw; + height: 100vh; + background-color: rgba(192, 192, 192, 0.5); +} + diff --git a/static/js/appbundle.js b/static/js/appbundle.js index 36ab67b85e7..6637d0eb3e8 100644 --- a/static/js/appbundle.js +++ b/static/js/appbundle.js @@ -8915,10 +8915,10 @@ Read more: ${P}#error-${t4}`; } const te3 = Xt; var ee2 = "[object String]"; - function ne(t4) { + function ne2(t4) { return typeof t4 == "string" || !Jt2(t4) && te3(t4) && Qt2(t4) == ee2; } - const oe = ne; + const oe = ne2; function ie4(t4, e3, n3 = {}, o3 = []) { const i3 = n3 && n3.xmlns; const r3 = i3 ? t4.createElementNS(i3, e3) : t4.createElement(e3); @@ -9682,8 +9682,8 @@ Read more: ${P}#error-${t4}`; } const Js2 = Zs; var Xs2 = Ei2 && Ei2.isMap; - var ta = Xs2 ? Ai2(Xs2) : Js2; - const ea = ta; + var ta2 = Xs2 ? Ai2(Xs2) : Js2; + const ea = ta2; var na2 = "[object Set]"; function oa2(t4) { return te3(t4) && is18(t4) == na2; @@ -60571,7 +60571,6 @@ ${o3}` : i3; addCurlyBracesToCode: () => addCurlyBracesToCode, addCurlyBracesToKeyword: () => addCurlyBracesToKeyword, add_account_placeholder: () => add_account_placeholder, - append_classname: () => append_classname, autoSave: () => autoSave, changeUserEmail: () => changeUserEmail, change_language: () => change_language, @@ -60580,9 +60579,10 @@ ${o3}` : i3; comeBackHereAfterLogin: () => comeBackHereAfterLogin, confetti_cannon: () => confetti_cannon, convert: () => convert2, + copyAccountsToClipboard: () => copyAccountsToClipboard, copy_join_link: () => copy_join_link, copy_to_clipboard: () => copy_to_clipboard, - create_accounts: () => create_accounts, + createAccounts: () => createAccounts, create_class: () => create_class, delete_adventure: () => delete_adventure, delete_class: () => delete_class, @@ -60595,7 +60595,7 @@ ${o3}` : i3; emptyEditor: () => emptyEditor, enable_level: () => enable_level, error: () => error, - generate_passwords: () => generate_passwords, + filter_admin: () => filter_admin, getCurrentAdv: () => getCurrentAdv, getEditorContents: () => getEditorContents, getForTeacherTable: () => getForTeacherTable, @@ -60608,9 +60608,11 @@ ${o3}` : i3; incrementDebugLine: () => incrementDebugLine, initialize: () => initialize, initializeActivity: () => initializeActivity, + initializeAdminUserPage: () => initializeAdminUserPage, initializeApp: () => initializeApp, initializeClassOverviewPage: () => initializeClassOverviewPage, initializeCodePage: () => initializeCodePage, + initializeCreateAccountsPage: () => initializeCreateAccountsPage, initializeCustomAdventurePage: () => initializeCustomAdventurePage, initializeCustomizeClassPage: () => initializeCustomizeClassPage, initializeDebugger: () => initializeDebugger, @@ -60632,6 +60634,7 @@ ${o3}` : i3; modal: () => modal, modalStepOne: () => modalStepOne, preview_adventure: () => preview_adventure, + printAccounts: () => printAccounts, remove_student: () => remove_student, remove_student_invite: () => remove_student_invite, rename_class: () => rename_class, @@ -60670,6 +60673,7 @@ ${o3}` : i3; theLevel: () => theLevel, theLocalSaveWarning: () => theLocalSaveWarning, theModalEditor: () => theModalEditor, + toggleAutoGeneratePasswords: () => toggleAutoGeneratePasswords, toggleDropdown: () => toggleDropdown, toggleVariableView: () => toggleVariableView, toggle_blur_code: () => toggle_blur_code, @@ -60929,19 +60933,19 @@ ${o3}` : i3; "unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?" }, "da": { - "CheckInternet": "Check whether your Internet connection is working.", - "Connection_error": "We couldn't reach the server.", - "Empty_output": "This code works but does not print anything. Add a print command to your code or use the turtle to get output.", - "Errors_found": "You made a mistake! Don't worry, Hedy is trying to find the mistakes", - "Execute_error": "Something went wrong while running the program.", - "Other_error": "Oops! Maybe we made a little mistake.", - "Program_repair": "This could be the correct code, can you fix it?", - "Program_too_long": "Your program takes too long to run.", - "ServerError": "You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at hello@hedy.org. In the meantime, try something a little different and take another look at the examples. Thanks!", - "Transpile_error": "We can't run your program.", - "Transpile_success": "Good job!\nAmazing!\nWell done!\nExcellent!\nYou did great!", - "Transpile_warning": "Warning!", - "Unsaved_Changes": "You have an unsaved program. Do you want to leave without saving it?", + "CheckInternet": "Tjek om du er forbundet til internettet.", + "Connection_error": "Vi kunne ikke n\xE5 serveren.", + "Empty_output": "Denne kode fungerer, men udskriver ikke noget. Tilf\xF8j en udskriftskommando til din kode eller brug skildpadden til at f\xE5 et output.", + "Errors_found": "Du lavede en fejl! Bare rolig, vi k\xF8rte stadig programmet", + "Execute_error": "Noget gik galt da programmet k\xF8rte.", + "Other_error": "Ups! Vi har m\xE5ske lavet en lille fejl.", + "Program_repair": "Dette kunne v\xE6re den korrekte kode; kan du l\xF8se det?", + "Program_too_long": "Dit program tager for lang tid at k\xF8re.", + "ServerError": "Du skrev et program, vi ikke havde forventet. Hvis du \xF8nsker at hj\xE6lpe, sende os en e-mail med niveauet og dit program p\xE5 hello@hedy.org. I mellemtiden, pr\xF8v at test et lidt anderledes program og tage et ekstra kig p\xE5 eksemplerne. Tak!", + "Transpile_error": "Vi kan ikke k\xF8re dit program.", + "Transpile_success": "Godt arbejde!\nFantastisk!\nGodt klaret!\nFremragende!\nFlot gjort!", + "Transpile_warning": "Advarsel!", + "Unsaved_Changes": "Dit program er ikke gemt. Vil du afslutte uden at gemme det?", "adventures_completed": "Adventures completed: {number_of_adventures}", "adventures_restored": "The default adventures have been restored!", "adventures_tried": "Adventures tried", @@ -61768,6 +61772,46 @@ ${o3}` : i3; "turtle": "\u{1F422}", "unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?" }, + "kab": { + "CheckInternet": "Senqed tuqqna-k \u0263er Internet tetteddu akken iwata.", + "Connection_error": "Ur nessawe\u1E0D ara \u0263er uqeddac.", + "Empty_output": "This code works but does not print anything. Add a print command to your code or use the turtle to get output.", + "Errors_found": "Tgi\u1E0D tucc\u1E0Da ! Ur ttagad, nselkem ahil", + "Execute_error": "Yella wayen ur neddi ara akken ilaq lawan n uselkem n wahil.", + "Other_error": "Ihuh! Waqil nga tucc\u1E0Da tamec\u1E6Du\u1E25t.", + "Program_repair": "Yezmer wagi d tangalt tame\u0263tut, tzemre\u1E0D ad t-t\u1E63eggme\u1E0D ?", + "Program_too_long": "Ahil-ik yetta\u1E6D\u1E6Daf a\u1E6Das n wakud i wakken ad yekker.", + "ServerError": "You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at hello@hedy.org. In the meantime, try something a little different and take another look at the examples. Thanks!", + "Transpile_error": "Ur nezmir ara ad nseddu ahil-ik.", + "Transpile_success": "Igerrez!\nGedha!\nYelha!\nIzad!\nD amahil izaden!", + "Transpile_warning": "\u0194ur-k!", + "Unsaved_Changes": "Ahil-a ur yettwasekles ara. Teb\u0263i\u1E0D ad teff\u0263e\u1E0D war ma teskelse\u1E0D-t?", + "adventures_completed": "Adventures completed: {number_of_adventures}", + "adventures_restored": "The default adventures have been restored.", + "adventures_tried": "Adventures tried", + "copy_link_to_share": "Copy link to share", + "customization_deleted": "Customizations successfully deleted.", + "dice": "\u{1F3B2}", + "directly_available": "Directly open", + "disabled": "Disabled", + "errors": "Errors", + "fortune": "\u{1F52E}, \u2728", + "graph_title": "Errors per adventure completed on level {level}", + "haunted": "\u{1F987}, \u{1F47B}, \u{1F383}", + "level_title": "Level", + "multiple_keywords_warning": "You are trying to use the keyword {orig_keyword}, but this keyword might have several meanings. Please choose the one you're trying to use from this list and copy paste it in your code, curly braces included: {keyword_list}", + "number_of_errors": "Number of errors: {number_of_errors}", + "one_level_error": "You need to select at least one level.", + "restaurant": "\u{1F363}, \u{1F355}, \u{1F354}", + "rock": "\u2702\uFE0F, \u{1F4DC}, \u{1F5FB}", + "select_all": "Select all", + "selected": "Selected", + "songs": "\u{1F3B5},\u{1F3B6}", + "successful_runs": "Successful runs: {successful_runs}", + "teacher_welcome": "Welcome to Hedy! Your are now the proud owner of a teachers account which allows you to create classes and invite students.", + "turtle": "\u{1F422}", + "unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?" + }, "kmr": { "CheckInternet": "Check whether your Internet connection is working.", "Connection_error": "We couldn't reach the server.", @@ -61928,6 +61972,46 @@ ${o3}` : i3; "turtle": "\u{1F422}", "unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?" }, + "ne": { + "CheckInternet": "Check whether your Internet connection is working.", + "Connection_error": "We couldn't reach the server.", + "Empty_output": "This code works but does not print anything. Add a print command to your code or use the turtle to get output.", + "Errors_found": "You made a mistake! Don't worry, we still ran the program", + "Execute_error": "Something went wrong while running the program.", + "Other_error": "Oops! Maybe we made a little mistake.", + "Program_repair": "This could be the correct code, can you fix it?", + "Program_too_long": "Your program takes too long to run.", + "ServerError": "You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at hello@hedy.org. In the meantime, try something a little different and take another look at the examples. Thanks!", + "Transpile_error": "We can't run your program.", + "Transpile_success": "Good job!\nAmazing!\nWell done!\nExcellent!\nYou did great!", + "Transpile_warning": "Warning!", + "Unsaved_Changes": "You have an unsaved program. Do you want to leave without saving it?", + "adventures_completed": "Adventures completed: {number_of_adventures}", + "adventures_restored": "The default adventures have been restored.", + "adventures_tried": "Adventures tried", + "copy_link_to_share": "Copy link to share", + "customization_deleted": "Customizations successfully deleted.", + "dice": "\u{1F3B2}", + "directly_available": "Directly open", + "disabled": "Disabled", + "errors": "Errors", + "fortune": "\u{1F52E}, \u2728", + "graph_title": "Errors per adventure completed on level {level}", + "haunted": "\u{1F987}, \u{1F47B}, \u{1F383}", + "level_title": "Level", + "multiple_keywords_warning": "You are trying to use the keyword {orig_keyword}, but this keyword might have several meanings. Please choose the one you're trying to use from this list and copy paste it in your code, curly braces included: {keyword_list}", + "number_of_errors": "Number of errors: {number_of_errors}", + "one_level_error": "You need to select at least one level.", + "restaurant": "\u{1F363}, \u{1F355}, \u{1F354}", + "rock": "\u2702\uFE0F, \u{1F4DC}, \u{1F5FB}", + "select_all": "Select all", + "selected": "Selected", + "songs": "\u{1F3B5},\u{1F3B6}", + "successful_runs": "Successful runs: {successful_runs}", + "teacher_welcome": "Welcome to Hedy! Your are now the proud owner of a teachers account which allows you to create classes and invite students.", + "turtle": "\u{1F422}", + "unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?" + }, "nl": { "CheckInternet": "Controleer of jouw internetverbinding wel goed werkt.", "Connection_error": "We konden niet goed met de server praten.", @@ -62528,6 +62612,46 @@ ${o3}` : i3; "turtle": "\u{1F422}", "unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?" }, + "ta": { + "CheckInternet": "\u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B87\u0BA3\u0BC8\u0BAF \u0B87\u0BA3\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1 \u0B9A\u0BC6\u0BAF\u0BB2\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BBE \u0B8E\u0BA9 \u0B9A\u0BB0\u0BBF\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD.", + "Connection_error": "\u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BBE\u0BB2\u0BCD \u0B9A\u0BC7\u0BB5\u0BC8\u0BAF\u0B95\u0BA4\u0BCD\u0BA4\u0BC8 \u0B85\u0B9F\u0BC8\u0BAF \u0BAE\u0BC1\u0B9F\u0BBF\u0BAF\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8.", + "Empty_output": "This code works but does not print anything. Add a print command to your code or use the turtle to get output.", + "Errors_found": "\u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0BA8\u0BBF\u0BB0\u0BB2\u0BBF\u0BB2\u0BCD \u0BAA\u0BBF\u0BB4\u0BC8\u0B95\u0BB3\u0BCD \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95\u0BBF\u0BA9\u0BCD\u0BB1\u0BA9! \u0B8E\u0BA9\u0BBF\u0BA9\u0BC1\u0BAE\u0BCD \u0B95\u0BB5\u0BB2\u0BC8\u0BAF\u0BC1\u0BB1 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BBE\u0BAE\u0BCD. \u0B87\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BBF\u0BA9\u0BC1\u0BAE\u0BCD \u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0BA8\u0BBF\u0BB0\u0BB2\u0BC8 \u0B87\u0BAF\u0B95\u0BCD\u0B95 \u0BAE\u0BC1\u0B9F\u0BBF\u0BA8\u0BCD\u0BA4\u0BA4\u0BC1", + "Execute_error": "Something went wrong while running the program.", + "Other_error": "Oops! Maybe we made a little mistake.", + "Program_repair": "This could be the correct code, can you fix it?", + "Program_too_long": "Your program takes too long to run.", + "ServerError": "You wrote a program we weren't expecting. If you want to help, send us an email with the level and your program at hello@hedy.org. In the meantime, try something a little different and take another look at the examples. Thanks!", + "Transpile_error": "We can't run your program.", + "Transpile_success": "Good job!\nAmazing!\nWell done!\nExcellent!\nYou did great!", + "Transpile_warning": "Warning!", + "Unsaved_Changes": "You have an unsaved program. Do you want to leave without saving it?", + "adventures_completed": "Adventures completed: {number_of_adventures}", + "adventures_restored": "The default adventures have been restored.", + "adventures_tried": "Adventures tried", + "copy_link_to_share": "Copy link to share", + "customization_deleted": "Customizations successfully deleted.", + "dice": "\u{1F3B2}", + "directly_available": "Directly open", + "disabled": "Disabled", + "errors": "Errors", + "fortune": "\u{1F52E}, \u2728", + "graph_title": "Errors per adventure completed on level {level}", + "haunted": "\u{1F987}, \u{1F47B}, \u{1F383}", + "level_title": "Level", + "multiple_keywords_warning": "You are trying to use the keyword {orig_keyword}, but this keyword might have several meanings. Please choose the one you're trying to use from this list and copy paste it in your code, curly braces included: {keyword_list}", + "number_of_errors": "Number of errors: {number_of_errors}", + "one_level_error": "You need to select at least one level.", + "restaurant": "\u{1F363}, \u{1F355}, \u{1F354}", + "rock": "\u2702\uFE0F, \u{1F4DC}, \u{1F5FB}", + "select_all": "Select all", + "selected": "Selected", + "songs": "\u{1F3B5},\u{1F3B6}", + "successful_runs": "Successful runs: {successful_runs}", + "teacher_welcome": "Welcome to Hedy! Your are now the proud owner of a teachers account which allows you to create classes and invite students.", + "turtle": "\u{1F422}", + "unsaved_class_changes": "There are unsaved changes, are you sure you want to leave this page?" + }, "te": { "CheckInternet": "Check whether your Internet connection is working.", "Connection_error": "We couldn't reach the server.", @@ -78096,7 +78220,7 @@ t.hideturtle() t.penup() t.left(90) t.pendown() -t.speed(3) +t.speed(10) t.showturtle() `; var pressed_prefix = `# coding=utf8 @@ -97053,8 +97177,8 @@ def note_with_error(value, err): DIGIT: "0123456789" }; var da = { - False: "False", - True: "True", + False: "Falsk|False", + True: "Sand|True", add: "tilf\xF8j|add", and: "og|and", ask: "sp\xF8rg|ask", @@ -97062,53 +97186,53 @@ def note_with_error(value, err): black: "sort|black", blue: "bl\xE5|blue", brown: "brun|brown", - call: "call", + call: "kald|call", clear: "rens|clear", color: "farve|color", comma: ",", def: "def", define: "definer|define", echo: "ekko|echo", - elif: "elif", + elif: "ellers hvis|elif", else: "ellers|else", - false: "false", + false: "falsk|false", for: "for", forward: "fremad|forward", - from: "from", + from: "fra|from", gray: "gr\xE5|gray", green: "gr\xF8n|green", - if: "if", - in: "in", + if: "hvis|if", + in: "i|in", input: "input", - is: "is", - left: "left", - length: "length", - not_in: "not in", - or: "or", + is: "er|is", + left: "venstre|left", + length: "l\xE6ngde|length", + not_in: "ikke i|not in", + or: "eller|or", orange: "orange", pink: "lyser\xF8d|pink", - play: "play", - pressed: "pressed", - print: "print", + play: "spil|play", + pressed: "trykket ned|pressed", + print: "skriv|print", purple: "lila|purple", - random: "random", - range: "range", - red: "red", - remove: "remove", - repeat: "repeat", - return: "return", - right: "right", - sleep: "sleep", - step: "step", - times: "times", - to: "to", - to_list: "to", - true: "true", + random: "tilf\xE6ldighed|random", + range: "interval|range", + red: "r\xF8d|red", + remove: "fjern|remove", + repeat: "gentag|repeat", + return: "returner|return", + right: "h\xF8jre|right", + sleep: "sov|sleep", + step: "skridt|step", + times: "gange|times", + to: "til|to", + to_list: "til|to", + true: "sand|true", turn: "drej|turn", - while: "while", - white: "white", - with: "with", - yellow: "yellow", + while: "mens|while", + white: "hvid|white", + with: "med|with", + yellow: "gul|yellow", DIGIT: "0123456789" }; var de = { @@ -98291,6 +98415,65 @@ def note_with_error(value, err): yellow: "\u304D\u3044\u308D|yellow", DIGIT: "0123456789" }; + var kab = { + False: "False", + True: "True", + add: "rnu|add", + and: "akked|and", + ask: "ssuter|ask", + at: "ar|at", + black: "aberkan|black", + blue: "amidadi|blue", + brown: "aqehwi|brown", + call: "asiwel|call", + clear: "sfe\u1E0D|clear", + color: "ini|color", + comma: ",", + def: "def", + define: "sbadu|define", + echo: "yerra-d|echo", + elif: "ne\u0263 ma yella|elif", + else: "ne\u0263|else", + false: "false", + for: "i|for", + forward: "welleh|forward", + from: "seg|from", + gray: "gray", + green: "azegzaw|green", + if: "ma yella|if", + in: "deg|in", + input: "sekcem|input", + is: "d|is", + left: "ayeffus|left", + length: "te\u0263zi|length", + not_in: "ma\u010D\u010Di deg|not in", + or: "ne\u0263|or", + orange: "a\u010D\u010Dinawi|orange", + pink: "axuxi|pink", + play: "urar|play", + pressed: "pressed", + print: "siggez|print", + purple: "purple", + random: "random", + range: "range", + red: "azegga\u0263|red", + remove: "kkes|remove", + repeat: "ales|repeat", + return: "u\u0263al \u0263er deffir|return", + right: "ayeffus|right", + sleep: "gen|sleep", + step: "takkayt|step", + times: "tikkal|times", + to: "\u0263er|to", + to_list: "\u0263er|to", + true: "true", + turn: "zzi|turn", + while: "imi|while", + white: "amellal|white", + with: "akked|with", + yellow: "awre\u0263|yellow", + DIGIT: "0123456789" + }; var kmr = { False: "False", True: "True", @@ -98586,6 +98769,65 @@ def note_with_error(value, err): yellow: "yellow", DIGIT: "0123456789" }; + var ne = { + False: "False", + True: "True", + add: "add", + and: "and", + ask: "ask", + at: "at", + black: "black", + blue: "blue", + brown: "brown", + call: "call", + clear: "clear", + color: "color", + comma: ",", + def: "def", + define: "define", + echo: "echo", + elif: "elif", + else: "else", + false: "false", + for: "for", + forward: "forward", + from: "from", + gray: "gray", + green: "green", + if: "if", + in: "in", + input: "input", + is: "is", + left: "left", + length: "length", + not_in: "not in", + or: "or", + orange: "orange", + pink: "pink", + play: "play", + pressed: "pressed", + print: "print", + purple: "purple", + random: "random", + range: "range", + red: "red", + remove: "remove", + repeat: "repeat", + return: "return", + right: "right", + sleep: "sleep", + step: "step", + times: "times", + to: "to", + to_list: "to", + true: "true", + turn: "turn", + while: "while", + white: "white", + with: "with", + yellow: "yellow", + DIGIT: "0123456789" + }; var nl = { False: "False", True: "True", @@ -99412,6 +99654,65 @@ def note_with_error(value, err): yellow: "yellow", DIGIT: "0123456789" }; + var ta = { + False: "False", + True: "True", + add: "add", + and: "and", + ask: "ask", + at: "at", + black: "black", + blue: "blue", + brown: "brown", + call: "call", + clear: "clear", + color: "color", + comma: ",", + def: "def", + define: "define", + echo: "echo", + elif: "elif", + else: "else", + false: "false", + for: "for", + forward: "forward", + from: "from", + gray: "gray", + green: "green", + if: "if", + in: "in", + input: "input", + is: "is", + left: "left", + length: "length", + not_in: "not in", + or: "or", + orange: "orange", + pink: "pink", + play: "play", + pressed: "pressed", + print: "print", + purple: "purple", + random: "random", + range: "range", + red: "red", + remove: "remove", + repeat: "repeat", + return: "return", + right: "right", + sleep: "sleep", + step: "step", + times: "times", + to: "to", + to_list: "to", + true: "true", + turn: "turn", + while: "while", + white: "white", + with: "with", + yellow: "yellow", + DIGIT: "0123456789" + }; var te = { False: "False", True: "True", @@ -100089,11 +100390,13 @@ def note_with_error(value, err): id, it, ja, + kab, kmr, ko, mi, ms, nb_NO, + ne, nl, pa_PK, pap, @@ -100108,6 +100411,7 @@ def note_with_error(value, err): sr, sv, sw, + ta, te, th, tl, @@ -118793,6 +119097,15 @@ def note_with_error(value, err): scales ]; + // static/js/loading.ts + function setLoadingVisibility(visible) { + if (visible) { + $("#loading_mask").removeClass("invisible"); + } else { + $("#loading_mask").addClass("invisible"); + } + } + // static/js/teachers.ts var editorCreator = new HedyCodeMirrorEditorCreator(); function create_class(class_name_prompt) { @@ -119260,92 +119573,115 @@ def note_with_error(value, err): newRow.appendTo("#account_rows_container"); } } - function generate_passwords() { - if (!$("#passwords_toggle").is(":checked")) { - $(".passwords_input").val(""); - $(".passwords_input").prop("disabled", false); - return; - } - $(".account_row").each(function() { - if ($(this).is(":visible")) { - $(this).find(":input").each(function() { - if ($(this).attr("id") == "password") { - const random_password = generateRandomString(6); - $(this).val(random_password); - } - }); - } - }); - $(".passwords_input").prop("disabled", true); - } - function append_classname() { - const classname = $("#classes").val(); - $(".usernames_input").each(function() { - $(this).val($(this).val() + "_" + classname); - }); - } - function create_accounts(prompt) { - modal.confirm(prompt, function() { - $("#account_rows_container").find(":input").each(function() { - $(this).removeClass("border-2 border-red-500"); - $(this).removeAttr("required"); - }); - let accounts = []; - $(".account_row").each(function() { - if ($(this).is(":visible")) { - let account = {}; - $(this).find(":input").each(function() { - account[$(this).attr("name")] = $(this).val(); - }); - if (account["password"].length !== 0 || account["username"].length !== 0) { - accounts.push(account); - } - } - }); + function toggleAutoGeneratePasswords() { + if ($("#passwords_toggle").is(":checked")) { + $("#passwords_toggle_checked_text").show(); + $("#passwords_toggle_unchecked_text").hide(); + $("#usernames_title").show(); + $("#passwords_title").hide(); + $("#usernames_desc").show(); + $("#passwords_desc").hide(); + } else { + $("#passwords_toggle_checked_text").hide(); + $("#passwords_toggle_unchecked_text").show(); + $("#usernames_title").hide(); + $("#passwords_title").show(); + $("#usernames_desc").hide(); + $("#passwords_desc").show(); + } + } + function printAccounts() { + var table = document.getElementById("accounts_table"); + let newWindow = window.open(""); + const css2 = ` + `; + newWindow.document.write((table == null ? void 0 : table.outerHTML) + css2); + newWindow.print(); + newWindow.close(); + } + function copyAccountsToClipboard(prompt) { + const selection2 = window.getSelection(); + const table = document.getElementById("accounts_table"); + if (selection2 && table) { + var range10 = document.createRange(); + selection2.empty(); + range10.selectNode(table); + selection2.addRange(range10); + document.execCommand("copy"); + selection2.empty(); + modal.notifySuccess(prompt); + } + } + function createAccounts(prompt) { + const accounts = $("#accounts_input").val(); + const numberOfAccounts = accounts.split("\n").filter((l) => l.trim()).length; + const updatedPrompt = prompt.replace("{number_of_accounts}", numberOfAccounts.toString()); + modal.confirm(updatedPrompt, function() { + const className = $("#classes").val(); + const generatePasswords = $("#passwords_toggle").is(":checked"); + setLoadingVisibility(true); $.ajax({ type: "POST", url: "/for-teachers/create-accounts", data: JSON.stringify({ + class: className, + generate_passwords: generatePasswords, accounts }), - contentType: "application/json", - dataType: "json" + contentType: "application/json" }).done(function(response) { - if (response.error) { - modal.notifyError(response.error); - $("#account_rows_container").find(":input").each(function() { - if ($(this).val() == response.value) { - $(this).addClass("border-2 border-red-500"); - } - }); - return; - } else { - modal.notifySuccess(response.success); - if ($("input[name='download_credentials_checkbox']:checked").val() == "yes") { - download_login_credentials(accounts); + setLoadingVisibility(false); + $("#accounts_form").hide(); + $("#create_accounts_title").hide(); + $("#accounts_results").show(); + $("#accounts_results_title").show(); + $("tr:has(td)").remove(); + const accountsHtml = createHtmlForAccountsTable(response["accounts"]); + $("#accounts_table").append(accountsHtml); + }).fail(function(err) { + setLoadingVisibility(false); + try { + const parsed = JSON.parse(err.responseText); + if (parsed.error) { + modal.notifyError(parsed.error, 0); + return; } - $("#account_rows_container").find(":input").each(function() { - $(this).val(""); - }); + } catch (e) { } - }).fail(function(err) { modal.notifyError(err.responseText); }); }); } - function download_login_credentials(accounts) { - let csvContent = "data:text/csv;charset=utf-8,"; - csvContent += "Username, Password\r\n"; - accounts.forEach(function(account) { - let row = account.username + "," + account.password; - csvContent += row + "\r\n"; - }); - var encodedUri = encodeURI(csvContent); - var link = document.createElement("a"); - link.setAttribute("href", encodedUri); - link.setAttribute("download", "accounts.csv"); - document.body.appendChild(link); - link.click(); + function createHtmlForAccountsTable(accounts) { + let result = ""; + for (let [index3, account] of accounts.entries()) { + result += ` + + ${account["username"]} + ${account["password"]} + `; + } + return result; + } + function onCreateAccountsPaste() { + const accountsInput = $("#accounts_input").val(); + const newAccounts = accountsInput.replace(/\t/g, ";"); + $("#accounts_input").val(newAccounts); } function copy_join_link(link, success2) { var sampleTextarea = document.createElement("textarea"); @@ -119356,14 +119692,6 @@ def note_with_error(value, err): document.body.removeChild(sampleTextarea); modal.notifySuccess(success2); } - function generateRandomString(length) { - var text = ""; - var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - for (var i = 0; i < length; i++) { - text += possible.charAt(Math.floor(Math.random() * possible.length)); - } - return text; - } function initializeTeacherPage(options) { if (options.welcome_teacher) { modal.notifySuccess(ClientMessages.teacher_welcome, 3e4); @@ -119390,6 +119718,12 @@ def note_with_error(value, err): } } } + function initializeCreateAccountsPage(_options) { + const accountsInput = document.getElementById("accounts_input"); + accountsInput == null ? void 0 : accountsInput.addEventListener("paste", function() { + window.setTimeout(onCreateAccountsPaste, 100); + }); + } function initializeCustomizeClassPage(options) { $(document).ready(function() { $("#back_to_class").on("click", () => { @@ -121924,6 +122258,32 @@ def note_with_error(value, err): $("#filterform").submit(); }); } + function filter_admin() { + const params = {}; + const filter = $("#admin_filter_category").val(); + params["filter"] = filter; + if ($("#hidden_page_input").val()) { + params["page"] = $("#hidden_page_input").val(); + } + switch (filter) { + case "email": + case "username": + params["substring"] = $("#email_filter_input").val(); + break; + case "language": + params["language"] = $("#language_filter_input").val(); + break; + case "keyword_language": + params["keyword_language"] = $("#keyword_language_filter_input").val(); + break; + default: + params["start"] = $("#admin_start_date").val(); + params["end"] = $("#admin_end_date").val(); + break; + } + const queryString = Object.entries(params).map(([k, v]) => k + "=" + encodeURIComponent(v)).join("&"); + window.open("?" + queryString, "_self"); + } // static/js/profile.ts function initializeMyProfilePage(_options) { @@ -121955,6 +122315,9 @@ def note_with_error(value, err): case "for-teachers": initializeTeacherPage(options.javascriptPageOptions); break; + case "create-accounts": + initializeCreateAccountsPage(options.javascriptPageOptions); + break; case "class-overview": initializeClassOverviewPage(options.javascriptPageOptions); break; @@ -122899,9 +123262,9 @@ def note_with_error(value, err): if (O) for (var qi = m ? 3 : 1, mn = function(Ht) { var ri = T.find(function(Qi) { - var ne = I.get(Qi); - if (ne) - return ne.slice(0, Ht).every(function(gn) { + var ne2 = I.get(Qi); + if (ne2) + return ne2.slice(0, Ht).every(function(gn) { return gn; }); }); @@ -123031,7 +123394,7 @@ def note_with_error(value, err): var P, tt = T === "y" ? Q : J, et2 = T === "y" ? dt : ut, U = T === "y" ? "height" : "width", bt = k[T], Gi = bt + v[tt], se = bt - v[et2], qi = g ? -O[U] / 2 : 0, mn = w === Te ? I[U] : O[U], oi = w === Te ? -O[U] : -I[U], Zi = t2.elements.arrow, ye = g && Zi ? er(Zi) : { width: 0, height: 0 - }, Ht = t2.modifiersData["arrow#persistent"] ? t2.modifiersData["arrow#persistent"].padding : Tc(), ri = Ht[tt], Qi = Ht[et2], ne = Si(0, I[U], ye[U]), gn = E ? I[U] / 2 - qi - ne - ri - L.mainAxis : mn - ne - ri - L.mainAxis, Lh = E ? -I[U] / 2 + qi + ne + Qi + L.mainAxis : oi + ne + Qi + L.mainAxis, bn2 = t2.elements.arrow && Vi(t2.elements.arrow), Nh = bn2 ? T === "y" ? bn2.clientTop || 0 : bn2.clientLeft || 0 : 0, br = (P = S == null ? void 0 : S[T]) != null ? P : 0, Mh = bt + gn - br - Nh, Rh = bt + Lh - br, vr = Si(g ? sn(Gi, Mh) : Gi, bt, g ? be(se, Rh) : se); + }, Ht = t2.modifiersData["arrow#persistent"] ? t2.modifiersData["arrow#persistent"].padding : Tc(), ri = Ht[tt], Qi = Ht[et2], ne2 = Si(0, I[U], ye[U]), gn = E ? I[U] / 2 - qi - ne2 - ri - L.mainAxis : mn - ne2 - ri - L.mainAxis, Lh = E ? -I[U] / 2 + qi + ne2 + Qi + L.mainAxis : oi + ne2 + Qi + L.mainAxis, bn2 = t2.elements.arrow && Vi(t2.elements.arrow), Nh = bn2 ? T === "y" ? bn2.clientTop || 0 : bn2.clientLeft || 0 : 0, br = (P = S == null ? void 0 : S[T]) != null ? P : 0, Mh = bt + gn - br - Nh, Rh = bt + Lh - br, vr = Si(g ? sn(Gi, Mh) : Gi, bt, g ? be(se, Rh) : se); k[T] = vr, N[T] = vr - bt; } if (a) { diff --git a/static/js/appbundle.js.map b/static/js/appbundle.js.map index bf578b8b323..0941510fc2d 100644 --- a/static/js/appbundle.js.map +++ b/static/js/appbundle.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../../node_modules/jszip/dist/jszip.min.js", "../../node_modules/@babel/runtime/helpers/arrayWithHoles.js", "../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js", "../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js", "../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js", "../../node_modules/@babel/runtime/helpers/nonIterableRest.js", "../../node_modules/@babel/runtime/helpers/slicedToArray.js", "../../node_modules/@babel/runtime/helpers/classCallCheck.js", "../../node_modules/@babel/runtime/helpers/typeof.js", "../../node_modules/@babel/runtime/helpers/toPrimitive.js", "../../node_modules/@babel/runtime/helpers/toPropertyKey.js", "../../node_modules/@babel/runtime/helpers/createClass.js", "../../node_modules/automation-events/build/es5/bundle.js", "../../node_modules/dompurify/src/utils.js", "../../node_modules/dompurify/src/tags.js", "../../node_modules/dompurify/src/attrs.js", "../../node_modules/dompurify/src/regexp.js", "../../node_modules/dompurify/src/purify.js", "ckeditor.js", "index.ts", "message-translations.ts", "client-messages.ts", "modal.ts", "app.ts", "../../node_modules/tone/Tone/version.ts", "../../node_modules/standardized-audio-context/src/module.ts", "../../node_modules/standardized-audio-context/src/factories/abort-error.ts", "../../node_modules/standardized-audio-context/src/factories/add-active-input-connection-to-audio-node.ts", "../../node_modules/standardized-audio-context/src/factories/add-audio-node-connections.ts", "../../node_modules/standardized-audio-context/src/factories/add-audio-param-connections.ts", "../../node_modules/standardized-audio-context/src/globals.ts", "../../node_modules/standardized-audio-context/src/helpers/is-constructible.ts", "../../node_modules/standardized-audio-context/src/helpers/split-import-statements.ts", "../../node_modules/standardized-audio-context/src/factories/add-audio-worklet-module.ts", "../../node_modules/standardized-audio-context/src/helpers/get-value-for-key.ts", "../../node_modules/standardized-audio-context/src/helpers/pick-element-from-set.ts", "../../node_modules/standardized-audio-context/src/helpers/delete-passive-input-connection-to-audio-node.ts", "../../node_modules/standardized-audio-context/src/helpers/get-event-listeners-of-audio-node.ts", "../../node_modules/standardized-audio-context/src/helpers/set-internal-state-to-active.ts", "../../node_modules/standardized-audio-context/src/guards/audio-worklet-node.ts", "../../node_modules/standardized-audio-context/src/helpers/set-internal-state-to-passive.ts", "../../node_modules/standardized-audio-context/src/helpers/set-internal-state-to-passive-when-necessary.ts", "../../node_modules/standardized-audio-context/src/factories/add-connection-to-audio-node.ts", "../../node_modules/standardized-audio-context/src/factories/add-passive-input-connection-to-audio-node.ts", "../../node_modules/standardized-audio-context/src/factories/add-silent-connection.ts", "../../node_modules/standardized-audio-context/src/factories/add-unrendered-audio-worklet-node.ts", "../../node_modules/standardized-audio-context/src/factories/analyser-node-constructor.ts", "../../node_modules/standardized-audio-context/src/helpers/is-owned-by-context.ts", "../../node_modules/standardized-audio-context/src/factories/analyser-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-buffer-copy-channel-methods-out-of-bounds-support.ts", "../../node_modules/standardized-audio-context/src/factories/index-size-error.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-audio-buffer-get-channel-data-method.ts", "../../node_modules/standardized-audio-context/src/factories/audio-buffer-constructor.ts", "../../node_modules/standardized-audio-context/src/constants.ts", "../../node_modules/standardized-audio-context/src/helpers/is-active-audio-node.ts", "../../node_modules/standardized-audio-context/src/factories/audio-buffer-source-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/audio-buffer-source-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/guards/audio-buffer-source-node.ts", "../../node_modules/standardized-audio-context/src/guards/biquad-filter-node.ts", "../../node_modules/standardized-audio-context/src/guards/constant-source-node.ts", "../../node_modules/standardized-audio-context/src/guards/gain-node.ts", "../../node_modules/standardized-audio-context/src/guards/oscillator-node.ts", "../../node_modules/standardized-audio-context/src/guards/stereo-panner-node.ts", "../../node_modules/standardized-audio-context/src/helpers/get-audio-node-connections.ts", "../../node_modules/standardized-audio-context/src/helpers/get-audio-param-connections.ts", "../../node_modules/standardized-audio-context/src/helpers/deactivate-active-audio-node-input-connections.ts", "../../node_modules/standardized-audio-context/src/helpers/deactivate-audio-graph.ts", "../../node_modules/standardized-audio-context/src/helpers/is-valid-latency-hint.ts", "../../node_modules/standardized-audio-context/src/factories/audio-context-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/audio-destination-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/audio-destination-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/audio-listener-factory.ts", "../../node_modules/standardized-audio-context/src/guards/audio-node.ts", "../../node_modules/standardized-audio-context/src/guards/audio-node-output-connection.ts", "../../node_modules/standardized-audio-context/src/helpers/insert-element-in-set.ts", "../../node_modules/standardized-audio-context/src/helpers/add-active-input-connection-to-audio-param.ts", "../../node_modules/standardized-audio-context/src/helpers/add-passive-input-connection-to-audio-param.ts", "../../node_modules/standardized-audio-context/src/guards/native-audio-node-faker.ts", "../../node_modules/standardized-audio-context/src/helpers/connect-native-audio-node-to-native-audio-node.ts", "../../node_modules/standardized-audio-context/src/helpers/delete-active-input-connection.ts", "../../node_modules/standardized-audio-context/src/helpers/delete-active-input-connection-to-audio-param.ts", "../../node_modules/standardized-audio-context/src/helpers/delete-event-listeners-of-audio-node.ts", "../../node_modules/standardized-audio-context/src/helpers/delete-passive-input-connection-to-audio-param.ts", "../../node_modules/standardized-audio-context/src/helpers/disconnect-native-audio-node-from-native-audio-node.ts", "../../node_modules/standardized-audio-context/src/helpers/get-native-audio-node.ts", "../../node_modules/standardized-audio-context/src/helpers/get-native-audio-param.ts", "../../node_modules/standardized-audio-context/src/helpers/is-part-of-a-cycle.ts", "../../node_modules/standardized-audio-context/src/helpers/is-passive-audio-node.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-node-disconnect-method-support.ts", "../../node_modules/standardized-audio-context/src/helpers/visit-each-audio-node-once.ts", "../../node_modules/standardized-audio-context/src/guards/native-audio-node.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-audio-node-disconnect-method.ts", "../../node_modules/standardized-audio-context/src/factories/audio-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/audio-param-factory.ts", "../../node_modules/standardized-audio-context/src/factories/audio-param-renderer.ts", "../../node_modules/standardized-audio-context/src/read-only-map.ts", "../../node_modules/standardized-audio-context/src/factories/audio-worklet-node-constructor.ts", "../../node_modules/standardized-audio-context/src/helpers/copy-from-channel.ts", "../../node_modules/standardized-audio-context/src/helpers/copy-to-channel.ts", "../../node_modules/standardized-audio-context/src/helpers/create-nested-arrays.ts", "../../node_modules/standardized-audio-context/src/helpers/get-audio-worklet-processor.ts", "../../node_modules/standardized-audio-context/src/factories/audio-worklet-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/base-audio-context-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/biquad-filter-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/biquad-filter-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/cache-test-result.ts", "../../node_modules/standardized-audio-context/src/factories/channel-merger-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/channel-merger-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/channel-splitter-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/channel-splitter-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/connect-audio-param.ts", "../../node_modules/standardized-audio-context/src/factories/connect-multiple-outputs.ts", "../../node_modules/standardized-audio-context/src/factories/connected-native-audio-buffer-source-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/constant-source-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/constant-source-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/convert-number-to-unsigned-long.ts", "../../node_modules/standardized-audio-context/src/factories/convolver-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/convolver-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/create-native-offline-audio-context.ts", "../../node_modules/standardized-audio-context/src/factories/data-clone-error.ts", "../../node_modules/standardized-audio-context/src/helpers/detach-array-buffer.ts", "../../node_modules/standardized-audio-context/src/factories/decode-audio-data.ts", "../../node_modules/standardized-audio-context/src/factories/decrement-cycle-counter.ts", "../../node_modules/standardized-audio-context/src/factories/delay-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/delay-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/delete-active-input-connection-to-audio-node.ts", "../../node_modules/standardized-audio-context/src/factories/delete-unrendered-audio-worklet-node.ts", "../../node_modules/standardized-audio-context/src/guards/delay-node.ts", "../../node_modules/standardized-audio-context/src/factories/detect-cycles.ts", "../../node_modules/standardized-audio-context/src/factories/disconnect-multiple-outputs.ts", "../../node_modules/standardized-audio-context/src/factories/dynamics-compressor-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/dynamics-compressor-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/encoding-error.ts", "../../node_modules/standardized-audio-context/src/factories/evaluate-source.ts", "../../node_modules/standardized-audio-context/src/factories/event-target-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/expose-current-frame-and-current-time.ts", "../../node_modules/standardized-audio-context/src/factories/fetch-source.ts", "../../node_modules/standardized-audio-context/src/factories/gain-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/gain-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/get-active-audio-worklet-node-inputs.ts", "../../node_modules/standardized-audio-context/src/factories/get-audio-node-renderer.ts", "../../node_modules/standardized-audio-context/src/factories/get-audio-node-tail-time.ts", "../../node_modules/standardized-audio-context/src/factories/get-audio-param-renderer.ts", "../../node_modules/standardized-audio-context/src/factories/get-backup-offline-audio-context.ts", "../../node_modules/standardized-audio-context/src/factories/invalid-state-error.ts", "../../node_modules/standardized-audio-context/src/factories/get-native-context.ts", "../../node_modules/standardized-audio-context/src/factories/get-or-create-backup-offline-audio-context.ts", "../../node_modules/standardized-audio-context/src/factories/get-unrendered-audio-worklet-nodes.ts", "../../node_modules/standardized-audio-context/src/factories/invalid-access-error.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-iir-filter-node-get-frequency-response-method.ts", "../../node_modules/standardized-audio-context/src/factories/iir-filter-node-constructor.ts", "../../node_modules/standardized-audio-context/src/helpers/filter-buffer.ts", "../../node_modules/standardized-audio-context/src/factories/iir-filter-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/increment-cycle-counter-factory.ts", "../../node_modules/standardized-audio-context/src/factories/is-any-audio-context.ts", "../../node_modules/standardized-audio-context/src/factories/is-any-audio-node.ts", "../../node_modules/standardized-audio-context/src/factories/is-any-audio-param.ts", "../../node_modules/standardized-audio-context/src/factories/is-any-offline-audio-context.ts", "../../node_modules/standardized-audio-context/src/factories/is-native-audio-context.ts", "../../node_modules/standardized-audio-context/src/factories/is-native-audio-node.ts", "../../node_modules/standardized-audio-context/src/factories/is-native-audio-param.ts", "../../node_modules/standardized-audio-context/src/factories/is-native-context.ts", "../../node_modules/standardized-audio-context/src/factories/is-native-offline-audio-context.ts", "../../node_modules/standardized-audio-context/src/factories/is-secure-context.ts", "../../node_modules/standardized-audio-context/src/factories/media-element-audio-source-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/media-stream-audio-destination-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/media-stream-audio-source-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/media-stream-track-audio-source-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/minimal-audio-context-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/minimal-base-audio-context-constructor.ts", "../../node_modules/standardized-audio-context/src/helpers/test-promise-support.ts", "../../node_modules/standardized-audio-context/src/factories/minimal-offline-audio-context-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/monitor-connections.ts", "../../node_modules/standardized-audio-context/src/helpers/assign-native-audio-node-option.ts", "../../node_modules/standardized-audio-context/src/helpers/assign-native-audio-node-options.ts", "../../node_modules/standardized-audio-context/src/helpers/test-analyser-node-get-float-time-domain-data-method-support.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-analyser-node-get-float-time-domain-data-method.ts", "../../node_modules/standardized-audio-context/src/factories/native-analyser-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-audio-buffer-constructor.ts", "../../node_modules/standardized-audio-context/src/helpers/assign-native-audio-node-audio-param-value.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-audio-buffer-source-node-start-method-consecutive-calls.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-audio-scheduled-source-node-start-method-negative-parameters.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-audio-scheduled-source-node-stop-method-negative-parameters.ts", "../../node_modules/standardized-audio-context/src/factories/native-audio-buffer-source-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-audio-context-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/native-audio-destination-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-audio-worklet-node-constructor.ts", "../../node_modules/standardized-audio-context/src/helpers/test-clonability-of-audio-worklet-node-options.ts", "../../node_modules/standardized-audio-context/src/factories/native-audio-worklet-node-factory.ts", "../../node_modules/standardized-audio-context/src/helpers/compute-buffer-size.ts", "../../node_modules/standardized-audio-context/src/helpers/clone-audio-worklet-node-options.ts", "../../node_modules/standardized-audio-context/src/helpers/create-audio-worklet-processor-promise.ts", "../../node_modules/standardized-audio-context/src/helpers/create-audio-worklet-processor.ts", "../../node_modules/standardized-audio-context/src/factories/native-audio-worklet-node-faker-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-biquad-filter-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-channel-merger-node-factory.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-channel-splitter-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-channel-splitter-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-constant-source-node-factory.ts", "../../node_modules/standardized-audio-context/src/helpers/intercept-connections.ts", "../../node_modules/standardized-audio-context/src/factories/native-constant-source-node-faker-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-convolver-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-delay-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-dynamics-compressor-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-gain-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-iir-filter-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-iir-filter-node-faker-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-media-element-audio-source-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-media-stream-audio-destination-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-media-stream-audio-source-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-media-stream-track-audio-source-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-offline-audio-context-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/native-oscillator-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-panner-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-panner-node-faker-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-periodic-wave-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-script-processor-node.ts", "../../node_modules/standardized-audio-context/src/factories/native-stereo-panner-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-stereo-panner-node-faker-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-wave-shaper-node-factory.ts", "../../node_modules/standardized-audio-context/src/factories/native-wave-shaper-node-faker-factory.ts", "../../node_modules/standardized-audio-context/src/factories/not-supported-error.ts", "../../node_modules/standardized-audio-context/src/factories/offline-audio-context-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/oscillator-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/oscillator-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/panner-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/panner-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/periodic-wave-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/render-automation.ts", "../../node_modules/standardized-audio-context/src/factories/render-inputs-of-audio-node.ts", "../../node_modules/standardized-audio-context/src/factories/render-inputs-of-audio-param.ts", "../../node_modules/standardized-audio-context/src/factories/render-native-offline-audio-context.ts", "../../node_modules/standardized-audio-context/src/factories/set-active-audio-worklet-node-inputs.ts", "../../node_modules/standardized-audio-context/src/factories/set-audio-node-tail-time.ts", "../../node_modules/standardized-audio-context/src/factories/start-rendering.ts", "../../node_modules/standardized-audio-context/src/factories/stereo-panner-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/stereo-panner-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/test-audio-buffer-constructor-support.ts", "../../node_modules/standardized-audio-context/src/factories/test-audio-worklet-processor-post-message-support.ts", "../../node_modules/standardized-audio-context/src/factories/test-offline-audio-context-current-time-support.ts", "../../node_modules/standardized-audio-context/src/factories/unknown-error.ts", "../../node_modules/standardized-audio-context/src/factories/wave-shaper-node-constructor.ts", "../../node_modules/standardized-audio-context/src/factories/wave-shaper-node-renderer-factory.ts", "../../node_modules/standardized-audio-context/src/factories/window.ts", "../../node_modules/standardized-audio-context/src/factories/wrap-audio-buffer-copy-channel-methods.ts", "../../node_modules/standardized-audio-context/src/factories/wrap-audio-buffer-copy-channel-methods-out-of-bounds.ts", "../../node_modules/standardized-audio-context/src/factories/wrap-audio-buffer-source-node-stop-method-nullified-buffer.ts", "../../node_modules/standardized-audio-context/src/factories/wrap-channel-merger-node.ts", "../../node_modules/standardized-audio-context/src/helpers/get-first-sample.ts", "../../node_modules/standardized-audio-context/src/helpers/is-dc-curve.ts", "../../node_modules/standardized-audio-context/src/helpers/overwrite-accessors.ts", "../../node_modules/standardized-audio-context/src/helpers/sanitize-audio-worklet-node-options.ts", "../../node_modules/standardized-audio-context/src/helpers/sanitize-channel-splitter-options.ts", "../../node_modules/standardized-audio-context/src/helpers/sanitize-periodic-wave-options.ts", "../../node_modules/standardized-audio-context/src/helpers/set-value-at-time-until-possible.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-buffer-source-node-start-method-consecutive-calls-support.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-buffer-source-node-start-method-offset-clamping-support.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-buffer-source-node-stop-method-nullified-buffer-support.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-scheduled-source-node-start-method-negative-parameters-support.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-scheduled-source-node-stop-method-consecutive-calls-support.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-scheduled-source-node-stop-method-negative-parameters-support.ts", "../../node_modules/standardized-audio-context/src/helpers/test-audio-worklet-node-options-clonability.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-audio-buffer-source-node-start-method-offset-clamping.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-audio-scheduled-source-node-stop-method-consecutive-calls.ts", "../../node_modules/standardized-audio-context/src/helpers/wrap-event-listener.ts", "../../node_modules/tone/Tone/core/util/Debug.ts", "../../node_modules/tone/Tone/core/util/TypeCheck.ts", "../../node_modules/tone/Tone/core/context/AudioContext.ts", "../../node_modules/tslib/tslib.es6.mjs", "../../node_modules/tone/Tone/core/clock/Ticker.ts", "../../node_modules/tone/Tone/core/util/AdvancedTypeCheck.ts", "../../node_modules/tone/Tone/core/util/Defaults.ts", "../../node_modules/tone/Tone/core/Tone.ts", "../../node_modules/tone/Tone/core/util/Math.ts", "../../node_modules/tone/Tone/core/util/Timeline.ts", "../../node_modules/tone/Tone/core/context/ContextInitialization.ts", "../../node_modules/tone/Tone/core/util/Emitter.ts", "../../node_modules/tone/Tone/core/context/BaseContext.ts", "../../node_modules/tone/Tone/core/context/Context.ts", "../../node_modules/tone/Tone/core/context/DummyContext.ts", "../../node_modules/tone/Tone/core/util/Interface.ts", "../../node_modules/tone/Tone/core/context/ToneAudioBuffer.ts", "../../node_modules/tone/Tone/core/context/OfflineContext.ts", "../../node_modules/tone/Tone/core/Global.ts", "../../node_modules/tone/Tone/core/type/Conversions.ts", "../../node_modules/tone/Tone/core/type/TimeBase.ts", "../../node_modules/tone/Tone/core/type/Time.ts", "../../node_modules/tone/Tone/core/type/Frequency.ts", "../../node_modules/tone/Tone/core/type/TransportTime.ts", "../../node_modules/tone/Tone/core/context/ToneWithContext.ts", "../../node_modules/tone/Tone/core/util/StateTimeline.ts", "../../node_modules/tone/Tone/core/context/Param.ts", "../../node_modules/tone/Tone/core/context/ToneAudioNode.ts", "../../node_modules/tone/Tone/core/context/Gain.ts", "../../node_modules/tone/Tone/source/OneShotSource.ts", "../../node_modules/tone/Tone/signal/ToneConstantSource.ts", "../../node_modules/tone/Tone/signal/Signal.ts", "../../node_modules/tone/Tone/core/clock/TickParam.ts", "../../node_modules/tone/Tone/core/clock/TickSignal.ts", "../../node_modules/tone/Tone/core/clock/TickSource.ts", "../../node_modules/tone/Tone/core/clock/Clock.ts", "../../node_modules/tone/Tone/core/context/ToneAudioBuffers.ts", "../../node_modules/tone/Tone/core/type/Midi.ts", "../../node_modules/tone/Tone/core/type/Ticks.ts", "../../node_modules/tone/Tone/core/util/Draw.ts", "../../node_modules/tone/Tone/core/util/IntervalTimeline.ts", "../../node_modules/tone/Tone/component/channel/Volume.ts", "../../node_modules/tone/Tone/core/context/Destination.ts", "../../node_modules/tone/Tone/core/util/TimelineValue.ts", "../../node_modules/tone/Tone/core/clock/TransportEvent.ts", "../../node_modules/tone/Tone/core/clock/TransportRepeatEvent.ts", "../../node_modules/tone/Tone/core/clock/Transport.ts", "../../node_modules/tone/Tone/source/Source.ts", "../../node_modules/tone/Tone/source/buffer/ToneBufferSource.ts", "../../node_modules/tone/Tone/source/Noise.ts", "../../node_modules/tone/Tone/source/oscillator/OscillatorInterface.ts", "../../node_modules/tone/Tone/source/oscillator/ToneOscillatorNode.ts", "../../node_modules/tone/Tone/source/oscillator/Oscillator.ts", "../../node_modules/tone/Tone/signal/SignalOperator.ts", "../../node_modules/tone/Tone/signal/WaveShaper.ts", "../../node_modules/tone/Tone/signal/AudioToGain.ts", "../../node_modules/tone/Tone/signal/Multiply.ts", "../../node_modules/tone/Tone/source/oscillator/AMOscillator.ts", "../../node_modules/tone/Tone/source/oscillator/FMOscillator.ts", "../../node_modules/tone/Tone/source/oscillator/PulseOscillator.ts", "../../node_modules/tone/Tone/source/oscillator/FatOscillator.ts", "../../node_modules/tone/Tone/source/oscillator/PWMOscillator.ts", "../../node_modules/tone/Tone/source/oscillator/OmniOscillator.ts", "../../node_modules/tone/Tone/core/util/Decorator.ts", "../../node_modules/tone/Tone/source/buffer/Player.ts", "../../node_modules/tone/Tone/component/envelope/Envelope.ts", "../../node_modules/tone/Tone/instrument/Instrument.ts", "../../node_modules/tone/Tone/instrument/Monophonic.ts", "../../node_modules/tone/Tone/component/envelope/AmplitudeEnvelope.ts", "../../node_modules/tone/Tone/instrument/Synth.ts", "../../node_modules/tone/Tone/instrument/MembraneSynth.ts", "../../node_modules/tone/Tone/core/worklet/WorkletGlobalScope.ts", "../../node_modules/tone/Tone/core/worklet/ToneAudioWorkletProcessor.worklet.ts", "../../node_modules/tone/Tone/core/worklet/SingleIOProcessor.worklet.ts", "../../node_modules/tone/Tone/core/worklet/DelayLine.worklet.ts", "../../node_modules/tone/Tone/component/filter/FeedbackCombFilter.worklet.ts", "../../node_modules/tone/Tone/instrument/PolySynth.ts", "../../node_modules/tone/Tone/instrument/Sampler.ts", "../../node_modules/tone/Tone/component/channel/Panner.ts", "../../node_modules/tone/Tone/effect/BitCrusher.worklet.ts", "../../node_modules/tone/Tone/effect/Freeverb.ts", "../../node_modules/tone/Tone/effect/JCReverb.ts", "../../node_modules/tone/Tone/component/channel/Solo.ts", "../../node_modules/tone/Tone/component/channel/PanVol.ts", "../../node_modules/tone/Tone/component/channel/Channel.ts", "../../node_modules/tone/Tone/core/context/Listener.ts", "../../node_modules/tone/Tone/index.ts", "event-emitter.ts", "tabs.ts", "pythonPrefixes.ts", "types.ts", "tutorials/utils.ts", "tutorials/intro.ts", "tutorials/teacher.ts", "tutorials/level1.ts", "tutorials/tutorial.ts", "editor.ts", "../../node_modules/@codemirror/state/dist/index.js", "../../node_modules/style-mod/src/style-mod.js", "../../node_modules/w3c-keyname/index.js", "../../node_modules/@codemirror/view/dist/index.js", "../../node_modules/@lezer/common/dist/index.js", "../../node_modules/@lezer/highlight/dist/index.js", "../../node_modules/@codemirror/language/dist/index.js", "../../node_modules/@codemirror/commands/dist/index.js", "../../node_modules/crelt/index.js", "../../node_modules/@codemirror/search/dist/index.js", "cm-decorations.ts", "../../node_modules/@lezer/lr/dist/index.js", "lezer-parsers/level1-parser.terms.ts", "lezer-parsers/level2-parser.terms.ts", "lezer-parsers/level3-parser.terms.ts", "lezer-parsers/level4-parser.terms.ts", "lezer-parsers/level5-parser.terms.ts", "lezer-parsers/level6-parser.terms.ts", "lezer-parsers/level7-parser.terms.ts", "lezer-parsers/level8-parser.terms.ts", "lezer-parsers/level10-parser.terms.ts", "lezer-parsers/level11-parser.terms.ts", "lezer-parsers/level12-parser.terms.ts", "lezer-parsers/level13-parser.terms.ts", "lezer-parsers/level14-parser.terms.ts", "lezer-parsers/level15-parser.terms.ts", "lezer-parsers/level16-parser.terms.ts", "lezer-parsers/level17-parser.terms.ts", "lezer-parsers/level18-parser.terms.ts", "utils.ts", "lezer-parsers/tokens.ts", "lezer-parsers/level1-parser.ts", "lezer-parsers/level2-parser.ts", "lezer-parsers/level3-parser.ts", "lezer-parsers/level4-parser.ts", "lezer-parsers/level5-parser.ts", "lezer-parsers/level6-parser.ts", "lezer-parsers/level7-parser.ts", "lezer-parsers/level8-parser.ts", "lezer-parsers/level9-parser.ts", "lezer-parsers/level10-parser.ts", "lezer-parsers/level11-parser.ts", "lezer-parsers/level12-parser.ts", "lezer-parsers/level13-parser.ts", "lezer-parsers/level14-parser.ts", "lezer-parsers/level15-parser.ts", "lezer-parsers/level16-parser.ts", "lezer-parsers/level17-parser.ts", "lezer-parsers/level18-parser.ts", "lezer-parsers/language-packages.ts", "cm-monokai-theme.ts", "cm-editor.ts", "../../node_modules/sortablejs/modular/sortable.esm.js", "parsons.ts", "browser-helpers/on-element-becomes-visible.ts", "debugging.ts", "local.ts", "teachers.ts", "adventure.ts", "autosave.ts", "../../node_modules/@kurkle/color/dist/color.esm.js", "../../node_modules/chart.js/src/helpers/helpers.core.ts", "../../node_modules/chart.js/src/helpers/helpers.math.ts", "../../node_modules/chart.js/src/helpers/helpers.collection.ts", "../../node_modules/chart.js/src/helpers/helpers.extras.ts", "../../node_modules/chart.js/src/helpers/helpers.easing.ts", "../../node_modules/chart.js/src/helpers/helpers.color.ts", "../../node_modules/chart.js/src/core/core.animations.defaults.js", "../../node_modules/chart.js/src/core/core.layouts.defaults.js", "../../node_modules/chart.js/src/helpers/helpers.intl.ts", "../../node_modules/chart.js/src/core/core.ticks.js", "../../node_modules/chart.js/src/core/core.scale.defaults.js", "../../node_modules/chart.js/src/core/core.defaults.js", "../../node_modules/chart.js/src/helpers/helpers.canvas.ts", "../../node_modules/chart.js/src/helpers/helpers.options.ts", "../../node_modules/chart.js/src/helpers/helpers.config.ts", "../../node_modules/chart.js/src/helpers/helpers.curve.ts", "../../node_modules/chart.js/src/helpers/helpers.dom.ts", "../../node_modules/chart.js/src/helpers/helpers.interpolation.ts", "../../node_modules/chart.js/src/helpers/helpers.rtl.ts", "../../node_modules/chart.js/src/helpers/helpers.segment.js", "../../node_modules/chart.js/src/core/core.animator.js", "../../node_modules/chart.js/src/core/core.animation.js", "../../node_modules/chart.js/src/core/core.animations.js", "../../node_modules/chart.js/src/core/core.datasetController.js", "../../node_modules/chart.js/src/controllers/controller.bar.js", "../../node_modules/chart.js/src/controllers/controller.bubble.js", "../../node_modules/chart.js/src/controllers/controller.doughnut.js", "../../node_modules/chart.js/src/controllers/controller.line.js", "../../node_modules/chart.js/src/controllers/controller.polarArea.js", "../../node_modules/chart.js/src/controllers/controller.pie.js", "../../node_modules/chart.js/src/controllers/controller.radar.js", "../../node_modules/chart.js/src/controllers/controller.scatter.js", "../../node_modules/chart.js/src/core/core.adapters.ts", "../../node_modules/chart.js/src/core/core.interaction.js", "../../node_modules/chart.js/src/core/core.layouts.js", "../../node_modules/chart.js/src/platform/platform.base.js", "../../node_modules/chart.js/src/platform/platform.basic.js", "../../node_modules/chart.js/src/platform/platform.dom.js", "../../node_modules/chart.js/src/platform/index.js", "../../node_modules/chart.js/src/core/core.element.ts", "../../node_modules/chart.js/src/core/core.scale.autoskip.js", "../../node_modules/chart.js/src/core/core.scale.js", "../../node_modules/chart.js/src/core/core.typedRegistry.js", "../../node_modules/chart.js/src/core/core.registry.js", "../../node_modules/chart.js/src/core/core.plugins.js", "../../node_modules/chart.js/src/core/core.config.js", "../../node_modules/chart.js/src/core/core.controller.js", "../../node_modules/chart.js/src/elements/element.arc.ts", "../../node_modules/chart.js/src/elements/element.line.js", "../../node_modules/chart.js/src/elements/element.point.ts", "../../node_modules/chart.js/src/elements/element.bar.js", "../../node_modules/chart.js/src/plugins/plugin.colors.ts", "../../node_modules/chart.js/src/plugins/plugin.decimation.js", "../../node_modules/chart.js/src/plugins/plugin.filler/filler.segment.js", "../../node_modules/chart.js/src/plugins/plugin.filler/filler.helper.js", "../../node_modules/chart.js/src/plugins/plugin.filler/filler.options.js", "../../node_modules/chart.js/src/plugins/plugin.filler/filler.target.stack.js", "../../node_modules/chart.js/src/plugins/plugin.filler/simpleArc.js", "../../node_modules/chart.js/src/plugins/plugin.filler/filler.target.js", "../../node_modules/chart.js/src/plugins/plugin.filler/filler.drawing.js", "../../node_modules/chart.js/src/plugins/plugin.filler/index.js", "../../node_modules/chart.js/src/plugins/plugin.legend.js", "../../node_modules/chart.js/src/plugins/plugin.title.js", "../../node_modules/chart.js/src/plugins/plugin.subtitle.js", "../../node_modules/chart.js/src/plugins/plugin.tooltip.js", "../../node_modules/chart.js/src/scales/scale.category.js", "../../node_modules/chart.js/src/scales/scale.linearbase.js", "../../node_modules/chart.js/src/scales/scale.linear.js", "../../node_modules/chart.js/src/scales/scale.logarithmic.js", "../../node_modules/chart.js/src/scales/scale.radialLinear.js", "../../node_modules/chart.js/src/scales/scale.time.js", "../../node_modules/chart.js/src/scales/scale.timeseries.js", "../../node_modules/chart.js/src/index.ts", "comm.ts", "auth.ts", "local-save-warning.ts", "user-activity.ts", "index-tabs.ts", "htmx-integration.ts", "statistics.ts", "logs.ts", "admin.ts", "profile.ts", "initialize.ts", "../../node_modules/tw-elements/src/js/dom/data.js", "../../node_modules/tw-elements/src/js/util/index.js", "../../node_modules/tw-elements/src/js/dom/event-handler.js", "../../node_modules/tw-elements/src/js/base-component.js", "../../node_modules/tw-elements/src/js/components/button.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/enums.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/math.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/userAgent.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/within.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/getVariation.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/flip.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/hide.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/offset.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/debounce.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/format.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/validateModifiers.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/uniqueBy.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/createPopper.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/popper-lite.js", "../../node_modules/tw-elements/node_modules/@popperjs/core/lib/popper.js", "../../node_modules/tw-elements/src/js/dom/manipulator.js", "../../node_modules/tw-elements/src/js/dom/selector-engine.js", "../../node_modules/tw-elements/src/js/components/dropdown.js", "../../node_modules/tw-elements/src/js/components/collapse.js", "../../node_modules/tw-elements/src/js/util/scrollbar.js", "../../node_modules/tw-elements/src/js/util/backdrop.js", "../../node_modules/tw-elements/src/js/util/focusTrap.js", "../../node_modules/tw-elements/src/js/util/component-functions.js", "../../node_modules/tw-elements/src/js/components/offcanvas.js", "../../node_modules/tw-elements/src/js/components/alert.js", "../../node_modules/tw-elements/src/js/components/carousel.js", "../../node_modules/tw-elements/src/js/components/modal.js", "../../node_modules/tw-elements/src/js/util/sanitizer.js", "../../node_modules/tw-elements/src/js/components/tooltip.js", "../../node_modules/tw-elements/src/js/components/popover.js", "../../node_modules/tw-elements/src/js/navigation/scrollspy.js", "../../node_modules/tw-elements/src/js/navigation/tab.js", "../../node_modules/tw-elements/src/js/components/toast.js", "../../node_modules/tw-elements/node_modules/detect-autofill/dist/detect-autofill.js", "../../node_modules/tw-elements/src/js/forms/input.js", "../../node_modules/tw-elements/src/js/content-styles/animate.js", "../../node_modules/tw-elements/src/js/methods/ripple.js", "../../node_modules/tw-elements/src/js/forms/datepicker/date-utils.js", "../../node_modules/tw-elements/src/js/forms/datepicker/templates.js", "../../node_modules/tw-elements/src/js/util/keycodes.js", "../../node_modules/tw-elements/src/js/forms/datepicker/index.js", "../../node_modules/tw-elements/src/js/forms/timepicker/templates.js", "../../node_modules/tw-elements/src/js/forms/timepicker/utils.js", "../../node_modules/tw-elements/src/js/forms/timepicker/index.js", "../../node_modules/tw-elements/src/js/util/touch/swipe.js", "../../node_modules/tw-elements/src/js/util/touch/index.js", "../../node_modules/tw-elements/src/js/navigation/sidenav.js", "../../node_modules/tw-elements/src/js/components/stepper.js", "../../node_modules/tw-elements/src/js/forms/select/select-option.js", "../../node_modules/tw-elements/src/js/forms/select/selection-model.js", "../../node_modules/tw-elements/src/js/forms/select/util.js", "../../node_modules/tw-elements/src/js/forms/select/templates.js", "../../node_modules/tw-elements/src/js/forms/select/index.js", "../../node_modules/tw-elements/src/js/components/chips/templates.js", "../../node_modules/tw-elements/src/js/components/chips/chip.js", "../../node_modules/tw-elements/src/js/components/chips/index.js", "../../node_modules/tw-elements/src/js/data/chart/chartDefaults.js", "../../node_modules/tw-elements/node_modules/deepmerge/dist/cjs.js", "../../node_modules/tw-elements/src/js/data/chart/charts.js", "../../node_modules/tw-elements/node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js", "../../node_modules/tw-elements/src/js/methods/perfect-scrollbar.js", "../../node_modules/tw-elements/src/js/data/datatables/html/pagination.js", "../../node_modules/tw-elements/src/js/data/datatables/html/columns.js", "../../node_modules/tw-elements/src/js/data/datatables/html/rows.js", "../../node_modules/tw-elements/src/js/data/datatables/html/table.js", "../../node_modules/tw-elements/src/js/data/datatables/util.js", "../../node_modules/tw-elements/src/js/data/datatables/index.js", "../../node_modules/tw-elements/src/js/components/rating.js", "../../node_modules/tw-elements/src/js/components/popconfirm.js", "../../node_modules/tw-elements/src/js/components/lightbox.js", "../../node_modules/tw-elements/src/js/forms/validation/rules.js", "../../node_modules/tw-elements/src/js/forms/validation/validation.js", "../../node_modules/tw-elements/src/js/methods/touch/touchUtil.js", "../../node_modules/tw-elements/src/js/methods/touch/press.js", "../../node_modules/tw-elements/src/js/methods/touch/swipe.js", "../../node_modules/tw-elements/src/js/methods/touch/pan.js", "../../node_modules/tw-elements/src/js/methods/touch/pinch.js", "../../node_modules/tw-elements/src/js/methods/touch/tap.js", "../../node_modules/tw-elements/src/js/methods/touch/rotate.js", "../../node_modules/tw-elements/src/js/methods/touch/index.js", "../../node_modules/tw-elements/src/js/methods/smooth-scroll.js", "../../node_modules/tw-elements/src/js/methods/lazy-load.js", "../../node_modules/tw-elements/src/js/methods/clipboard.js", "../../node_modules/tw-elements/src/js/methods/infinite-scroll.js", "../../node_modules/tw-elements/src/js/methods/loading-management/templates.js", "../../node_modules/tw-elements/src/js/methods/loading-management/index.js", "../../node_modules/tw-elements/src/js/forms/dateTimepicker/utils.js", "../../node_modules/tw-elements/src/js/forms/dateTimepicker/templates.js", "../../node_modules/tw-elements/src/js/forms/dateTimepicker/index.js", "../../node_modules/tw-elements/src/js/methods/sticky.js", "../../node_modules/tw-elements/src/js/autoinit/jqueryInit.js", "../../node_modules/tw-elements/src/js/autoinit/autoinitCallbacks.js", "../../node_modules/tw-elements/src/js/autoinit/chartsInit.js", "../../node_modules/tw-elements/src/js/autoinit/Register.js", "../../node_modules/tw-elements/src/js/autoinit/index.js", "tailwind.ts", "public-adventures.ts", "microbit.ts", "custom-elements.ts"], - "sourcesContent": ["/*!\n\nJSZip v3.10.1 - A JavaScript class for generating and reading zip files\n\n\n(c) 2009-2016 Stuart Knightley \nDual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.\n\nJSZip uses the library pako released under the MIT license :\nhttps://github.com/nodeca/pako/blob/main/LICENSE\n*/\n\n!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).JSZip=e()}}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t=\"function\"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error(\"Cannot find module '\"+r+\"'\");throw n.code=\"MODULE_NOT_FOUND\",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h)}return o[r].exports}for(var l=\"function\"==typeof require&&require,e=0;e>2,s=(3&t)<<4|r>>4,a=1>6:64,o=2>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l}},{\"./support\":30,\"./utils\":32}],2:[function(e,t,r){\"use strict\";var n=e(\"./external\"),i=e(\"./stream/DataWorker\"),s=e(\"./stream/Crc32Probe\"),a=e(\"./stream/DataLengthProbe\");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a(\"data_length\")),t=this;return e.on(\"end\",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error(\"Bug : uncompressed data size mismatch\")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo(\"compressedSize\",this.compressedSize).withStreamInfo(\"uncompressedSize\",this.uncompressedSize).withStreamInfo(\"crc32\",this.crc32).withStreamInfo(\"compression\",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a(\"uncompressedSize\")).pipe(t.compressWorker(r)).pipe(new a(\"compressedSize\")).withStreamInfo(\"compression\",t)},t.exports=o},{\"./external\":6,\"./stream/Crc32Probe\":25,\"./stream/DataLengthProbe\":26,\"./stream/DataWorker\":27}],3:[function(e,t,r){\"use strict\";var n=e(\"./stream/GenericWorker\");r.STORE={magic:\"\\0\\0\",compressWorker:function(){return new n(\"STORE compression\")},uncompressWorker:function(){return new n(\"STORE decompression\")}},r.DEFLATE=e(\"./flate\")},{\"./flate\":7,\"./stream/GenericWorker\":28}],4:[function(e,t,r){\"use strict\";var n=e(\"./utils\");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?\"string\"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{\"./utils\":32}],5:[function(e,t,r){\"use strict\";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){\"use strict\";var n=null;n=\"undefined\"!=typeof Promise?Promise:e(\"lie\"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){\"use strict\";var n=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Uint32Array,i=e(\"pako\"),s=e(\"./utils\"),a=e(\"./stream/GenericWorker\"),o=n?\"uint8array\":\"array\";function h(e,t){a.call(this,\"FlateWorker/\"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic=\"\\b\\0\",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(e){return new h(\"Deflate\",e)},r.uncompressWorker=function(){return new h(\"Inflate\",{})}},{\"./stream/GenericWorker\":28,\"./utils\":32,pako:38}],8:[function(e,t,r){\"use strict\";function A(e,t){var r,n=\"\";for(r=0;r>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo(\"string\",s(h.name)),c=I.transformTo(\"string\",O.utf8encode(h.name)),d=h.comment,p=I.transformTo(\"string\",s(d)),m=I.transformTo(\"string\",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b=\"\",v=\"\",y=\"\",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),\"UNIX\"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+=\"up\"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+=\"uc\"+A(y.length,2)+y);var E=\"\";return E+=\"\\n\\0\",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+\"\\0\\0\\0\\0\"+A(z,4)+A(n,4)+f+b+p}}var I=e(\"../utils\"),i=e(\"../stream/GenericWorker\"),O=e(\"../utf8\"),B=e(\"../crc32\"),R=e(\"../signature\");function s(e,t,r,n){i.call(this,\"ZipFileWorker\"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo(\"string\",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{\"../utils\":32}],19:[function(e,t,r){\"use strict\";var n=e(\"./Uint8ArrayReader\");function i(e){n.call(this,e)}e(\"../utils\").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{\"../utils\":32,\"./Uint8ArrayReader\":21}],20:[function(e,t,r){\"use strict\";var n=e(\"./DataReader\");function i(e){n.call(this,e)}e(\"../utils\").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{\"../utils\":32,\"./DataReader\":18}],21:[function(e,t,r){\"use strict\";var n=e(\"./ArrayReader\");function i(e){n.call(this,e)}e(\"../utils\").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{\"../utils\":32,\"./ArrayReader\":17}],22:[function(e,t,r){\"use strict\";var n=e(\"../utils\"),i=e(\"../support\"),s=e(\"./ArrayReader\"),a=e(\"./StringReader\"),o=e(\"./NodeBufferReader\"),h=e(\"./Uint8ArrayReader\");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),\"string\"!==t||i.uint8array?\"nodebuffer\"===t?new o(e):i.uint8array?new h(n.transformTo(\"uint8array\",e)):new s(n.transformTo(\"array\",e)):new a(e)}},{\"../support\":30,\"../utils\":32,\"./ArrayReader\":17,\"./NodeBufferReader\":19,\"./StringReader\":20,\"./Uint8ArrayReader\":21}],23:[function(e,t,r){\"use strict\";r.LOCAL_FILE_HEADER=\"PK\u0003\u0004\",r.CENTRAL_FILE_HEADER=\"PK\u0001\u0002\",r.CENTRAL_DIRECTORY_END=\"PK\u0005\u0006\",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR=\"PK\u0006\u0007\",r.ZIP64_CENTRAL_DIRECTORY_END=\"PK\u0006\u0006\",r.DATA_DESCRIPTOR=\"PK\u0007\\b\"},{}],24:[function(e,t,r){\"use strict\";var n=e(\"./GenericWorker\"),i=e(\"../utils\");function s(e){n.call(this,\"ConvertWorker to \"+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{\"../utils\":32,\"./GenericWorker\":28}],25:[function(e,t,r){\"use strict\";var n=e(\"./GenericWorker\"),i=e(\"../crc32\");function s(){n.call(this,\"Crc32Probe\"),this.withStreamInfo(\"crc32\",0)}e(\"../utils\").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{\"../crc32\":4,\"../utils\":32,\"./GenericWorker\":28}],26:[function(e,t,r){\"use strict\";var n=e(\"../utils\"),i=e(\"./GenericWorker\");function s(e){i.call(this,\"DataLengthProbe for \"+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{\"../utils\":32,\"./GenericWorker\":28}],27:[function(e,t,r){\"use strict\";var n=e(\"../utils\"),i=e(\"./GenericWorker\");function s(e){i.call(this,\"DataWorker\");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=\"\",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case\"string\":e=this.data.substring(this.index,t);break;case\"uint8array\":e=this.data.subarray(this.index,t);break;case\"array\":case\"nodebuffer\":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{\"../utils\":32,\"./GenericWorker\":28}],28:[function(e,t,r){\"use strict\";function n(e){this.name=e||\"default\",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit(\"data\",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(\"end\"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(\"error\",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(\"error\",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r \"+e:e}},t.exports=n},{}],29:[function(e,t,r){\"use strict\";var h=e(\"../utils\"),i=e(\"./ConvertWorker\"),s=e(\"./GenericWorker\"),u=e(\"../base64\"),n=e(\"../support\"),a=e(\"../external\"),o=null;if(n.nodestream)try{o=e(\"../nodejs/NodejsStreamOutputAdapter\")}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on(\"data\",function(e,t){n.push(e),o&&o(t)}).on(\"error\",function(e){n=[],r(e)}).on(\"end\",function(){try{var e=function(e,t,r){switch(e){case\"blob\":return h.newBlob(h.transformTo(\"arraybuffer\",t),r);case\"base64\":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo(\"nodebuffer\",e).toString(\"utf-8\"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t>10&1023,a[r++]=56320|1023&n)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?\"uint8array\":\"array\",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?\"uint8array\":\"array\",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta})},s.Utf8EncodeWorker=l},{\"./nodejsUtils\":14,\"./stream/GenericWorker\":28,\"./support\":30,\"./utils\":32}],32:[function(e,t,a){\"use strict\";var o=e(\"./support\"),h=e(\"./base64\"),r=e(\"./nodejsUtils\"),u=e(\"./external\");function n(e){return e}function l(e,t){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||\"/\"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r>10&1023,o[n++]=56320|1023&i)}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},{\"./common\":41}],43:[function(e,t,r){\"use strict\";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){\"use strict\";var h,c=e(\"../utils/common\"),u=e(\"./trees\"),d=e(\"./adler32\"),p=e(\"./crc32\"),n=e(\"./messages\"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return(e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function U(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else{var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg=\"incorrect header check\",r.mode=30;break}if(8!=(15&u)){e.msg=\"unknown compression method\",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg=\"invalid window size\",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg=\"invalid block type\",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<>>16^65535)){e.msg=\"invalid stored block lengths\",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg=\"invalid code lengths set\",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){e.msg=\"invalid bit length repeat\",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg=\"invalid bit length repeat\",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg=\"invalid code -- missing end-of-block\",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg=\"invalid literal/lengths set\",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg=\"invalid distances set\",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg=\"invalid literal/length code\",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg=\"invalid distance code\",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg=\"invalid distance too far back\",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg=\"invalid distance too far back\",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(hd?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{\"../utils/common\":41}],53:[function(e,t,r){\"use strict\";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(r,n){\"use strict\";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i=\"[object process]\"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage(\"\",\"*\"),r.onmessage=t,e}}()?(a=\"setImmediate$\"+Math.random()+\"$\",r.addEventListener?r.addEventListener(\"message\",d,!1):r.attachEvent(\"onmessage\",d),function(e){r.postMessage(a+e,\"*\")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&\"onreadystatechange\"in l.createElement(\"script\")?(s=l.documentElement,function(e){var t=l.createElement(\"script\");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){\"function\"!=typeof e&&(e=new Function(\"\"+e));for(var t=new Array(arguments.length-1),r=0;r arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@babel/runtime/helpers/slicedToArray'), require('@babel/runtime/helpers/classCallCheck'), require('@babel/runtime/helpers/createClass')) :\n typeof define === 'function' && define.amd ? define(['exports', '@babel/runtime/helpers/slicedToArray', '@babel/runtime/helpers/classCallCheck', '@babel/runtime/helpers/createClass'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.automationEvents = {}, global._slicedToArray, global._classCallCheck, global._createClass));\n})(this, (function (exports, _slicedToArray, _classCallCheck, _createClass) { 'use strict';\n\n var createExtendedExponentialRampToValueAutomationEvent = function createExtendedExponentialRampToValueAutomationEvent(value, endTime, insertTime) {\n return {\n endTime: endTime,\n insertTime: insertTime,\n type: 'exponentialRampToValue',\n value: value\n };\n };\n\n var createExtendedLinearRampToValueAutomationEvent = function createExtendedLinearRampToValueAutomationEvent(value, endTime, insertTime) {\n return {\n endTime: endTime,\n insertTime: insertTime,\n type: 'linearRampToValue',\n value: value\n };\n };\n\n var createSetValueAutomationEvent = function createSetValueAutomationEvent(value, startTime) {\n return {\n startTime: startTime,\n type: 'setValue',\n value: value\n };\n };\n\n var createSetValueCurveAutomationEvent = function createSetValueCurveAutomationEvent(values, startTime, duration) {\n return {\n duration: duration,\n startTime: startTime,\n type: 'setValueCurve',\n values: values\n };\n };\n\n var getTargetValueAtTime = function getTargetValueAtTime(time, valueAtStartTime, _ref) {\n var startTime = _ref.startTime,\n target = _ref.target,\n timeConstant = _ref.timeConstant;\n return target + (valueAtStartTime - target) * Math.exp((startTime - time) / timeConstant);\n };\n\n var isExponentialRampToValueAutomationEvent = function isExponentialRampToValueAutomationEvent(automationEvent) {\n return automationEvent.type === 'exponentialRampToValue';\n };\n\n var isLinearRampToValueAutomationEvent = function isLinearRampToValueAutomationEvent(automationEvent) {\n return automationEvent.type === 'linearRampToValue';\n };\n\n var isAnyRampToValueAutomationEvent = function isAnyRampToValueAutomationEvent(automationEvent) {\n return isExponentialRampToValueAutomationEvent(automationEvent) || isLinearRampToValueAutomationEvent(automationEvent);\n };\n\n var isSetValueAutomationEvent = function isSetValueAutomationEvent(automationEvent) {\n return automationEvent.type === 'setValue';\n };\n\n var isSetValueCurveAutomationEvent = function isSetValueCurveAutomationEvent(automationEvent) {\n return automationEvent.type === 'setValueCurve';\n };\n\n var getValueOfAutomationEventAtIndexAtTime = function getValueOfAutomationEventAtIndexAtTime(automationEvents, index, time, defaultValue) {\n var automationEvent = automationEvents[index];\n return automationEvent === undefined ? defaultValue : isAnyRampToValueAutomationEvent(automationEvent) || isSetValueAutomationEvent(automationEvent) ? automationEvent.value : isSetValueCurveAutomationEvent(automationEvent) ? automationEvent.values[automationEvent.values.length - 1] : getTargetValueAtTime(time, getValueOfAutomationEventAtIndexAtTime(automationEvents, index - 1, automationEvent.startTime, defaultValue), automationEvent);\n };\n\n var getEndTimeAndValueOfPreviousAutomationEvent = function getEndTimeAndValueOfPreviousAutomationEvent(automationEvents, index, currentAutomationEvent, nextAutomationEvent, defaultValue) {\n return currentAutomationEvent === undefined ? [nextAutomationEvent.insertTime, defaultValue] : isAnyRampToValueAutomationEvent(currentAutomationEvent) ? [currentAutomationEvent.endTime, currentAutomationEvent.value] : isSetValueAutomationEvent(currentAutomationEvent) ? [currentAutomationEvent.startTime, currentAutomationEvent.value] : isSetValueCurveAutomationEvent(currentAutomationEvent) ? [currentAutomationEvent.startTime + currentAutomationEvent.duration, currentAutomationEvent.values[currentAutomationEvent.values.length - 1]] : [currentAutomationEvent.startTime, getValueOfAutomationEventAtIndexAtTime(automationEvents, index - 1, currentAutomationEvent.startTime, defaultValue)];\n };\n\n var isCancelAndHoldAutomationEvent = function isCancelAndHoldAutomationEvent(automationEvent) {\n return automationEvent.type === 'cancelAndHold';\n };\n\n var isCancelScheduledValuesAutomationEvent = function isCancelScheduledValuesAutomationEvent(automationEvent) {\n return automationEvent.type === 'cancelScheduledValues';\n };\n\n var getEventTime = function getEventTime(automationEvent) {\n if (isCancelAndHoldAutomationEvent(automationEvent) || isCancelScheduledValuesAutomationEvent(automationEvent)) {\n return automationEvent.cancelTime;\n }\n if (isExponentialRampToValueAutomationEvent(automationEvent) || isLinearRampToValueAutomationEvent(automationEvent)) {\n return automationEvent.endTime;\n }\n return automationEvent.startTime;\n };\n\n var getExponentialRampValueAtTime = function getExponentialRampValueAtTime(time, startTime, valueAtStartTime, _ref) {\n var endTime = _ref.endTime,\n value = _ref.value;\n if (valueAtStartTime === value) {\n return value;\n }\n if (0 < valueAtStartTime && 0 < value || valueAtStartTime < 0 && value < 0) {\n return valueAtStartTime * Math.pow(value / valueAtStartTime, (time - startTime) / (endTime - startTime));\n }\n return 0;\n };\n\n var getLinearRampValueAtTime = function getLinearRampValueAtTime(time, startTime, valueAtStartTime, _ref) {\n var endTime = _ref.endTime,\n value = _ref.value;\n return valueAtStartTime + (time - startTime) / (endTime - startTime) * (value - valueAtStartTime);\n };\n\n var interpolateValue = function interpolateValue(values, theoreticIndex) {\n var lowerIndex = Math.floor(theoreticIndex);\n var upperIndex = Math.ceil(theoreticIndex);\n if (lowerIndex === upperIndex) {\n return values[lowerIndex];\n }\n return (1 - (theoreticIndex - lowerIndex)) * values[lowerIndex] + (1 - (upperIndex - theoreticIndex)) * values[upperIndex];\n };\n\n var getValueCurveValueAtTime = function getValueCurveValueAtTime(time, _ref) {\n var duration = _ref.duration,\n startTime = _ref.startTime,\n values = _ref.values;\n var theoreticIndex = (time - startTime) / duration * (values.length - 1);\n return interpolateValue(values, theoreticIndex);\n };\n\n var isSetTargetAutomationEvent = function isSetTargetAutomationEvent(automationEvent) {\n return automationEvent.type === 'setTarget';\n };\n\n var AutomationEventList = /*#__PURE__*/function (_Symbol$iterator) {\n function AutomationEventList(defaultValue) {\n _classCallCheck(this, AutomationEventList);\n this._automationEvents = [];\n this._currenTime = 0;\n this._defaultValue = defaultValue;\n }\n _createClass(AutomationEventList, [{\n key: _Symbol$iterator,\n value: function value() {\n return this._automationEvents[Symbol.iterator]();\n }\n }, {\n key: \"add\",\n value: function add(automationEvent) {\n var eventTime = getEventTime(automationEvent);\n if (isCancelAndHoldAutomationEvent(automationEvent) || isCancelScheduledValuesAutomationEvent(automationEvent)) {\n var index = this._automationEvents.findIndex(function (currentAutomationEvent) {\n if (isCancelScheduledValuesAutomationEvent(automationEvent) && isSetValueCurveAutomationEvent(currentAutomationEvent)) {\n return currentAutomationEvent.startTime + currentAutomationEvent.duration >= eventTime;\n }\n return getEventTime(currentAutomationEvent) >= eventTime;\n });\n var removedAutomationEvent = this._automationEvents[index];\n if (index !== -1) {\n this._automationEvents = this._automationEvents.slice(0, index);\n }\n if (isCancelAndHoldAutomationEvent(automationEvent)) {\n var lastAutomationEvent = this._automationEvents[this._automationEvents.length - 1];\n if (removedAutomationEvent !== undefined && isAnyRampToValueAutomationEvent(removedAutomationEvent)) {\n if (lastAutomationEvent !== undefined && isSetTargetAutomationEvent(lastAutomationEvent)) {\n throw new Error('The internal list is malformed.');\n }\n var startTime = lastAutomationEvent === undefined ? removedAutomationEvent.insertTime : isSetValueCurveAutomationEvent(lastAutomationEvent) ? lastAutomationEvent.startTime + lastAutomationEvent.duration : getEventTime(lastAutomationEvent);\n var startValue = lastAutomationEvent === undefined ? this._defaultValue : isSetValueCurveAutomationEvent(lastAutomationEvent) ? lastAutomationEvent.values[lastAutomationEvent.values.length - 1] : lastAutomationEvent.value;\n var value = isExponentialRampToValueAutomationEvent(removedAutomationEvent) ? getExponentialRampValueAtTime(eventTime, startTime, startValue, removedAutomationEvent) : getLinearRampValueAtTime(eventTime, startTime, startValue, removedAutomationEvent);\n var truncatedAutomationEvent = isExponentialRampToValueAutomationEvent(removedAutomationEvent) ? createExtendedExponentialRampToValueAutomationEvent(value, eventTime, this._currenTime) : createExtendedLinearRampToValueAutomationEvent(value, eventTime, this._currenTime);\n this._automationEvents.push(truncatedAutomationEvent);\n }\n if (lastAutomationEvent !== undefined && isSetTargetAutomationEvent(lastAutomationEvent)) {\n this._automationEvents.push(createSetValueAutomationEvent(this.getValue(eventTime), eventTime));\n }\n if (lastAutomationEvent !== undefined && isSetValueCurveAutomationEvent(lastAutomationEvent) && lastAutomationEvent.startTime + lastAutomationEvent.duration > eventTime) {\n var duration = eventTime - lastAutomationEvent.startTime;\n var ratio = (lastAutomationEvent.values.length - 1) / lastAutomationEvent.duration;\n var length = Math.max(2, 1 + Math.ceil(duration * ratio));\n var fraction = duration / (length - 1) * ratio;\n var values = lastAutomationEvent.values.slice(0, length);\n if (fraction < 1) {\n for (var i = 1; i < length; i += 1) {\n var factor = fraction * i % 1;\n values[i] = lastAutomationEvent.values[i - 1] * (1 - factor) + lastAutomationEvent.values[i] * factor;\n }\n }\n this._automationEvents[this._automationEvents.length - 1] = createSetValueCurveAutomationEvent(values, lastAutomationEvent.startTime, duration);\n }\n }\n } else {\n var _index = this._automationEvents.findIndex(function (currentAutomationEvent) {\n return getEventTime(currentAutomationEvent) > eventTime;\n });\n var previousAutomationEvent = _index === -1 ? this._automationEvents[this._automationEvents.length - 1] : this._automationEvents[_index - 1];\n if (previousAutomationEvent !== undefined && isSetValueCurveAutomationEvent(previousAutomationEvent) && getEventTime(previousAutomationEvent) + previousAutomationEvent.duration > eventTime) {\n return false;\n }\n var persistentAutomationEvent = isExponentialRampToValueAutomationEvent(automationEvent) ? createExtendedExponentialRampToValueAutomationEvent(automationEvent.value, automationEvent.endTime, this._currenTime) : isLinearRampToValueAutomationEvent(automationEvent) ? createExtendedLinearRampToValueAutomationEvent(automationEvent.value, eventTime, this._currenTime) : automationEvent;\n if (_index === -1) {\n this._automationEvents.push(persistentAutomationEvent);\n } else {\n if (isSetValueCurveAutomationEvent(automationEvent) && eventTime + automationEvent.duration > getEventTime(this._automationEvents[_index])) {\n return false;\n }\n this._automationEvents.splice(_index, 0, persistentAutomationEvent);\n }\n }\n return true;\n }\n }, {\n key: \"flush\",\n value: function flush(time) {\n var index = this._automationEvents.findIndex(function (currentAutomationEvent) {\n return getEventTime(currentAutomationEvent) > time;\n });\n if (index > 1) {\n var remainingAutomationEvents = this._automationEvents.slice(index - 1);\n var firstRemainingAutomationEvent = remainingAutomationEvents[0];\n if (isSetTargetAutomationEvent(firstRemainingAutomationEvent)) {\n remainingAutomationEvents.unshift(createSetValueAutomationEvent(getValueOfAutomationEventAtIndexAtTime(this._automationEvents, index - 2, firstRemainingAutomationEvent.startTime, this._defaultValue), firstRemainingAutomationEvent.startTime));\n }\n this._automationEvents = remainingAutomationEvents;\n }\n }\n }, {\n key: \"getValue\",\n value: function getValue(time) {\n if (this._automationEvents.length === 0) {\n return this._defaultValue;\n }\n var indexOfNextEvent = this._automationEvents.findIndex(function (automationEvent) {\n return getEventTime(automationEvent) > time;\n });\n var nextAutomationEvent = this._automationEvents[indexOfNextEvent];\n var indexOfCurrentEvent = (indexOfNextEvent === -1 ? this._automationEvents.length : indexOfNextEvent) - 1;\n var currentAutomationEvent = this._automationEvents[indexOfCurrentEvent];\n if (currentAutomationEvent !== undefined && isSetTargetAutomationEvent(currentAutomationEvent) && (nextAutomationEvent === undefined || !isAnyRampToValueAutomationEvent(nextAutomationEvent) || nextAutomationEvent.insertTime > time)) {\n return getTargetValueAtTime(time, getValueOfAutomationEventAtIndexAtTime(this._automationEvents, indexOfCurrentEvent - 1, currentAutomationEvent.startTime, this._defaultValue), currentAutomationEvent);\n }\n if (currentAutomationEvent !== undefined && isSetValueAutomationEvent(currentAutomationEvent) && (nextAutomationEvent === undefined || !isAnyRampToValueAutomationEvent(nextAutomationEvent))) {\n return currentAutomationEvent.value;\n }\n if (currentAutomationEvent !== undefined && isSetValueCurveAutomationEvent(currentAutomationEvent) && (nextAutomationEvent === undefined || !isAnyRampToValueAutomationEvent(nextAutomationEvent) || currentAutomationEvent.startTime + currentAutomationEvent.duration > time)) {\n if (time < currentAutomationEvent.startTime + currentAutomationEvent.duration) {\n return getValueCurveValueAtTime(time, currentAutomationEvent);\n }\n return currentAutomationEvent.values[currentAutomationEvent.values.length - 1];\n }\n if (currentAutomationEvent !== undefined && isAnyRampToValueAutomationEvent(currentAutomationEvent) && (nextAutomationEvent === undefined || !isAnyRampToValueAutomationEvent(nextAutomationEvent))) {\n return currentAutomationEvent.value;\n }\n if (nextAutomationEvent !== undefined && isExponentialRampToValueAutomationEvent(nextAutomationEvent)) {\n var _getEndTimeAndValueOf = getEndTimeAndValueOfPreviousAutomationEvent(this._automationEvents, indexOfCurrentEvent, currentAutomationEvent, nextAutomationEvent, this._defaultValue),\n _getEndTimeAndValueOf2 = _slicedToArray(_getEndTimeAndValueOf, 2),\n startTime = _getEndTimeAndValueOf2[0],\n value = _getEndTimeAndValueOf2[1];\n return getExponentialRampValueAtTime(time, startTime, value, nextAutomationEvent);\n }\n if (nextAutomationEvent !== undefined && isLinearRampToValueAutomationEvent(nextAutomationEvent)) {\n var _getEndTimeAndValueOf3 = getEndTimeAndValueOfPreviousAutomationEvent(this._automationEvents, indexOfCurrentEvent, currentAutomationEvent, nextAutomationEvent, this._defaultValue),\n _getEndTimeAndValueOf4 = _slicedToArray(_getEndTimeAndValueOf3, 2),\n _startTime = _getEndTimeAndValueOf4[0],\n _value = _getEndTimeAndValueOf4[1];\n return getLinearRampValueAtTime(time, _startTime, _value, nextAutomationEvent);\n }\n return this._defaultValue;\n }\n }]);\n return AutomationEventList;\n }(Symbol.iterator);\n\n var createCancelAndHoldAutomationEvent = function createCancelAndHoldAutomationEvent(cancelTime) {\n return {\n cancelTime: cancelTime,\n type: 'cancelAndHold'\n };\n };\n\n var createCancelScheduledValuesAutomationEvent = function createCancelScheduledValuesAutomationEvent(cancelTime) {\n return {\n cancelTime: cancelTime,\n type: 'cancelScheduledValues'\n };\n };\n\n var createExponentialRampToValueAutomationEvent = function createExponentialRampToValueAutomationEvent(value, endTime) {\n return {\n endTime: endTime,\n type: 'exponentialRampToValue',\n value: value\n };\n };\n\n var createLinearRampToValueAutomationEvent = function createLinearRampToValueAutomationEvent(value, endTime) {\n return {\n endTime: endTime,\n type: 'linearRampToValue',\n value: value\n };\n };\n\n var createSetTargetAutomationEvent = function createSetTargetAutomationEvent(target, startTime, timeConstant) {\n return {\n startTime: startTime,\n target: target,\n timeConstant: timeConstant,\n type: 'setTarget'\n };\n };\n\n exports.AutomationEventList = AutomationEventList;\n exports.createCancelAndHoldAutomationEvent = createCancelAndHoldAutomationEvent;\n exports.createCancelScheduledValuesAutomationEvent = createCancelScheduledValuesAutomationEvent;\n exports.createExponentialRampToValueAutomationEvent = createExponentialRampToValueAutomationEvent;\n exports.createLinearRampToValueAutomationEvent = createLinearRampToValueAutomationEvent;\n exports.createSetTargetAutomationEvent = createSetTargetAutomationEvent;\n exports.createSetValueAutomationEvent = createSetValueAutomationEvent;\n exports.createSetValueCurveAutomationEvent = createSetValueCurveAutomationEvent;\n\n}));\n", "const {\n hasOwnProperty,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!apply) {\n apply = function (fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\nif (!freeze) {\n freeze = function (x) {\n return x;\n };\n}\n\nif (!seal) {\n seal = function (x) {\n return x;\n };\n}\n\nif (!construct) {\n construct = function (Func, args) {\n return new Func(...args);\n };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\nexport function numberIsNaN(x) {\n // eslint-disable-next-line unicorn/prefer-number-properties\n return typeof x === 'number' && isNaN(x);\n}\n\nexport function unapply(func) {\n return (thisArg, ...args) => apply(func, thisArg, args);\n}\n\nexport function unconstruct(func) {\n return (...args) => construct(func, args);\n}\n\n/* Add properties to a lookup table */\nexport function addToSet(set, array, transformCaseFunc) {\n transformCaseFunc = transformCaseFunc ?? stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n}\n\n/* Shallow clone an object */\nexport function clone(object) {\n const newObject = create(null);\n\n let property;\n for (property in object) {\n if (apply(hasOwnProperty, object, [property]) === true) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n}\n\n/* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n}\n\nexport {\n // Array\n arrayForEach,\n arrayIndexOf,\n arrayPop,\n arrayPush,\n arraySlice,\n // Object\n freeze,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n hasOwnProperty,\n isFrozen,\n setPrototypeOf,\n seal,\n // RegExp\n regExpTest,\n // String\n stringIndexOf,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringTrim,\n // Errors\n typeErrorCreate,\n // Other\n lookupGetter,\n};\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'section',\n 'select',\n 'shadow',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n]);\n\n// SVG\nexport const svg = freeze([\n 'svg',\n 'a',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'style',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'view',\n 'vkern',\n]);\n\nexport const svgFilters = freeze([\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n]);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n 'animate',\n 'color-profile',\n 'cursor',\n 'discard',\n 'fedropshadow',\n 'font-face',\n 'font-face-format',\n 'font-face-name',\n 'font-face-src',\n 'font-face-uri',\n 'foreignobject',\n 'hatch',\n 'hatchpath',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'missing-glyph',\n 'script',\n 'set',\n 'solidcolor',\n 'unknown',\n 'use',\n]);\n\nexport const mathMl = freeze([\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmultiscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mspace',\n 'msqrt',\n 'mstyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n]);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n 'maction',\n 'maligngroup',\n 'malignmark',\n 'mlongdiv',\n 'mscarries',\n 'mscarry',\n 'msgroup',\n 'mstack',\n 'msline',\n 'msrow',\n 'semantics',\n 'annotation',\n 'annotation-xml',\n 'mprescripts',\n 'none',\n]);\n\nexport const text = freeze(['#text']);\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'accept',\n 'action',\n 'align',\n 'alt',\n 'autocapitalize',\n 'autocomplete',\n 'autopictureinpicture',\n 'autoplay',\n 'background',\n 'bgcolor',\n 'border',\n 'capture',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'clear',\n 'color',\n 'cols',\n 'colspan',\n 'controls',\n 'controlslist',\n 'coords',\n 'crossorigin',\n 'datetime',\n 'decoding',\n 'default',\n 'dir',\n 'disabled',\n 'disablepictureinpicture',\n 'disableremoteplayback',\n 'download',\n 'draggable',\n 'enctype',\n 'enterkeyhint',\n 'face',\n 'for',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'id',\n 'inputmode',\n 'integrity',\n 'ismap',\n 'kind',\n 'label',\n 'lang',\n 'list',\n 'loading',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'minlength',\n 'multiple',\n 'muted',\n 'name',\n 'nonce',\n 'noshade',\n 'novalidate',\n 'nowrap',\n 'open',\n 'optimum',\n 'pattern',\n 'placeholder',\n 'playsinline',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'rev',\n 'reversed',\n 'role',\n 'rows',\n 'rowspan',\n 'spellcheck',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'sizes',\n 'span',\n 'srclang',\n 'start',\n 'src',\n 'srcset',\n 'step',\n 'style',\n 'summary',\n 'tabindex',\n 'title',\n 'translate',\n 'type',\n 'usemap',\n 'valign',\n 'value',\n 'width',\n 'xmlns',\n 'slot',\n]);\n\nexport const svg = freeze([\n 'accent-height',\n 'accumulate',\n 'additive',\n 'alignment-baseline',\n 'ascent',\n 'attributename',\n 'attributetype',\n 'azimuth',\n 'basefrequency',\n 'baseline-shift',\n 'begin',\n 'bias',\n 'by',\n 'class',\n 'clip',\n 'clippathunits',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'diffuseconstant',\n 'direction',\n 'display',\n 'divisor',\n 'dur',\n 'edgemode',\n 'elevation',\n 'end',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'filter',\n 'filterunits',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'fx',\n 'fy',\n 'g1',\n 'g2',\n 'glyph-name',\n 'glyphref',\n 'gradientunits',\n 'gradienttransform',\n 'height',\n 'href',\n 'id',\n 'image-rendering',\n 'in',\n 'in2',\n 'k',\n 'k1',\n 'k2',\n 'k3',\n 'k4',\n 'kerning',\n 'keypoints',\n 'keysplines',\n 'keytimes',\n 'lang',\n 'lengthadjust',\n 'letter-spacing',\n 'kernelmatrix',\n 'kernelunitlength',\n 'lighting-color',\n 'local',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'markerheight',\n 'markerunits',\n 'markerwidth',\n 'maskcontentunits',\n 'maskunits',\n 'max',\n 'mask',\n 'media',\n 'method',\n 'mode',\n 'min',\n 'name',\n 'numoctaves',\n 'offset',\n 'operator',\n 'opacity',\n 'order',\n 'orient',\n 'orientation',\n 'origin',\n 'overflow',\n 'paint-order',\n 'path',\n 'pathlength',\n 'patterncontentunits',\n 'patterntransform',\n 'patternunits',\n 'points',\n 'preservealpha',\n 'preserveaspectratio',\n 'primitiveunits',\n 'r',\n 'rx',\n 'ry',\n 'radius',\n 'refx',\n 'refy',\n 'repeatcount',\n 'repeatdur',\n 'restart',\n 'result',\n 'rotate',\n 'scale',\n 'seed',\n 'shape-rendering',\n 'specularconstant',\n 'specularexponent',\n 'spreadmethod',\n 'startoffset',\n 'stddeviation',\n 'stitchtiles',\n 'stop-color',\n 'stop-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke',\n 'stroke-width',\n 'style',\n 'surfacescale',\n 'systemlanguage',\n 'tabindex',\n 'targetx',\n 'targety',\n 'transform',\n 'transform-origin',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'textlength',\n 'type',\n 'u1',\n 'u2',\n 'unicode',\n 'values',\n 'viewbox',\n 'visibility',\n 'version',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'width',\n 'word-spacing',\n 'wrap',\n 'writing-mode',\n 'xchannelselector',\n 'ychannelselector',\n 'x',\n 'x1',\n 'x2',\n 'xmlns',\n 'y',\n 'y1',\n 'y2',\n 'z',\n 'zoomandpan',\n]);\n\nexport const mathMl = freeze([\n 'accent',\n 'accentunder',\n 'align',\n 'bevelled',\n 'close',\n 'columnsalign',\n 'columnlines',\n 'columnspan',\n 'denomalign',\n 'depth',\n 'dir',\n 'display',\n 'displaystyle',\n 'encoding',\n 'fence',\n 'frame',\n 'height',\n 'href',\n 'id',\n 'largeop',\n 'length',\n 'linethickness',\n 'lspace',\n 'lquote',\n 'mathbackground',\n 'mathcolor',\n 'mathsize',\n 'mathvariant',\n 'maxsize',\n 'minsize',\n 'movablelimits',\n 'notation',\n 'numalign',\n 'open',\n 'rowalign',\n 'rowlines',\n 'rowspacing',\n 'rowspan',\n 'rspace',\n 'rquote',\n 'scriptlevel',\n 'scriptminsize',\n 'scriptsizemultiplier',\n 'selection',\n 'separator',\n 'separators',\n 'stretchy',\n 'subscriptshift',\n 'supscriptshift',\n 'symmetric',\n 'voffset',\n 'width',\n 'xmlns',\n]);\n\nexport const xml = freeze([\n 'xlink:href',\n 'xml:id',\n 'xlink:title',\n 'xml:space',\n 'xmlns:xlink',\n]);\n", "import { seal } from './utils.js';\n\n// eslint-disable-next-line unicorn/better-regex\nexport const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nexport const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nexport const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nexport const DOCTYPE_NAME = seal(/^html$/i);\nexport const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n", "import * as TAGS from './tags.js';\nimport * as ATTRS from './attrs.js';\nimport * as EXPRESSIONS from './regexp.js';\nimport {\n addToSet,\n clone,\n freeze,\n arrayForEach,\n arrayPop,\n arrayPush,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringIndexOf,\n stringTrim,\n numberIsNaN,\n regExpTest,\n typeErrorCreate,\n lookupGetter,\n} from './utils.js';\n\nconst getGlobal = () => (typeof window === 'undefined' ? null : window);\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\nconst _createTrustedTypesPolicy = function (trustedTypes, document) {\n if (\n typeof trustedTypes !== 'object' ||\n typeof trustedTypes.createPolicy !== 'function'\n ) {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (\n document.currentScript &&\n document.currentScript.hasAttribute(ATTR_NAME)\n ) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n },\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn(\n 'TrustedTypes policy ' + policyName + ' could not be created.'\n );\n return null;\n }\n};\n\nfunction createDOMPurify(window = getGlobal()) {\n const DOMPurify = (root) => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = VERSION;\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n const originalDocument = window.document;\n\n let { document } = window;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes,\n } = window;\n\n const ElementPrototype = Element.prototype;\n\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n const trustedTypesPolicy = _createTrustedTypesPolicy(\n trustedTypes,\n originalDocument\n );\n const emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName,\n } = document;\n const { importNode } = originalDocument;\n\n let documentMode = {};\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported =\n typeof getParentNode === 'function' &&\n implementation &&\n implementation.createHTMLDocument !== undefined &&\n documentMode !== 9;\n\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT,\n } = EXPRESSIONS;\n\n let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n ...TAGS.html,\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.mathMl,\n ...TAGS.text,\n ]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ...ATTRS.html,\n ...ATTRS.svg,\n ...ATTRS.mathMl,\n ...ATTRS.xml,\n ]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(\n Object.create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false,\n },\n })\n );\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (\u00A77.3.3)\n * - DOM Tree Accessors (\u00A73.1.5)\n * - Form Element Parent-Child Relations (\u00A74.10.3)\n * - Iframe srcdoc / Nested WindowProxies (\u00A74.8.5)\n * - HTMLCollection (\u00A74.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, [\n 'annotation-xml',\n 'audio',\n 'colgroup',\n 'desc',\n 'foreignobject',\n 'head',\n 'iframe',\n 'math',\n 'mi',\n 'mn',\n 'mo',\n 'ms',\n 'mtext',\n 'noembed',\n 'noframes',\n 'noscript',\n 'plaintext',\n 'script',\n 'style',\n 'svg',\n 'template',\n 'thead',\n 'title',\n 'video',\n 'xmp',\n ]);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, [\n 'audio',\n 'video',\n 'img',\n 'source',\n 'image',\n 'track',\n ]);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n 'alt',\n 'class',\n 'for',\n 'id',\n 'label',\n 'name',\n 'pattern',\n 'placeholder',\n 'role',\n 'summary',\n 'title',\n 'value',\n 'style',\n 'xmlns',\n ]);\n\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet(\n {},\n [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE],\n stringToString\n );\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Specify the maximum element nesting depth to prevent mXSS */\n const MAX_NESTING_DEPTH = 255;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n\n const isRegexOrFunction = function (testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function (cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1\n ? (PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE)\n : (PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE);\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc =\n PARSER_MEDIA_TYPE === 'application/xhtml+xml'\n ? stringToString\n : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS =\n 'ALLOWED_TAGS' in cfg\n ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc)\n : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR =\n 'ALLOWED_ATTR' in cfg\n ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc)\n : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES =\n 'ALLOWED_NAMESPACES' in cfg\n ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString)\n : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES =\n 'ADD_URI_SAFE_ATTR' in cfg\n ? addToSet(\n clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS =\n 'ADD_DATA_URI_TAGS' in cfg\n ? addToSet(\n clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS =\n 'FORBID_CONTENTS' in cfg\n ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc)\n : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS =\n 'FORBID_TAGS' in cfg\n ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc)\n : {};\n FORBID_ATTR =\n 'FORBID_ATTR' in cfg\n ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc)\n : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)\n ) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck =\n cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)\n ) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck =\n cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements ===\n 'boolean'\n ) {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =\n cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [...TAGS.text]);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, TAGS.html);\n addToSet(ALLOWED_ATTR, ATTRS.html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, TAGS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, TAGS.svgFilters);\n addToSet(ALLOWED_ATTR, ATTRS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, TAGS.mathMl);\n addToSet(ALLOWED_ATTR, ATTRS.mathMl);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [\n 'mi',\n 'mo',\n 'mn',\n 'ms',\n 'mtext',\n ]);\n\n const HTML_INTEGRATION_POINTS = addToSet({}, [\n 'foreignobject',\n 'annotation-xml',\n ]);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n 'title',\n 'style',\n 'font',\n 'a',\n 'script',\n ]);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, TAGS.svg);\n addToSet(ALL_SVG_TAGS, TAGS.svgFilters);\n addToSet(ALL_SVG_TAGS, TAGS.svgDisallowed);\n\n const ALL_MATHML_TAGS = addToSet({}, TAGS.mathMl);\n addToSet(ALL_MATHML_TAGS, TAGS.mathMlDisallowed);\n\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function (element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template',\n };\n }\n\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return (\n tagName === 'svg' &&\n (parentTagName === 'annotation-xml' ||\n MATHML_TEXT_INTEGRATION_POINTS[parentTagName])\n );\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (\n parent.namespaceURI === SVG_NAMESPACE &&\n !HTML_INTEGRATION_POINTS[parentTagName]\n ) {\n return false;\n }\n\n if (\n parent.namespaceURI === MATHML_NAMESPACE &&\n !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]\n ) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return (\n !ALL_MATHML_TAGS[tagName] &&\n (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName])\n );\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (\n PARSER_MEDIA_TYPE === 'application/xhtml+xml' &&\n ALLOWED_NAMESPACES[element.namespaceURI]\n ) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function (node) {\n arrayPush(DOMPurify.removed, { element: node });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function (name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node,\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node,\n });\n }\n\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function (dirty) {\n /* Create a HTML document */\n let doc;\n let leadingWhitespace;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (\n PARSER_MEDIA_TYPE === 'application/xhtml+xml' &&\n NAMESPACE === HTML_NAMESPACE\n ) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty =\n '' +\n dirty +\n '';\n }\n\n const dirtyPayload = trustedTypesPolicy\n ? trustedTypesPolicy.createHTML(dirty)\n : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT\n ? emptyHTML\n : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n\n const body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(\n document.createTextNode(leadingWhitespace),\n body.childNodes[0] || null\n );\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(\n doc,\n WHOLE_DOCUMENT ? 'html' : 'body'\n )[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n const _createIterator = function (root) {\n return createNodeIterator.call(\n root.ownerDocument || root,\n root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT |\n NodeFilter.SHOW_COMMENT |\n NodeFilter.SHOW_TEXT |\n NodeFilter.SHOW_PROCESSING_INSTRUCTION |\n NodeFilter.SHOW_CDATA_SECTION,\n null,\n false\n );\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function (elm) {\n return (\n elm instanceof HTMLFormElement &&\n ((typeof elm.__depth !== 'undefined' &&\n typeof elm.__depth !== 'number') ||\n (typeof elm.__removalCount !== 'undefined' &&\n typeof elm.__removalCount !== 'number') ||\n typeof elm.nodeName !== 'string' ||\n typeof elm.textContent !== 'string' ||\n typeof elm.removeChild !== 'function' ||\n !(elm.attributes instanceof NamedNodeMap) ||\n typeof elm.removeAttribute !== 'function' ||\n typeof elm.setAttribute !== 'function' ||\n typeof elm.namespaceURI !== 'string' ||\n typeof elm.insertBefore !== 'function' ||\n typeof elm.hasChildNodes !== 'function')\n );\n };\n\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function (object) {\n return typeof Node === 'object'\n ? object instanceof Node\n : object &&\n typeof object === 'object' &&\n typeof object.nodeType === 'number' &&\n typeof object.nodeName === 'string';\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function (entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], (hook) => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function (currentNode) {\n let content;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check if tagname contains Unicode */\n if (regExpTest(/[\\u0080-\\uFFFF]/, currentNode.nodeName)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS,\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (\n currentNode.hasChildNodes() &&\n !_isNode(currentNode.firstElementChild) &&\n (!_isNode(currentNode.content) ||\n !_isNode(currentNode.content.firstElementChild)) &&\n regExpTest(/<[/\\w]/g, currentNode.innerHTML) &&\n regExpTest(/<[/\\w]/g, currentNode.textContent)\n ) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Mitigate a problem with templates inside select */\n if (\n tagName === 'select' &&\n regExpTest(/