diff --git a/content/adventures/ar.yaml b/content/adventures/ar.yaml
index baafac1ebf1..1a5c3e3c7e5 100644
--- a/content/adventures/ar.yaml
+++ b/content/adventures/ar.yaml
@@ -218,12 +218,6 @@ adventures:
sword = 'found'
```
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'
@@ -238,339 +232,26 @@ adventures:
{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} & {remove} {from}'
- default_save_name: add_remove_command
description: introducing add to 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} 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 hpoing 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, you can use the `{echo}` command. The answer will then 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: آلة حاسبة
default_save_name: آلة حاسبة
@@ -625,44 +306,7 @@ adventures:
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
@@ -678,34 +322,7 @@ adventures:
number2 = {ask} 'What is the second number?'
answer = number1 + number2
{print} number1 ' plus ' number2 ' is ' answer
- 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
@@ -724,91 +341,14 @@ adventures:
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: تصحيح الأخطاء
default_save_name: تصحيح الأخطاء
description: مغامرة تصحيح الأخطاء
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: |
**تحذير! هذا الكود بحاجة إلى تصحيح!**
```
@@ -1022,9 +562,6 @@ adventures:
print month i
```
12:
- story_text: |-
- ### Exercise
- Debug this code. Good luck!
example_code: |
**Warning! This code needs to be debugged!**
```
@@ -1050,9 +587,6 @@ adventures:
call greet_costumer
```
13:
- story_text: |-
- ### Exercise
- Debug this code. Good luck!
example_code: |
**Warning! This code needs to be debugged!**
```
@@ -1082,9 +616,6 @@ adventures:
print 'No problem!'
```
14:
- story_text: |-
- ### Exercise
- Debug this code. Good luck!
example_code: |
**Warning! This code needs to be debugged!**
```
@@ -1131,9 +662,6 @@ adventures:
else
'no problem'
15:
- story_text: |-
- ### Exercise
- Debug this random children's story. Good luck!
example_code: |
**Warning! This code needs to be debugged!**
```
@@ -1168,10 +696,6 @@ adventures:
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!**
```
@@ -1190,9 +714,6 @@ adventures:
```
17:
- story_text: |-
- ### Exercise
- Debug this code. Good luck!
example_code: |
**Warning! This code needs to be debugged!**
```
@@ -1225,9 +746,6 @@ adventures:
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!**
```
@@ -1258,10 +776,6 @@ adventures:
جرب الكود بنفسك من خلال الضغط على الزر الأخضر "تنفيذ البرنامج" الموجود تحت المساحة البرمجية.
بامكانك اظهار/طباعة الكلام على الشاشة من خلال استعمال الأمر `{print}` .
- example_code: |
- ```
- {print} Hello world!
- ```
2:
story_text: "في المستوى 2 نتعلم الأوامر الجديدة `{is}` و `{sleep}`.\nيمكنك أن تعطي اسما لشيء ما باستخدام `{is}`. هذا ما يسمى ب \"متغير\". في المثال الموجود قمنا بانشاء متغير يسمى الاسم ومتغير آخر يسمى العمر. يمكنك أن تستخدم كلمة الاسم في أي مكان في البرنامج الخاص بك وسيتم استبدالها ب هيدي، كما في المثال التوضيحي: \n\nبهذا الشكل لم تعد الان بحاجة للأمر `{echo}`.\n"
example_code: |
@@ -1347,10 +861,6 @@ adventures:
{for} حيوان {in} حيواناتي_المفضلة
{print} "أنا أحب " حيوان
```
- 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: |-
**الأرقام العشرية**
@@ -1482,33 +992,8 @@ adventures:
{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: غسل الأطباق؟
- default_save_name: Dishes
description: Use the computer to see who does the dishes (Start at level 2)
levels:
3:
@@ -1594,22 +1079,10 @@ adventures:
10:
story_text: |
In this level you could make an even better dish washing shedule.
- 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: |
```
prices = ['1 million dollars', 'an apple pie', 'nothing']
@@ -1623,67 +1096,16 @@ adventures:
{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: العراف
default_save_name: العراف
- description: Let Hedy predict the future
levels:
1:
story_text: |
@@ -1712,24 +1134,6 @@ adventures:
```
story_text_2: |
الان هيدي العرافة تستطيع الإجابة بنعم، لا او ربما فقط. هل يمكنك أن تعطيها خيارات لإجابات أخرى مثل "بالتأكيد" او "{ask} مرة أخرى".
- 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: |
في هذا المستوى ستتعلم (سرًا) ترجيح الاحتمالات لصالحك ، عند استخدام العراف!
@@ -1839,27 +1243,8 @@ adventures:
{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'
@@ -1896,31 +1281,13 @@ adventures:
I dreamed that my Bonnie is dead
Can you program this verse in the same way as the example?
+ 14:
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
+ {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?'
@@ -1928,219 +1295,6 @@ adventures:
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!***
-
{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'
@@ -2020,25 +1185,7 @@ adventures:
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
@@ -2052,223 +1199,7 @@ adventures:
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!***
- {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'
@@ -1931,25 +1038,7 @@ adventures:
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
@@ -1963,223 +1052,7 @@ adventures:
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!***
- {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'
@@ -2009,25 +1457,7 @@ adventures:
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
@@ -2041,266 +1471,24 @@ adventures:
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
+ haunted:
levels:
- 14:
- story_text: |
- In this level you can program the game 'Guess my number'
-
+ 1:
+ story_text_2: |
### Exercise
- Fill in the correct symbols on the blanks to get the game to work.
+ Can you finish the scary story? Or make up your own haunted house story?
+ 2:
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: |
+ monster_1 {is} 👻
+ monster_2 {is} 🤡
+ monster_3 {is} 👶
+ {print} You enter the haunted house.
+ {print} Suddenly you see a monster_1
+ {print} You run into the other room, but a monster_2 is waiting there for you!
+ {print} Oh no! Quickly get to the kitchen.
+ {print} But as you enter monster_3 attacks you!
```
- 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!***
- {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'
@@ -1970,25 +1145,7 @@ adventures:
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
@@ -2002,222 +1159,7 @@ adventures:
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!***
- {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'
@@ -2001,25 +983,7 @@ adventures:
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
@@ -2033,1116 +997,118 @@ adventures:
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.
+ haunted:
+ levels:
+ 2:
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
+ monster_1 {is} 👻
+ monster_2 {is} 🤡
+ monster_3 {is} 👶
+ {print} You enter the haunted house.
+ {print} Suddenly you see a monster_1
+ {print} You run into the other room, but a monster_2 is waiting there for you!
+ {print} Oh no! Quickly get to the kitchen.
+ {print} But as you enter monster_3 attacks you!
+ ```
+ example_code_2: |
+ ```
+ monster_1 {is} _
+ monster_2 {is} _
+ monster_3 {is} _
+ {print} You enter the haunted house.
+ {print} Suddenly you see a monster_1
+ {print} You run into the other room, but a monster_2 is waiting there for you!
+ {print} Oh no! Quickly get to the kitchen.
+ {print} But as you enter monster_3 attacks you!
+ ```
+ 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!
+ 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"
+ if_command:
+ description: Introducing the if command
levels:
- 14:
+ 9:
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: |
+ In this level you can also put an {if} command inside another {if} command.
+ in_command:
+ description: Introducing the in command
+ levels:
+ 5:
+ example_code_2: |
```
- {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'
+ 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'
```
- hangman:
- name: Hangman
- default_save_name: Hangman
- description: Guess the word
+ is_command:
+ description: introducing is command
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!***
- {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'
@@ -1979,46 +1041,7 @@ adventures:
{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
@@ -2032,253 +1055,9 @@ adventures:
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!***
- {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'
@@ -1884,25 +949,7 @@ adventures:
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
@@ -1916,223 +963,7 @@ adventures:
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!***
- {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'
@@ -1962,25 +1229,7 @@ adventures:
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
@@ -1994,219 +1243,6 @@ adventures:
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!***
- {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'
@@ -1975,25 +1089,7 @@ adventures:
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
@@ -2007,223 +1103,7 @@ adventures:
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!***
- {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'
@@ -1970,25 +1076,7 @@ adventures:
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
@@ -2002,222 +1090,7 @@ adventures:
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!***
- {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'
@@ -1984,25 +1168,7 @@ adventures:
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
@@ -2016,251 +1182,13 @@ adventures:
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!***
- {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'
@@ -2031,25 +1148,7 @@ adventures:
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
@@ -2063,222 +1162,7 @@ adventures:
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!***
- {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'
@@ -1986,25 +1162,7 @@ adventures:
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
@@ -2018,223 +1176,7 @@ adventures:
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!***
- {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'
@@ -2004,25 +1235,7 @@ adventures:
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
@@ -2036,223 +1249,7 @@ adventures:
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!***
- {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"
- 13:
- 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"
- 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"
- 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:
- 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"
- name: Guess my number
- default_save_name: guess my number
- 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{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'
@@ -2002,25 +1212,7 @@ adventures:
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
@@ -2034,219 +1226,6 @@ adventures:
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!***
- {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 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`.
-
- ### Exercise
- The next verse of this song goes:
-
- 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!***
- {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"
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"
13:
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, 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"
- 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"
- 18:
- 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"
- 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"
- 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"
- name: Guess my number
- default_save_name: guess my number
- hangman:
- default_save_name: Hangman
- description: Guess the word
- name: Hangman
- levels:
- 17:
- 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"
- 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"
- hangman_2:
- default_save_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"
- name: Hangman 2
- 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{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'
@@ -1971,25 +1462,7 @@ adventures:
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
@@ -2003,248 +1476,35 @@ adventures:
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
+ haunted:
+ name: Rumah berhantu
+ default_save_name: rumahhantu
+ description: Keluar dari rumah berhantu
levels:
- 14:
- story_text: |
- In this level you can program the game 'Guess my number'
+ 1:
+ story_text: |-
+ Pada petualangan ini kamu akan membuat permainan dimana kamu harus keluar dari sebuah rumah berhantu dengan cara memilih pintu yang benar.
+ Jika kamu memilih pintu yang benar kamu akan bertahan hidup, tapi kalau tidak seekor monster akan...
+ Pada level 1 kita memulai permainan rumah berhantu dengan membuat cerita menyeramkan dan menanyakan monster apa yang pemain akan lihat di rumah berhantu.
+ example_code: "```\nprint Kenapa aku ada disini?\nprint Aku ingat temanku menyarankan untuk tidak ke rumah besar tua itu...\nprint dan tiba-tiba semuanya menjadi gelap.\nprint Tapi bagaimana caranya aku tergeletak di lantai...?\nprint Kepalaku sakit seperti telah dipukul dengan tongkat pemukul basebal!\nprint Suara apa itu?\nprint Oh tidak! Aku merasa kalau aku tidak sendiri di rumah ini!\nprint Aku perlu keluar dari sini!\nprint Ada 3 pintu didepanku...\n{ask} Pintu mana yang harus kupilih?\necho Aku memilih pintu \nprint ...?\n ```\n\nDapatkah kamu menyelesaikan cerita menyeramkan ini dengan menanyakan monster apa yang akan muncul? Atau membuat cerita rumah berhantu milik kamu sendiri?\n"
+ story_text_2: |
### 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:
+ Can you finish the scary story? Or make up your own haunted house story?
+ 2:
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`.
+ In this haunted house you can choose your monsters with emojis. Of course you could also use words.
- ***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!***
- {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'
@@ -2049,25 +1351,7 @@ adventures:
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
@@ -2081,219 +1365,6 @@ adventures:
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!***
- {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'
@@ -1958,25 +1049,7 @@ adventures:
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
@@ -1990,223 +1063,7 @@ adventures:
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!***
- {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!***
- {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'
@@ -1992,25 +897,7 @@ adventures:
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
@@ -2024,268 +911,20 @@ adventures:
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
+ haunted:
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.
+ 2:
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'
+ monster_1 {is} 👻
+ monster_2 {is} 🤡
+ monster_3 {is} 👶
+ {print} You enter the haunted house.
+ {print} Suddenly you see a monster_1
+ {print} You run into the other room, but a monster_2 is waiting there for you!
+ {print} Oh no! Quickly get to the kitchen.
+ {print} But as you enter monster_3 attacks you!
```
- 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!***
- {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'
@@ -2032,25 +1105,7 @@ adventures:
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
@@ -2063,224 +1118,17 @@ adventures:
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!***
- {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 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`.
-
- ### Exercise
- The next verse of this song goes:
-
- 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!***
- {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"
13:
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, 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"
- 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"
- 18:
- 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"
- 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"
- name: functions
- description: functions
- default_save_name: functions
- 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
- 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
music:
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\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"
- 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"
- default_save_name: music
- name: music
- description: Play a tune!
- for_command:
- default_save_name: for
- levels:
- 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."
- 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"
- 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"
- name: '{for}'
- description: '{for} command'
- 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{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'
@@ -1958,25 +1215,7 @@ adventures:
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
@@ -1990,219 +1229,6 @@ adventures:
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!***
- {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{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'
@@ -1963,25 +1041,7 @@ adventures:
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
@@ -1995,251 +1055,13 @@ adventures:
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!***
- {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 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`.
-
- ### Exercise
- The next verse of this song goes:
-
- 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!***
- {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'
@@ -1970,25 +1076,7 @@ adventures:
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
@@ -2002,222 +1090,7 @@ adventures:
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!***
- {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'
@@ -1941,25 +1015,7 @@ adventures:
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
@@ -1973,223 +1029,7 @@ adventures:
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!***
- {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'
@@ -1977,25 +1026,7 @@ adventures:
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
@@ -2009,1132 +1040,171 @@ adventures:
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.
+ haunted:
+ levels:
+ 1:
+ story_text_2: |
+ ### Exercise
+ Can you finish the scary story? Or make up your own haunted house story?
+ 2:
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:
+ monster_1 {is} 👻
+ monster_2 {is} 🤡
+ monster_3 {is} 👶
+ {print} You enter the haunted house.
+ {print} Suddenly you see a monster_1
+ {print} You run into the other room, but a monster_2 is waiting there for you!
+ {print} Oh no! Quickly get to the kitchen.
+ {print} But as you enter monster_3 attacks you!
+ ```
+ example_code_2: |
+ ```
+ monster_1 {is} _
+ monster_2 {is} _
+ monster_3 {is} _
+ {print} You enter the haunted house.
+ {print} Suddenly you see a monster_1
+ {print} You run into the other room, but a monster_2 is waiting there for you!
+ {print} Oh no! Quickly get to the kitchen.
+ {print} But as you enter monster_3 attacks you!
+ ```
+ 3:
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.
+ 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!
+ 4:
+ story_text: |
+ In this level you learn how to use quotation marks in your games.
+ Can you make your Haunted House level 4 proof?
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'
+ _ 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}
```
- hangman:
- name: Hangman
- default_save_name: Hangman
- description: Guess the word
- levels:
- 17:
+ 9:
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.
+ In this level you can use nesting, which allows you to make the haunted house even more interactive!
### 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`.
+ 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?
+ 11:
+ story_text: |
+ In this level we've changed the repeat command and we've added a line to our haunted house that tells the player in which room they are.
- ***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!***
- {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'
@@ -1950,25 +1247,7 @@ adventures:
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
@@ -1982,219 +1261,6 @@ adventures:
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!***
- {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"
13:
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 programmed the line `define song with place`.\nWhen the function is called, 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\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\nCan you program this verse in the same way as the example?\n"
- 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"
14:
story_text: "V prejšnjih stopnjah ste se naučili ustvarjati funkcije in z njimi uporabljati argumente. Funkcijo lahko uporabite tudi tako, da ji dovolite, da nekaj izračuna namesto vas.\nFunkciji lahko podate formulo za izračun, ona pa vam bo podala odgovor. Ta odgovor se imenuje **vrnjena vrednost**.\n\nV tej kodi bo na primer funkcija izračunaj_novo_ceno izračunala novo ceno kateregakoli predmeta. Vrnjena vrednost bo nova cena.\n\n### Vaja\nDokončajte ta program. Spremenljivko nova_cena smo za vas že ustvarili, vi jo morate le še nastaviti.\nVrstico kode zaključite tako, da pokličete funkcijo, ki izračuna novo ceno.\n"
example_code: "```\n{define} izračunaj_novo_ceno {with} znesek, odstotek\n odstotek = odstotek/ 100\n znesek_popusta = znesek* odstotek\n return znesek - znesek_popusta\n\nstara_cena = {ask} 'Kakšna je označena cena?'\npopust = {ask} 'Kakšen je odstotek popusta?'\n\nnova_cena = _ izračunaj_novo_ceno {with} stara_cena, _\n{print} 'Nova cena je ' nova_cena ' Eurov'\n```\n"
- 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'\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"
- 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!***
- {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'
@@ -1970,25 +1269,7 @@ adventures:
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
@@ -2002,219 +1283,6 @@ adventures:
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!***
- {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'
@@ -2048,25 +1561,7 @@ adventures:
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
@@ -2080,240 +1575,46 @@ adventures:
new_price = _ calculate_new_price {with} old_price, _
{print} 'The new price is ' new_price ' dollar'
```
- 18:
+ harry_potter:
+ description: Harry Potter-äventyr
+ levels:
+ 10:
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.
+ ### Övning
+ Vi kan också skapa en spådam med Harry Potter-tema. Fyll i tomrummen så att nio rader skrivs ut.
+ **Extrauppgift** Ändra temat för spådamen till något annat, till exempel din favoritbok, film eller tv-program.
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)
+ hus = Gryffindor, Slytherin, Hufflepuff, Ravenclaw
+ ämnen = drycker, försvar mot svartkonst, förtrollningar, förvandling
+ rädslor = Voldemort, spindlar, att misslyckas med sitt OWL-test
+ namn = Harry, Ron, Hermione
+ _
+ _ {print} namn ' är placerad i ' hus {at} {random}
+ _ {print} namn ' är bra på ' ämnen {at} {random}
+ _ {print} namn 's största rädsla är ' rädslor {at} {random}
```
- guess_my_number:
- name: Guess my number
- default_save_name: guess my number
- description: guess my number
+ haunted:
+ name: Spökhuset
+ default_save_name: Spökhuset
+ description: Flykten från spökhuset
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.
+ 1:
+ story_text: "I det här äventyret jobbar du med att skapa ett spel där du måste fly från ett hemsökt hus genom att välja rätt dörr.\nOm du väljer rätt dörr kommer du att överleva, men om du inte gör det kan ett hemskt monster...\n \nPå nivå 1 börjar vi vårt spökhusspel med att hitta på en skrämmande historia och frågar spelaren vilket monster de kommer att se i spökhuset.\n"
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!***
- {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'
@@ -2009,25 +1125,7 @@ adventures:
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
@@ -2041,222 +1139,7 @@ adventures:
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!***
- {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{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'
@@ -1983,25 +1075,7 @@ adventures:
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
@@ -2015,251 +1089,13 @@ adventures:
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!***
- {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'
@@ -1965,25 +1054,7 @@ adventures:
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
@@ -1997,251 +1068,13 @@ adventures:
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!***
- {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'
@@ -1985,25 +1040,7 @@ adventures:
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
@@ -2017,251 +1054,13 @@ adventures:
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!***
- {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'
@@ -1979,25 +1086,7 @@ adventures:
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
@@ -2011,251 +1100,13 @@ adventures:
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!***
- {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'
@@ -2049,25 +1589,7 @@ adventures:
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
@@ -2081,253 +1603,59 @@ adventures:
new_price = _ calculate_new_price {with} old_price, _
{print} 'The new price is ' new_price ' dollar'
```
- 18:
+ harry_potter:
+ description: Harry Potter maceraları
+ levels:
+ 10:
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.
+ ### Alıştırma
+ Harry Potter temalı bir falcı da yapabiliriz. Boşlukları 9 satır yazdıracak şekilde doldurun.
+ **Ek Görev** Falcının temasını en sevdiğiniz kitap, film veya televizyon programı gibi başka bir şeye dönüştürün.
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)
+ evler = Gryffindor, Slytherin, Hufflepuff, Ravenclaw
+ konular = iksirler, karanlık sanatlara karşı savunma, tılsımlar, başkalaşım
+ korkular = Voldemort, örümcekler, OWL sınavında başarısız olmak
+ isimler = Harry, Ron, Hermione
+ _
+ _ {print} isim ' şu okula gidiyor: ' evler {at} {random}
+ _ {print} isim ' şu konuda çok iyi: ' konular {at} {random}
+ _ {print} isim ' en çok şundan korkuyor: ' korkular {at} {random}
```
- guess_my_number:
- name: Guess my number
- default_save_name: guess my number
- description: guess my number
+ haunted:
+ name: Perili Ev
+ default_save_name: Perili Ev
+ description: Perili evden kaçış
levels:
- 14:
+ 1:
story_text: |
- In this level you can program the game 'Guess my number'
+ Bu macerada, doğru kapıyı seçerek perili bir evden kaçmanız gereken bir oyun yapmak için çalışıyorsunuz.
+ Eğer doğru kapıyı seçerseniz hayatta kalırsınız, ama seçmezseniz korkunç bir canavar sizi...
- ### Exercise
- Fill in the correct symbols on the blanks to get the game to work.
+ 1. seviyede, perili ev oyunumuza korkutucu bir hikaye uydurarak başlıyoruz ve oyuncuya perili evde hangi canavarı göreceklerini soruyoruz.
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:
+ {print} Buraya nasıl geldim?
+ {print} Arkadaşımın bana eski malikaneye gitmemi söylediğini hatırlıyorum...
+ {print} sonra her şey aniden karardı.
+ {print} Ama nasıl oldu da kendimi yerde buldum?
+ {print} Başım beyzbol sopasıyla vurulmuş gibi ağrıyor!
+ {print} Bu ses de ne?
+ {print} Oh hayır! Bu evde yalnız değilmişim gibi hissediyorum!
+ {print} Buradan çıkmam lazım!
+ {print} Önümde 3 kapı var...
+ {ask} Hangi kapıyı seçmeliyim?
+ {echo} Seçtiğim kapı
+ {print} ...?
+ ```
+ story_text_2: |
+ ### Alıştırma
+ Sarı düğmeye tıklayarak örnek kodu girdi ekranınıza kopyalayın.
+ Şimdi en az 5 satır kod ekleyerek hikayeyi bitirin.
+ Her kod satırına `{print}` komutuyla başlamayı unutmayın.
+ 2:
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!***
- {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'
@@ -1966,25 +1188,7 @@ adventures:
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
@@ -1998,251 +1202,13 @@ adventures:
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!***
- {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'
@@ -1971,25 +1052,7 @@ adventures:
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
@@ -2003,251 +1066,13 @@ adventures:
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!***
- {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"
- default_save_name: functions
- description: functions
- hangman:
- default_save_name: Hangman
- description: Guess the word
- levels:
- 17:
- 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"
- 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"
- name: Hangman
- 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
- 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.\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:
- default_save_name: Hangman_3
- name: Hangman 3
- description: 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{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'
@@ -2006,25 +1146,7 @@ adventures:
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
@@ -2038,251 +1160,13 @@ adventures:
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!***
- {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'
@@ -1985,25 +1037,7 @@ adventures:
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
@@ -2017,251 +1051,13 @@ adventures:
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!***
- Antarmuka yang sederhana dan contoh yang baik.
\nGuru: Kelas 3 - 6 (dasar)\n\nPemrograman multibahasa dan konsep pemrograman bertahap itu sendiri.
\nAS: Sekolah menengah, kelas 6-8\n\nSifat bertahap dari pengenalan pemrograman.
\nAustralia: Sekolah Menengah\n\nBerlanjut secara otomatis.
\nBelanda: 2 HAVO-VWO\n\nBaik penjelasan dalam bahasa Belanda (dan kode dalam bahasa Inggris), dan cara membangun dengan lebih banyak kemungkinan.
\nBelanda: Kelas Plus grup 7\n\nTapi Hedy dan tingkatannya yang bertahap... ide yang bagus, saya ingin berterima kasih secara pribadi karena telah menciptakan ini. Saya tidak bisa cukup berterima kasih. Juga, saya belum pernah melihat level keterlibatan dan antusiasme siswa saya, seperti yang saya lihat dengan Hedy. Kami telah mencakup hingga level 5, dan berencana untuk menghabiskan satu minggu lagi di kelas dan lab, sebelum memulai Python.
\nPakistan\n \n'Realitas' pemrograman, itu menyerupai bagaimana kenyataannya.
\nBelanda: Kelas Plus grup 4 hingga 8\n\nAktivitas bertahap. Aktivitas yang menyenangkan.
\nBelanda: 1e Semua level, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\n\nSaya sangat menyukai Hedy dan juga disusun dengan baik, yang membuatnya baik untuk digunakan di sekolah dasar. Pendekatan bertahap Hedy bekerja dengan sangat baik. Penjelasan singkat di awal setiap level dan program contoh singkat membantu memberikan wawasan cepat kepada anak-anak tentang apa yang baru di level yang dipilih. Tugas-tugas berbeda yang dapat dipilih anak-anak juga bekerja dengan sangat baik. Anda melihat anak-anak memilih tugas yang menarik bagi mereka dan mereka kemudian bekerja dengannya, melalui level-level. Hedy sangat menyenangkan bagi anak-anak yang pandai pemrograman dan ingin mencicipi bahasa pemrograman sebenarnya. Ini adalah persiapan yang baik untuk sekolah menengah segera setelah lebih banyak pendidikan TIK diberikan di sana.
\nBelanda: Sekolah Montessori Oegstgeest\n\nKonstruksinya sangat bagus.
\nBelanda: Sekolah Menengah Bawah HAVO-VWO\n\nSaya bisa menjaga kecepatan kelas.
\nBelanda: grup 7 dan 8\n\n\nFelienne mengajar anak-anak
\n\n\nAnak-anak belajar tentang Hedy
" + text: "Antarmuka yang sederhana dan contoh yang baik.
\nGuru: Kelas 3 - 6 (dasar)\n\nPemrograman multibahasa dan konsep pemrograman bertahap itu sendiri.
\nAS: Sekolah menengah, kelas 6-8\n\nSifat bertahap dari pengenalan pemrograman.
\nAustralia: Sekolah Menengah\n\nBerlanjut secara otomatis.
\nBelanda: 2 HAVO-VWO\n\nBaik penjelasan dalam bahasa Belanda (dan kode dalam bahasa Inggris), dan cara membangun dengan lebih banyak kemungkinan.
\nBelanda: Kelas Plus grup 7\n\nTapi Hedy dan tingkatannya yang bertahap... ide yang bagus, saya ingin berterima kasih secara pribadi karena telah menciptakan ini. Saya tidak bisa cukup berterima kasih. Juga, saya belum pernah melihat level keterlibatan dan antusiasme siswa saya, seperti yang saya lihat dengan Hedy. Kami telah mencakup + hingga level 5, dan berencana untuk menghabiskan satu minggu lagi di kelas dan lab, sebelum memulai Python.
\nPakistan\n \n'Realitas' pemrograman, itu menyerupai bagaimana kenyataannya.
\nBelanda: Kelas Plus grup 4 hingga 8\n\nAktivitas bertahap. Aktivitas yang menyenangkan.
\nBelanda: 1e Semua level, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\n\nSaya sangat menyukai Hedy dan juga disusun dengan baik, yang membuatnya baik untuk digunakan di sekolah dasar. Pendekatan bertahap Hedy bekerja dengan sangat baik. Penjelasan singkat di awal setiap level dan program contoh singkat membantu memberikan wawasan cepat kepada anak-anak tentang apa yang baru di level yang dipilih. Tugas-tugas berbeda yang dapat dipilih anak-anak juga bekerja dengan sangat baik. Anda melihat anak-anak memilih tugas yang menarik bagi mereka dan mereka kemudian bekerja dengannya, melalui level-level. Hedy + sangat menyenangkan bagi anak-anak yang pandai pemrograman dan ingin mencicipi bahasa pemrograman sebenarnya. Ini adalah persiapan yang baik untuk sekolah menengah segera setelah lebih banyak pendidikan TIK diberikan di sana.
\nBelanda: Sekolah Montessori Oegstgeest\n\nKonstruksinya sangat bagus.
\nBelanda: Sekolah Menengah Bawah HAVO-VWO\n\nSaya bisa menjaga kecepatan kelas.
\nBelanda: grup 7 dan 8\n\n\nFelienne mengajar anak-anak
\n\n\nAnak-anak belajar tentang Hedy
" teacher-guide: - title: Pengenalan Hedy key: intro diff --git a/content/pages/it.yaml b/content/pages/it.yaml index 6d64b3e966c..2a0d8971dee 100644 --- a/content/pages/it.yaml +++ b/content/pages/it.yaml @@ -53,15 +53,15 @@ join-sections: 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. + 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. + 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: diff --git a/content/pages/ja.yaml b/content/pages/ja.yaml index ac814540f83..94f0f315d94 100644 --- a/content/pages/ja.yaml +++ b/content/pages/ja.yaml @@ -51,51 +51,13 @@ join-sections: 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). -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: '*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" + 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: Introduction key: intro diff --git a/content/pages/kab.yaml b/content/pages/kab.yaml index 88350fbcd6f..941205e1dea 100644 --- a/content/pages/kab.yaml +++ b/content/pages/kab.yaml @@ -11,7 +11,8 @@ teacher-guide: - 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." + 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: Aṭuṭuryel @@ -28,12 +29,17 @@ teacher-guide: 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." + - 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'." + - 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 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 @@ -65,7 +71,8 @@ teacher-guide: - 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." + 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." @@ -517,23 +524,6 @@ teacher-guide: 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' @@ -547,12 +537,7 @@ 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: Iselmaden ɣef 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)" + 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*" title: Tasemlit n Hedy diff --git a/content/pages/kmr.yaml b/content/pages/kmr.yaml index 7567230d08e..838f1995889 100644 --- a/content/pages/kmr.yaml +++ b/content/pages/kmr.yaml @@ -1,4 +1,3 @@ -title: Hedy documentation home-sections: - title: Textual programming made easy! text: |- @@ -54,15 +53,15 @@ join-sections: 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. + 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. + 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: @@ -94,7 +93,9 @@ 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" + 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: Introduction key: intro diff --git a/content/pages/ko.yaml b/content/pages/ko.yaml index 7a812e79835..cd25586f55e 100644 --- a/content/pages/ko.yaml +++ b/content/pages/ko.yaml @@ -52,15 +52,15 @@ join-sections: 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. + 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. + 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에서 한 강연을 확인해보세요:: diff --git a/content/pages/mi.yaml b/content/pages/mi.yaml index 149fab91da3..43ed6ba561e 100644 --- a/content/pages/mi.yaml +++ b/content/pages/mi.yaml @@ -1,67 +1,15 @@ -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! - - -- 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. + 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 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. + 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: @@ -94,7 +42,9 @@ start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' - title: What other teachers say about Hedy - text: "Simple interface and good examples.
\nTeacher: 3rd - 6th grades (elementary)\n\nMultilingual programming and just the gradual programming concept itself.
\nUS: middle school, 6th-8th grade\n\nThe gradual nature of introducing programming.
\nAustralia: High school\n\nContinues automatically.
\nNetherlands: 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.
\nNetherlands: Plus class group 7\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.
\nPakistan\n \nThe 'realness' of programming, it resembles how it is in reality.
\nNetherlands: Plus class group 4 to 8\n\nStep-by-step activities. Fun activities.
\nNetherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\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.
\nNetherlands: Oegstgeest Montessori school\n\nThe construction is so good.
\nNetherlands: Lower secondary school HAVO-VWO\n\nI can keep the pace of the class.
\nNetherlands: group 7 en 8\n\n\nFelienne teaching kids
\n\n\nKids learning about Hedy
" + text: "Simple interface and good examples.
\nTeacher: 3rd - 6th grades (elementary)\n\nMultilingual programming and just the gradual programming concept itself.
\nUS: middle school, 6th-8th grade\n\nThe gradual nature of introducing programming.
\nAustralia: High school\n\nContinues automatically.
\nNetherlands: 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.
\nNetherlands: Plus class group 7\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.
\nPakistan\n \nThe 'realness' of programming, it resembles how it is in reality.
\nNetherlands: Plus class group 4 to 8\n\nStep-by-step activities. Fun activities.
\nNetherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\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.
\nNetherlands: Oegstgeest Montessori school\n\nThe construction is so good.
\nNetherlands: Lower secondary school HAVO-VWO\n\nI can keep the pace of the class.
\nNetherlands: group 7 en 8\n\n\nFelienne teaching kids
\n\n\nKids learning about Hedy
" teacher-guide: - title: Introduction key: intro diff --git a/content/pages/ms.yaml b/content/pages/ms.yaml index 89232e39209..eec6e81e6a3 100644 --- a/content/pages/ms.yaml +++ b/content/pages/ms.yaml @@ -33,35 +33,18 @@ home-sections: 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! - - -- 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. + 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. + 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: @@ -90,52 +73,6 @@ learn-more-sections: * [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 diff --git a/content/pages/nb_NO.yaml b/content/pages/nb_NO.yaml index 56eaf7b9109..5010460cb01 100644 --- a/content/pages/nb_NO.yaml +++ b/content/pages/nb_NO.yaml @@ -54,15 +54,15 @@ join-sections: 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. + 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. + 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: @@ -95,7 +95,9 @@ 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" + 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: Introduksjon key: intro diff --git a/content/pages/ne.yaml b/content/pages/ne.yaml index a7f58270399..d95cdf5242e 100644 --- a/content/pages/ne.yaml +++ b/content/pages/ne.yaml @@ -1,567 +1,18 @@ -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" -- 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. + 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. + 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. + 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)" diff --git a/content/pages/pa_PK.yaml b/content/pages/pa_PK.yaml index 69ab96143d2..16a52e22652 100644 --- a/content/pages/pa_PK.yaml +++ b/content/pages/pa_PK.yaml @@ -1,4 +1,3 @@ -title: Hedy documentation home-sections: - title: Textual programming made easy! text: |- @@ -1143,8 +1142,3 @@ 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 149fab91da3..43ed6ba561e 100644 --- a/content/pages/pap.yaml +++ b/content/pages/pap.yaml @@ -1,67 +1,15 @@ -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! - - -- 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. + 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 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. + 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: @@ -94,7 +42,9 @@ start-sections: - title: Getting started with Hedy text: '*Something about teachers accounts, slides etc*' - title: What other teachers say about Hedy - text: "Simple interface and good examples.
\nTeacher: 3rd - 6th grades (elementary)\n\nMultilingual programming and just the gradual programming concept itself.
\nUS: middle school, 6th-8th grade\n\nThe gradual nature of introducing programming.
\nAustralia: High school\n\nContinues automatically.
\nNetherlands: 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.
\nNetherlands: Plus class group 7\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.
\nPakistan\n \nThe 'realness' of programming, it resembles how it is in reality.
\nNetherlands: Plus class group 4 to 8\n\nStep-by-step activities. Fun activities.
\nNetherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\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.
\nNetherlands: Oegstgeest Montessori school\n\nThe construction is so good.
\nNetherlands: Lower secondary school HAVO-VWO\n\nI can keep the pace of the class.
\nNetherlands: group 7 en 8\n\n\nFelienne teaching kids
\n\n\nKids learning about Hedy
" + text: "Simple interface and good examples.
\nTeacher: 3rd - 6th grades (elementary)\n\nMultilingual programming and just the gradual programming concept itself.
\nUS: middle school, 6th-8th grade\n\nThe gradual nature of introducing programming.
\nAustralia: High school\n\nContinues automatically.
\nNetherlands: 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.
\nNetherlands: Plus class group 7\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.
\nPakistan\n \nThe 'realness' of programming, it resembles how it is in reality.
\nNetherlands: Plus class group 4 to 8\n\nStep-by-step activities. Fun activities.
\nNetherlands: 1e All levels, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\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.
\nNetherlands: Oegstgeest Montessori school\n\nThe construction is so good.
\nNetherlands: Lower secondary school HAVO-VWO\n\nI can keep the pace of the class.
\nNetherlands: group 7 en 8\n\n\nFelienne teaching kids
\n\n\nKids learning about Hedy
" teacher-guide: - title: Introduction key: intro diff --git a/content/pages/peo.yaml b/content/pages/peo.yaml index f32d84651f2..ee7a9a632a5 100644 --- a/content/pages/peo.yaml +++ b/content/pages/peo.yaml @@ -1,67 +1,15 @@ -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! - - -- 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. + 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: - 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. + * 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: @@ -90,52 +38,6 @@ learn-more-sections: * [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 diff --git a/content/pages/pl.yaml b/content/pages/pl.yaml index 1ef748de710..717ac9baeb7 100644 --- a/content/pages/pl.yaml +++ b/content/pages/pl.yaml @@ -54,15 +54,15 @@ join-sections: 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. + 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. + 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: diff --git a/content/pages/pt_BR.yaml b/content/pages/pt_BR.yaml index 124d7143f1e..370ee490a27 100644 --- a/content/pages/pt_BR.yaml +++ b/content/pages/pt_BR.yaml @@ -49,15 +49,15 @@ join-sections: 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. + 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. + 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: @@ -100,7 +100,9 @@ start-sections: * Toda criança pode programar!! Hedy é especialmente útil para crianças com problemas de visão porque pode ler o material em voz alta para você, sem a necessidade de um mouse. * Estamos aqui para ajudar, você pode nos encontrar, por exemplo, no [Discord](https://discord.gg/8yY7dEme9r) ou pode [nos enviar um e-mail](hello@hedy.org). - title: Professores 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" + 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: Introdução key: intro diff --git a/content/pages/pt_PT.yaml b/content/pages/pt_PT.yaml index d1f7c473429..3e3d6f1ccaa 100644 --- a/content/pages/pt_PT.yaml +++ b/content/pages/pt_PT.yaml @@ -107,7 +107,10 @@ start-sections: * Estamos aqui para ajudar, pode encontrar-nos, por exemplo, no [Discord](https://discord.gg/8yY7dEme9r) ou pode [enviar-nos um e-mail](hello@hedy.org).' - title: Professores sobre a Hedy - text: "Vários professores de todo o mundo expressaram a sua paixão pela Hedy, como alguns partilharam connosco:\n\n*Incrívelmente inspirador! É uma óptima maneira de tornar a programação muito mais acessível para si, mas também para os alunos. É muito divertido brincar com ela e tem muito potencial para ser utilizada com os alunos. Penso que é uma ferramenta muito boa! Penso que esta é uma forma valiosa para as crianças começarem a aprender programação. Python e a programação sempre foram muito interessantes, porque a barreira à aprendizagem é muito elevada. Agora tudo está um pouco mais baixo e foi-me explicado que pode ser muito fácil. Gostei de ver como a Hedy tenta tornar a programação tão acessível quanto possível para os utilizadores!\nPaíses Baixos: Professores de matemática em formação (ensino secundário)\n\n*Interface simples e bons exemplos.* Professor: 3º - 6º ano (ensino básico)\n\n*Programação multilingue e apenas o próprio conceito de programação gradual em si. EUA: escola secundária, 6º-8º ano\n\n*A natureza gradual da introdução à programação.* Austrália: Ensino secundário\n\n*Continua automaticamente.* Países Baixos: 2 HAVO-VWO\n\n*Tanto o fato da explicação poder ser dada em neerlandês (e o código em inglês), como o facto de se desenvolverem cada vez mais possibilidades.* Países Baixos: Grupo de turma Plus\n\n*Mas a Hedy e os seus níveis graduais... que ideia, queria agradecer-vos pessoalmente por terem criado isto. Não tenho palavras para vos agradecer. Além disso, nunca vi o nível de envolvimento e entusiasmo dos meus alunos, como tenho visto com a Hedy. Cobrimos até o nível 5 e planeamos passar mais uma semana nele em aulas e laboratórios, antes de começar Python.* Paquistão\n\n*A \"realidade\" da programação, assemelha-se ao que é na realidade.* Países Baixos: Grupo de turmas Plus 4 a 8\n\n*Atividades passo-a-passo. Atividades divertidas.* Países Baixos: 1e Todos os níveis, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\n\n*Gosto muito da Hedy e está muito bem organizada, o que a torna adequada para ser utilizada na escola primária. A abordagem gradual da Hedy funciona muito bem. A breve explicação no início de cada nível e os pequenos programas de exemplo ajudam a dar às crianças uma visão rápida do que há de novo no nível escolhido. As diferentes tarefas que as crianças podem escolher também funcionam muito bem. As crianças escolhem tarefas que lhes agradam e depois trabalham com elas, ao longo dos níveis. A Hedy é muito divertida para as crianças que são boas em programação e que querem experimentar uma verdadeira linguagem de programação. É uma boa preparação para a escola secundária, logo que nela seja ministrado mais ensino das TIC.* Países Baixos: Escola Montessori de Oegstgeest\n\n*A construção é muito boa... Países Baixos: Escola secundária inferior HAVO-VWO\n\n*Consigo manter o ritmo da aula.* Países Baixos: grupo 7 e 8\n\n![Felienne a ensinar crianças](/images/teacherfeedback/Fkids1.JPG) *Felienne a ensinar crianças*\n\n\n![Crianças a aprender sobre a Hedy](/images/teacherfeedback/Fkids2.JPG) *Crianças a aprender sobre a Hedy*" + text: "Vários professores de todo o mundo expressaram a sua paixão pela Hedy, como alguns partilharam connosco:\n\n*Incrívelmente inspirador! É uma óptima maneira de tornar a programação muito mais acessível para si, mas também para os alunos. É muito divertido brincar com ela e tem muito potencial para ser utilizada com os alunos. Penso que é uma ferramenta muito boa! Penso que esta é uma forma valiosa para as crianças começarem a aprender programação. Python e a programação sempre foram muito interessantes, porque a barreira à aprendizagem é muito elevada. Agora tudo está um pouco mais baixo e foi-me explicado que pode ser muito fácil. Gostei de ver como a Hedy tenta tornar a programação tão acessível quanto possível para os utilizadores!\nPaíses Baixos: Professores de matemática em formação (ensino secundário)\n\n*Interface simples e bons exemplos.* Professor: 3º - 6º ano (ensino básico)\n\n*Programação multilingue e apenas o próprio conceito de programação gradual em si. EUA: escola + secundária, 6º-8º ano\n\n*A natureza gradual da introdução à programação.* Austrália: Ensino secundário\n\n*Continua automaticamente.* Países Baixos: 2 HAVO-VWO\n\n*Tanto o fato da explicação poder ser dada em neerlandês (e o código em inglês), como o facto de se desenvolverem cada vez mais possibilidades.* Países Baixos: Grupo de turma Plus\n\n*Mas a Hedy e os seus níveis graduais... que ideia, queria agradecer-vos pessoalmente por terem criado isto. Não tenho palavras para vos agradecer. Além disso, nunca vi o nível de envolvimento e entusiasmo dos meus alunos, como tenho visto com a Hedy. Cobrimos até o nível 5 e planeamos passar mais uma semana nele em aulas e laboratórios, antes de começar Python.* Paquistão\n\n*A \"realidade\" da programação, assemelha-se ao que é na realidade.* Países Baixos: Grupo de turmas Plus 4 a 8\n\n*Atividades passo-a-passo. Atividades divertidas.* Países Baixos: 1e Todos os níveis, 2e VWO/HAVO 2e VWO +, 3e HAVO 3e VWO\n\n*Gosto muito da Hedy e está + muito bem organizada, o que a torna adequada para ser utilizada na escola primária. A abordagem gradual da Hedy funciona muito bem. A breve explicação no início de cada nível e os pequenos programas de exemplo ajudam a dar às crianças uma visão rápida do que há de novo no nível escolhido. As diferentes tarefas que as crianças podem escolher também funcionam muito bem. As crianças escolhem tarefas que lhes agradam e depois trabalham com elas, ao longo dos níveis. A Hedy é muito divertida para as crianças que são boas em programação e que querem experimentar uma verdadeira linguagem de programação. É uma boa preparação para a escola secundária, logo que nela seja ministrado mais ensino das TIC.* Países Baixos: Escola Montessori de Oegstgeest\n\n*A construção é muito boa... Países Baixos: Escola secundária inferior HAVO-VWO\n\n*Consigo manter o ritmo da aula.* Países Baixos: grupo 7 e 8\n\n![Felienne a ensinar crianças](/images/teacherfeedback/Fkids1.JPG) *Felienne a ensinar crianças*\n + \n\n![Crianças a aprender sobre a Hedy](/images/teacherfeedback/Fkids2.JPG) *Crianças a aprender sobre a Hedy*" teacher-guide: - title: Introdução key: intro @@ -125,7 +128,8 @@ teacher-guide: É importante que os estudantes sejam capazes de ler bem. Não recomendamos que se comece com a Hedy antes dos estudantes terem atingido pelo menos um nível de leitura do 3º ano. Os estudantes (e professores!) não precisam de qualquer experiência em programação antes de começarem com a Hedy. - title: Como funciona a Hedy? - text: "A Hedy é dividida em níveis, nos quais são ensinados novos comandos. Cada nível contém uma variedade de aventuras para praticar os novos comandos aprendidos.\nComo professor, pode decidir que aventuras estão disponíveis para os seus alunos. Irão criar um restaurante, uma calculadora ou uma casa assombrada neste nível? Dentro de cada nível, as aventuras estão organizadas da mais fácil para a mais difícil.\nAssim, os seus alunos continuarão a ser desafiados. As aventuras podem ser completadas, individualmente, pelos alunos ou pode usá-las numa instrução clássica.\n\nAs aventuras também incluem um código exemplo, para garantir que os professores menos digitalmente informados, possam utilizar a Hedy também!\nClaro que a Hedy também serve os professores que adoram criar os seus próprios planos de aula e aventuras.\n\nApós programar todas as aventuras de um determinado nível, os seus alunos podem testar os seus conhecimento num breve questionário.\nPode acompanhar o trabalho dos seus alunos e a sua evolução na página da turma." + text: "A Hedy é dividida em níveis, nos quais são ensinados novos comandos. Cada nível contém uma variedade de aventuras para praticar os novos comandos aprendidos.\nComo professor, pode decidir que aventuras estão disponíveis para os seus alunos. Irão criar um restaurante, uma calculadora ou uma casa assombrada neste nível? Dentro de cada nível, as aventuras estão organizadas da mais fácil para a mais difícil.\nAssim, os seus alunos continuarão a ser desafiados. As aventuras podem ser completadas, individualmente, pelos alunos ou pode usá-las numa instrução clássica.\n\nAs aventuras também incluem um código exemplo, para garantir que os professores menos digitalmente informados, possam utilizar a Hedy também!\nClaro que a Hedy também serve os professores que adoram criar os seus próprios planos de aula e aventuras.\n\nApós programar todas as aventuras de um determinado nível, os seus alunos podem testar os seus conhecimento num breve questionário.\nPode acompanhar o trabalho dos + seus alunos e a sua evolução na página da turma." - title: Dispositivos text: |- A Hedy é baseada na web, o que significa que funciona em qualquer dispositivo com um navegador (Google Chrome, Firefox, Edge, entre outros), portanto, portáteis, Chromebooks, tablets e até telemóveis são apropriados para usar a Hedy. diff --git a/content/pages/ro.yaml b/content/pages/ro.yaml index 123bbca3c58..8c7a61a41dc 100644 --- a/content/pages/ro.yaml +++ b/content/pages/ro.yaml @@ -54,15 +54,15 @@ join-sections: 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. + 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. + 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: @@ -94,7 +94,9 @@ 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" + 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: Introducere key: introducere diff --git a/content/pages/ru.yaml b/content/pages/ru.yaml index 0b089ec5bc6..15963b6b168 100644 --- a/content/pages/ru.yaml +++ b/content/pages/ru.yaml @@ -90,7 +90,8 @@ learn-more-sections: * [AG Connect (Dutch), April 2020](https://www.agconnect.nl/artikel/stapsgewijs-python-leren-programmeren-met-nieuwe-taal-hedy) start-sections: - title: Начать с Hedy - text: "Добро пожаловать в Hedy, мы рады помочь вам начать работу с Hedy.\n\nНаш [Учительский справочник](https://www.hedy.org/for-teachers/manual) содержит подробный обзор всех функций, а эта страница предлагает краткий обзор, чтобы вы знали, что к чему, прежде чем углубиться в изучение.\n\nНесколько важных моментов, которые стоит знать: \n* Hedy — это инструмент, созданный для управления классом детей, занимающихся программированием! Вы можете создавать свои собственные классы, планы уроков и следить за успехами детей. Вам не нужно знать много программирования, если вы только начинаете, Хеди работает шаг за шагом, так же как и для вас!\n* Вы можете использовать Hedy на своем родном языке, потому что он был переведен на многие другие языки!\n* Программировать может каждый ребёнок!! Hedy особенно полезна для детей с проблемами зрения, потому что Hedy может читать материалы вслух, без неободимости использовать мышь. Мы готовы вам помочь, и вы можете найти нас, например, на [Discord](https://discord.gg/8yY7dEme9r) или написать нам на [email](hello@hedy.org)." + text: "Добро пожаловать в Hedy, мы рады помочь вам начать работу с Hedy.\n\nНаш [Учительский справочник](https://www.hedy.org/for-teachers/manual) содержит подробный обзор всех функций, а эта страница предлагает краткий обзор, чтобы вы знали, что к чему, прежде чем углубиться в изучение.\n\nНесколько важных моментов, которые стоит знать: \n* Hedy — это инструмент, созданный для управления классом детей, занимающихся программированием! Вы можете создавать свои собственные классы, планы уроков и следить за успехами детей. Вам не нужно знать много программирования, если вы только начинаете, Хеди работает шаг за шагом, так же как и для вас!\n* Вы можете использовать Hedy на своем родном языке, потому что он был переведен на многие другие языки!\n* Программировать может каждый ребёнок!! Hedy особенно полезна для детей с проблемами зрения, потому что Hedy может читать материалы вслух, без неободимости использовать мышь. Мы готовы вам помочь, и вы можете найти нас, например, на [Discord](https://discord.gg/8yY7dEme9r) + или написать нам на [email](hello@hedy.org)." - title: Учителя о Hedy text: |- Разные учителя по всему миру выразили свою страсть к Хеди, как некоторые из них поделились с нами: diff --git a/content/pages/sl.yaml b/content/pages/sl.yaml index 3ef0df08e74..b92929fe3f6 100644 --- a/content/pages/sl.yaml +++ b/content/pages/sl.yaml @@ -1,51 +1,21 @@ -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" -- 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.\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: 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: -- 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.\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" -- 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. + 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. + 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*" + 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)" teacher-guide: - title: Introduction key: intro @@ -61,7 +31,8 @@ teacher-guide: - 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." + 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: Tutorial key: tutorial subsections: @@ -79,11 +50,16 @@ teacher-guide: - 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." + 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'." + 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." + 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." - title: Teaching with Hedy @@ -113,7 +89,8 @@ teacher-guide: - 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 probably doesn't know that she has to change something in the example code before running it.\nIn this way this overview can give you a better understanding of what a student is struggling with." + 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 probably doesn't know that she has to change something in the example code before running it.\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." - title: Overview of programs per adventure diff --git a/content/pages/sq.yaml b/content/pages/sq.yaml index 501de458e26..787df4ed10b 100644 --- a/content/pages/sq.yaml +++ b/content/pages/sq.yaml @@ -1,4 +1,3 @@ -title: Hedy documentation home-sections: - title: Textual programming made easy! text: |- @@ -54,15 +53,15 @@ join-sections: 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. + 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. + 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: @@ -95,7 +94,9 @@ 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" + 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: Introduction key: intro diff --git a/content/pages/sr.yaml b/content/pages/sr.yaml index 84e58901f9d..accbf26ceff 100644 --- a/content/pages/sr.yaml +++ b/content/pages/sr.yaml @@ -110,7 +110,9 @@ start-sections: * Овде смо да помогнемо, можете нас пронаћи на пример на [Discord-у](https://discord.gg/8yY7dEme9r) или нам можете [послати имејл](hello@hedy.org).' - title: Наставници о Hedy - text: "Разни наставници широм света изразили су своју страст према Hedy, као што су неки поделили са нама:\n\n*Невероватно инспиративно! Супер добар начин да програмирање учините много приступачнијим за себе, али и за ученике. Веома забавно за играње и пуно потенцијала за коришћење са ученицима. Мислим да је ово веома леп алат! Верујем да је ово вредан начин за децу да почну учити програмирање. Python и кодирање су увек били веома узбудљиви, јер је баријера за учење веома висока. Сада је све мало ниже и објашњено је да може бити веома лако. Уживао сам гледајући како Hedy покушава да учини програмирање што приступачнијим за кориснике!*\nХоландија: Наставници математике у обуци (средња школа)\n\n*Једноставан интерфејс и добри примери.* Наставник: 3. - 6. разред (основна школа)\n\n*Вишејезично програмирање и сам концепт постепеног програмирања.* САД: средња школа, 6. - 8. разред\n\n*Постепена природа увођења програмирања.* Аустралија: средња школа\n\n*Аутоматски наставља.* Холандија: 2 HAVO-VWO\n\n*И то што објашњење може бити на холандском (а код на енглеском), и то што се гради са све више могућности.* Холандија: Плус група\n\n*Али Hedy и њени постепени нивои...какав идеја, желео сам лично да вам захвалим што сте ово створили. Не могу вам довољно захвалити. Такође, никада нисам видео ниво ангажовања и ентузијазма мојих ученика, као што сам видео са Hedy. Покрили смо до нивоа 5, и планирамо да проведемо још једну недељу на томе у часовима и лабораторијама, пре него што почнемо са Python-ом.* Пакистан\n\n*'Реалност' програмирања, подсећа на то како је у стварности.* Холандија: Плус група 4 до 8\n\n*Корак по корак активности. Забавне активности.* Холандија: 1е Сви нивои, 2е VWO/HAVO 2е VWO +, 3е HAVO 3е VWO\n\n*Веома ми се свиђа Hedy и такође је лепо постављен, што га чини добрим за коришћење у основној школи. Постепени приступ Hedy-а ради веома добро. Кратко објашњење на почетку сваког нивоа и кратки пример програми помажу да деца брзо схвате шта је ново у изабраном нивоу. Различити задаци које деца могу изабрати такође раде веома добро. Видите како деца бирају задатке који им се допадају и онда раде на њима, кроз нивое. Hedy је веома забаван за децу која су добра у програмирању и желе да окусе прави програмски језик. То је добра припрема за средњу школу чим се тамо почне давати више ИКТ образовања.* Холандија: Оегстгеест Монтесори школа\n\n*Конструкција је тако добра.* Холандија: Нижи разреди средње школе HAVO-VWO\n\n*Могу да пратим темпо разреда.* Холандија: група 7 и 8\n\n![Felienne учи децу](/images/teacherfeedback/Fkids1.JPG) *Felienne учи децу*\n\n\n![Деца уче о Hedy](/images/teacherfeedback/Fkids2.JPG) *Деца уче о Hedy*" + text: "Разни наставници широм света изразили су своју страст према Hedy, као што су неки поделили са нама:\n\n*Невероватно инспиративно! Супер добар начин да програмирање учините много приступачнијим за себе, али и за ученике. Веома забавно за играње и пуно потенцијала за коришћење са ученицима. Мислим да је ово веома леп алат! Верујем да је ово вредан начин за децу да почну учити програмирање. Python и кодирање су увек били веома узбудљиви, јер је баријера за учење веома висока. Сада је све мало ниже и објашњено је да може бити веома лако. Уживао сам гледајући како Hedy покушава да учини програмирање што приступачнијим за кориснике!*\nХоландија: Наставници математике у обуци (средња школа)\n\n*Једноставан интерфејс и добри примери.* Наставник: 3. - 6. разред (основна школа)\n\n*Вишејезично програмирање и сам концепт постепеног програмирања.* САД: средња школа, 6. - 8. разред\n\n*Постепена природа увођења програмирања.* Аустралија: средња школа\n\n*Аутоматски наставља.* Холандија: 2 + HAVO-VWO\n\n*И то што објашњење може бити на холандском (а код на енглеском), и то што се гради са све више могућности.* Холандија: Плус група\n\n*Али Hedy и њени постепени нивои...какав идеја, желео сам лично да вам захвалим што сте ово створили. Не могу вам довољно захвалити. Такође, никада нисам видео ниво ангажовања и ентузијазма мојих ученика, као што сам видео са Hedy. Покрили смо до нивоа 5, и планирамо да проведемо још једну недељу на томе у часовима и лабораторијама, пре него што почнемо са Python-ом.* Пакистан\n\n*'Реалност' програмирања, подсећа на то како је у стварности.* Холандија: Плус група 4 до 8\n\n*Корак по корак активности. Забавне активности.* Холандија: 1е Сви нивои, 2е VWO/HAVO 2е VWO +, 3е HAVO 3е VWO\n\n*Веома ми се свиђа Hedy и такође је лепо постављен, што га чини добрим за коришћење у основној школи. Постепени приступ Hedy-а ради веома добро. Кратко објашњење на почетку сваког нивоа и кратки пример програми помажу да деца брзо схвате шта је ново у изабраном + нивоу. Различити задаци које деца могу изабрати такође раде веома добро. Видите како деца бирају задатке који им се допадају и онда раде на њима, кроз нивое. Hedy је веома забаван за децу која су добра у програмирању и желе да окусе прави програмски језик. То је добра припрема за средњу школу чим се тамо почне давати више ИКТ образовања.* Холандија: Оегстгеест Монтесори школа\n\n*Конструкција је тако добра.* Холандија: Нижи разреди средње школе HAVO-VWO\n\n*Могу да пратим темпо разреда.* Холандија: група 7 и 8\n\n![Felienne учи децу](/images/teacherfeedback/Fkids1.JPG) *Felienne учи децу*\n\n\n![Деца уче о Hedy](/images/teacherfeedback/Fkids2.JPG) *Деца уче о Hedy*" teacher-guide: - title: Увод key: увод diff --git a/content/pages/sv.yaml b/content/pages/sv.yaml index 511a568a57e..75ff7a4be2a 100644 --- a/content/pages/sv.yaml +++ b/content/pages/sv.yaml @@ -53,15 +53,15 @@ join-sections: 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. + 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. + 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: diff --git a/content/pages/sw.yaml b/content/pages/sw.yaml index 0c1d9ad2b36..09765fa832b 100644 --- a/content/pages/sw.yaml +++ b/content/pages/sw.yaml @@ -1,4 +1,3 @@ -title: Hedy documentation home-sections: - title: Textual programming made easy! text: |- @@ -51,51 +50,13 @@ join-sections: 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). -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: '*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" + 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: Introduction key: intro diff --git a/content/pages/ta.yaml b/content/pages/ta.yaml index 74434afb1fd..0967ef424bc 100644 --- a/content/pages/ta.yaml +++ b/content/pages/ta.yaml @@ -1,1187 +1 @@ -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! - - -- 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 1da9a2facbb..cc227ca7ceb 100644 --- a/content/pages/te.yaml +++ b/content/pages/te.yaml @@ -52,15 +52,15 @@ join-sections: 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. + 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. + 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: @@ -93,7 +93,9 @@ start-sections: - title: Hedy తో ప్రారంభం text: '*ఉపాధ్యాయుల ఖాతాలు, స్లయిడ్లు మొదలైన వాటి గురించి కొంత*' - 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" + 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: Introduction key: intro diff --git a/content/pages/th.yaml b/content/pages/th.yaml index c4b600e657e..beea92ff3d4 100644 --- a/content/pages/th.yaml +++ b/content/pages/th.yaml @@ -54,15 +54,15 @@ join-sections: 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. + 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. + 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: @@ -95,7 +95,9 @@ 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" + 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: คำนำ key: คำนำ diff --git a/content/pages/tl.yaml b/content/pages/tl.yaml index 501de458e26..787df4ed10b 100644 --- a/content/pages/tl.yaml +++ b/content/pages/tl.yaml @@ -1,4 +1,3 @@ -title: Hedy documentation home-sections: - title: Textual programming made easy! text: |- @@ -54,15 +53,15 @@ join-sections: 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. + 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. + 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: @@ -95,7 +94,9 @@ 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" + 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: Introduction key: intro diff --git a/content/pages/tn.yaml b/content/pages/tn.yaml index 0c1d9ad2b36..09765fa832b 100644 --- a/content/pages/tn.yaml +++ b/content/pages/tn.yaml @@ -1,4 +1,3 @@ -title: Hedy documentation home-sections: - title: Textual programming made easy! text: |- @@ -51,51 +50,13 @@ join-sections: 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). -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: '*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" + 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: Introduction key: intro diff --git a/content/pages/tr.yaml b/content/pages/tr.yaml index 9a0bf8e9889..11ad5a10e2a 100644 --- a/content/pages/tr.yaml +++ b/content/pages/tr.yaml @@ -53,15 +53,15 @@ join-sections: 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. + 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. + 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: diff --git a/content/pages/uk.yaml b/content/pages/uk.yaml index f9a83322bb7..855967cde95 100644 --- a/content/pages/uk.yaml +++ b/content/pages/uk.yaml @@ -54,15 +54,15 @@ join-sections: 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. + 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. + 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: diff --git a/content/pages/ur.yaml b/content/pages/ur.yaml index 532dcd9743e..d8397cfdfa6 100644 --- a/content/pages/ur.yaml +++ b/content/pages/ur.yaml @@ -51,51 +51,13 @@ join-sections: 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). -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: '*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" + 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: تعارف key: تعارف diff --git a/content/pages/uz.yaml b/content/pages/uz.yaml index c98ff881993..5100ad76f29 100644 --- a/content/pages/uz.yaml +++ b/content/pages/uz.yaml @@ -1,67 +1,15 @@ -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! - - -- 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. + 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: - 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. + * 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: @@ -90,1098 +38,3 @@ learn-more-sections: * [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/vi.yaml b/content/pages/vi.yaml index 7f76d2503b0..c4023fed499 100644 --- a/content/pages/vi.yaml +++ b/content/pages/vi.yaml @@ -54,15 +54,15 @@ join-sections: 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. + 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. + 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): @@ -95,7 +95,9 @@ 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" + 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: Giới thiệu key: giới thiệu diff --git a/content/pages/zh_Hant.yaml b/content/pages/zh_Hant.yaml index 23848f7a144..0f2ec21591f 100644 --- a/content/pages/zh_Hant.yaml +++ b/content/pages/zh_Hant.yaml @@ -1,4 +1,3 @@ -title: Hedy documentation home-sections: - title: Textual programming made easy! text: |- @@ -54,15 +53,15 @@ join-sections: 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. + 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. + 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: @@ -94,7 +93,9 @@ 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" + 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: Introduction key: intro diff --git a/content/parsons/ar.yaml b/content/parsons/ar.yaml index d30b226dea3..0f62f118c7c 100644 --- a/content/parsons/ar.yaml +++ b/content/parsons/ar.yaml @@ -36,35 +36,13 @@ levels: {print} تم إضافة اللعبة إلى سلة المشتريات الخاصة بك. {print} شكرًا لك على الشراء من متجرنا 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: |- @@ -85,9 +63,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -95,7 +70,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -103,11 +77,6 @@ levels: {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 @@ -115,29 +84,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -159,108 +110,8 @@ levels: {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 differnet 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/parsons/bg.yaml b/content/parsons/bg.yaml index 7f64a09c699..bdaf4bcdf3a 100644 --- a/content/parsons/bg.yaml +++ b/content/parsons/bg.yaml @@ -12,7 +12,6 @@ levels: {echo} Значи искате {print} Твоята поръчка се принтрира! 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} Това е диджей Хеди {ask} Готови ли сте за парти? @@ -20,51 +19,19 @@ levels: {echo} Чудесен избор! Аз обичам 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 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: |- @@ -85,9 +52,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -95,7 +59,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -103,11 +66,6 @@ levels: {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 @@ -115,29 +73,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -159,108 +99,8 @@ levels: {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 differnet 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/parsons/bn.yaml b/content/parsons/bn.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/bn.yaml +++ b/content/parsons/bn.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/ca.yaml b/content/parsons/ca.yaml index cf205fd844c..7ee617faee9 100644 --- a/content/parsons/ca.yaml +++ b/content/parsons/ca.yaml @@ -131,13 +131,6 @@ levels: 7: 1: story: Completa la cançó del Baby shark. Primer comença amb el Baby shark, després la mare (mommy shark) i finalment el pare (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: Crea la cançó "Les rodes de l'autobús van girant" code: |- @@ -146,9 +139,6 @@ levels: {print} "les rodes de l'autobús girant, van rodant, van rodant" {print} "per tota la ciutat" 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: story: Imprimeix el compte enrere per al joc de l'amagatall. code: |- @@ -171,9 +161,6 @@ levels: {print} 'Bona feina!' {else} {print} 'No! La resposta correcta és ' resposta_correcta - 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!'" 10: 1: story: |- @@ -216,15 +203,6 @@ levels: story: |- Crea un programa que ens expliqui els resultats finals de la fira de la ciència. Primer defineix la variable concursants, després la variable lloc. **Pista** La línia 5 hauria de tenir la comanda sleep (dorm), i hauries d'acabar amb un text de felicitació. - 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: |- diff --git a/content/parsons/cs.yaml b/content/parsons/cs.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/cs.yaml +++ b/content/parsons/cs.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/cy.yaml b/content/parsons/cy.yaml index 91dab9aa0ee..6b75889df67 100644 --- a/content/parsons/cy.yaml +++ b/content/parsons/cy.yaml @@ -8,35 +8,6 @@ levels: 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: |- @@ -44,44 +15,12 @@ levels: 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. - 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 minute 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 price that you might win. code: |- @@ -89,66 +28,8 @@ levels: price {is} {ask} 'What would you like to win?' {add} price {to_list} prices {print} 'You won a ' prices {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?' @@ -156,117 +37,8 @@ levels: {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 differnet 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/parsons/da.yaml b/content/parsons/da.yaml index 53927b79ec6..bce495689c9 100644 --- a/content/parsons/da.yaml +++ b/content/parsons/da.yaml @@ -1,88 +1,10 @@ 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! - 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. - 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 minute 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 price that you might win. code: |- @@ -90,66 +12,8 @@ levels: price {is} {ask} 'What would you like to win?' {add} price {to_list} prices {print} 'You won a ' prices {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?' @@ -157,117 +21,8 @@ levels: {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 differnet 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/parsons/de.yaml b/content/parsons/de.yaml index ea85f78aef3..d557be2d100 100644 --- a/content/parsons/de.yaml +++ b/content/parsons/de.yaml @@ -122,13 +122,6 @@ levels: 7: 1: story: Vervollständige den Baby Shark Song. Zuerst kommt Baby Shark, dann Mommy und zum Schluss 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: Erstelle den Song 'Die Räder am Bus gehen rundherum' code: |- @@ -160,16 +153,6 @@ levels: 9: 1: story: Dieses Spiel wird dir drei Mathe Aufgaben geben. Die Frage ist jedesmal anders. Kannst du die Reihenfolge herausfinden? - 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: |- Dieser Code fragt die Kunden in einem Restaurant, ob sie Nachtisch bestellen wollen. Falls sie Nachtisch bestellen wollen, frag sie, was sie für einen Nachtisch wollen. Wenn sie Tiramisu bestellen, wird ihnen gesagt, dass es ausverkauft ist. @@ -203,25 +186,9 @@ levels: story: |- Dieser Friseur-Roboter wird für dich einen neuen Haarschnitt aussuchen. Wenn du mit der ersten Wahl nicht einverstanden bist, kannst du es nochmal versuchen. **Achtung** Die Variable person wird in der ersten Zeile bestimmt. Die Variable frisur wird in der zweiten Zeile bestimmt. - 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: Erzeuge die Countdown Uhr für Neujahr! Das Programm sollte die Zahlen 10 bis 1 für eine Sekunde zeigen und dir dann ein Frohes neues Jahr wünschen. - code: |- - {for} number {in} {range} 10 {to} 1 - {print} number - {sleep} - {clear} - {print} 'Happy New Year!' 2: story: |- Erstelle ein Programm, das uns die Ergebnisse der Wissenschaftsschau sagt. Definiere zuerst die Variable Teilnehmer, dann die Variable Platzierung. @@ -248,17 +215,3 @@ levels: 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/parsons/el.yaml b/content/parsons/el.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/el.yaml +++ b/content/parsons/el.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/eo.yaml b/content/parsons/eo.yaml index 40e15928904..66082cf31b6 100644 --- a/content/parsons/eo.yaml +++ b/content/parsons/eo.yaml @@ -8,46 +8,15 @@ levels: 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 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 @@ -55,10 +24,6 @@ levels: {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: |- ludantoj {is} Liam, Noah, Sophie ludanto_1 {is} ludantoj {at} {random} @@ -87,9 +52,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -97,7 +59,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' respondo {is} {ask} '88 - 16 = ?' @@ -105,11 +66,6 @@ levels: {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 @@ -117,29 +73,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -161,108 +99,8 @@ levels: {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: |- Helpu tiun ĉi familion kreante hortabelon pri kiu kaj kion ili devas kuiri ĉi semajne. La komando `{remove}` certigas ke neniu devas kuiru dufoje, kaj ke ili havu ĉiuvespere malsaman manĝon. **Atentu!** la ordo de la variabloj devas esti unue «tagoj», poste «familianoj», kaj laste «manĝelektoj». Tio ankaŭ devas esti por la linioj kun la komando `{remove}`. - 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/parsons/et.yaml b/content/parsons/et.yaml index 6396a557a1a..65012fd73a0 100644 --- a/content/parsons/et.yaml +++ b/content/parsons/et.yaml @@ -11,13 +11,6 @@ levels: {ask} Millist kooki sa osta tahad? {echo} Nii et sa tahad {print} Sinu tellimus tehakse valmis! - 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: |- @@ -50,26 +43,12 @@ levels: {sleep} 2 {print} Sa oled majad {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: |- @@ -90,9 +69,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -100,7 +76,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -108,11 +83,6 @@ levels: {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 @@ -120,29 +90,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -164,108 +116,8 @@ levels: {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 differnet 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/parsons/fa.yaml b/content/parsons/fa.yaml index 540c6617fbf..dbc6dd0d8fa 100644 --- a/content/parsons/fa.yaml +++ b/content/parsons/fa.yaml @@ -37,7 +37,6 @@ levels: {print} از خرید شما سپاسگذاریم! 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} سال تحصیلی جدید در هاگوارتز شروع می شود! {print} The sorting hat is ready to sort you into a Hogwarts house. @@ -45,26 +44,12 @@ levels: {sleep} 2 {print} And it is 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: |- @@ -85,9 +70,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -95,7 +77,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -103,11 +84,6 @@ levels: {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 @@ -115,29 +91,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -159,108 +117,8 @@ levels: {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 differnet 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/parsons/fi.yaml b/content/parsons/fi.yaml index 48b26fce92e..fcf0b661194 100644 --- a/content/parsons/fi.yaml +++ b/content/parsons/fi.yaml @@ -8,35 +8,13 @@ levels: 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 {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: |- @@ -44,44 +22,12 @@ levels: 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. - 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 minute 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 price that you might win. code: |- @@ -89,66 +35,8 @@ levels: price {is} {ask} 'What would you like to win?' {add} price {to_list} prices {print} 'You won a ' prices {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?' @@ -156,117 +44,8 @@ levels: {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 differnet 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/parsons/fr.yaml b/content/parsons/fr.yaml index 440819a01dc..a357acd1a57 100644 --- a/content/parsons/fr.yaml +++ b/content/parsons/fr.yaml @@ -19,9 +19,6 @@ levels: {ask} Quelle chanson veux-tu écouter ? {echo} Super choix ! J'adore 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: Ceci est la boutique en ligne d'un magasin de jouets. Crée un programme où les clients peuvent ajouter un jouet dans leur panier. code: |- @@ -50,19 +47,6 @@ levels: {print} Ton repas du jour hasard est... {sleep} 2 {print} nourriture {at} {random} avec garnitures {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: |- @@ -122,13 +106,6 @@ levels: 7: 1: story: Remets dans l'ordre la chanson Baby Shark. Baby Shark arrive en premier, puis Mommy Shark et finalement 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: Écris la chanson « Les roues de l’autobus tournent tournent » code: |- @@ -234,9 +211,6 @@ levels: place = place - 1 {print} "Félicitations !" 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:\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" - 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'" 2: story: Joue avec nous le jeux du Twister ! Commencer par définir la variable « personnes », puis « membres », et enfin « couleurs » code: |- diff --git a/content/parsons/fr_CA.yaml b/content/parsons/fr_CA.yaml index 440819a01dc..a357acd1a57 100644 --- a/content/parsons/fr_CA.yaml +++ b/content/parsons/fr_CA.yaml @@ -19,9 +19,6 @@ levels: {ask} Quelle chanson veux-tu écouter ? {echo} Super choix ! J'adore 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: Ceci est la boutique en ligne d'un magasin de jouets. Crée un programme où les clients peuvent ajouter un jouet dans leur panier. code: |- @@ -50,19 +47,6 @@ levels: {print} Ton repas du jour hasard est... {sleep} 2 {print} nourriture {at} {random} avec garnitures {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: |- @@ -122,13 +106,6 @@ levels: 7: 1: story: Remets dans l'ordre la chanson Baby Shark. Baby Shark arrive en premier, puis Mommy Shark et finalement 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: Écris la chanson « Les roues de l’autobus tournent tournent » code: |- @@ -234,9 +211,6 @@ levels: place = place - 1 {print} "Félicitations !" 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:\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" - 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'" 2: story: Joue avec nous le jeux du Twister ! Commencer par définir la variable « personnes », puis « membres », et enfin « couleurs » code: |- diff --git a/content/parsons/fy.yaml b/content/parsons/fy.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/fy.yaml +++ b/content/parsons/fy.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/he.yaml b/content/parsons/he.yaml index 06a5a0af40b..6deee0a1d40 100644 --- a/content/parsons/he.yaml +++ b/content/parsons/he.yaml @@ -8,18 +8,8 @@ levels: 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.\n - 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.\nShow which movie you're about to watch and wish the viewers lot of fun!\n @@ -38,12 +28,6 @@ levels: 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?\nAre you a Gryffindor, Hufflepuf, Ravenclaw or Slytherin.\nLet the program wait a short period before revealing your house.\n - 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!\n code: |- @@ -52,19 +36,6 @@ levels: {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!\nMake a program that selects your first Pokémon.\nLet the program wait a minute before revealing your first pokémon.\n @@ -113,22 +84,8 @@ levels: cakes_amount is 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'\n - 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.\nEither red, yellow or blue! Take a little pauze after announcing a team.\n @@ -148,108 +105,8 @@ levels: {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 differnet 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/parsons/hi.yaml b/content/parsons/hi.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/hi.yaml +++ b/content/parsons/hi.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/hr.yaml b/content/parsons/hr.yaml index 3a6c9c13ee6..0967ef424bc 100644 --- a/content/parsons/hr.yaml +++ b/content/parsons/hr.yaml @@ -1,88 +1 @@ -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. - 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}" - 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}" - 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" - 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!'" - 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." - 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' - 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. - 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" +{} diff --git a/content/parsons/hu.yaml b/content/parsons/hu.yaml index 2936f647571..de4783a2b50 100644 --- a/content/parsons/hu.yaml +++ b/content/parsons/hu.yaml @@ -12,7 +12,6 @@ levels: {echo} Ezt kértél: {print} Mindjárt hozom! 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} Yo, itt DJ Hedy {ask} Kezdődhet a buli? @@ -20,51 +19,19 @@ levels: {echo} Szuper! A legjobb szám a 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 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: |- @@ -85,9 +52,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -95,7 +59,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -103,11 +66,6 @@ levels: {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 @@ -115,29 +73,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -159,108 +99,8 @@ levels: {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 differnet 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/parsons/ia.yaml b/content/parsons/ia.yaml index 594bfa31eda..0967ef424bc 100644 --- a/content/parsons/ia.yaml +++ b/content/parsons/ia.yaml @@ -1,269 +1 @@ -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/parsons/iba.yaml b/content/parsons/iba.yaml index c0b4204a2c4..0967ef424bc 100644 --- a/content/parsons/iba.yaml +++ b/content/parsons/iba.yaml @@ -1,88 +1 @@ -levels: - 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!'" - 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. - 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" - 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." - 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. - 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" +{} diff --git a/content/parsons/id.yaml b/content/parsons/id.yaml index 6fbfb3c54d5..c58bd715b0b 100644 --- a/content/parsons/id.yaml +++ b/content/parsons/id.yaml @@ -9,35 +9,13 @@ levels: Dia bertanya jenis pai apa yang ingin Anda pesan. Kemudian dia mengulang jawaban Anda. Terakhir, pesanan Anda sedang disiapkan. - 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 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: |- @@ -45,18 +23,6 @@ levels: 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. - 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\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}" 4: 1: story: |- @@ -77,9 +43,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -87,7 +50,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Selesaikan masalah ini' jawaban {is} {ask} '88 - 16 = ?' @@ -95,11 +57,6 @@ levels: {else} {print} 'Salah! Jawabannya adalah 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 @@ -107,29 +64,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -151,108 +90,13 @@ levels: {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: |- Bantu keluarga ini dengan membuat jadwal siapa yang memasak dan apa yang harus mereka buat minggu ini. Perintah hapus memastikan tidak ada yang memasak dua kali dan mereka mendapatkan makan malam berbeda setiap hari. **Keberatan!** urutan variabel harus hari pertama, lalu orang, dan terakhir pilihan makan malam. Ini juga berlaku untuk baris dengan perintah `{remove}`. - 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: |- Buatlah program yang memberi tahu kita hasil akhir pameran sains. Pertama tentukan variabel kontestan, lalu variabel tempatnya. **Petunjuk** Baris 5 harus menjadi perintah tidur, dan kamu harus mengakhirinya dengan mengucapkan selamat. - 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/parsons/it.yaml b/content/parsons/it.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/it.yaml +++ b/content/parsons/it.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/ja.yaml b/content/parsons/ja.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/ja.yaml +++ b/content/parsons/ja.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/kab.yaml b/content/parsons/kab.yaml index efe255da183..0967ef424bc 100644 --- a/content/parsons/kab.yaml +++ b/content/parsons/kab.yaml @@ -1,88 +1 @@ -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/kmr.yaml b/content/parsons/kmr.yaml index 91dab9aa0ee..6b75889df67 100644 --- a/content/parsons/kmr.yaml +++ b/content/parsons/kmr.yaml @@ -8,35 +8,6 @@ levels: 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: |- @@ -44,44 +15,12 @@ levels: 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. - 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 minute 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 price that you might win. code: |- @@ -89,66 +28,8 @@ levels: price {is} {ask} 'What would you like to win?' {add} price {to_list} prices {print} 'You won a ' prices {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?' @@ -156,117 +37,8 @@ levels: {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 differnet 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/parsons/ko.yaml b/content/parsons/ko.yaml index 7ce46490a78..e6b65459493 100644 --- a/content/parsons/ko.yaml +++ b/content/parsons/ko.yaml @@ -60,14 +60,6 @@ levels: 체스 토너먼트에는 세 명의 선수가 남아 있다. 두 선수가 먼저 맞붙어야 할 상대를 결정하는 프로그램을 만드세요. 첫 번째 경기를 치른 두 명의 플레이어를 인쇄하는 것으로 시작한 다음 승자가 상대할 플레이어를 인쇄합니다. - 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: |- @@ -119,28 +111,11 @@ levels: {print} 'In catyears you are ' cat_age ' years old.' 2: story: 생일 파티를 위해 몇 개의 케이크를 사야 하는지 계산할 수 있도록 도와주는 프로그램을 만드세요. - 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: 아기 상어 노래를 완성하세요. 먼저 아기 상어, 그 다음에 엄마, 그리고 마지막으로 아빠 상어. - 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: '''버스 바퀴는 돌고 돈다''라는 노래를 만들어 보세요' - 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: |- @@ -155,115 +130,25 @@ levels: sleep 2 2: story: 숨바꼭질 게임의 카운트다운을 인쇄하세요. - code: |- - counter = 11 - {repeat} 10 {times} - counter = counter - 1 - {print} counter - {sleep} 1 - {print} 'Ready or not here I come!' 9: 1: story: 이 게임은 당신에게 세가지 수학과제를 줄 것이다. 매번 문제가 다르다. 당신은 순서를 알아낼 수 있습니까? - 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: |- 이 코드는 식당에 있는 고객들에게 디저트를 주문할 것인지를 물어봅니다. 만약 주문한다면, 어떤 디저트를 주문할 것인지를 물어봅니다. 만약 그들이 티라미수를 주문하면, 그들은 티라미수가 매진되었다는 말을 듣습니다. 코드를 작동시킬 수 있나요? - 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: |- 누가 요리를 하고 있고 이번 주에 그들이 무엇을 만들어야 하는지에 대한 일정표를 만들어서 이 가족을 도와주세요. 제거 명령은 아무도 두 번 요리할 필요가 없도록 해주고 그들은 매일 다른 저녁식사를 하도록 해줍니다. **Mind!** 변수 순서는 첫째 날, 그 다음에 사람, 그리고 마지막에 dinner_options이어야 합니다. 이 순서는 remove 명령이 있는 줄에도 적용됩니다. - 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: |- 이 변신 로봇이 여러분의 새로운 머리 모양을 결정해 줄 것입니다. 만약 여러분이 첫 번째 선택에 동의하지 않는다면, 다시 시도해 볼 수 있습니다. **Mind** 변수 사람은 첫 번째 줄에 정의하고, 두 번째 줄에 변수 머리 스타일을 정의합니다. - 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: 새해 전날을 위한 카운트 다운 시계를 만드세요! 이 프로그램은 10부터 1까지의 숫자를 잠깐 동안 보여주고 나서 여러분에게 새해 복 많이 받으세요. - 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: 우리와 함께 트위스터 게임을 해보세요! 먼저 가변적인 사람들을 정의하고, 팔다리, 그리고 색을 정의하세요. - 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/parsons/mi.yaml b/content/parsons/mi.yaml index fe77f55542b..6ac4961c7e4 100644 --- a/content/parsons/mi.yaml +++ b/content/parsons/mi.yaml @@ -1,151 +1,6 @@ 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?' @@ -153,117 +8,8 @@ levels: {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 differnet 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/parsons/ms.yaml b/content/parsons/ms.yaml index 86bb7f59ba9..0967ef424bc 100644 --- a/content/parsons/ms.yaml +++ b/content/parsons/ms.yaml @@ -1,88 +1 @@ -levels: - 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!'" - 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. - 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" - 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." - 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}" - 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. - 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!'" - 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" +{} diff --git a/content/parsons/nb_NO.yaml b/content/parsons/nb_NO.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/nb_NO.yaml +++ b/content/parsons/nb_NO.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/ne.yaml b/content/parsons/ne.yaml index fbd4f836430..0967ef424bc 100644 --- a/content/parsons/ne.yaml +++ b/content/parsons/ne.yaml @@ -1,88 +1 @@ -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 3828da1d390..d3ee3e75686 100644 --- a/content/parsons/nl.yaml +++ b/content/parsons/nl.yaml @@ -116,13 +116,6 @@ levels: 7: 1: story: Maak het baby shark liedje compleet. Eerst komt baby, dan mama tot slot papa haai. - 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: Maak het liedje 'de wielen van de bus' code: |- diff --git a/content/parsons/pa_PK.yaml b/content/parsons/pa_PK.yaml index 708147d1f28..337d2af976f 100644 --- a/content/parsons/pa_PK.yaml +++ b/content/parsons/pa_PK.yaml @@ -8,18 +8,8 @@ levels: 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.\n - 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.\nShow which movie you're about to watch and wish the viewers lot of fun!\n @@ -52,27 +42,9 @@ levels: food {is} pizza, icecream, salad, sandwich 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!\nMake a program that selects your first Pokémon.\nLet the program wait a minute before revealing your first pokémon.\n - 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 price that you might win.\n code: |- @@ -83,19 +55,8 @@ levels: 5: 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.\n - 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.\n - 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.\nFirst ask the age of the user and start calculating.\nFirst calculate the dogyears then the catyears.\nShow the user the different ages.\n @@ -107,28 +68,9 @@ levels: {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.\n - 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'\n - 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.\nEither red, yellow or blue! Take a little pauze after announcing a team.\n @@ -148,108 +90,8 @@ levels: counter = counter - 1 {print} counter {sleep} 1 - 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 differnet 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/parsons/pap.yaml b/content/parsons/pap.yaml index fe77f55542b..6ac4961c7e4 100644 --- a/content/parsons/pap.yaml +++ b/content/parsons/pap.yaml @@ -1,151 +1,6 @@ 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?' @@ -153,117 +8,8 @@ levels: {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 differnet 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/parsons/peo.yaml b/content/parsons/peo.yaml index 75dbc8215d0..0967ef424bc 100644 --- a/content/parsons/peo.yaml +++ b/content/parsons/peo.yaml @@ -1,88 +1 @@ -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. - 6: - 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!'\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'" - 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." - 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" - 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" - 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}" - 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}" - 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}" - 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' - 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. - 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!'" - 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" +{} diff --git a/content/parsons/pl.yaml b/content/parsons/pl.yaml index 9c04d98cc92..5cc935201c9 100644 --- a/content/parsons/pl.yaml +++ b/content/parsons/pl.yaml @@ -57,19 +57,6 @@ levels: {print} Twój dzisiejszy losowy posiłek to... {sleep} 2 {print} jedzenie {at} {random} z losowymi dodatki {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: |- @@ -168,108 +155,8 @@ levels: {print} licznik {sleep} 1 {print} 'Gotowi czy nie, szukam!' - 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 differnet 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/parsons/pt_BR.yaml b/content/parsons/pt_BR.yaml index f6687f7307b..922b790d1a7 100644 --- a/content/parsons/pt_BR.yaml +++ b/content/parsons/pt_BR.yaml @@ -124,13 +124,6 @@ levels: 7: 1: story: Complete a canção baby shark. Primeiro vem baby shark, depois mommy e, por fim, 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: Crie a canção 'As rodas do ônibus giram, giram' code: |- @@ -201,20 +194,6 @@ levels: {print} 'Na ' dia ' ' pessoa_escolhida ' vai fazer ' jantar_escolhido {remove} pessoa_escolhida {from} pessoas {remove} jantar_escolhido {from} opções_de_jantar - 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: Crie um relógio de contagem regressiva para a noite de Ano Novo! O programa deve mostrar os números de 10 a 1 por um segundo e então te desejar um feliz ano novo. @@ -224,43 +203,3 @@ levels: {sleep} {clear} {print} 'Feliz Ano Novo!' - 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/parsons/pt_PT.yaml b/content/parsons/pt_PT.yaml index 5922de79240..7ad0b4aab92 100644 --- a/content/parsons/pt_PT.yaml +++ b/content/parsons/pt_PT.yaml @@ -9,35 +9,13 @@ levels: Ele(a) pergunta que torta queres pedir. E depois repete a tua resposta de volta para ti. Finalmente, o teu pedido está a ser preparado. - 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 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: |- @@ -45,14 +23,7 @@ levels: 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. - 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: |- comida {is} pizza, gelado, salada, sandwich coberturas {is} chocolate, queijo, atum, sprinkles @@ -60,10 +31,6 @@ levels: {sleep} 2 {print} comida {at}{random} com cobertura de {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: |- jogadores {is} Liam, Noah, Sofia jogador_1 {is} jogadores {at} {random} @@ -92,9 +59,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -102,7 +66,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Resolve o problema' resposta {is} {ask} '88 - 16 = ?' @@ -110,11 +73,6 @@ levels: {else} {print} 'Incorrecto! A resposta era 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 @@ -122,29 +80,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -166,108 +106,13 @@ levels: {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: |- Ajude esta família criando um calendário de quem está a cozinhar e o que deve fazer esta semana. Os comandos `{remove}` garantem que ninguém tem de cozinhar duas vezes e que todos os dias têm um jantar diferente. **Detalhe!** a ordem das variáveis deve ser primeiro dias, depois pessoas e, por último, opções_jantar. Isto é válido para as linhas com os comandos `{remove}` também. - 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: |- Crie um programa que nos diga os resultados finais da feira de ciências. Primeiro define a variável concorrentes e depois a variável lugar. **Dica** A linha 5 deve ser o comando sleep, e deves terminar com os parabéns. - 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/parsons/ro.yaml b/content/parsons/ro.yaml index 91dab9aa0ee..6b75889df67 100644 --- a/content/parsons/ro.yaml +++ b/content/parsons/ro.yaml @@ -8,35 +8,6 @@ levels: 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: |- @@ -44,44 +15,12 @@ levels: 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. - 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 minute 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 price that you might win. code: |- @@ -89,66 +28,8 @@ levels: price {is} {ask} 'What would you like to win?' {add} price {to_list} prices {print} 'You won a ' prices {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?' @@ -156,117 +37,8 @@ levels: {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 differnet 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/parsons/ru.yaml b/content/parsons/ru.yaml index 8e38d583cbe..ab1c41e03f7 100644 --- a/content/parsons/ru.yaml +++ b/content/parsons/ru.yaml @@ -12,7 +12,6 @@ levels: {echo} Так вы хотите. {print} Ваш заказ готовится! 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} Это DJ Hedy {ask} Вы готовы к вечеринке? @@ -20,16 +19,12 @@ levels: {echo} Отличный выбор! Я люблю 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} Мы будем смотреть {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} Добро пожаловать в наш магазин игрушек игрушка {is} {ask} Что бы вы хотели купить? @@ -37,7 +32,6 @@ levels: {print} Спасибо за покупки с нами! 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} Новый учебный год в Хогвартсе начинается! {print} Распределяющая шляпа готова распределить вас по домам Хогвартса. @@ -45,26 +39,12 @@ levels: {sleep} 2 {print} И это дома {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: |- еда {is} пицца, мороженое, салат, сэндвич начинки {is} шоколад, сыр, тунец, посыпка {print} Ваша случайная на сегодня... {sleep} 2 {print} еда {at} {random} с начинки {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: |- @@ -85,9 +65,6 @@ levels: {print} 'Вы выиграли ' призы {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} Бэтмен, Человек-паук, Мстители, Парк Юрского периода movie {is} {ask} 'Какой твой любимый фильм?' @@ -95,7 +72,6 @@ levels: {else} {print} 'Очень жаль, вашего любимого фильма нет в списке, мы обязательно его добавим!' {add} movie {to_list} favorite_movies 2: - story: Create a maths game. code: |- {print} 'Решите эту задачу' ответ {is} {ask} '88 - 16 = ?' @@ -103,11 +79,6 @@ levels: {else} {print} 'Неправильно! Ответ был 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} 'Сколько тебе лет?' dog_age = age * 7 @@ -115,24 +86,13 @@ levels: {print} 'В собачьих годах тебе' dog_age ' лет.' {print} 'В кошачьих годах тебе ' cat_age ' лет.' 2: - story: Create a program that helps you calculate how many cakes you should buy for your birthday party. code: |- {print} 'Сегодня твой день рождения!' people = {ask} 'Скольким людям вы хотите дать по кусочку торта?' cakes_amount = people/8 {print} 'Вам придется купить ' cakes_amount ' торты' 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} 'колеса автобуса едут' {repeat} 3 {times} {print} 'туда сюда' @@ -159,108 +119,8 @@ levels: {print} счётчик {sleep} 1 {print} 'Готов или нет, но я иду!' - 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 differnet 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/parsons/sl.yaml b/content/parsons/sl.yaml index fd13965c429..65120a28257 100644 --- a/content/parsons/sl.yaml +++ b/content/parsons/sl.yaml @@ -14,75 +14,15 @@ levels: story: To je spletna trgovina z igračami. Ustvarite program, v katerem lahko kupci dodajo predmet v nakupovalno košarico. code: "{print} Dobrodošli v naši trgovini z igračami\nigrača {is} {ask} Kaj bi radi kupili?\n{print} igrača je dodana v vašo košarico.\n{print} Hvala, ker ste nakupovali pri nas!" 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: Ustvarite program, ki bo za vas izbral naključni obrok. Sestavite seznam jedi in seznam prelivov ter pustite programu, da odloči, kaj boste jedli! code: "hrana {is} pica, sladoled, solata, sendvič\ndodatki {is} čokolada, sir, tuna, mrvice\n{print} Vaš naključni obrok za danes je...\n{sleep} 2\n{print} hrana {at} {random} z dodatki {at} {random}" 3: story: "Na šahovskem turnirju ostanejo trije igralci.\nUstvarite program, ki odloči, katera dva igralca morata najprej igrati drug proti drugemu.\nZačnite tako, da natisnete dva igralca, ki igrata prvo tekmo, nato natisnite, proti kateremu igralcu bo igral zmagovalec." - 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}" - 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: - 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" - 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'" 6: - 1: - 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." - 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.'" 2: story: Ustvarite program, ki vam pomaga izračunati, koliko tort morate kupiti za rojstnodnevno zabavo. code: "{print} 'Danes imate rojstni dan!'\nljudje = {ask} 'Kolikim ljudem želite dati košček torte?'\nštevilo_tort = ljudje/8\n{print} 'Kupiti boste morali ' število_tort ' torte'" 7: 1: story: Dokončajte pesem Baby Shark. Najprej pride Baby Shartk, nato njegova mama in na koncu še oče morski pes. - 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'" - 2: - story: Create the song 'The wheels on the bus go round and round' - 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'" - 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: - story: Print the countdown for a game of hide and seek. - 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!'" - 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!'" - 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.\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" - 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}" - 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!'" - 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:\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" - 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'" - 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}" diff --git a/content/parsons/sq.yaml b/content/parsons/sq.yaml index ab030e9fc67..8881b24a278 100644 --- a/content/parsons/sq.yaml +++ b/content/parsons/sq.yaml @@ -57,19 +57,6 @@ levels: {print} Vakti juaj i rastësishëm për sot është... {sleep} 2 {print} ushqimi {at} {random} me majë {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: |- @@ -168,108 +155,8 @@ levels: {print} numëruesi {sleep} 1 {print} 'Gati apo jo ja ku po vij!' - 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 differnet 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/parsons/sv.yaml b/content/parsons/sv.yaml index bc7828d00de..755e4275ff0 100644 --- a/content/parsons/sv.yaml +++ b/content/parsons/sv.yaml @@ -52,19 +52,6 @@ levels: {print} Din slumpade måltid för dagen är... {sleep} 2 {print} mat {at} {random} med tillbehör {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: |- @@ -163,108 +150,8 @@ levels: {print} räknare {sleep} 1 {print} 'Nu kommer jag!' - 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 differnet 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/parsons/sw.yaml b/content/parsons/sw.yaml index 691d9a1a842..846d6e4af02 100644 --- a/content/parsons/sw.yaml +++ b/content/parsons/sw.yaml @@ -8,35 +8,13 @@ levels: 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 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: |- @@ -44,33 +22,13 @@ levels: 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. - 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: |- @@ -91,9 +49,6 @@ levels: {print} 'You won a ' prices {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: |- favoriete_movies {is} Batman, Spiderman, The Avengers, Jurassic Park movie {is} {ask} 'What is your favourite movie?' @@ -101,7 +56,6 @@ levels: {else} {print} 'Such a shame that your favourite movie is not in the list, we will add it right away!' {add} movie {to_list} favoriete_movies 2: - story: Create a maths game. code: |- {print} 'Solve this problem' answer {is} {ask} '88 - 16 = ?' @@ -109,11 +63,6 @@ levels: {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 @@ -121,29 +70,11 @@ levels: {print} 'In dogyears you are ' dog_age ' years old.' {print} 'In catyears 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 is 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: |- @@ -165,108 +96,8 @@ levels: {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 differnet 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/parsons/ta.yaml b/content/parsons/ta.yaml index 594bfa31eda..0967ef424bc 100644 --- a/content/parsons/ta.yaml +++ b/content/parsons/ta.yaml @@ -1,269 +1 @@ -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/parsons/te.yaml b/content/parsons/te.yaml index 0a160bd9eed..a5c6bf6d995 100644 --- a/content/parsons/te.yaml +++ b/content/parsons/te.yaml @@ -8,35 +8,13 @@ levels: 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 {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: |- @@ -50,38 +28,12 @@ levels: houses {is} Gryffindor, Hufflepuf, Ravenclaw, Slytherin {sleep} 2 {print} And it is 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 minute 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 price that you might win. code: |- @@ -89,66 +41,8 @@ levels: price {is} {ask} 'What would you like to win?' {add} price {to_list} prices {print} 'You won a ' prices {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?' @@ -156,117 +50,8 @@ levels: {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 differnet 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/parsons/th.yaml b/content/parsons/th.yaml index dcffad0441b..1fb71049533 100644 --- a/content/parsons/th.yaml +++ b/content/parsons/th.yaml @@ -52,19 +52,6 @@ levels: {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!\nMake a program that selects your first Pokémon.\nLet the program wait a minute before revealing your first pokémon.\n @@ -83,12 +70,6 @@ levels: 5: 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.\n - 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.\n code: |- @@ -113,22 +94,8 @@ levels: cakes_amount is 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'\n - 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.\nEither red, yellow or blue! Take a little pauze after announcing a team.\n @@ -141,115 +108,8 @@ levels: sleep 2 2: story: Print the countdown for a game of hide and seek.\n - 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 differnet 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/parsons/tl.yaml b/content/parsons/tl.yaml index 98a2e94268e..29f0c4d0b0c 100644 --- a/content/parsons/tl.yaml +++ b/content/parsons/tl.yaml @@ -8,35 +8,13 @@ levels: 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 {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: |- @@ -44,33 +22,6 @@ levels: 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. - 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: |- @@ -89,66 +40,16 @@ levels: price {is} {ask} 'What would you like to win?' {add} price {to_list} prices {print} 'You won a ' prices {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 dogyears you are ' dog_age ' years old.' {print} 'In catyears 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?' @@ -157,7 +58,6 @@ levels: {print} teams {at} {random} sleep 2 2: - story: Print the countdown for a game of hide and seek. code: |- counter = 11 {repeat} 10 {times} @@ -165,108 +65,8 @@ levels: {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 differnet 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/parsons/tn.yaml b/content/parsons/tn.yaml index 98ad2f2aa48..dba737e5d30 100644 --- a/content/parsons/tn.yaml +++ b/content/parsons/tn.yaml @@ -1,19 +1,5 @@ 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.\n code: |- @@ -39,12 +25,6 @@ levels: 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?\nAre you a Gryffindor, Hufflepuf, Ravenclaw or Slytherin.\nLet the program wait a short period before revealing your house.\n - 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!\n code: |- @@ -53,19 +33,6 @@ levels: {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!\nMake a program that selects your first Pokémon.\nLet the program wait a minute before revealing your first pokémon.\n @@ -84,12 +51,6 @@ levels: 5: 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.\n - 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.\n code: |- @@ -100,12 +61,6 @@ levels: 6: 1: 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.\n - 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.\n code: |- @@ -114,22 +69,8 @@ levels: cakes_amount is 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'\n - 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.\nEither red, yellow or blue! Take a little pauze after announcing a team.\n @@ -149,108 +90,8 @@ levels: {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 differnet 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/parsons/uk.yaml b/content/parsons/uk.yaml index 5a1f8781cfe..7ed480231ca 100644 --- a/content/parsons/uk.yaml +++ b/content/parsons/uk.yaml @@ -57,19 +57,6 @@ levels: {print} Ваша випадкова вечеря на сьогодні - це... {sleep} 2 {print} їжа {at} {random} начинки {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: |- @@ -168,108 +155,8 @@ levels: {print} лічильник {sleep} 1 {print} 'Готові чи ні, але я йду!' - 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 differnet 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/parsons/ur.yaml b/content/parsons/ur.yaml index 4e32e7325dd..53a5cffda71 100644 --- a/content/parsons/ur.yaml +++ b/content/parsons/ur.yaml @@ -50,19 +50,6 @@ levels: {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!\nMake a program that selects your first Pokémon.\nLet the program wait a minute before revealing your first pokémon.\n @@ -81,12 +68,6 @@ levels: 5: 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.\n - 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.\n code: |- @@ -111,15 +92,6 @@ levels: cakes_amount is 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'\n code: |- @@ -139,115 +111,8 @@ levels: sleep 2 2: story: Print the countdown for a game of hide and seek.\n - 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 differnet 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/parsons/uz.yaml b/content/parsons/uz.yaml index 594bfa31eda..0967ef424bc 100644 --- a/content/parsons/uz.yaml +++ b/content/parsons/uz.yaml @@ -1,269 +1 @@ -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/parsons/vi.yaml b/content/parsons/vi.yaml index 821581a1ee0..c682ec22b39 100644 --- a/content/parsons/vi.yaml +++ b/content/parsons/vi.yaml @@ -38,12 +38,6 @@ levels: 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?\nAre you a Gryffindor, Hufflepuf, Ravenclaw or Slytherin.\nLet the program wait a short period before revealing your house.\n - 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: Viết chương trình chọn một món ăn ngẫu nhiên. Tạo một danh sách đồ ăn và lớp phủ (topping) và để chương trình quyết định bạn sẽ ăn gì! code: |- @@ -52,19 +46,6 @@ levels: {print} Món ăn ngẫu nhiên của ngày hôm nay là... {sleep} 2 {print} do_an {at} {random} lớp_phủ {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!\nMake a program that selects your first Pokémon.\nLet the program wait a minute before revealing your first pokémon.\n @@ -83,19 +64,8 @@ levels: 5: 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.\n - 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.\n - 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.\nFirst ask the age of the user and start calculating.\nFirst calculate the dogyears then the catyears.\nShow the user the different ages.\n @@ -107,21 +77,7 @@ levels: {print} 'In catyears 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.\n - 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'\n code: |- @@ -148,108 +104,8 @@ levels: {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 differnet 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/parsons/zh_Hans.yaml b/content/parsons/zh_Hans.yaml index df680755072..e1bf0363ae0 100644 --- a/content/parsons/zh_Hans.yaml +++ b/content/parsons/zh_Hans.yaml @@ -15,7 +15,6 @@ levels: {echo} 所以你想要 {print} 您的订单正在准备中! 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} 这是DJ海蒂 {ask} 你准备好参加派对了吗? @@ -23,31 +22,17 @@ levels: {echo} 很棒的选择!我喜欢这首歌 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} 是时候度过一个晚上的网飞了 电影 {is} 刺猬索尼克2 {print} 我们要看电影 {print} 玩得愉快! 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} 欢迎来到我们的玩具店 玩具 {is} {ask} 你想买什么? {print}玩具已添加到您的购物车中。 {print} 感谢您与我们一起购物! - 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}" 4: 1: story: |- @@ -59,53 +44,22 @@ levels: {print} “这将是你的第一只神奇宝贝!” {sleep} {print} 口袋妖怪 {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: - 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" - 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'" 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: |- 年龄 = {ask}“你多大了?” 狗的年龄 = 年龄 * 7 猫的年龄 = 年龄 * 5 {print}“在狗年里,你已经'dog_age'岁了。” {print} “在猫年里,你已经'cat_age'岁了。” - 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!'\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'" 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} “公共汽车上的轮子” {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.\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: story: Print the countdown for a game of hide and seek. code: |- @@ -116,52 +70,19 @@ levels: {sleep} 1 {print} “准备好了,我来不来!” 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: |- 此代码询问餐厅的顾客是否要订购甜点。如果他们这样做,它会问他们什么样的甜点。如果他们订购提拉米苏,他们会被告知提拉米苏已经售罄。 你能让代码工作吗? - 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: |- 通过制定一个时间表来帮助这个家庭摆脱困境,确定谁在做饭以及他们本周应该做什么。 `{remove}` 命令确保没有人需要做饭两次,这样每天都有不同的晚餐。 **注意!** 变量顺序应该是先是哪一天,然后是人,最后是晚餐选项。 这也适用于带有`{remove}` 命令的行。 - 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: |- 这个化妆机器人将为您决定您的新发型。如果您不同意第一个选择,可以重试。 **头脑**变量人定义在第一行。第二个中的可变发型。 - 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: 创建除夕倒计时!程序应该在一秒钟内显示从10到1的数字,然后祝你新年快乐。 @@ -175,15 +96,6 @@ levels: story: |- 创建一个程序,告诉我们科学集市的最终结果。首先定义变量参赛者,然后定义变量位置。 **提示** 第 5 行应该是睡眠命令,而且你应该以表示祝贺结束。 - 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: |- @@ -197,17 +109,5 @@ levels: 她冉冉升起 她冉冉升起 清晨 - 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: 和我们一起玩龙卷风游戏!首先定义可变的人,然后是四肢,然后是颜色。 - 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/parsons/zh_Hant.yaml b/content/parsons/zh_Hant.yaml index 91dab9aa0ee..6b75889df67 100644 --- a/content/parsons/zh_Hant.yaml +++ b/content/parsons/zh_Hant.yaml @@ -8,35 +8,6 @@ levels: 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: |- @@ -44,44 +15,12 @@ levels: 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. - 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 minute 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 price that you might win. code: |- @@ -89,66 +28,8 @@ levels: price {is} {ask} 'What would you like to win?' {add} price {to_list} prices {print} 'You won a ' prices {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?' @@ -156,117 +37,8 @@ levels: {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 differnet 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/ar.yaml b/content/quizzes/ar.yaml index 4924ce58787..39384ab6226 100644 --- a/content/quizzes/ar.yaml +++ b/content/quizzes/ar.yaml @@ -12,8 +12,6 @@ levels: - option: هييدي feedback: حاول مرة اخرى! hint: سميت على اسم هيدي لامار. - correct_answer: A - question_score: '10' 2: question_text: أي الخيارات التالية يجب ملؤها في الفراغ لجعل النص "مرحبا" يظهر؟ code: _ مرحبا! @@ -27,8 +25,6 @@ levels: - option: '`{إسأل}`' feedback: مع `{ask}`، يمكنك طرح سؤال. hint: _أهلا يا عالم! - correct_answer: B - question_score: '10' 3: question_text: كيف تسأل ما هو اللون المفضل لشخص ما؟ mp_choice_options: @@ -53,8 +49,6 @@ levels: ``` feedback: '`{echo}` يكرر إجابة سؤالك.' hint: يمكنك أن تسأل شيئاً باستخدام الأمر `{ask}` - correct_answer: C - question_score: '10' 4: question_text: ما الخطأ في هذا الكود؟ code: |- @@ -71,8 +65,6 @@ levels: - option: لا شئ! إنه كود ممتاز! feedback: خطأ، حاول النظر بتمعن اكثر! hint: السطر الاول لا يبدو صحيحًا - correct_answer: A - question_score: '10' 5: question_text: ما هو الأمر المفقود في السطر 2؟ code: |- @@ -100,8 +92,6 @@ levels: ``` feedback: أحسنت! hint: تريد أن ترى الإجابة في نهاية السطر 2 ... - correct_answer: D - question_score: '10' 6: question_text: ما الخطأ في هذا الكود؟ code: |- @@ -119,8 +109,6 @@ levels: - option: في السطر الرابع، تهجئة `{print}` ليست صحيحة. feedback: لا، يوجد خطأ في مكان أخر hint: تحقق من الأمر `{print}`. - correct_answer: B - question_score: '10' 7: question_text: ما الخطأ في هذا الكود؟ code: |- @@ -138,8 +126,6 @@ levels: - option: لا شئ! الكود ممتاز! feedback: إجابة صحيحة! hint: تحقق من الرمز سطرا سطرا - correct_answer: D - question_score: '10' 8: question_text: كيف تستخدم الأمر `{echo}`؟ mp_choice_options: @@ -152,8 +138,6 @@ levels: - option: يمكن إستخدامه لجعل النص يختفي. feedback: هذا غير صحيح... hint: '`{echo}` يستخدم بعد الأمر `{ask}`.' - correct_answer: C - question_score: '10' 9: question_text: ما الخطأ في هذا الكود؟ code: |- @@ -170,14 +154,8 @@ levels: - option: لا شيء! الكود ممتاز! feedback: ابحث عن الخطأ... hint: '`{ask}` يمكنك من طرح سؤال' - correct_answer: B - question_score: '10' 10: question_text: ما هو المخرج الذي سيكون على شاشة الإخراج بعد قيامك بتشغيل هذا الرمز؟ - 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: هنالك أمرين لـ`{echo}` @@ -191,9 +169,6 @@ levels: Are you ready to go to level 2? Yes! feedback: هنالك أمرين لـ`{echo}` - hint: Let's go! - correct_answer: B - question_score: '10' 2: 1: question_text: اختر الجملة الصحيحة @@ -207,8 +182,6 @@ levels: - option: باستخدام الأمر `{sleep}` يمكنك إزالة النص عن الشاشة feedback: لا يعمل الأمر `{sleep}` بهذه الطريقة hint: الأمر `{print}` ما زال يعمل كما كان في المستوى الأول - correct_answer: C - question_score: '10' 2: question_text: اختر الكود الصحيح mp_choice_options: @@ -233,8 +206,6 @@ levels: ``` feedback: الكلمات صحيحة، لكن ترتيبها خاطئ! hint: الأمر `{ask}` يعمل الآن بشكل مختلف عن المستوى الأول - correct_answer: A - question_score: '10' 3: question_text: ما النتيجة التي تظهر على الشاشة عند تنفيذ الكود التالي؟ code: |- @@ -250,8 +221,6 @@ levels: - option: مريم ذهبت إلى البقالة مريم اشترت تفاحة feedback: من المفترض أن يظهر اسم مريم مرة واحدة hint: يتم استبدال كلمة "الاسم" بـِ"مريم" - correct_answer: C - question_score: '10' 4: question_text: ما النتيجة التي تظهر على الشاشة عند تنفيذ الكود التالي؟ code: |- @@ -267,8 +236,6 @@ levels: - option: مرحبًا، هيدي هو هيدي feedback: صحيح! سيتم تصحيح هذا الخطأ في المستور الرابع! hint: كلمة "اسمي" سيتم استبدالها بـِ"هيدي" مرتين - correct_answer: D - question_score: '10' 5: question_text: ماذا يحدث عند استخدام الأمر `{sleep}` ؟ mp_choice_options: @@ -281,8 +248,6 @@ levels: - option: يتم استخدام الأمر `{sleep}` في نهاية الكود عادةً لنخبر هيدي أن البرنامج انتهى feedback: لا طبعًا، لن تستفيد منه إذا وضعته في نهاية الكود hint: الحاسوب ينتظر لمدة ثانية عند استخدام الأمر `{sleep}` - correct_answer: C - question_score: '10' 6: question_text: ماذا يجب أن يكون في الأسطر الفارغة؟ code: |- @@ -311,8 +276,6 @@ levels: ``` feedback: لا يوجد سؤال لاستخدام `{ask}` من أجله! hint: توقف للحظة من أجل هذا الحدث الرائع - correct_answer: A - question_score: '10' 7: question_text: ما هو الأمر الذي يجب استخدامه في السطر ٢؟ code: |- @@ -341,8 +304,6 @@ levels: ``` feedback: استخدم الرقم ٣ لتسهل الأمر عليك hint: نريد من الحاسوب أن ينتظر لثلاثة ثوانٍ - correct_answer: B - question_score: '10' 8: question_text: كيف ستصلح السطر الأول من الكود؟ code: |- @@ -370,8 +331,6 @@ levels: ``` feedback: أين الأمر `{ask}`؟ hint: اسم المتغير يجب أن ياتي أولًا - correct_answer: C - question_score: '10' 9: question_text: اكتشف الخطأ في الكود التالي code: |- @@ -387,8 +346,6 @@ levels: - option: 'السطر الثاني يجب أن يكون هكذا: `{sleep}` حيواني المفضل هو الكلب' feedback: '`{sleep}` لا يستخدم لطباعة الكلام' hint: أنت تريد أن تـ`{print}` "حيواني المفضل هو الكلب" - correct_answer: B - question_score: '10' 10: question_text: ما الأمر الذي يجب ان نستخدمه في السطر الأول؟ code: |- @@ -418,8 +375,6 @@ levels: ``` feedback: رائع! hint: أنت تريد أن تسأل سؤالًا - correct_answer: D - question_score: '10' 3: 1: question_text: أياً من الأوامر التالية يستخدم لجعل هيدي تختار شيئاً بطريقة تعسفية؟ @@ -445,13 +400,8 @@ levels: ``` feedback: إجابة صحيحة! hint: تعسفي يعني بدون تخطيط أو بعشوائية. - correct_answer: D - question_score: '10' 2: question_text: ما الخطأ في هذا الكود؟ - code: |- - animals {is} dog cat cow - {print} animals {at} {random} mp_choice_options: - option: 'في السطر ١ يجب إستخدام الفاصلة: كلب، قطة، بقرة.' feedback: أحسنت! @@ -462,8 +412,6 @@ levels: - option: '`{at} {random}`الأمر `{at} {random}` تهجئته غير صحيحة' feedback: الأمر `{at} {random}` تهجئته صحيحة hint: هناك شيء خاطيء في السطر ١ - correct_answer: A - question_score: '10' 3: question_text: كيف بمكنك تصحيح الخطأ في السطر٢ للكود؟ code: |- @@ -488,8 +436,6 @@ levels: - option: لا شيء، الكود صحيح! feedback: أبحث جيداً عن الخطأ hint: المتغير المستخدم (القائمة) تسمى الخيارات. - correct_answer: C - question_score: '10' 4: question_text: ما الذي يجب تغييره في السطر٢ لطباعة سعر عشوائي؟ code: |- @@ -514,8 +460,6 @@ levels: - option: لا شيء، الكود صحيح. feedback: أنظر جيداً هناك خطأ لم تنتبه له! hint: المتغيير اسمه الأسعار - correct_answer: B - question_score: '10' 5: question_text: ما الخطأ في هذا الكود؟ code: |- @@ -533,8 +477,6 @@ levels: - option: لا شيء، الكود صحيح feedback: أجل هذا صحيح! hint: هل هذا الكود يحتوي على أي أخطاء من الأساس؟ - correct_answer: D - question_score: '10' 6: question_text: ما الخطأ في هذا الكود؟ code: |- @@ -551,8 +493,6 @@ levels: - option: لا شيء! الكود رائع! feedback: فالواقع، السطر٢ يوجد به خطأ. hint: هناك شيء خاطيء في السطر٢. - correct_answer: B - question_score: '10' 7: question_text: ما الذي يفعله الأمر `{add}`؟ code: |- @@ -570,8 +510,6 @@ levels: - option: الأمر `{add}` يطبع اسم كتابك المفضل. feedback: لا، بل يضيف كتابك المفضل للقائمة hint: الأمر `{add}` يضيف كتاب للقائمة، ولكن أي كتاب؟ - correct_answer: C - question_score: '10' 8: question_text: ما خرج هذا الكود عند تشغيله؟ code: |- @@ -589,8 +527,6 @@ levels: - option: القشدة الحامضة feedback: هذا صحيح! hint: هناك ثلاث نكهات، تم حذف اثنين. ما المتبقي؟ - correct_answer: D - question_score: '10' 9: question_text: ما الخطأ في هذا الكود؟ code: "الألوان هي الأزرق، الأرجواني، الأخضر\nاللون_المختار {is} {ask} ما لون الشعر الذي لا ترغب في الحصول عليه؟\n{remove} اللون_المختار {from} الألوان \n{print} سوف أصبغ شعري اللون {at} {random}" @@ -604,8 +540,6 @@ levels: - option: لا شئ، هذا الكود صحيح! feedback: أوجد الخطأ! hint: تحقق من السطر٣ - correct_answer: C - question_score: '10' 10: question_text: ماذا يجب أن يوضع مكان _؟_؟ code: |- @@ -636,8 +570,6 @@ levels: ``` feedback: معنى تلك الإضافة أن الذي قام بتمشية الكلب أمس عليه أن يفعل ذلك مرة أخرى اليوم، هذا معناه. hint: الشخص الذي قام بتمشية الكلب أمس يجب حذف اسمه من القائمة. - correct_answer: A - question_score: '10' 4: 1: question_text: 'اختر الجملة الصحيحة مما يلي:' @@ -651,7 +583,6 @@ levels: - option: يجب استخدام علامات الاقتباس مع `{at} {random}` feedback: لا, ولكن هناك أمران يجب استخدام علامات الاقتباس معهما. hint: في المستوى الرابع تحتاج لعلامات الاقتباس عند استخدام أمران من الأوامر. - correct_answer: A question_score: ١٠ 2: question_text: ما الكود الذي يستخدم علامات الاقتباس الصحيحة؟ @@ -677,7 +608,6 @@ levels: ``` feedback: هذه فاصلة, أنت تريد علامات الاقتباس hint: اختر علامات الاقتباس الصحيحة. - correct_answer: B question_score: ١٠ 3: question_text: في أي كود تم استخدام علامات الاقتباس بالشكل الصحيح؟ @@ -703,7 +633,6 @@ levels: ``` feedback: رائع! hint: يجب أن تكون علامات الاقتباس محيطة بالكلام الذي تريد طباعته (قبله وبعده) - correct_answer: D question_score: ١٠ 4: question_text: 'اختر العبارة الصحيحة مما يلي:' @@ -717,7 +646,6 @@ levels: - option: لك حرية الاختيار ان تستخدم علامات الاقتباس أم لا. feedback: للأسف, هيدي قوانينها صارمة بشأن علامات الاقتباس. hint: ابتداءً من المستوى الرابع عليك استخدام علامات الاقتباس. - correct_answer: B question_score: ١٠ 5: question_text: ما الذي يجب تغييره في الكود كي تعمل للعبة بالشكل الصحيح؟ @@ -742,11 +670,8 @@ levels: feedback: إجابة صحيحة, أحسنت! - option: لا شيء, اللعبة تعمل بالشكل الصحيح! feedback: انظر جيدًا. هناك خطأ في الكود. - 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: ١٠ 6: - question_text: What would be a good next line in this code? code: الجوائز {is} ١ دولار, ١٠٠ دولارات, مليون دولار mp_choice_options: - option: |- @@ -770,7 +695,6 @@ levels: ``` feedback: هيدي ستطبع حرفيًا عبارة "الجوائز {at}{random}" hint: فكّر جيدًا قبل الإجابة, فرّق بين المتغير الذي لا ينبغي وضعه داخل علامات اقتباس والكلمات العادية التي يجب وضعها داخل علامات اقتباس عند الطباعة - correct_answer: A question_score: ١٠ 7: question_text: ما الخطأ في هذا الكود؟ @@ -788,7 +712,6 @@ levels: - option: لا شيء, الكود يبدو جيدًا كما هو! feedback: انظر جيدًا, هناك خطأ في الكود! hint: تفقد كل سط إن كان بحاجة علامات الاقتباس أم لا. - correct_answer: A question_score: ١٠ 8: question_text: ما هو السطر المناسب ليكمل الكود التالي؟ @@ -818,7 +741,6 @@ levels: ``` feedback: هيدي ستطبع حرفيًا عبارة "لقد اخترت الباب الباب" hint: المتغير "الباب" يجب أن تطبع قيمته كرقم... - correct_answer: C question_score: ١٠ 9: question_text: ما الخيار الذي لن يظهر على الشاشة أبدًا؟ @@ -835,7 +757,6 @@ levels: - option: نادي برشلونة سيفوز في دوري أبطال أوروبا feedback: إجابة صحيحة, نادي برشلونة ليس من ضمن القائمة hint: ما هي الخيارات التي ستختار منها هيدي عشوائيًا؟ - correct_answer: D question_score: ١٠ 10: question_text: 'اختر الإجابة الصحيحة مما يلي:' @@ -853,7 +774,6 @@ levels: - option: لا شيء, الكود لا يحتوي على أخطاء feedback: ركّز جيّدًا ستجد خطأ! hint: أحد السطور يحتاج إلى علامات اقتباس, لأننا نريد طباعته حرفيًا. - correct_answer: B question_score: ١٠ 5: 1: @@ -872,79 +792,8 @@ levels: - option: In level 5 `{ask}` and `{print}` work the same as in level 4 feedback: Correct! hint: We have only learned a new command in level 5. - 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 question mark in the last line? code: |- @@ -953,30 +802,6 @@ levels: 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 question mark? code: |- @@ -1005,9 +830,6 @@ levels: {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 question mark? code: |- @@ -1035,222 +857,12 @@ levels: {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: Which sign do you use for an addition? - 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 is 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' @@ -1263,12 +875,8 @@ levels: 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. @@ -1279,54 +887,9 @@ levels: - option: infinite feedback: In this level you can only repeat one line at a time hint: You can only repeat 1 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: |- ``` @@ -1349,24 +912,7 @@ levels: ``` feedback: '`{times}` is spelled correctly' hint: I'm is wrong, you can't use apostrophes - 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 @@ -1392,14 +938,7 @@ levels: round and round round and round feedback: All though 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 @@ -1420,17 +959,8 @@ levels: We will ROCK YOU! feedback: Mind the repeat command - hint: Mind the `{repeat}` command. - correct_answer: B - question_score: '10' 8: question_text: Welke Hedy code hoort bij dit resultaat - code: |- - Here comes the sun - Do do do do - Here comes the sun - And I say - Its alright mp_choice_options: - option: |- ``` @@ -1464,8 +994,6 @@ levels: ``` feedback: Dit is niet de juiste volgorde.. hint: '`{repeat}` kan alleen worden gebruikt als je dezelfde regel meerdere keren achter elkaar wil uitvoeren.' - correct_answer: A - question_score: '10' 9: question_text: Welke Hedy code hoort bij dit resultaat ? code: |- @@ -1509,15 +1037,8 @@ levels: ``` feedback: Perfect hint: '''Help !'' wordt 3x herhaald.' - correct_answer: D - question_score: '10' 10: question_text: What Hedy 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: |- ``` @@ -1547,46 +1068,8 @@ levels: {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. @@ -1596,15 +1079,7 @@ levels: feedback: Nee, repeat is de goede spelling - option: The second line need 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 @@ -1631,10 +1106,7 @@ levels: 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} @@ -1666,15 +1138,7 @@ levels: Yay! Were going on holiday! 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 en start with 4 spaces. feedback: That's right! @@ -1684,44 +1148,7 @@ levels: 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: |- eten = {ask} 'What would you like to eat?' {if} food {is} fries @@ -1740,11 +1167,7 @@ levels: 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: |- ``` @@ -1786,50 +1209,20 @@ levels: {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} eten = {ask} 'What would you like to eat?' @@ -1850,19 +1243,7 @@ levels: - option: The indentation is wrong in the last `{if}` command. feedback: It not, though. 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! @@ -1881,11 +1262,7 @@ levels: 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?' @@ -1901,20 +1278,7 @@ levels: {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?' @@ -1934,15 +1298,7 @@ levels: feedback: That's right! - option: Cinderella with shoe size 40 gets the output 'I was looking for you!' feedback: No she gets 'Ill keep looking' - 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: |- ``` @@ -1977,11 +1333,7 @@ levels: {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 @@ -1991,9 +1343,6 @@ levels: 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: "In this code from a pizza restaurant. \nYoull get a 5 dollar discount if you order a medium pizza with coke.\n What should you do to debug this code?" code: |- @@ -2034,9 +1383,6 @@ levels: price = price - 2 ``` feedback: Try again - hint: After each `{if}` command, the line below should indent - correct_answer: A - question_score: '10' 8: question_text: What is wrong is this code? code: |- @@ -2054,25 +1400,7 @@ levels: 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 @@ -2087,8 +1415,6 @@ levels: - option: line 2 should atart with 4 spaces and line 3 with 8 feedback: You are correct! hint: The first line doens'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? @@ -2096,91 +1422,6 @@ levels: 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: |- @@ -2189,25 +1430,7 @@ levels: 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! @@ -2221,9 +1444,6 @@ levels: 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: |- @@ -2231,30 +1451,6 @@ levels: 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: |- @@ -2283,9 +1479,6 @@ levels: '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: |- @@ -2295,20 +1488,7 @@ levels: {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: |- prices = 1 million dollars, car, sandwich names = Bob, Patrick, Sandy, Larry @@ -2323,9 +1503,6 @@ levels: feedback: That is not true. Larry has the same odds as the others - option: Someone might win with two prices 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 question mark? @@ -2353,14 +1530,7 @@ levels: {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 @@ -2373,64 +1543,7 @@ levels: 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: |- ``` @@ -2457,42 +1570,6 @@ levels: ``` 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 question mark? code: |- @@ -2501,35 +1578,7 @@ levels: _?_ food is {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 @@ -2545,34 +1594,7 @@ levels: 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: |- ``` @@ -2603,11 +1625,8 @@ levels: ``` feedback: '`{range}` 0 `{to}` 3 is 4 times.' hint: Mind the indention - 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 @@ -2624,11 +1643,7 @@ levels: 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: |- ``` @@ -2654,11 +1669,7 @@ levels: 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!' @@ -2671,30 +1682,13 @@ levels: 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' @@ -2707,18 +1701,6 @@ levels: 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: |- @@ -2732,32 +1714,7 @@ levels: 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!" @@ -2769,36 +1726,7 @@ levels: 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: |- ``` @@ -2820,9 +1748,6 @@ levels: 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: |- @@ -2849,9 +1774,6 @@ levels: 'prices' = 'one million dollars', 'nothing' ``` feedback: You one 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: |- @@ -2872,12 +1794,8 @@ levels: 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?' @@ -2908,11 +1826,7 @@ levels: 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?' @@ -2927,11 +1841,7 @@ levels: 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?' @@ -2949,10 +1859,7 @@ levels: - 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' @@ -2963,28 +1870,11 @@ levels: 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?' @@ -2997,20 +1887,7 @@ levels: 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' @@ -3024,20 +1901,7 @@ levels: print 'I fed them this moring! They do not need more food today' if animal is 'hamster' and color is '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?' @@ -3051,32 +1915,7 @@ levels: 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?' @@ -3113,11 +1952,7 @@ levels: {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 is ask 'What product are you looking for?' @@ -3141,65 +1976,8 @@ levels: 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? @@ -3208,20 +1986,7 @@ levels: {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?' @@ -3229,20 +1994,7 @@ levels: {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 @@ -3250,69 +2002,7 @@ levels: 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 @@ -3321,101 +2011,19 @@ levels: {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 two blanks? 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!' @@ -3435,11 +2043,7 @@ levels: 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 @@ -3458,9 +2062,6 @@ levels: 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: |- @@ -3478,25 +2079,8 @@ levels: 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 to 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! @@ -3506,32 +2090,9 @@ levels: 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: |- chocolate = {ask} 'How many calories have you eaten today?' {while} calories <= 1000 @@ -3549,16 +2110,7 @@ levels: 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! @@ -3568,105 +2120,20 @@ levels: 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. @@ -3676,16 +2143,7 @@ levels: 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. @@ -3695,487 +2153,3 @@ levels: 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/quizzes/bg.yaml b/content/quizzes/bg.yaml index 7044e23c3fe..bbfeedbeecb 100644 --- a/content/quizzes/bg.yaml +++ b/content/quizzes/bg.yaml @@ -11,9 +11,6 @@ levels: 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 command makes text appear? code: ___ Hello! @@ -39,40 +36,9 @@ levels: ``` 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! @@ -82,11 +48,7 @@ levels: 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... @@ -111,49 +73,7 @@ levels: {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! @@ -163,33 +83,8 @@ levels: 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 outputscreen 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 @@ -203,12 +98,8 @@ levels: 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: In level 2 the `{print}` command doesn't exist anymore feedback: '`{print}` still works' @@ -219,84 +110,7 @@ levels: - option: In level 2 all the level 1 commands still work feedback: No one command doesn't work anymore. hint: '`{print}` and `{ask}` still exist.' - 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... _?_ @@ -322,116 +136,17 @@ levels: {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 do you use to let Hedy pick something arbitrarily? @@ -456,14 +171,7 @@ levels: {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! @@ -473,155 +181,15 @@ levels: 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 of this code? - 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 haircolor wouldn't your 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 3 - correct_answer: C - question_score: '10' 10: question_text: What should be on the _?_? code: |- @@ -652,8 +220,6 @@ levels: ``` feedback: This increased the change that the person who walked yesterday now has to do it again. That's mean. hint: The person who walked the dog yesterday should be removed from the list. - correct_answer: A - question_score: '10' 4: 1: question_text: Which of these is true? @@ -666,11 +232,7 @@ levels: feedback: '`{at} {random}` still works' - option: '`{at} {random}` now needs quotation marks' feedback: No, but 2 other commands do. - 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: |- ``` @@ -692,11 +254,7 @@ levels: {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: |- ``` @@ -718,28 +276,7 @@ levels: {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: |- ``` @@ -758,89 +295,9 @@ levels: 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 @@ -850,27 +307,6 @@ levels: 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: What is true? @@ -888,79 +324,8 @@ levels: - option: In level 5 `{ask}` and `{print}` work the same as in level 4 feedback: Correct! hint: We have only learned a new command in level 5. - 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 question mark in the last line? code: |- @@ -969,30 +334,6 @@ levels: 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 question mark? code: |- @@ -1021,9 +362,6 @@ levels: {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 question mark? code: |- @@ -1051,225 +389,15 @@ levels: {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: Which sign do you use for an addition? - 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 is this virtual restaurant? + 10: 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' + 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 @@ -1279,12 +407,8 @@ levels: 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. @@ -1295,54 +419,9 @@ levels: - option: infinite feedback: In this level you can only repeat one line at a time hint: You can only repeat 1 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: |- ``` @@ -1365,24 +444,7 @@ levels: ``` feedback: '`{times}` is spelled correctly' hint: I'm is wrong, you can't use apostrophes - 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 @@ -1408,14 +470,7 @@ levels: round and round round and round feedback: All though 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 @@ -1436,17 +491,8 @@ levels: We will ROCK YOU! feedback: Mind the repeat command - hint: Mind the `{repeat}` command. - correct_answer: B - question_score: '10' 8: question_text: Welke Hedy code hoort bij dit resultaat - code: |- - Here comes the sun - Do do do do - Here comes the sun - And I say - Its alright mp_choice_options: - option: |- ``` @@ -1480,8 +526,6 @@ levels: ``` feedback: Dit is niet de juiste volgorde.. hint: '`{repeat}` kan alleen worden gebruikt als je dezelfde regel meerdere keren achter elkaar wil uitvoeren.' - correct_answer: A - question_score: '10' 9: question_text: Welke Hedy code hoort bij dit resultaat ? code: |- @@ -1525,15 +569,8 @@ levels: ``` feedback: Perfect hint: '''Help !'' wordt 3x herhaald.' - correct_answer: D - question_score: '10' 10: question_text: What Hedy 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: |- ``` @@ -1563,46 +600,8 @@ levels: {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. @@ -1612,15 +611,7 @@ levels: feedback: Nee, repeat is de goede spelling - option: The second line need 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 @@ -1647,10 +638,7 @@ levels: 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} @@ -1682,15 +670,7 @@ levels: Yay! Were going on holiday! 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 en start with 4 spaces. feedback: That's right! @@ -1700,44 +680,7 @@ levels: 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: |- eten = {ask} 'What would you like to eat?' {if} food {is} fries @@ -1756,11 +699,7 @@ levels: 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: |- ``` @@ -1802,50 +741,20 @@ levels: {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} eten = {ask} 'What would you like to eat?' @@ -1866,19 +775,7 @@ levels: - option: The indentation is wrong in the last `{if}` command. feedback: It not, though. 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! @@ -1897,11 +794,7 @@ levels: 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?' @@ -1917,20 +810,7 @@ levels: {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?' @@ -1950,15 +830,7 @@ levels: feedback: That's right! - option: Cinderella with shoe size 40 gets the output 'I was looking for you!' feedback: No she gets 'Ill keep looking' - 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: |- ``` @@ -1993,11 +865,7 @@ levels: {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 @@ -2007,9 +875,6 @@ levels: 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: "In this code from a pizza restaurant. \nYoull get a 5 dollar discount if you order a medium pizza with coke.\n What should you do to debug this code?" code: |- @@ -2050,9 +915,6 @@ levels: price = price - 2 ``` feedback: Try again - hint: After each `{if}` command, the line below should indent - correct_answer: A - question_score: '10' 8: question_text: What is wrong is this code? code: |- @@ -2070,25 +932,7 @@ levels: 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 @@ -2103,8 +947,6 @@ levels: - option: line 2 should atart with 4 spaces and line 3 with 8 feedback: You are correct! hint: The first line doens'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? @@ -2112,91 +954,6 @@ levels: 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: |- @@ -2205,25 +962,7 @@ levels: 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! @@ -2237,9 +976,6 @@ levels: 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: |- @@ -2247,30 +983,6 @@ levels: 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: |- @@ -2299,9 +1011,6 @@ levels: '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: |- @@ -2311,20 +1020,7 @@ levels: {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: |- prices = 1 million dollars, car, sandwich names = Bob, Patrick, Sandy, Larry @@ -2339,9 +1035,6 @@ levels: feedback: That is not true. Larry has the same odds as the others - option: Someone might win with two prices 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 question mark? @@ -2369,14 +1062,7 @@ levels: {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 @@ -2389,64 +1075,7 @@ levels: 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: |- ``` @@ -2473,42 +1102,6 @@ levels: ``` 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 question mark? code: |- @@ -2517,35 +1110,7 @@ levels: _?_ food is {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 @@ -2561,34 +1126,7 @@ levels: 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: |- ``` @@ -2619,11 +1157,8 @@ levels: ``` feedback: '`{range}` 0 `{to}` 3 is 4 times.' hint: Mind the indention - 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 @@ -2640,11 +1175,7 @@ levels: 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: |- ``` @@ -2670,11 +1201,7 @@ levels: 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!' @@ -2687,30 +1214,13 @@ levels: 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' @@ -2723,18 +1233,6 @@ levels: 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: |- @@ -2748,32 +1246,7 @@ levels: 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!" @@ -2785,36 +1258,7 @@ levels: 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: |- ``` @@ -2836,9 +1280,6 @@ levels: 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: |- @@ -2865,9 +1306,6 @@ levels: 'prices' = 'one million dollars', 'nothing' ``` feedback: You one 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: |- @@ -2888,12 +1326,8 @@ levels: 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?' @@ -2924,11 +1358,7 @@ levels: 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?' @@ -2943,11 +1373,7 @@ levels: 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?' @@ -2965,10 +1391,7 @@ levels: - 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' @@ -2979,28 +1402,11 @@ levels: 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?' @@ -3013,20 +1419,7 @@ levels: 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' @@ -3040,20 +1433,7 @@ levels: print 'I fed them this moring! They do not need more food today' if animal is 'hamster' and color is '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?' @@ -3067,32 +1447,7 @@ levels: 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?' @@ -3129,11 +1484,7 @@ levels: {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 is ask 'What product are you looking for?' @@ -3157,65 +1508,8 @@ levels: 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? @@ -3224,20 +1518,7 @@ levels: {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?' @@ -3245,20 +1526,7 @@ levels: {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 @@ -3266,69 +1534,7 @@ levels: 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 @@ -3337,101 +1543,19 @@ levels: {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 two blanks? 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!' @@ -3451,11 +1575,7 @@ levels: 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 @@ -3474,9 +1594,6 @@ levels: 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: |- @@ -3494,25 +1611,8 @@ levels: 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 to 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! @@ -3522,32 +1622,9 @@ levels: 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: |- chocolate = {ask} 'How many calories have you eaten today?' {while} calories <= 1000 @@ -3565,16 +1642,7 @@ levels: 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! @@ -3584,105 +1652,20 @@ levels: 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. @@ -3692,16 +1675,7 @@ levels: 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. @@ -3711,478 +1685,8 @@ levels: 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: Опитай отново. @@ -4193,5 +1697,3 @@ levels: - option: There is an indentation mistake in the last line. feedback: Не. hint: Прочети кода внимателно. - correct_answer: C - question_score: '10' diff --git a/content/quizzes/bn.yaml b/content/quizzes/bn.yaml index c704bc5e02b..e7c635d29e4 100644 --- a/content/quizzes/bn.yaml +++ b/content/quizzes/bn.yaml @@ -1,19 +1,5 @@ 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 command makes text appear? code: ___ Hello! @@ -39,40 +25,9 @@ levels: ``` 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! @@ -82,11 +37,7 @@ levels: 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... @@ -111,49 +62,7 @@ levels: {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! @@ -163,33 +72,8 @@ levels: 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 outputscreen 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 @@ -203,12 +87,8 @@ levels: 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: In level 2 the `{print}` command doesn't exist anymore feedback: '`{print}` still works' @@ -219,84 +99,7 @@ levels: - option: In level 2 all the level 1 commands still work feedback: No one command doesn't work anymore. hint: '`{print}` and `{ask}` still exist.' - 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... _?_ @@ -322,116 +125,17 @@ levels: {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 do you use to let Hedy pick something arbitrarily? @@ -456,14 +160,7 @@ levels: {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! @@ -473,155 +170,15 @@ levels: 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 of this code? - 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 haircolor wouldn't your 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 3 - correct_answer: C - question_score: '10' 10: question_text: What should be on the _?_? code: |- @@ -652,8 +209,6 @@ levels: ``` feedback: This increased the change that the person who walked yesterday now has to do it again. That's mean. hint: The person who walked the dog yesterday should be removed from the list. - correct_answer: A - question_score: '10' 4: 1: question_text: Which of these is true? @@ -666,11 +221,7 @@ levels: feedback: '`{at} {random}` still works' - option: '`{at} {random}` now needs quotation marks' feedback: No, but 2 other commands do. - 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: |- ``` @@ -692,11 +243,7 @@ levels: {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: |- ``` @@ -718,28 +265,7 @@ levels: {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: |- ``` @@ -758,89 +284,9 @@ levels: 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 @@ -850,27 +296,6 @@ levels: 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: What is true? @@ -888,79 +313,8 @@ levels: - option: In level 5 `{ask}` and `{print}` work the same as in level 4 feedback: Correct! hint: We have only learned a new command in level 5. - 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 question mark in the last line? code: |- @@ -969,30 +323,6 @@ levels: 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 question mark? code: |- @@ -1021,9 +351,6 @@ levels: {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 question mark? code: |- @@ -1051,222 +378,12 @@ levels: {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: Which sign do you use for an addition? - 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 is 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' @@ -1279,12 +396,8 @@ levels: 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. @@ -1295,54 +408,9 @@ levels: - option: infinite feedback: In this level you can only repeat one line at a time hint: You can only repeat 1 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: |- ``` @@ -1362,27 +430,10 @@ levels: - option: |- ``` {times} - ``` - feedback: '`{times}` is spelled correctly' - hint: I'm is wrong, you can't use apostrophes - 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' + ``` + feedback: '`{times}` is spelled correctly' + hint: I'm is wrong, you can't use apostrophes 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 @@ -1408,14 +459,7 @@ levels: round and round round and round feedback: All though 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 @@ -1436,17 +480,8 @@ levels: We will ROCK YOU! feedback: Mind the repeat command - hint: Mind the `{repeat}` command. - correct_answer: B - question_score: '10' 8: question_text: Welke Hedy code hoort bij dit resultaat - code: |- - Here comes the sun - Do do do do - Here comes the sun - And I say - Its alright mp_choice_options: - option: |- ``` @@ -1480,8 +515,6 @@ levels: ``` feedback: Dit is niet de juiste volgorde.. hint: '`{repeat}` kan alleen worden gebruikt als je dezelfde regel meerdere keren achter elkaar wil uitvoeren.' - correct_answer: A - question_score: '10' 9: question_text: Welke Hedy code hoort bij dit resultaat ? code: |- @@ -1525,15 +558,8 @@ levels: ``` feedback: Perfect hint: '''Help !'' wordt 3x herhaald.' - correct_answer: D - question_score: '10' 10: question_text: What Hedy 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: |- ``` @@ -1563,46 +589,8 @@ levels: {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. @@ -1612,15 +600,7 @@ levels: feedback: Nee, repeat is de goede spelling - option: The second line need 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 @@ -1647,10 +627,7 @@ levels: 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} @@ -1682,15 +659,7 @@ levels: Yay! Were going on holiday! 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 en start with 4 spaces. feedback: That's right! @@ -1700,44 +669,7 @@ levels: 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: |- eten = {ask} 'What would you like to eat?' {if} food {is} fries @@ -1756,11 +688,7 @@ levels: 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: |- ``` @@ -1802,50 +730,20 @@ levels: {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} eten = {ask} 'What would you like to eat?' @@ -1866,19 +764,7 @@ levels: - option: The indentation is wrong in the last `{if}` command. feedback: It not, though. 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! @@ -1897,11 +783,7 @@ levels: 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?' @@ -1917,20 +799,7 @@ levels: {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?' @@ -1950,15 +819,7 @@ levels: feedback: That's right! - option: Cinderella with shoe size 40 gets the output 'I was looking for you!' feedback: No she gets 'Ill keep looking' - 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: |- ``` @@ -1993,11 +854,7 @@ levels: {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 @@ -2007,9 +864,6 @@ levels: 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: "In this code from a pizza restaurant. \nYoull get a 5 dollar discount if you order a medium pizza with coke.\n What should you do to debug this code?" code: |- @@ -2050,9 +904,6 @@ levels: price = price - 2 ``` feedback: Try again - hint: After each `{if}` command, the line below should indent - correct_answer: A - question_score: '10' 8: question_text: What is wrong is this code? code: |- @@ -2070,25 +921,7 @@ levels: 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 @@ -2103,8 +936,6 @@ levels: - option: line 2 should atart with 4 spaces and line 3 with 8 feedback: You are correct! hint: The first line doens'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? @@ -2112,91 +943,6 @@ levels: 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: |- @@ -2205,25 +951,7 @@ levels: 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! @@ -2237,9 +965,6 @@ levels: 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: |- @@ -2247,30 +972,6 @@ levels: 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: |- @@ -2299,9 +1000,6 @@ levels: '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: |- @@ -2311,20 +1009,7 @@ levels: {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: |- prices = 1 million dollars, car, sandwich names = Bob, Patrick, Sandy, Larry @@ -2339,9 +1024,6 @@ levels: feedback: That is not true. Larry has the same odds as the others - option: Someone might win with two prices 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 question mark? @@ -2369,14 +1051,7 @@ levels: {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 @@ -2389,64 +1064,7 @@ levels: 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: |- ``` @@ -2473,42 +1091,6 @@ levels: ``` 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 question mark? code: |- @@ -2517,35 +1099,7 @@ levels: _?_ food is {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 @@ -2561,34 +1115,7 @@ levels: 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: |- ``` @@ -2619,11 +1146,8 @@ levels: ``` feedback: '`{range}` 0 `{to}` 3 is 4 times.' hint: Mind the indention - 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 @@ -2640,11 +1164,7 @@ levels: 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: |- ``` @@ -2670,11 +1190,7 @@ levels: 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!' @@ -2687,30 +1203,13 @@ levels: 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' @@ -2723,18 +1222,6 @@ levels: 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: |- @@ -2748,32 +1235,7 @@ levels: 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!" @@ -2785,36 +1247,7 @@ levels: 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: |- ``` @@ -2836,9 +1269,6 @@ levels: 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: |- @@ -2865,9 +1295,6 @@ levels: 'prices' = 'one million dollars', 'nothing' ``` feedback: You one 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: |- @@ -2888,12 +1315,8 @@ levels: 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?' @@ -2924,11 +1347,7 @@ levels: 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?' @@ -2943,11 +1362,7 @@ levels: 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?' @@ -2965,10 +1380,7 @@ levels: - 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' @@ -2979,28 +1391,11 @@ levels: 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?' @@ -3013,20 +1408,7 @@ levels: 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' @@ -3040,20 +1422,7 @@ levels: print 'I fed them this moring! They do not need more food today' if animal is 'hamster' and color is '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?' @@ -3067,32 +1436,7 @@ levels: 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?' @@ -3129,11 +1473,7 @@ levels: {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 is ask 'What product are you looking for?' @@ -3157,16 +1497,8 @@ levels: 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। @@ -3177,45 +1509,7 @@ levels: - 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? @@ -3224,20 +1518,7 @@ levels: {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?' @@ -3245,20 +1526,7 @@ levels: {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 @@ -3266,35 +1534,7 @@ levels: 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। @@ -3305,16 +1545,7 @@ levels: - 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! @@ -3324,11 +1555,7 @@ levels: 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 @@ -3337,36 +1564,6 @@ levels: {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।' @@ -3384,54 +1581,12 @@ levels: 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 two blanks? 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!' @@ -3451,11 +1606,7 @@ levels: 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 @@ -3474,9 +1625,6 @@ levels: 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: |- @@ -3494,25 +1642,8 @@ levels: 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 to 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! @@ -3523,17 +1654,7 @@ levels: - 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! @@ -3544,10 +1665,7 @@ levels: - 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: |- chocolate = {ask} 'How many calories have you eaten today?' {while} calories <= 1000 @@ -3565,16 +1683,8 @@ levels: 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! @@ -3584,15 +1694,8 @@ levels: 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। @@ -3602,11 +1705,7 @@ levels: 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] @@ -3634,10 +1733,7 @@ levels: ``` 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] @@ -3673,16 +1769,7 @@ levels: ``` 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। @@ -3692,16 +1779,7 @@ levels: 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। @@ -3712,15 +1790,7 @@ levels: - 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। @@ -3731,15 +1801,7 @@ levels: - 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। @@ -3750,14 +1812,7 @@ levels: - 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: |- ``` @@ -3792,14 +1847,7 @@ levels: ``` 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: |- ``` @@ -3824,20 +1872,7 @@ levels: 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: |- ``` @@ -3865,16 +1900,8 @@ levels: {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: |- ``` @@ -3901,21 +1928,7 @@ levels: ``` 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। @@ -3926,14 +1939,7 @@ levels: - 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: |- ``` @@ -3968,22 +1974,7 @@ levels: ``` 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। @@ -3994,21 +1985,7 @@ levels: - 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: |- ``` @@ -4059,20 +2036,7 @@ levels: ``` 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। @@ -4083,10 +2047,7 @@ levels: - 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: |- ``` @@ -4121,20 +2082,7 @@ levels: ``` 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। @@ -4145,20 +2093,7 @@ levels: - 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! @@ -4169,20 +2104,7 @@ levels: - 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। @@ -4193,5 +2115,3 @@ levels: - 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/quizzes/ca.yaml b/content/quizzes/ca.yaml index 4a4e1bc3d6e..af03d52505c 100644 --- a/content/quizzes/ca.yaml +++ b/content/quizzes/ca.yaml @@ -11,11 +11,7 @@ levels: feedback: Aquest no! - option: Heidi feedback: Aquest no! - 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: _ Hola! mp_choice_options: - option: |- @@ -39,10 +35,7 @@ levels: ``` feedback: With `{ask}`, you can ask a question. hint: _ Hola món! - correct_answer: B - question_score: '10' 3: - question_text: How do you ask what someone's favorite color is? mp_choice_options: - option: |- ``` @@ -64,9 +57,6 @@ levels: {echo} Quin és el teu color preferit? ``` 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: Què falla en aquest codi? code: |- @@ -82,11 +72,7 @@ levels: 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} Quin és el teu animal preferit? _ Així que el teu animal preferit és... @@ -111,16 +97,8 @@ levels: {echo} ``` feedback: Endavant! - hint: You want to see the answer at the end of line 2... - correct_answer: D - question_score: '10' 6: question_text: Què falla en aquest codi? - 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.' @@ -130,16 +108,8 @@ levels: feedback: '`{echo}` és correcte.' - 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: Què falla en aquest codi? - 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? @@ -149,11 +119,7 @@ levels: feedback: Are you sure something is wrong? - option: Res! Aquest codi és perfecte! feedback: Correcte! - 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! @@ -163,11 +129,7 @@ levels: feedback: Bona feina! - 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} Hola! {print} Com estàs? @@ -181,15 +143,8 @@ levels: 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 outputscreen 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 @@ -203,12 +158,8 @@ levels: 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 @@ -218,85 +169,7 @@ levels: 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... _?_ @@ -322,116 +195,17 @@ levels: {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 do you use to let Hedy pick something arbitrarily? @@ -456,14 +230,7 @@ levels: {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! @@ -473,155 +240,8 @@ levels: 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 3 - correct_answer: C - question_score: '10' 10: question_text: What should be on the _?_? code: |- @@ -652,8 +272,6 @@ levels: ``` feedback: This increased the change that the person who walked yesterday now has to do it again. That's mean. hint: The person who walked the dog yesterday should be removed from the list. - correct_answer: A - question_score: '10' 4: 1: question_text: Which of these is true? @@ -666,11 +284,7 @@ levels: feedback: '`{at} {random}` still works' - option: '`{at} {random}` now needs quotation marks' feedback: No, but 2 other commands do. - 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: |- ``` @@ -692,11 +306,7 @@ levels: {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: |- ``` @@ -718,28 +328,7 @@ levels: {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: |- ``` @@ -758,89 +347,9 @@ levels: 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 @@ -850,27 +359,6 @@ levels: 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 _?_? @@ -899,80 +387,8 @@ levels: {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 question mark in the last line? code: |- @@ -981,30 +397,6 @@ levels: 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 question mark? code: |- @@ -1033,9 +425,6 @@ levels: {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 question mark? code: |- @@ -1063,222 +452,10 @@ levels: {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 is 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' @@ -1291,12 +468,8 @@ levels: 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. @@ -1307,91 +480,32 @@ levels: - option: infinite feedback: In this level you can only repeat one line at a time hint: You can only repeat 1 line at a time - correct_answer: B - question_score: '10' 2: - question_text: Which code is right? + hint: First the repeat command, then the `{print}` command + 4: mp_choice_options: - option: |- ``` - {print} 100 {times} 'hello' + I'm ``` - feedback: '`{repeat}` 100 `{times}` `{print}` ''hello''' + feedback: That's right! - option: |- ``` - {print} {repeat} 100 {times} 'hello' + {print} ``` - feedback: '{repeat} 100 {times} {print} ''hello''' + feedback: '`{print}` is spelled correctly' - option: |- ``` - {repeat} 'hello' 100 {times} + {repeat} ``` - feedback: '{repeat} 100 {times} {print} ''hello''' + feedback: '`{repeat}` is spelled correctly' - 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} + {times} ``` feedback: '`{times}` is spelled correctly' hint: I'm is wrong, you can't use apostrophes - 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} 'Les rodes de l'autobús van girant' {repeat} 3 {times} {print} ' van rodant' @@ -1420,14 +534,7 @@ levels: van rodant van rodant feedback: All though 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 @@ -1448,61 +555,7 @@ levels: 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: |- ``` @@ -1536,16 +589,8 @@ levels: {print} 'Please help me!' ``` feedback: Perfect - hint: '''Help!'' is repeated 3 times.' - correct_answer: D - question_score: '10' 10: question_text: What Hedy 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: |- ``` @@ -1575,46 +620,8 @@ levels: {print} 'pica de mans' ``` 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. @@ -1624,15 +631,7 @@ levels: feedback: Nee, repeat is de goede spelling - option: The second line need 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 @@ -1659,97 +658,7 @@ levels: 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 @@ -1768,96 +677,8 @@ levels: 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} eten = {ask} 'What would you like to eat?' @@ -1878,51 +699,7 @@ levels: - option: The indentation is wrong in the last `{if}` command. feedback: It not, though. 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?' @@ -1938,20 +715,7 @@ levels: {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?' @@ -1971,15 +735,7 @@ levels: feedback: That's right! - option: Cinderella with shoe size 40 gets the output 'I was looking for you!' feedback: No she gets 'Ill keep looking' - 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: |- ``` @@ -2014,11 +770,7 @@ levels: {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 @@ -2028,9 +780,6 @@ levels: 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: "In this code from a pizza restaurant. \nYou'll get a 5 dollar discount if you order a medium pizza with coke.\n What should you do to debug this code?" code: |- @@ -2071,9 +820,6 @@ levels: price = price - 2 ``` feedback: Try again - hint: After each `{if}` command, the line below should indent - correct_answer: A - question_score: '10' 8: question_text: What is wrong is this code? code: |- @@ -2091,41 +837,12 @@ levels: 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 doens'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? @@ -2133,91 +850,6 @@ levels: 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: |- @@ -2226,25 +858,7 @@ levels: 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! @@ -2258,9 +872,6 @@ levels: 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: |- @@ -2268,30 +879,6 @@ levels: 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: |- @@ -2320,11 +907,7 @@ levels: '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 @@ -2332,20 +915,7 @@ levels: {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: |- prices = 1 million dollars, car, sandwich names = Bob, Patrick, Sandy, Larry @@ -2360,9 +930,6 @@ levels: feedback: That is not true. Larry has the same odds as the others - option: Someone might win with two prices 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 question mark? @@ -2390,14 +957,7 @@ levels: {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 @@ -2410,64 +970,7 @@ levels: 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: |- ``` @@ -2494,42 +997,6 @@ levels: ``` 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 question mark? code: |- @@ -2538,35 +1005,7 @@ levels: _?_ food is {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 @@ -2582,34 +1021,7 @@ levels: 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: |- ``` @@ -2640,11 +1052,8 @@ levels: ``` feedback: '`{range}` 0 `{to}` 3 is 4 times.' hint: Mind the indention - 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 @@ -2661,11 +1070,7 @@ levels: 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: |- ``` @@ -2691,11 +1096,7 @@ levels: 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!' @@ -2708,30 +1109,13 @@ levels: 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' @@ -2744,18 +1128,6 @@ levels: 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: |- @@ -2769,32 +1141,7 @@ levels: 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!" @@ -2806,36 +1153,7 @@ levels: 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' + 8: mp_choice_options: - option: |- ``` @@ -2857,9 +1175,6 @@ levels: 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: |- @@ -2886,9 +1201,6 @@ levels: 'prices' = 'one million dollars', 'nothing' ``` feedback: You one 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: |- @@ -2911,12 +1223,8 @@ levels: 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?' @@ -2947,11 +1255,7 @@ levels: 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?' @@ -2966,11 +1270,7 @@ levels: 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?' @@ -2988,10 +1288,7 @@ levels: - 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' @@ -3002,28 +1299,11 @@ levels: 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?' @@ -3036,20 +1316,7 @@ levels: 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' @@ -3063,20 +1330,7 @@ levels: print 'I fed them this moring! They do not need more food today' if animal is 'hamster' and color is '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?' @@ -3090,32 +1344,7 @@ levels: 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?' @@ -3152,11 +1381,7 @@ levels: {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 is ask 'What product are you looking for?' @@ -3180,65 +1405,8 @@ levels: 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? @@ -3247,20 +1415,7 @@ levels: {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?' @@ -3268,20 +1423,7 @@ levels: {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 @@ -3289,69 +1431,7 @@ levels: 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 @@ -3360,101 +1440,19 @@ levels: {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 two blanks? 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!' @@ -3474,11 +1472,7 @@ levels: 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 @@ -3497,9 +1491,6 @@ levels: 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: |- @@ -3517,25 +1508,8 @@ levels: 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 to 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! @@ -3545,32 +1519,9 @@ levels: 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: |- chocolate = {ask} 'How many calories have you eaten today?' {while} calories <= 1000 @@ -3588,16 +1539,7 @@ levels: 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! @@ -3607,105 +1549,20 @@ levels: 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. @@ -3715,16 +1572,7 @@ levels: 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. @@ -3734,487 +1582,3 @@ levels: 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/quizzes/cs.yaml b/content/quizzes/cs.yaml index b4243bbce6c..f651d0795b2 100644 --- a/content/quizzes/cs.yaml +++ b/content/quizzes/cs.yaml @@ -12,8 +12,6 @@ levels: - option: Heidi feedback: Tahle ne! hint: Je pojmenován po Hedy Lamarr. - correct_answer: A - question_score: '10' 2: question_text: Který příkaz je třeba doplnit místo podtržítek, aby se zobrazil text Ahoj!? code: ___ Hello! @@ -39,8 +37,6 @@ levels: ``` feedback: Pomocí příkazu `{ask}` se můžete ptát na otázky. hint: _?_ Ahoj světe! - correct_answer: B - question_score: '10' 3: question_text: Jak se někoho zeptáte na jeho oblíbenou barvu? mp_choice_options: @@ -65,8 +61,6 @@ levels: ``` feedback: Příkaz `{echo}` zopakuje odpověď. hint: Pomocí příkazu `{ask}` se můžete na něco zeptat. - correct_answer: C - question_score: '10' 4: question_text: Co je na tomto kódu špatně? code: |- @@ -83,8 +77,6 @@ levels: - option: Nic! Toto je perfektní kód! feedback: Špatně, zkontroluj si to ještě jednou! hint: Řádek 1 se nezdá být správně - correct_answer: A - question_score: '10' 5: question_text: Který příkaz chybí na řádku 2? code: |- @@ -112,8 +104,6 @@ levels: ``` feedback: Přesně tak! hint: Chcete vidět odpověď na konci řádku 2... - correct_answer: D - question_score: '10' 6: question_text: Co je špatně na tomto kódu? code: |- @@ -131,8 +121,6 @@ levels: - option: Na řádku 4 je `{print}` napsán špatně. feedback: Ne, chyba je někde jinde hint: Zkontroluj příkaz `{print}`. - correct_answer: B - question_score: '10' 7: question_text: Co je špatně s tímto kódem? code: |- @@ -150,8 +138,6 @@ levels: - option: Nic! Toto je skvělý kód! feedback: Správně! hint: Zkontroluj kód řádek po řádku - correct_answer: D - question_score: '10' 8: question_text: Jak byste použili příkaz `{echo}`? mp_choice_options: @@ -164,8 +150,6 @@ levels: - option: Můžete to použít pro zmizení textu. feedback: Toto není správně... hint: Příkaz `{echo}` se používá po příkazu `{ask}`. - correct_answer: C - question_score: '10' 9: question_text: Co je s tímto kódem špatně? code: |- @@ -182,14 +166,8 @@ levels: - option: Nic. Tento kód je správně! feedback: Podívej se pořádně na chyby... hint: Příkaz `{ask}` umožňuje pokládat otázky - correct_answer: B - question_score: '10' 10: question_text: Which output will be in your outputscreen 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 @@ -203,9 +181,6 @@ levels: 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: Která podmínka je pravdivá? @@ -219,8 +194,6 @@ levels: - option: Na úrovni 2 fungují všechny příkazy z úrovně 1 feedback: Žádný příkaz již nefunguje. hint: Příkazy `{print}` a `{ask}` stále existují. - correct_answer: C - question_score: '10' 2: question_text: Který kód je správně? mp_choice_options: @@ -245,8 +218,6 @@ levels: ``` feedback: Slova jsou správně, pořadí nikoliv! hint: příkaz `{ask}` nefunguje stejně jako na úrovni 1 - correct_answer: A - question_score: '10' 3: question_text: Co se zobrazí po spuštění tohoto kódu? code: |- @@ -262,8 +233,6 @@ levels: - option: Marleen jde na trh a kupuje jablko. feedback: Ona není nahrazena jménem hint: Slovo jméno je nahrazeno Marleen - correct_answer: C - question_score: '10' 4: question_text: Co se zobrazí po spuštění tohoto kódu? code: |- @@ -278,25 +247,7 @@ levels: 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... _?_ @@ -322,116 +273,17 @@ levels: {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 do you use to let Hedy pick something arbitrarily? @@ -456,14 +308,7 @@ levels: {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! @@ -473,9 +318,6 @@ levels: 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 of this code? code: |- @@ -499,129 +341,13 @@ levels: 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 haircolor wouldn't your 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 3 - correct_answer: C - question_score: '10' 10: question_text: What should be on the _?_? code: |- @@ -652,8 +378,6 @@ levels: ``` feedback: This increased the change that the person who walked yesterday now has to do it again. That's mean. hint: The person who walked the dog yesterday should be removed from the list. - correct_answer: A - question_score: '10' 4: 1: question_text: Which of these is true? @@ -666,11 +390,7 @@ levels: feedback: '`{at} {random}` still works' - option: '`{at} {random}` now needs quotation marks' feedback: No, but 2 other commands do. - 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: |- ``` @@ -692,11 +412,7 @@ levels: {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: |- ``` @@ -718,25 +434,7 @@ levels: {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: |- volba {is} kámen, nůžky, papír {print} 'volba {at} {random}' @@ -759,88 +457,9 @@ levels: - option: Nothing, the game already works! feedback: Look carefully. There is an error. hint: Nechceme, aby Hedy doslova vypsala 'volba {at} {random}', ale aby vypsala 'kámen' nebo 'nůžky' nebo 'papír'. - 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 @@ -850,27 +469,6 @@ levels: 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: What is true? @@ -888,79 +486,8 @@ levels: - option: In level 5 `{ask}` and `{print}` work the same as in level 4 feedback: Correct! hint: We have only learned a new command in level 5. - 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 question mark in the last line? code: |- @@ -969,30 +496,6 @@ levels: 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 question mark? code: |- @@ -1021,9 +524,6 @@ levels: {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 question mark? code: |- @@ -1051,222 +551,12 @@ levels: {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: Which sign do you use for an addition? - 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 is 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' @@ -1279,12 +569,8 @@ levels: 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. @@ -1295,54 +581,9 @@ levels: - option: infinite feedback: In this level you can only repeat one line at a time hint: You can only repeat 1 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: |- ``` @@ -1365,24 +606,7 @@ levels: ``` feedback: '`{times}` is spelled correctly' hint: I'm is wrong, you can't use apostrophes - 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 @@ -1408,14 +632,7 @@ levels: round and round round and round feedback: All though 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 @@ -1436,17 +653,8 @@ levels: We will ROCK YOU! feedback: Mind the repeat command - hint: Mind the `{repeat}` command. - correct_answer: B - question_score: '10' 8: question_text: Welke Hedy code hoort bij dit resultaat - code: |- - Here comes the sun - Do do do do - Here comes the sun - And I say - Its alright mp_choice_options: - option: |- ``` @@ -1480,8 +688,6 @@ levels: ``` feedback: Dit is niet de juiste volgorde.. hint: '`{repeat}` kan alleen worden gebruikt als je dezelfde regel meerdere keren achter elkaar wil uitvoeren.' - correct_answer: A - question_score: '10' 9: question_text: Welke Hedy code hoort bij dit resultaat ? code: |- @@ -1525,15 +731,8 @@ levels: ``` feedback: Perfect hint: '''Help !'' wordt 3x herhaald.' - correct_answer: D - question_score: '10' 10: question_text: What Hedy 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: |- ``` @@ -1563,46 +762,8 @@ levels: {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. @@ -1612,15 +773,7 @@ levels: feedback: Nee, repeat is de goede spelling - option: The second line need 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 @@ -1647,10 +800,7 @@ levels: 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} @@ -1682,15 +832,7 @@ levels: Yay! Were going on holiday! 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 en start with 4 spaces. feedback: That's right! @@ -1700,44 +842,7 @@ levels: 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: |- eten = {ask} 'What would you like to eat?' {if} food {is} fries @@ -1756,11 +861,7 @@ levels: 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: |- ``` @@ -1802,50 +903,20 @@ levels: {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 hudebni_styl = {ask} 'Jaký hudební styl máš nejradši?' 2 {if} hudebni_styl 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} eten = {ask} 'What would you like to eat?' @@ -1866,19 +937,7 @@ levels: - option: The indentation is wrong in the last `{if}` command. feedback: It not, though. 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! @@ -1897,11 +956,7 @@ levels: 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?' @@ -1917,20 +972,7 @@ levels: {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?' @@ -1950,15 +992,7 @@ levels: feedback: That's right! - option: Cinderella with shoe size 40 gets the output 'I was looking for you!' feedback: No she gets 'Ill keep looking' - 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: |- ``` @@ -1993,11 +1027,7 @@ levels: {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 @@ -2007,9 +1037,6 @@ levels: 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: "In this code from a pizza restaurant. \nYoull get a 5 dollar discount if you order a medium pizza with coke.\n What should you do to debug this code?" code: |- @@ -2050,9 +1077,6 @@ levels: price = price - 2 ``` feedback: Try again - hint: After each `{if}` command, the line below should indent - correct_answer: A - question_score: '10' 8: question_text: What is wrong is this code? code: |- @@ -2070,25 +1094,7 @@ levels: 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 @@ -2103,8 +1109,6 @@ levels: - option: line 2 should atart with 4 spaces and line 3 with 8 feedback: You are correct! hint: The first line doens'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? @@ -2112,91 +1116,6 @@ levels: 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: |- @@ -2214,11 +1133,7 @@ levels: 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: |- volba = kámen, nůžky, papír hráči = Kelly, Meredith @@ -2237,9 +1152,6 @@ levels: 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: |- @@ -2247,30 +1159,6 @@ levels: 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: |- @@ -2299,9 +1187,6 @@ levels: '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: |- @@ -2311,20 +1196,7 @@ levels: {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: |- prices = 1 million dollars, car, sandwich names = Bob, Patrick, Sandy, Larry @@ -2339,9 +1211,6 @@ levels: feedback: That is not true. Larry has the same odds as the others - option: Someone might win with two prices 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 question mark? @@ -2369,14 +1238,7 @@ levels: {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 @@ -2389,64 +1251,7 @@ levels: 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: |- ``` @@ -2473,42 +1278,6 @@ levels: ``` 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 question mark? code: |- @@ -2517,35 +1286,7 @@ levels: _?_ food is {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 @@ -2561,34 +1302,7 @@ levels: 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: |- ``` @@ -2619,11 +1333,8 @@ levels: ``` feedback: '`{range}` 0 `{to}` 3 is 4 times.' hint: Mind the indention - 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 @@ -2640,11 +1351,7 @@ levels: 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: |- ``` @@ -2670,11 +1377,7 @@ levels: 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!' @@ -2687,30 +1390,13 @@ levels: 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' @@ -2723,18 +1409,6 @@ levels: 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: |- @@ -2748,32 +1422,7 @@ levels: 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!" @@ -2785,36 +1434,7 @@ levels: 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: |- ``` @@ -2836,9 +1456,6 @@ levels: 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: |- @@ -2865,9 +1482,6 @@ levels: 'prices' = 'one million dollars', 'nothing' ``` feedback: You one 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: |- @@ -2888,12 +1502,8 @@ levels: 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?' @@ -2924,11 +1534,7 @@ levels: 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?' @@ -2943,11 +1549,7 @@ levels: 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?' @@ -2965,10 +1567,7 @@ levels: - 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' @@ -2979,28 +1578,11 @@ levels: 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?' @@ -3013,20 +1595,7 @@ levels: 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' @@ -3040,20 +1609,7 @@ levels: print 'I fed them this moring! They do not need more food today' if animal is 'hamster' and color is '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?' @@ -3067,32 +1623,7 @@ levels: 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?' @@ -3129,11 +1660,7 @@ levels: {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 is ask 'What product are you looking for?' @@ -3157,65 +1684,8 @@ levels: 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? @@ -3224,20 +1694,7 @@ levels: {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?' @@ -3245,20 +1702,7 @@ levels: {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 @@ -3266,69 +1710,7 @@ levels: 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 @@ -3337,101 +1719,19 @@ levels: {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 two blanks? 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!' @@ -3451,11 +1751,7 @@ levels: 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 @@ -3474,9 +1770,6 @@ levels: 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: |- @@ -3494,25 +1787,8 @@ levels: 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 to 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! @@ -3522,32 +1798,9 @@ levels: 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: |- chocolate = {ask} 'How many calories have you eaten today?' {while} calories <= 1000 @@ -3565,16 +1818,7 @@ levels: 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! @@ -3584,105 +1828,20 @@ levels: 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. @@ -3692,16 +1851,7 @@ levels: 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. @@ -3711,487 +1861,3 @@ levels: 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/quizzes/cy.yaml b/content/quizzes/cy.yaml index c4e98e77e2e..b7c7321ade8 100644 --- a/content/quizzes/cy.yaml +++ b/content/quizzes/cy.yaml @@ -1,21 +1,6 @@ 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: |- @@ -39,40 +24,7 @@ levels: ``` 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! @@ -82,11 +34,7 @@ levels: 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... @@ -111,49 +59,7 @@ levels: {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! @@ -163,33 +69,8 @@ levels: 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 outputscreen 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 @@ -203,12 +84,8 @@ levels: 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 @@ -218,85 +95,7 @@ levels: 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... _?_ @@ -322,116 +121,17 @@ levels: {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 do you use to let Hedy pick something arbitrarily? @@ -456,14 +156,7 @@ levels: {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! @@ -473,155 +166,8 @@ levels: 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 3 - correct_answer: C - question_score: '10' 10: question_text: What should be on the _?_? code: |- @@ -652,8 +198,6 @@ levels: ``` feedback: This increased the change that the person who walked yesterday now has to do it again. That's mean. hint: The person who walked the dog yesterday should be removed from the list. - correct_answer: A - question_score: '10' 4: 1: question_text: Which of these is true? @@ -666,11 +210,7 @@ levels: feedback: '`{at} {random}` still works' - option: '`{at} {random}` now needs quotation marks' feedback: No, but 2 other commands do. - 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: |- ``` @@ -692,11 +232,7 @@ levels: {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: |- ``` @@ -718,28 +254,7 @@ levels: {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: |- ``` @@ -758,89 +273,9 @@ levels: 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 @@ -850,27 +285,6 @@ levels: 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: What is true? @@ -888,79 +302,8 @@ levels: - option: In level 5 `{ask}` and `{print}` work the same as in level 4 feedback: Correct! hint: We have only learned a new command in level 5. - 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 question mark in the last line? code: |- @@ -969,30 +312,6 @@ levels: 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 question mark? code: |- @@ -1021,9 +340,6 @@ levels: {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 question mark? code: |- @@ -1051,298 +367,37 @@ levels: {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' + 6: + 6: + question_text: How much does a hamburger cost is this virtual restaurant? 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} + name _?_ Hedy + {print} name 'is walking trough the forrest' 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: + - 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. + 7: 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' + - option: '0' + feedback: No you can repeat a line. + - option: '1' + feedback: Correct, one line at a time + - option: '2' + 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 1 line at a time 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 is 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: '2' - 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 1 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: |- ``` @@ -1365,24 +420,7 @@ levels: ``` feedback: '`{times}` is spelled correctly' hint: I'm is wrong, you can't use apostrophes - 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 @@ -1408,14 +446,7 @@ levels: round and round round and round feedback: All though 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 @@ -1436,61 +467,7 @@ levels: 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: |- ``` @@ -1524,16 +501,8 @@ levels: {print} 'Please help me!' ``` feedback: Perfect - hint: '''Help!'' is repeated 3 times.' - correct_answer: D - question_score: '10' 10: question_text: What Hedy 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: |- ``` @@ -1563,46 +532,8 @@ levels: {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. @@ -1612,15 +543,7 @@ levels: feedback: Nee, repeat is de goede spelling - option: The second line need 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 @@ -1647,97 +570,7 @@ levels: 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 @@ -1756,96 +589,8 @@ levels: 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} eten = {ask} 'What would you like to eat?' @@ -1866,51 +611,7 @@ levels: - option: The indentation is wrong in the last `{if}` command. feedback: It not, though. 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?' @@ -1926,20 +627,7 @@ levels: {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?' @@ -1959,15 +647,7 @@ levels: feedback: That's right! - option: Cinderella with shoe size 40 gets the output 'I was looking for you!' feedback: No she gets 'Ill keep looking' - 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: |- ``` @@ -2002,11 +682,7 @@ levels: {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 @@ -2016,9 +692,6 @@ levels: 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: "In this code from a pizza restaurant. \nYou'll get a 5 dollar discount if you order a medium pizza with coke.\n What should you do to debug this code?" code: |- @@ -2059,9 +732,6 @@ levels: price = price - 2 ``` feedback: Try again - hint: After each `{if}` command, the line below should indent - correct_answer: A - question_score: '10' 8: question_text: What is wrong is this code? code: |- @@ -2079,41 +749,12 @@ levels: 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 doens'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? @@ -2121,91 +762,6 @@ levels: 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: |- @@ -2214,25 +770,7 @@ levels: 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! @@ -2246,9 +784,6 @@ levels: 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: |- @@ -2256,30 +791,6 @@ levels: 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: |- @@ -2308,11 +819,7 @@ levels: '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 @@ -2320,20 +827,7 @@ levels: {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: |- prices = 1 million dollars, car, sandwich names = Bob, Patrick, Sandy, Larry @@ -2348,9 +842,6 @@ levels: feedback: That is not true. Larry has the same odds as the others - option: Someone might win with two prices 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 question mark? @@ -2378,14 +869,7 @@ levels: {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 @@ -2398,126 +882,33 @@ levels: 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! + 4: mp_choice_options: - option: |- ``` - {for} i {in} {range} 1 {to} 5 + {for} i {in} {range} 0 {to} 10 {print} i - {print} 'Once I caught a fish alive!' ``` - feedback: Perfect + feedback: Now Hedy prints the numbers from 0 to 10 instead of 10 to 0. - option: |- ``` - {for} i {in} {range} 1 {to} 5 - {print} i - {print} 'Once I caught a fish alive!' + {for} i {in} {range} 0 to 10 + {print} - i ``` - feedback: This code won't work. You need an indent after {for}. + feedback: Hedy would print negative numbers in this case. - option: |- ``` - {for} i {in} {range} 1 {to} 5 - {print} i - {print} 'Once I caught a fish alive!' + {for} i {in} {range} 10 to 0 + {print} 10 9 8 7 6 5 4 3 2 1 0 ``` - feedback: Now Hedy will count '1 Once I caught a fish alive!, 2 Once I caught a fish alive! etc. + feedback: Unfortunately this does not exist. - 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} - i - ``` - feedback: Hedy would print negative numbers in this case. - - option: |- - ``` - {for} i {in} {range} 10 to 0 - {print} 10 9 8 7 6 5 4 3 2 1 0 - ``` - feedback: Unfortunately this does not exist. - - option: |- - ``` - {for} i {in} {range} 0 {to} 10 - {print} 10 - i + {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 question mark? code: |- @@ -2526,35 +917,7 @@ levels: _?_ food is {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 @@ -2570,34 +933,7 @@ levels: 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: |- ``` @@ -2628,11 +964,8 @@ levels: ``` feedback: '`{range}` 0 `{to}` 3 is 4 times.' hint: Mind the indention - 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 @@ -2649,11 +982,7 @@ levels: 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: |- ``` @@ -2679,11 +1008,7 @@ levels: 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!' @@ -2696,30 +1021,13 @@ levels: 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' @@ -2732,18 +1040,6 @@ levels: 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: |- @@ -2757,32 +1053,7 @@ levels: 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!" @@ -2794,36 +1065,7 @@ levels: 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: |- ``` @@ -2845,9 +1087,6 @@ levels: 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: |- @@ -2874,9 +1113,6 @@ levels: 'prices' = 'one million dollars', 'nothing' ``` feedback: You one 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: |- @@ -2897,12 +1133,8 @@ levels: 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?' @@ -2933,11 +1165,7 @@ levels: 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?' @@ -2952,11 +1180,7 @@ levels: 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?' @@ -2974,10 +1198,7 @@ levels: - 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' @@ -2988,28 +1209,11 @@ levels: 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?' @@ -3022,20 +1226,7 @@ levels: 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' @@ -3049,20 +1240,7 @@ levels: print 'I fed them this moring! They do not need more food today' if animal is 'hamster' and color is '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?' @@ -3076,32 +1254,7 @@ levels: 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?' @@ -3138,11 +1291,7 @@ levels: {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 is ask 'What product are you looking for?' @@ -3166,65 +1315,8 @@ levels: 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? @@ -3233,20 +1325,7 @@ levels: {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?' @@ -3254,20 +1333,7 @@ levels: {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 @@ -3275,69 +1341,7 @@ levels: 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 @@ -3346,101 +1350,19 @@ levels: {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 two blanks? 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!' @@ -3460,11 +1382,7 @@ levels: 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 @@ -3483,9 +1401,6 @@ levels: 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: |- @@ -3503,25 +1418,8 @@ levels: 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 to 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! @@ -3531,32 +1429,9 @@ levels: 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: |- chocolate = {ask} 'How many calories have you eaten today?' {while} calories <= 1000 @@ -3574,16 +1449,7 @@ levels: 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! @@ -3593,105 +1459,20 @@ levels: 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. @@ -3701,16 +1482,7 @@ levels: 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. @@ -3720,487 +1492,3 @@ levels: 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/quizzes/da.yaml b/content/quizzes/da.yaml index 9b1bf1ecf7a..2b85a16b58f 100644 --- a/content/quizzes/da.yaml +++ b/content/quizzes/da.yaml @@ -1,40 +1,9 @@ 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: _ Hej! - 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: |- ``` @@ -56,15 +25,7 @@ levels: {echo} Hvad er din yndlingsfarve? ``` 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! @@ -74,70 +35,11 @@ levels: 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! @@ -147,33 +49,8 @@ levels: 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 outputscreen after you've run this code? - code: |- - {ask} Are you ready to go to level 2? - {echo} - {echo} mp_choice_options: - option: Er du klar til at gå videre til niveau 2? feedback: There are two echo commands @@ -187,12 +64,8 @@ levels: Er du klar til at gå videre til niveau 2? Ja! 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 @@ -202,11 +75,7 @@ levels: 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: |- ``` @@ -228,114 +97,17 @@ levels: {ask} Hvad hedder du? {is} navn ``` 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: |- ``` @@ -357,28 +129,7 @@ levels: alder {is} Hvor gammel er du? ``` 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... @@ -405,9 +156,6 @@ levels: {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 do you use to let Hedy pick something arbitrarily? @@ -426,14 +174,7 @@ levels: {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! @@ -443,14 +184,7 @@ levels: 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: |- ``` @@ -469,14 +203,7 @@ levels: 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: |- ``` @@ -495,103 +222,8 @@ levels: 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 3 - correct_answer: C - question_score: '10' 10: question_text: What should be on the _?_? code: |- @@ -622,8 +254,6 @@ levels: ``` feedback: This increased the change that the person who walked yesterday now has to do it again. That's mean. hint: The person who walked the dog yesterday should be removed from the list. - correct_answer: A - question_score: '10' 4: 1: question_text: Which of these is true? @@ -636,11 +266,7 @@ levels: feedback: '`{at} {random}` still works' - option: '`{at} {random}` now needs quotation marks' feedback: No, but 2 other commands do. - 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: |- ``` @@ -662,11 +288,7 @@ levels: {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: |- ``` @@ -688,28 +310,7 @@ levels: {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: |- ``` @@ -728,89 +329,9 @@ levels: 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 @@ -820,27 +341,6 @@ levels: 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 _?_? @@ -848,93 +348,8 @@ levels: 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 question mark in the last line? code: |- @@ -943,30 +358,6 @@ levels: 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 question mark? code: |- @@ -974,22 +365,6 @@ levels: 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 question mark? code: |- @@ -1013,222 +388,10 @@ levels: - 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 is 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' @@ -1241,12 +404,8 @@ levels: 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. @@ -1257,10 +416,7 @@ levels: - option: infinite feedback: In this level you can only repeat one line at a time hint: You can only repeat 1 line at a time - correct_answer: B - question_score: '10' 2: - question_text: Which code is right? mp_choice_options: - option: |- ``` @@ -1283,28 +439,7 @@ levels: ``` 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: |- ``` @@ -1321,24 +456,7 @@ levels: `{times}` feedback: '`{times}` is spelled correctly' hint: I'm is wrong, you can't use apostrophes - 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 @@ -1364,14 +482,7 @@ levels: round and round round and round feedback: All though 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 @@ -1392,173 +503,33 @@ levels: We will ROCK YOU! feedback: Mind the repeat command - hint: Mind the `{repeat}` command. - correct_answer: B - question_score: '10' - 8: + 10: 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 + 8: + 1: 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. + Hej + Jeg hedder Hedy! + feedback: Everything is printed twice. - 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'? + Hej + Hej + Jeg hedder Hedy + feedback: The second line is repeated twice as well. - 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: What Hedy 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: |- - Hej - Jeg hedder Hedy! - feedback: Everything is printed twice. - - option: |- - Hej - Hej - Jeg hedder Hedy - feedback: The second line is repeated twice as well. - - option: |- - Hej - Jeg hedder Hedy! - Hej - Jeg hedder Hedy! - feedback: Super! + Hej + Jeg hedder Hedy! + Hej + Jeg hedder Hedy! + feedback: Super! - option: |- Hej Hej Jeg hedder Hedy! Jeg hedder 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. @@ -1568,15 +539,7 @@ levels: feedback: Nee, repeat is de goede spelling - option: The second line need 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 @@ -1603,69 +566,7 @@ levels: 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 @@ -1689,11 +590,7 @@ levels: Pancakes Pancakes feedback: Godt klaret! - 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 @@ -1712,96 +609,8 @@ levels: 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} eten = {ask} 'What would you like to eat?' @@ -1822,51 +631,7 @@ levels: - option: The indentation is wrong in the last `{if}` command. feedback: It not, though. 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?' @@ -1882,20 +647,7 @@ levels: {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?' @@ -1915,54 +667,7 @@ levels: feedback: That's right! - option: Cinderella with shoe size 40 gets the output 'I was looking for you!' feedback: No she gets 'Ill keep looking' - 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 @@ -1972,9 +677,6 @@ levels: 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: "In this code from a pizza restaurant. \nYou'll get a 5 dollar discount if you order a medium pizza with coke.\n What should you do to debug this code?" code: |- @@ -2015,9 +717,6 @@ levels: price = price - 5 ``` feedback: Try again - hint: After each `{if}` command, the line below should indent - correct_answer: A - question_score: '10' 8: question_text: What is wrong is this code? code: |- @@ -2035,41 +734,12 @@ levels: 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 doens'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? @@ -2077,91 +747,6 @@ levels: 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: |- @@ -2170,25 +755,7 @@ levels: 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! @@ -2202,9 +769,6 @@ levels: 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: |- @@ -2212,30 +776,6 @@ levels: 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: |- @@ -2243,32 +783,7 @@ levels: 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 @@ -2276,20 +791,7 @@ levels: {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: |- prices = 1 million dollars, car, sandwich names = Bob, Patrick, Sandy, Larry @@ -2304,9 +806,6 @@ levels: feedback: That is not true. Larry has the same odds as the others - option: Someone might win with two prices 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 question mark? @@ -2328,14 +827,7 @@ levels: - 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 @@ -2348,64 +840,7 @@ levels: 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: |- ``` @@ -2432,42 +867,6 @@ levels: ``` 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 question mark? code: |- @@ -2476,35 +875,7 @@ levels: _?_ food is {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 @@ -2520,34 +891,7 @@ levels: 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: |- ``` @@ -2578,32 +922,12 @@ levels: ``` feedback: '`{range}` 0 `{to}` 3 is 4 times.' hint: Mind the indention - 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: |- ``` @@ -2629,28 +953,11 @@ levels: 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? @@ -2665,11 +972,7 @@ levels: 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' @@ -2682,20 +985,7 @@ levels: 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?' @@ -2707,32 +997,7 @@ levels: 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!" @@ -2744,36 +1009,7 @@ levels: 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: |- ``` @@ -2795,14 +1031,7 @@ levels: 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: |- ``` @@ -2824,20 +1053,7 @@ levels: 'prices' = 'one million dollars', 'nothing' ``` feedback: You one 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. @@ -2847,12 +1063,8 @@ levels: 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?' @@ -2883,11 +1095,7 @@ levels: 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?' @@ -2902,11 +1110,7 @@ levels: 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?' @@ -2924,10 +1128,7 @@ levels: - 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' @@ -2938,28 +1139,7 @@ levels: 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?' @@ -2972,20 +1152,7 @@ levels: 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' @@ -2999,20 +1166,7 @@ levels: print 'I fed them this moring! They do not need more food today' if animal is 'hamster' and color is '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?' @@ -3026,32 +1180,7 @@ levels: 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?' @@ -3063,36 +1192,7 @@ levels: 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: - ``` - {if} chocolate = 'no' {and} sprinkles = 'no' - ``` - feedback: This is not what I ordered! - - option: |- - Line 5 should be: - ``` - {if} chocolate = 'yes' {and} sprinkles = 'yes' - ``` - 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 is ask 'What product are you looking for?' @@ -3116,51 +1216,8 @@ levels: 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 @@ -3169,111 +1226,7 @@ levels: - option: '`<` and `>=`' feedback: You are right - option: '`+` og `==`' - 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: Det er sandt! @@ -3284,123 +1237,10 @@ levels: - option: There are no length restrictions to go on the roller coaster feedback: There are. hint: '> betyder større end' - 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 two blanks? - 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 @@ -3410,20 +1250,7 @@ levels: 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 @@ -3433,17 +1260,8 @@ levels: 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 @@ -3453,25 +1271,8 @@ levels: 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 to 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! @@ -3481,40 +1282,7 @@ levels: 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' @@ -3524,16 +1292,7 @@ levels: 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! @@ -3543,105 +1302,20 @@ levels: 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. @@ -3651,16 +1325,7 @@ levels: 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. @@ -3670,229 +1335,8 @@ levels: 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: |- ``` @@ -3926,48 +1370,7 @@ levels: 🦔 ``` 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: |- ``` @@ -4017,83 +1420,7 @@ levels: 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. @@ -4103,45 +1430,7 @@ levels: feedback: Godt klaret! - 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. @@ -4151,6 +1440,3 @@ levels: feedback: Godt klaret! - 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/quizzes/de.yaml b/content/quizzes/de.yaml index 614fd950c93..948bebc9e0d 100644 --- a/content/quizzes/de.yaml +++ b/content/quizzes/de.yaml @@ -12,8 +12,6 @@ levels: - option: Heidi feedback: Nicht dieses! hint: Es ist nach Hedy Lamarr benannt. - correct_answer: A - question_score: '10' 2: question_text: Welche müssen in die Lücken gefüllt werden, um den Text Hello! erscheinen zu lassen? code: _ Hallo! @@ -27,8 +25,6 @@ levels: - option: '`{ask}`' feedback: Mit `{ask}` kannst du eine Frage stellen. hint: _ Hallo Welt! - correct_answer: B - question_score: '10' 3: question_text: Wie fragst du, was jemandes Lieblingsfarbe ist? mp_choice_options: @@ -53,8 +49,6 @@ levels: ``` feedback: '`{echo}` gibt deine Antwort aus.' hint: Mit dem `{ask}`-Befehl kannst du etwas fragen - correct_answer: C - question_score: '10' 4: question_text: Was ist falsch an diesem Code? code: |- @@ -71,8 +65,6 @@ levels: - option: Nichts! Der Code ist perfekt! feedback: Falsch, schau nochmal genau hin! hint: Zeile 1 sieht nicht ganz richtig aus - correct_answer: A - question_score: '10' 5: question_text: Welcher Befehl fehlt in Zeile 2? code: |- @@ -88,8 +80,6 @@ levels: - option: '`{echo}`' feedback: Richtig! hint: Du möchtest die Antwort am Ende von Zeile 2 sehen... - correct_answer: D - question_score: '10' 6: question_text: Was stimmt mit diesem Code nicht? code: |- @@ -107,8 +97,6 @@ levels: - option: In Zeile 4, `{print}` ist falsch geschrieben. feedback: Nein, der Fehler liegt woanders hint: Prüfe die `{print}` Befehle. - correct_answer: B - question_score: '10' 7: question_text: Was stimmt mit diesem Code nicht? code: |- @@ -126,8 +114,6 @@ levels: - option: Nichts! Dies ist ein perfekter Code! feedback: Richtig! hint: Prüfe den Code Zeile für Zeile - correct_answer: D - question_score: '10' 8: question_text: Wie wird der Befehl `{echo}` verwendet? mp_choice_options: @@ -140,8 +126,6 @@ levels: - option: Du kannst es verwenden, um Text verschwinden zu lassen. feedback: Das ist nicht richtig... hint: '`{echo}` wird nach einem `{ask}` Befehl benutzt.' - correct_answer: C - question_score: '10' 9: question_text: Was ist an diesem Code falsch? code: |- @@ -158,14 +142,8 @@ levels: - option: Nichts. Dies ist einwandfreier Code! feedback: Suche sorgfältig nach dem Fehler... hint: '`{ask}` erlaubt es dir, eine Frage zu stellen' - correct_answer: B - question_score: '10' 10: question_text: Welche Ausgabe wird im Ausgabebereich erscheinen, wenn du diesen Code ausführst? - 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: Es gibt zwei `{echo}` Befehle @@ -179,9 +157,6 @@ levels: Are you ready to go to level 2? Yes! feedback: Es gibt zwei `{echo}` -Befehle - hint: Let's go! - correct_answer: B - question_score: '10' 2: 1: question_text: Welche Aussage ist wahr? @@ -195,8 +170,6 @@ levels: - option: Mit dem {sleep} Befehl kannst du Text vom Bildschirm entfernen. feedback: So funktioniert `{sleep}` nicht. hint: '`{print}` funktioniert genauso wie in Level 1' - correct_answer: C - question_score: '10' 2: question_text: Welcher Code ist korrekt? mp_choice_options: @@ -221,8 +194,6 @@ levels: ``` feedback: Die Worte sind richtig, die Reihenfolge nicht! hint: '`{ask}` funktioniert nicht wie in Level 1' - correct_answer: A - question_score: '10' 3: question_text: Was erscheint in der Ausgabe, wenn du diesen Code ausführst? code: |- @@ -238,8 +209,6 @@ levels: - option: Marleen geht auf den Markt und Marleen kauft einen Apfel. feedback: Sie wird nicht durch name ersetzt hint: Das Wort name wird durch Marleen ersetzt - correct_answer: C - question_score: '10' 4: question_text: Was wird auf dem Ausgabebildschirm angezeigt, wenn du diesen Code ausführst? code: |- @@ -255,8 +224,6 @@ levels: - option: Hi my Hedy is Hedy feedback: Richtig, dieser Fehler wird in Level 4 behoben! hint: '''name'' wird an beiden Stellen durch ''Hedy'' ersetzt' - correct_answer: D - question_score: '10' 5: question_text: Was passiert wenn du den `{sleep}` Befehl verwendest? mp_choice_options: @@ -269,8 +236,6 @@ levels: - option: Du fügst es am Ende ein, damit Hedy weiß, dass dein Programm fertig ist feedback: Nein, es wäre am Ende deines Codes nutzlos hint: Der Computer wartet eine Sekunde lang beim Befehl `{sleep}` - correct_answer: C - question_score: '10' 6: question_text: Was sollte in den Zeilen stehen? code: |- @@ -287,8 +252,6 @@ levels: - option: '`{ask}`' feedback: Es gibt keine Frage, die gestellt wird hint: Pause für dramatischen Effekt... - correct_answer: A - question_score: '10' 7: question_text: Welcher Befehl sollte in Zeile 2 verwendet werden? code: |- @@ -317,8 +280,6 @@ levels: ``` feedback: Mach es dir leichter, indem du die Zahl 3 verwendest hint: Du willst, dass der Computer 3 Sekunden lang wartet - correct_answer: B - question_score: '10' 8: question_text: Wie würdest du die erste Zeile des Codes korrigieren? code: |- @@ -346,13 +307,8 @@ levels: ``` feedback: Wo ist der `{ask}` Befehl? hint: Der Variablenname sollte an erster Stelle stehen - correct_answer: C - question_score: '10' 9: question_text: Was läuft in diesem Code schief? - code: |- - dogs {is} animal - {print} I love animal mp_choice_options: - option: 'Zeile 1 sollte lauten: dogs `{is}` animals' feedback: Der Variablenname ist animal @@ -363,8 +319,6 @@ levels: - option: 'Zeile 2 sollte lauten: `{sleep}` I love animals' feedback: Schlafe wird nicht benutzt, um Text zu `{print}` hint: Du willst mit `{print}` 'I love dogs' ausgeben - correct_answer: B - question_score: '10' 10: question_text: Welcher Befehl muss in Zeile 1 verwendet werden? code: |- @@ -394,8 +348,6 @@ levels: ``` feedback: Das ist richtig! hint: Du willst mit `{ask}` eine Frage stellen - correct_answer: D - question_score: '10' 3: 1: question_text: Mit welchen Befehlen kann Hedy etwas Zufälliges auswählen? @@ -409,8 +361,6 @@ levels: - option: '`{at}` `{random}`' feedback: Korrekt! hint: Zufällig bedeutet ohne Plan. - correct_answer: D - question_score: '10' 2: question_text: Welcher Fehler versteckt sich in diesem Code? code: |- @@ -426,8 +376,6 @@ levels: - option: '`{at} {random}` ist nicht richtig geschrieben' feedback: '`{at} {random}` ist die richtige Schreibweise' hint: In Zeile 1 hat sich ein Fehler eingeschlichen - correct_answer: A - question_score: '10' 3: question_text: Wie beseitigt man den Fehler in Zeile 2? code: |- @@ -452,8 +400,6 @@ levels: - option: Nichts, der Code ist korrekt! feedback: Such genau nach dem Fehler hint: Die Variable (die Liste) heißt optionen. - correct_answer: C - question_score: '10' 4: question_text: Was muss in Zeile 2 geändert werden, um einen Zufallspreis auszugeben? code: |- @@ -478,8 +424,6 @@ levels: - option: Nichts, dieser Code ist in Ordnung. feedback: Such aufmerksam nach dem Fehler den du übersehen hast! hint: Der Variablenname ist prices - correct_answer: B - question_score: '10' 5: question_text: Wo ist der Fehler in diesem Code? code: |- @@ -497,8 +441,6 @@ levels: - option: Nichts, dieser Code ist perfekt feedback: Das ist richtig! hint: Hat dieser Code überhaupt einen Fehler? - correct_answer: D - question_score: '10' 6: question_text: Was stimmt mit diesem Code nicht? code: |- @@ -515,8 +457,6 @@ levels: - option: Nichts! Dieser Code ist großartig! feedback: Tatsächlich hat Zeile 2 einen Fehler. hint: Da stimmt etwas nicht mit Zeile 2. - correct_answer: B - question_score: '10' 7: question_text: Was macht der `{add}` Befehl? code: |- @@ -534,8 +474,6 @@ levels: - option: Der `{add}` Befehl gibt dein Lieblingsbuch aus. feedback: Nein, es fügt dein Lieblingsbuch zur Liste hinzu hint: Der `{add}` Befehl fügt ein Buch hinzu, aber welches? - correct_answer: C - question_score: '10' 8: question_text: Was ist die Ausgabe dieses Code? code: |- @@ -553,8 +491,6 @@ levels: - option: Saure Sahne feedback: Das ist richtig! hint: Es gibt 3 Geschmacksrichtungen, aber 2 werden entfernt. Welche bleibt übrig? - correct_answer: D - question_score: '10' 9: question_text: Was stimmt mit diesem Code nicht? code: |- @@ -572,8 +508,6 @@ levels: - option: Nichts, dies ist korrekter Code! feedback: Finde den Fehler! hint: Schau in Zeile 3 - correct_answer: C - question_score: '10' 10: question_text: Was sollte in den Lücken sein _? code: |- @@ -604,8 +538,6 @@ levels: ``` feedback: Dies hat die Wahrscheinlichkeit erhöht, dass die Person die gestern ging jetzt schon wieder gehen muss. Das ist gemein. hint: Die Person, die gestern ging, sollte von der Liste entfernt werden. - correct_answer: A - question_score: '10' 4: 1: question_text: Welches dieser Programme ist korrekt? @@ -631,8 +563,6 @@ levels: ``` feedback: Vorsicht bei der Nutzung von Anführungszeichen und Apostrophen hint: In Level 4 benötigst du für 2 Befehle Anführungszeichen. - correct_answer: A - question_score: '10' 2: question_text: Welcher Code benutzt die richtigen Anführungszeichen? mp_choice_options: @@ -657,8 +587,6 @@ levels: ``` feedback: Dies ist ein Komma, du brauchst Anführungszeichen. hint: Wähle die richtigen Anführungszeichen. - correct_answer: B - question_score: '10' 3: question_text: Wo werden die Anführungszeichen richtig benutzt? mp_choice_options: @@ -683,8 +611,6 @@ levels: ``` feedback: Perfekt! hint: Sowohl vor als auch hinter Wörtern, die du ausgeben möchtest, sollten Anführungszeichen stehen. - correct_answer: D - question_score: '10' 4: question_text: Welche Aussage ist wahr? mp_choice_options: @@ -697,8 +623,6 @@ levels: - option: Du kannst selbst wählen, ob du Anführungszeichen benutzt oder nicht. feedback: Leider ist Hedy strenger. hint: Ab Level 4 musst du Anführungszeichen benutzen. - correct_answer: B - question_score: '10' 5: question_text: Was muss geändert werden, um das Spiel zum Laufen zu bringen? code: |- @@ -723,8 +647,6 @@ levels: - option: Nichts, das Spiel funktioniert bereits! feedback: Schau genau hin. Dort ist ein Fehler. hint: Du möchtest nicht das Hedy wortwörtlich 'auswahlmöglichkeiten {at} {random}' ausgibt, du möchtest 'Stein' oder 'Papier' oder 'Schere' ausgeben. - correct_answer: C - question_score: '10' 6: question_text: Was wäre eine gute nächste Zeile in diesem Code? code: preise {is} 1 Euro, 100 Euro, 1 Million Euro @@ -750,8 +672,6 @@ levels: ``` feedback: Hedy wird wortwörtlich 'preise {at} {random}'' ausgeben hint: 'Denk scharf nach: was ist eine Variable und sollte außerhalb von Anführungszeichen stehen? Und was sind normale Wörter, die innerhalb stehen sollten?' - correct_answer: A - question_score: '10' 7: question_text: Was stimmt mit diesem Code nicht? code: |- @@ -768,8 +688,6 @@ levels: - option: Nichts, dieser Code ist gut so wie er ist! feedback: Schau genau hin. Du hast einen Fehler übersehen! hint: Prüfe jede Zeile, ob sie Anführungszeichen benötigen könnte oder nicht. - correct_answer: A - question_score: '10' 8: question_text: Was wäre eine gute nächste Zeile in diesem Code? code: |- @@ -798,8 +716,6 @@ levels: ``` feedback: Hedy wird wortwörtlich 'Also wählst du Tür Tür ausgeben hint: Das zweite Wort Tür sollte mit der Nummer ersetzt werden, das erste sollte weiterhin das Wort Tür sein... - correct_answer: C - question_score: '10' 9: question_text: Was wird nie im Ausgabebereich erscheinen? code: |- @@ -815,8 +731,6 @@ levels: - option: FC Barcelona wird die Champions League gewinnen feedback: Das ist richtig. Es ist nicht in der Liste hint: Was sind Hedys Auswahlmöglichkeiten von denen zufällig gewählt wird? - correct_answer: D - question_score: '10' 10: question_text: Welche Aussage ist wahr? code: |- @@ -833,8 +747,6 @@ levels: - option: Nichts, dieser Code hat keine Fehler feedback: Du hast einen übersehen! hint: Eine Zeile benötigt Anführungszeichen, weil du sie wortwörtlich ausgeben möchtest. - correct_answer: B - question_score: '10' 5: 1: question_text: Welcher Befehl sollte in die Lücken _? @@ -852,8 +764,6 @@ levels: - option: '`{else}`' feedback: Das ist richtig! hint: Welches passt zum `{if}` Befehl? - correct_answer: D - question_score: '10' 2: question_text: Was erscheint im Ausgabebereich, wenn du den Namen Hedy eintippst? code: |- @@ -868,9 +778,6 @@ levels: feedback: Nein, es gibt den Namen nicht aus - option: Error feedback: Glücklicherweise nicht! - hint: '`{if}` name `{is}` Hedy `{print}` ...?' - correct_answer: A - question_score: '10' 3: question_text: Was ist das richtige Passwort? code: |- @@ -887,8 +794,6 @@ levels: - option: ALARM INTRUDER feedback: Dies wird ausgegeben, wenn du das falsche Passwort eintippst! hint: '`{if}` passwort `{is}` ... `{print}` ''Richtig!''' - correct_answer: B - question_score: '10' 4: question_text: Was gibt Hedy aus, wenn du das falsche Passwort eintippst? code: |- @@ -905,8 +810,6 @@ levels: - option: ALARM! INTRUDER! feedback: Großartig gemacht! hint: Dein Computer wird bei Eindringlingen Alarm schlagen! - correct_answer: D - question_score: '10' 5: question_text: Warum wird Hedy 'ALARM! EINDINGLING' ausgeben, wenn du 'geheimnis' eintippst? code: |- @@ -923,8 +826,6 @@ levels: - option: Weil Hedy Fehler macht feedback: Nein, Hedy hat recht hint: Die Rechtschreibung des Wortes muss genau gleich sein. - correct_answer: A - question_score: '10' 6: question_text: Welches Wort sollte anstelle des Leerzeichens in der letzten Zeile stehen? code: |- @@ -955,8 +856,6 @@ levels: ``` feedback: '`{print}` ist bereits dort, wir brauchen ein Wort davor!' hint: '`{if}` geht zusammen mit...?' - correct_answer: C - question_score: '10' 7: question_text: Welches Wort sollte anstelle des Leerzeichens stehen? code: |- @@ -974,8 +873,6 @@ levels: - option: '`{print}`' feedback: Toll! hint: Nach `{else}` folgt ein `{print}` Befehl - correct_answer: D - question_score: '10' 8: question_text: Welches Wort sollte anstelle des Leerzeichens stehen? code: |- @@ -998,8 +895,6 @@ levels: - option: '`{print}`' feedback: Nein, das ist es nicht. hint: Was ist der Variablenname? - correct_answer: B - question_score: '10' 9: question_text: Welche Tür solltest du wählen um zu entkommen?? code: |- @@ -1019,8 +914,6 @@ levels: - option: Es ist eine Falle, du wirst immer gegessen werden! feedback: Glücklicherweise nicht! hint: Eine der Türen wird dich in Sicherheit bringen.. - correct_answer: B - question_score: '10' 10: question_text: Welches Monster steht hinter Tür 1? code: |- @@ -1040,12 +933,9 @@ levels: - option: Riesenspinne feedback: Nicht immer... hint: Beachte die letzten 3 Wörter... Monster `{at} {random}`... - correct_answer: A - question_score: '10' 6: 1: question_text: Was gibt Hedy aus, wenn du diesen Code laufen lässt? - code: '{print} 2*10' mp_choice_options: - option: '20' feedback: Richtig! @@ -1056,8 +946,6 @@ levels: - option: '210' feedback: Beachte, dass es eine Berechnung ist. hint: Das `*` wird als Multiplikationszeichen benutzt - correct_answer: A - question_score: '10' 2: question_text: Was benutzt du wenn du zwei Zahlen addieren möchtest? mp_choice_options: @@ -1070,11 +958,8 @@ levels: - option: '`+`' feedback: Richtig! hint: Es ist das Pluszeichen. - correct_answer: D - question_score: '10' 3: question_text: Was ist Hedys Ausgabe, wenn du diesen Code ausführst? - code: '{print} ''3*10''' mp_choice_options: - option: '30' feedback: Dies wäre die richtige Antwort, wenn es keine Anführungszeichen geben würde. @@ -1085,8 +970,6 @@ levels: - option: Nichts, Hedy wird eine Fehlermeldung ausgeben. feedback: Nein, Hedy wird es wortwörtlich ausgeben. hint: Beachte die Anführungszeichen!! - correct_answer: C - question_score: '10' 4: question_text: Kim ist 10 Jahre alt. Was wird Hedy für sie ausgeben? code: |- @@ -1104,8 +987,6 @@ levels: - option: Deine Glückszahl ist... 10 feedback: Ihre Glückszahl ist Name mal Alter... hint: 'Kim hat 3 Buchstaben, sie ist 10 Jahre alt, also: Buchstaben mal Alter = 3*10 = 30.' - correct_answer: C - question_score: '10' 5: question_text: Wenn 5 Leute im Restaurant essen, wie viel müssen sie insgesamt bezahlen? code: |- @@ -1123,8 +1004,6 @@ levels: - option: 50 Euro feedback: Großartig! hint: preis ist leute mal 10 - correct_answer: D - question_score: '10' 6: question_text: Wie viel kostet ein Hamburger in diesem virtuellen Restaurant? code: |- @@ -1143,8 +1022,6 @@ levels: - option: 21 Euro feedback: Das ist der Preis für einen Hamburger und Pommes! hint: Beachte die vierte Zeile. - correct_answer: A - question_score: '10' 7: question_text: Warum sagt Zeile 7 'preis ist preis + 3' anstelle von 'preis ist 3'? code: |- @@ -1167,8 +1044,6 @@ levels: - option: Weil der Preis 0 Euro ist. feedback: Das ist wahr, jedoch nicht der Grund hint: Der Preis sollte nicht 3 sein, aber 3 Euro mehr als es bereits war - correct_answer: C - question_score: '10' 8: question_text: Warum ist dieser Code inkorrekt? code: |- @@ -1186,8 +1061,6 @@ levels: - option: Die Variable in Zeile 2 kann nicht antwort heißen, weil sie zu ähnlich zur Variable richtige antwort ist. feedback: Variablennamen können ähnlich sein, aber sie dürfen nicht aus 2 Wörtern bestehen... hint: Untersuche die Namen der Variablen. - correct_answer: B - question_score: '10' 9: question_text: Stell dir vor, du liebst Fußball eine 10, du hast 2 Bananen gegessen und hast heute 3 Mal deine Hände gewaschen. Wie schlau denkt die alberne Wahrsagerin, dass du bist? code: |- @@ -1209,8 +1082,6 @@ levels: - option: 100% feedback: (2 Bananen + 3 Hygiene) * 10 Fußball = 5*10 =? hint: (2 Bananen + 3 Hygiene) * 10 Fußball = 5*10 =? - correct_answer: C - question_score: '10' 10: question_text: Welche Aussage ist wahr? code: |- @@ -1226,8 +1097,6 @@ levels: - option: Du kannst nur das `=` Zeichen verwenden, wenn du mit Zahlen arbeitest, nicht mit Wörtern. feedback: Du kannst das `=` auch mit Wörtern benutzen. hint: '`{is}` und `=` sind beide erlaubt' - correct_answer: B - question_score: '10' 7: 1: question_text: Wie viele Zeilen Code kannst du mit einem Mal mit dem wiederhole-Befehl in diesem Level wiederholen? @@ -1241,8 +1110,6 @@ levels: - option: unendlich feedback: In diesem Level kannst du nur eine Zeile wiederholen hint: Du kannst nur eine Zeile mit einem Mal wiederholen - correct_answer: B - question_score: '10' 2: question_text: Welcher Code ist richtig? mp_choice_options: @@ -1267,8 +1134,6 @@ levels: ``` feedback: Das ist richtig! hint: Erst der `{repeat}` -Befehl, dann der `{print}` Befehl - correct_answer: D - question_score: '10' 3: question_text: Ist dieser Code richtig oder falsch? code: '{repeat} 100 {times} ''Hallo!''' @@ -1282,13 +1147,8 @@ levels: - option: Falsch, das Wort `{print}` fehlt feedback: Richtig hint: 'Es sollte so sein: `{repeat}` 100 `{times}` `{print}` ''Hallo''' - correct_answer: D - question_score: '10' 4: question_text: Welches Wort ist falsch im Code? - code: |- - {print} 'I'm blue' - {repeat} 7 {times} {print} 'da ba dee, da ba da' mp_choice_options: - option: |- ``` @@ -1302,8 +1162,6 @@ levels: - option: '`{times}`' feedback: '`{times}` ist richtig geschrieben' hint: I'm ist falsch, du kannst keine Apostrophe in einem Satz verwenden - correct_answer: A - question_score: '10' 5: question_text: Ist dieser Code richtig oder falsch? code: '{repeat} 100 {times} {print} ''Hedy ist toll!''' @@ -1313,13 +1171,8 @@ levels: - option: Falsch feedback: Das ist es nicht hint: Der Code ist richtig! - correct_answer: A - question_score: '10' 6: question_text: Was wird die Ausgabe dieses Code sein? - 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 @@ -1346,13 +1199,8 @@ levels: round and round feedback: All through the town! Perfekt! hint: Nur 'round and round' wird 3 Mal wiederholt. - correct_answer: D - question_score: '10' 7: question_text: Was wird die Ausgabe dieses Code sein? - code: |- - {repeat} 2 {times} {print} 'We will' - {print} 'ROCK YOU!' mp_choice_options: - option: |- We will We will @@ -1374,16 +1222,8 @@ levels: ROCK YOU! feedback: Beachte den wiederhole-Befehl hint: Beachte den `{repeat}` Befehl. - correct_answer: B - question_score: '10' 8: question_text: Welcher Hedy code gehört zu dieser Ausgabe? - code: |- - Here comes the sun - Do do do do - Here comes the sun - And I say - Its alright mp_choice_options: - option: |- ``` @@ -1417,8 +1257,6 @@ levels: ``` feedback: Dies ist nicht die richtige Reihenfolge.. hint: '`{repeat}` kann nur benutzt werden, wenn du die gleiche Zeile mehrfach in Folge ausführen möchtest.' - correct_answer: A - question_score: '10' 9: question_text: Welcher Hedy-Code gehört dieser Ausgabe? code: |- @@ -1462,15 +1300,8 @@ levels: ``` feedback: Perfekt hint: '''Help!'' wird 3 Mal wiederholt.' - correct_answer: D - question_score: '10' 10: question_text: Welcher Code gehört zu dieser Ausgabe? - 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: |- ``` @@ -1501,8 +1332,6 @@ levels: ``` feedback: Dies ist nicht in der richtigen Reihenfolge. hint: Beachte die Reihenfolge der Sätze. - correct_answer: B - question_score: '10' 8: 1: question_text: Welche Ausgabe wird von diesem Code erzeugt? @@ -1533,8 +1362,6 @@ levels: Ich bin Hedy! feedback: Alles wird doppelt ausgegeben hint: Beide Zeilen werden zweimal wiederholt. - correct_answer: C - question_score: '10' 2: question_text: Was stimmt mit diesem Code nicht? code: |- @@ -1550,14 +1377,8 @@ levels: - option: Die zweite Zeile sollte mit 4 Leerzeichen als Einrückung beginnen. feedback: Richtig! hint: Etwas fehlt in der zweiten Zeile? - correct_answer: D - question_score: '10' 3: question_text: Welche Ausgabe wird erzeugt, wenn du dieses Programm ausführst? - code: |- - {repeat} 3 {times} - {print} 'Baby shark tututudutudu' - {print} 'Baby shark' mp_choice_options: - option: |- Baby shark tututudutudu @@ -1584,8 +1405,6 @@ levels: Baby shark feedback: Was wird wiederholt und was nicht. hint: Was wird wiederholt und was nicht? - correct_answer: C - question_score: '10' 4: question_text: Welche Ausgabe ist richtig? code: |- @@ -1620,8 +1439,6 @@ levels: Wir fahren in den Urlaub! feedback: Die letzte Zeile wird auch wiederholt. hint: Der Block unter dem `{repeat}` Befehl wird zwei Mal wiederholt. - correct_answer: B - question_score: '10' 5: question_text: Was stimmt mit diesem Code nicht? code: |- @@ -1638,15 +1455,8 @@ levels: - option: '`{ask}` ist kein Befehl mehr' feedback: Das ist nicht wahr hint: Etwas stimmt mit der Einrückung nicht - correct_answer: A - question_score: '10' 6: question_text: Which code was used to create this output? - code: |- - {print} 'Welcome to restaurant Hedy' - {repeat} 2 {times} - food {is} {ask} 'What do you want to eat?' - {print} food mp_choice_options: - option: |- ``` @@ -1680,8 +1490,6 @@ levels: ``` feedback: Awesome! hint: Pay attention to what sould be repeated and what should only be printed once. - correct_answer: D - question_score: '10' 7: question_text: Was stimmt mit diesem Code nicht? code: |- @@ -1703,8 +1511,6 @@ levels: - option: Die Einrückung ist im ersten `{if}` Befehl falsch. feedback: Das ist richtig. hint: Schau dir die Einrückung genau an. - correct_answer: D - question_score: '10' 8: question_text: In welchem Programm wurde die Einrückung richtig gemacht? mp_choice_options: @@ -1749,8 +1555,6 @@ levels: ``` feedback: Du liegst falsch! hint: Was sollte passieren, wenn die Person richtig liegt? Und was sonst? - correct_answer: C - question_score: '10' 9: question_text: Welche Zeilen sollten mit 4 Leerzeichen beginnen? code: |- @@ -1769,8 +1573,6 @@ levels: - option: Zeile 3 und 5 feedback: Gut gemacht! hint: Die Zeilen nach dem `{if}` oder `{else}` Befehl sollten mit 4 Leerzeichen beginnen. - correct_answer: D - question_score: '10' 10: question_text: Welche Aussage ist wahr? code: |- @@ -1787,8 +1589,6 @@ levels: - option: Zeile 3 sollte mit 4 Leerzeichen beginnen feedback: Du liegst richtig! hint: Nur eine Zeile sollte mit 4 Leerzeichen beginnen, aber welche...? - correct_answer: D - question_score: '10' 9: 1: question_text: Was stimmt mit diesem Code nicht? @@ -1812,8 +1612,6 @@ levels: - option: Die Einrückung im letzten `{if}` Befehl ist falsch. feedback: Es ist nicht die Einrückung. hint: Alle Einrückungen wurden richtig gemacht. - correct_answer: A - question_score: '10' 2: question_text: Was wird ausgegeben nachdem man das richtige Passwort eingegeben hat? code: |- @@ -1853,8 +1651,6 @@ levels: ``` feedback: Richtig! hint: Alles unter dem `{repeat}` Befehl wird zwei Mal wiederholt. - correct_answer: D - question_score: '10' 3: question_text: Welchen Fall solltest du wählen, um eine Million Euro zu gewinnen? code: |- @@ -1882,8 +1678,6 @@ levels: - option: Fall 2, offen feedback: Großartig gemacht! Du gewinnst! hint: Folge dem richtigen Pfad - correct_answer: D - question_score: '10' 4: question_text: Welche Aussage ist wahr? code: |- @@ -1906,8 +1700,6 @@ levels: - option: Aschenputtel mit Schuhgröße 38 bekommt den Ausgang "Ich suche weiter" feedback: Nein, sie bekommt "❤️❤️❤️" hint: Egal wie du heißt, wenn du Schuhgröße 40 hast, bekommst du die Nachricht "Ich suche weiter". - correct_answer: C - question_score: '10' 5: question_text: Welcher Code hat diese Ausgabe erzeugt? output: |- @@ -1949,8 +1741,6 @@ levels: ``` feedback: Es gibt 2 `{repeat}` Befehle in diesem Code. hint: Beachte die Einrückung - correct_answer: C - question_score: '10' 6: question_text: Nach welchen/welchem Befehl/Befehlen solltest du Einrückung verwenden (die Zeile mit 4 Leerzeichen beginnen)? mp_choice_options: @@ -1963,8 +1753,6 @@ levels: - option: '`{if}` `{else}` `{repeat}` `{print}`' feedback: Nicht mit drucke hint: Einrückung passiert in der Zeile unter manchen Befehlen - correct_answer: C - question_score: '10' 7: question_text: Du bekommst 5 Euro Rabatt, wenn du eine mittlere Pizza mit Cola bestellst.>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<
\").replace(/\\r?\\n/g,\"
\").replace(/\\t/g,\" \").replace(/^\\s/,\" \").replace(/\\s$/,\" \").replace(/\\s\\s/g,\" \");if(t.includes(\"
\")||t.includes(\"
\")){t=`
${t}
`}return t}function SL(t){return t.replace(/(\\s+)<\\/span>/g,((t,e)=>{if(e.length==1){return\" \"}return e})).replace(//g,\"\")}const BL=[\"figcaption\",\"li\"];const ML=[\"ol\",\"ul\"];function PL(t){if(t.is(\"$text\")||t.is(\"$textProxy\")){return t.data}if(t.is(\"element\",\"img\")&&t.hasAttribute(\"alt\")){return t.getAttribute(\"alt\")}if(t.is(\"element\",\"br\")){return\"\\n\"}let e=\"\";let n=null;for(const o of t.getChildren()){e+=NL(o,n)+PL(o);n=o}return e}function NL(t,e){if(!e){return\"\"}if(t.is(\"element\",\"li\")&&!t.isEmpty&&t.getChild(0).is(\"containerElement\")){return\"\\n\\n\"}if(ML.includes(t.name)&&ML.includes(e.name)){return\"\\n\\n\"}if(!t.is(\"containerElement\")&&!e.is(\"containerElement\")){return\"\"}if(BL.includes(t.name)||BL.includes(e.name)){return\"\\n\"}return\"\\n\\n\"}function LL(t,e){return t&&hl(t,e,Gi)}const zL=LL;var OL=1,RL=2;function VL(t,e,n,o){var i=n.length,r=i,s=!o;if(t==null){return!r}t=Object(t);while(i--){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t)){return false}}while(++i node\n if (codeNode) {\n codeNode.hidden = true\n code = codeNode.innerText\n } else {\n code = preview.textContent || \"\";\n preview.textContent = \"\";\n }\n\n // Create this example editor\n const exampleEditor = editorCreator.initializeReadOnlyEditor(preview, dir);\n // Strip trailing newline, it renders better\n exampleEditor.contents = code;\n exampleEditor.contents = exampleEditor.contents.trimEnd();\n // And add an overlay button to the editor if requested via a show-copy-button class, either\n // on the itself OR on the element that has the '.turn-pre-into-ace' class.\n if ($(preview).hasClass('show-copy-button') || $(container).hasClass('show-copy-button')) {\n const adventure = container.getAttribute('data-tabtarget')\n const buttonContainer = $('').addClass('absolute ltr:right-0 rtl:left-0 top-0 mx-1 mt-1').appendTo(preview);\n let symbol = \"\u21E5\";\n if (dir === \"rtl\") {\n symbol = \"\u21E4\";\n }\n $('`;\r\n};\r\n\r\nexport const getChip = ({ text, iconSVG }, classes) => {\r\n return `\r\n ${text} \r\n \r\n ${iconSVG}\r\n \r\n `;\r\n};\r\n", "/*\r\n--------------------------------------------------------------------------\r\nTailwind Elements is an open-source UI kit of advanced components for TailwindCSS.\r\nCopyright \u00A9 2023 MDBootstrap.com\r\n\r\nUnless a custom, individually assigned license has been granted, this program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\r\nIn addition, a custom license may be available upon request, subject to the terms and conditions of that license. Please contact tailwind@mdbootstrap.com for more information on obtaining a custom license.\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\r\n--------------------------------------------------------------------------\r\n*/\r\n\r\nimport { element, typeCheckConfig } from \"../../util/index\";\r\nimport Manipulator from \"../../dom/manipulator\";\r\nimport SelectorEngine from \"../../dom/selector-engine\";\r\nimport Data from \"../../dom/data\";\r\nimport EventHandler from \"../../dom/event-handler\";\r\nimport { getChip } from \"./templates\";\r\n\r\n/**\r\n *\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nconst NAME = \"chip\";\r\nconst DATA_KEY = `te.${NAME}`;\r\n\r\nconst ATTR_CHIP_CLOSE = \"data-te-chip-close\";\r\n\r\nconst ATTR_SELECTOR_CHIP_CLOSE = `[${ATTR_CHIP_CLOSE}]`;\r\n\r\nconst EVENT_DELETE = \"delete.te.chips\";\r\nconst EVENT_SELECT = \"select.te.chip\";\r\n\r\nconst defaultIcon = ``;\r\n\r\nconst DefaultType = {\r\n text: \"string\",\r\n closeIcon: \"boolean\",\r\n img: \"object\",\r\n iconSVG: \"string\",\r\n};\r\n\r\nconst Default = {\r\n text: \"\",\r\n closeIcon: false,\r\n img: { path: \"\", alt: \"\" },\r\n iconSVG: defaultIcon,\r\n};\r\n\r\nconst DefaultClasses = {\r\n icon: \"float-right pl-[8px] text-[16px] opacity-[.53] cursor-pointer fill-[#afafaf] hover:text-[#8b8b8b] transition-all duration-200 ease-in-out\",\r\n chipElement:\r\n \"flex justify-between items-center h-[32px] leading-loose py-[5px] px-[12px] mr-4 my-[5px] text-[13px] font-normal text-[#4f4f4f] cursor-pointer bg-[#eceff1] dark:text-white dark:bg-neutral-600 rounded-[16px] transition-[opacity] duration-300 ease-linear [word-wrap: break-word] shadow-none normal-case hover:!shadow-none active:bg-[#cacfd1] inline-block font-medium leading-normal text-[#4f4f4f] text-center no-underline align-middle cursor-pointer select-none border-[.125rem] border-solid border-transparent py-1.5 px-3 text-xs rounded\",\r\n chipCloseIcon:\r\n \"w-4 float-right pl-[8px] text-[16px] opacity-[.53] cursor-pointer fill-[#afafaf] hover:fill-[#8b8b8b] dark:fill-gray-400 dark:hover:fill-gray-100 transition-all duration-200 ease-in-out\",\r\n};\r\n\r\nconst DefaultClassesType = {\r\n icon: \"string\",\r\n chipElement: \"string\",\r\n chipCloseIcon: \"string\",\r\n};\r\n\r\nclass Chip {\r\n constructor(element, data = {}, classes) {\r\n this._element = element;\r\n this._options = this._getConfig(data);\r\n this._classes = this._getClasses(classes);\r\n }\r\n\r\n // Getters\r\n\r\n static get NAME() {\r\n return NAME;\r\n }\r\n\r\n // Public\r\n\r\n init() {\r\n this._appendCloseIcon();\r\n this._handleDelete();\r\n this._handleTextChip();\r\n this._handleClickOnChip();\r\n }\r\n\r\n dispose() {\r\n this._element = null;\r\n this._options = null;\r\n EventHandler.off(this._element, \"click\");\r\n }\r\n\r\n appendChip() {\r\n const { text, closeIcon, iconSVG } = this._options;\r\n const chip = getChip({ text, closeIcon, iconSVG }, this._classes);\r\n\r\n return chip;\r\n }\r\n\r\n // Private\r\n\r\n _appendCloseIcon(el = this._element) {\r\n if (SelectorEngine.find(ATTR_SELECTOR_CHIP_CLOSE, this._element).length > 0)\r\n return;\r\n\r\n if (this._options.closeIcon) {\r\n const createIcon = element(\"span\");\r\n\r\n createIcon.classList = this._classes.icon;\r\n createIcon.setAttribute(ATTR_CHIP_CLOSE);\r\n createIcon.innerHTML = this._options.iconSVG;\r\n\r\n el.insertAdjacentElement(\"beforeend\", createIcon);\r\n }\r\n }\r\n\r\n _handleClickOnChip() {\r\n EventHandler.on(this._element, \"click\", (event) => {\r\n const { textContent } = event.target;\r\n const obj = {};\r\n\r\n obj.tag = textContent.trim();\r\n\r\n EventHandler.trigger(EVENT_SELECT, { event, obj });\r\n });\r\n }\r\n\r\n _handleDelete() {\r\n const deleteElement = SelectorEngine.find(\r\n ATTR_SELECTOR_CHIP_CLOSE,\r\n this._element\r\n );\r\n\r\n if (deleteElement.length === 0) return;\r\n\r\n EventHandler.on(this._element, \"click\", ATTR_SELECTOR_CHIP_CLOSE, () => {\r\n EventHandler.trigger(this._element, EVENT_DELETE);\r\n this._element.remove();\r\n });\r\n }\r\n\r\n _handleTextChip() {\r\n if (this._element.innerText !== \"\") return;\r\n\r\n this._element.innerText = this._options.text;\r\n }\r\n\r\n _getConfig(options) {\r\n const config = {\r\n ...Default,\r\n ...Manipulator.getDataAttributes(this._element),\r\n ...options,\r\n };\r\n\r\n typeCheckConfig(NAME, config, DefaultType);\r\n\r\n return config;\r\n }\r\n\r\n _getClasses(classes) {\r\n const dataAttributes = Manipulator.getDataClassAttributes(this._element);\r\n\r\n classes = {\r\n ...DefaultClasses,\r\n ...dataAttributes,\r\n ...classes,\r\n };\r\n\r\n typeCheckConfig(NAME, classes, DefaultClassesType);\r\n\r\n return classes;\r\n }\r\n\r\n static getInstance(element) {\r\n return Data.getData(element, DATA_KEY);\r\n }\r\n\r\n static getOrCreateInstance(element, config = {}) {\r\n return (\r\n this.getInstance(element) ||\r\n new this(element, typeof config === \"object\" ? config : null)\r\n );\r\n }\r\n}\r\n\r\nexport default Chip;\r\n", "/*\r\n--------------------------------------------------------------------------\r\nTailwind Elements is an open-source UI kit of advanced components for TailwindCSS.\r\nCopyright \u00A9 2023 MDBootstrap.com\r\n\r\nUnless a custom, individually assigned license has been granted, this program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\r\nIn addition, a custom license may be available upon request, subject to the terms and conditions of that license. Please contact tailwind@mdbootstrap.com for more information on obtaining a custom license.\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\r\n--------------------------------------------------------------------------\r\n*/\r\n\r\nimport { typeCheckConfig, element, getUID } from \"../../util/index\";\r\nimport Manipulator from \"../../dom/manipulator\";\r\nimport SelectorEngine from \"../../dom/selector-engine\";\r\nimport Chip from \"./chip\";\r\nimport Data from \"../../dom/data\";\r\nimport { getInputField } from \"./templates\";\r\nimport EventHandler from \"../../dom/event-handler\";\r\nimport {\r\n LEFT_ARROW,\r\n RIGHT_ARROW,\r\n ENTER,\r\n BACKSPACE,\r\n UP_ARROW,\r\n DOWN_ARROW,\r\n DELETE,\r\n} from \"../../util/keycodes\";\r\nimport Input from \"../../forms/input\";\r\n\r\n/*\r\n------------------------------------------------------------------------\r\nConstants\r\n------------------------------------------------------------------------\r\n*/\r\n\r\nconst NAME = \"chips\";\r\nconst ATTR_NAME = `data-te-${NAME}`;\r\n\r\nconst DATA_KEY = `te.${NAME}`;\r\n\r\nconst ATTR_CHIPS_INIT = `${ATTR_NAME}-input-init`;\r\nconst ATTR_CHIPS_ACTIVE = `${ATTR_NAME}-active`;\r\nconst ATTR_CHIPS_INITIAL = `${ATTR_NAME}-initial`;\r\nconst ATTR_CHIPS_PLACEHOLDER = `${ATTR_NAME}-placeholder`;\r\nconst ATTR_CHIPS_WRAPPER = `${ATTR_NAME}-input-wrapper`;\r\nconst ATTR_CHIP_INIT = \"data-te-chip-init\";\r\nconst ATTR_CHIP_CLOSE = \"data-te-chip-close\";\r\nconst ATTR_CHIP_TEXT = \"data-te-chip-text\";\r\n\r\nconst ATTR_SELECTOR_CHIPS_ACTIVE = `[${ATTR_CHIPS_ACTIVE}]`;\r\nconst ATTR_SELECTOR_CHIP_INIT = `[${ATTR_CHIP_INIT}]`;\r\nconst ATTR_SELECTOR_CHIP_ACTIVE = `${ATTR_SELECTOR_CHIP_INIT}${ATTR_SELECTOR_CHIPS_ACTIVE}`;\r\nconst ATTR_SELECTOR_CLOSE = `[${ATTR_CHIP_CLOSE}]`;\r\nconst ATTR_SELECTOR_CHIPS_WRAPPER = `[${ATTR_CHIPS_WRAPPER}]`;\r\nconst ATTR_SELECTOR_CHIP_TEXT = `[${ATTR_CHIP_TEXT}]`;\r\nconst ATTR_SELECTOR_CHIPS_PLACEHOLDER = `[${ATTR_CHIPS_PLACEHOLDER}]`;\r\n\r\nconst DATA_NOTCH_LEADING = \"data-te-input-notch-leading-ref\";\r\nconst DATA_NOTCH_MIDDLE = \"data-te-input-notch-middle-ref\";\r\nconst SELECTOR_NOTCH_LEADING = `[${DATA_NOTCH_LEADING}]`;\r\nconst SELECTOR_NOTCH_MIDDLE = `[${DATA_NOTCH_MIDDLE}]`;\r\n\r\n// input helpers\r\nconst ATTR_INPUT_STATE_ACTIVE = \"data-te-input-state-active\";\r\nconst ATTR_SELECTOR_INPUT_NOTCH_REF = \"[data-te-input-notch-ref]\";\r\n\r\nconst EVENT_ADD = \"add.te.chips\";\r\nconst EVENT_ARROW_DOWN = \"arrowDown.te.chips\";\r\nconst EVENT_ARROW_LEFT = \"arrowLeft.te.chips\";\r\nconst EVENT_ARROW_RIGHT = \"arrowRight.te.chips\";\r\nconst EVENT_ARROW_UP = \"arrowUp.te.chips\";\r\nconst EVENT_DELETE = \"delete.te.chips\";\r\nconst EVENT_SELECT = \"select.te.chips\";\r\n\r\nconst DefaultType = {\r\n inputID: \"string\",\r\n parentSelector: \"string\",\r\n initialValues: \"array\",\r\n editable: \"boolean\",\r\n labelText: \"string\",\r\n inputClasses: \"object\",\r\n inputOptions: \"object\",\r\n};\r\n\r\nconst Default = {\r\n inputID: getUID(\"chips-input-\"),\r\n parentSelector: \"\",\r\n initialValues: [{ tag: \"init1\" }, { tag: \"init2\" }],\r\n editable: false,\r\n labelText: \"Example label\",\r\n inputClasses: {},\r\n inputOptions: {},\r\n};\r\n\r\nconst DefaultClasses = {\r\n opacity: \"opacity-0\",\r\n inputWrapperPadding: \"p-[5px]\",\r\n transition:\r\n \"transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]\",\r\n contentEditable: \"outline-none !border-[3px] !border-solid !border-[#b2b3b4]\",\r\n chipsInputWrapper:\r\n \"relative flex items-center flex-wrap transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]\",\r\n chipsInput:\r\n \"peer block min-h-[auto] w-[150px] rounded border-0 bg-transparent py-[0.32rem] px-3 leading-[1.6] outline-none transition-all duration-200 ease-linear focus:placeholder:opacity-100 data-[te-input-state-active]:placeholder:opacity-100 motion-reduce:transition-none dark:text-gray-200 dark:placeholder:text-gray-200 [&:not([data-te-input-placeholder-active])]:placeholder:opacity-0\",\r\n chipsLabel:\r\n \"pointer-events-none absolute top-0 left-3 mb-0 max-w-[90%] origin-[0_0] truncate pt-[0.37rem] leading-[1.6] text-gray-500 transition-all duration-200 ease-out peer-focus:-translate-y-[0.9rem] peer-focus:scale-[0.8] peer-focus:text-primary peer-data-[te-input-state-active]:-translate-y-[0.9rem] peer-data-[te-input-state-active]:scale-[0.8] motion-reduce:transition-none dark:text-gray-200 dark:peer-focus:text-gray-200\",\r\n};\r\n\r\nconst DefaultClassesType = {\r\n opacity: \"string\",\r\n inputWrapperPadding: \"string\",\r\n transition: \"string\",\r\n contentEditable: \"string\",\r\n chipsInputWrapper: \"string\",\r\n chipsInput: \"string\",\r\n chipsLabel: \"string\",\r\n};\r\n\r\nclass ChipsInput extends Chip {\r\n constructor(element, data = {}, classes) {\r\n super(element, data);\r\n this._element = element;\r\n this._inputInstance = null;\r\n\r\n if (this._element) {\r\n Data.setData(element, DATA_KEY, this);\r\n }\r\n\r\n this._options = this._getConfig(data);\r\n this._classes = this._getClasses(classes);\r\n this.numberClicks = 0;\r\n\r\n this.init();\r\n }\r\n\r\n // Getters\r\n\r\n static get NAME() {\r\n return NAME;\r\n }\r\n\r\n get activeChip() {\r\n return SelectorEngine.findOne(ATTR_SELECTOR_CHIP_ACTIVE, this._element);\r\n }\r\n\r\n get input() {\r\n return SelectorEngine.findOne(\"input\", this._element);\r\n }\r\n\r\n get allChips() {\r\n return SelectorEngine.find(ATTR_SELECTOR_CHIP_INIT, this._element);\r\n }\r\n\r\n get chipsInputWrapper() {\r\n return SelectorEngine.findOne(ATTR_SELECTOR_CHIPS_WRAPPER, this._element);\r\n }\r\n\r\n // Public\r\n\r\n init() {\r\n this._setChipsClass();\r\n this._appendInputToElement(ATTR_CHIPS_PLACEHOLDER);\r\n this._handleInitialValue();\r\n this._handleInputText();\r\n this._handleKeyboard();\r\n this._handleChipsOnSelect();\r\n this._handleEditable();\r\n this._handleChipsFocus();\r\n this._handleClicksOnChips();\r\n\r\n this._inputInstance._getLabelWidth();\r\n this._inputInstance._applyNotch();\r\n }\r\n\r\n dispose() {\r\n this._element = null;\r\n this._options = null;\r\n }\r\n\r\n // Private\r\n\r\n _getNotchData() {\r\n this._notchMiddle = SelectorEngine.findOne(\r\n SELECTOR_NOTCH_MIDDLE,\r\n this._element\r\n );\r\n this._notchLeading = SelectorEngine.findOne(\r\n SELECTOR_NOTCH_LEADING,\r\n this._element\r\n );\r\n }\r\n\r\n _setChipsClass() {\r\n this._element.setAttribute(ATTR_CHIPS_INIT, \"\");\r\n }\r\n\r\n _handleDeleteEvents(event) {\r\n const [last] = this.allChips.slice(-1);\r\n\r\n if (this.activeChip === null) {\r\n last.remove();\r\n\r\n this._handleEvents(event, EVENT_DELETE);\r\n } else {\r\n const index = this.allChips.findIndex((chip) => chip === this.activeChip);\r\n const activeChipAfter = this._handleActiveChipAfterRemove(index);\r\n const arr = [];\r\n\r\n if (this.activeChip === null) return;\r\n\r\n this.activeChip.remove();\r\n this._handleEvents(event, EVENT_DELETE);\r\n\r\n this.numberClicks = index;\r\n\r\n activeChipAfter.setAttribute(ATTR_CHIPS_ACTIVE, \"\");\r\n\r\n this.allChips.forEach((chip) => {\r\n if (chip.hasAttribute(ATTR_CHIPS_ACTIVE)) {\r\n arr.push(chip);\r\n\r\n if (arr.length > 1) {\r\n this.allChips.forEach((chip) => chip.remove());\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n _handleUpEvents(event) {\r\n this.numberClicks += 1;\r\n\r\n if (this.numberClicks === this.allChips.length + 1) this.numberClicks = 0;\r\n\r\n this._handleRightKeyboardArrow(this.numberClicks);\r\n\r\n this._handleEvents(event, EVENT_ARROW_RIGHT);\r\n this._handleEvents(event, EVENT_ARROW_UP);\r\n }\r\n\r\n _handleDownEvents(event) {\r\n this.numberClicks -= 1;\r\n\r\n if (this.numberClicks <= 0) this.numberClicks = this.allChips.length;\r\n\r\n this._handleLeftKeyboardArrow(this.numberClicks);\r\n\r\n this._handleEvents(event, EVENT_ARROW_LEFT);\r\n this._handleEvents(event, EVENT_ARROW_DOWN);\r\n }\r\n\r\n _keyboardEvents(event) {\r\n const { target, keyCode, ctrlKey } = event;\r\n\r\n if (target.value.length > 0 || this.allChips.length === 0) return;\r\n\r\n if (keyCode === BACKSPACE || keyCode === DELETE) {\r\n this._handleDeleteEvents(event);\r\n } else if (keyCode === RIGHT_ARROW || keyCode === UP_ARROW) {\r\n this._handleUpEvents(event);\r\n } else if (keyCode === LEFT_ARROW || keyCode === DOWN_ARROW) {\r\n this._handleDownEvents(event);\r\n } else if (keyCode === 65 && ctrlKey) {\r\n this._handleAddActiveClass();\r\n }\r\n }\r\n\r\n _handleKeyboard() {\r\n EventHandler.on(this.input, \"keydown\", (event) =>\r\n this._keyboardEvents(event)\r\n );\r\n }\r\n\r\n _handleEditable() {\r\n const { editable } = this._options;\r\n\r\n if (!editable) return;\r\n\r\n this.allChips.forEach((chip) => {\r\n EventHandler.on(chip, \"dblclick\", (e) => {\r\n const close = SelectorEngine.findOne(ATTR_SELECTOR_CLOSE, chip);\r\n\r\n chip.classList.add(...this._classes.contentEditable.split(\" \"));\r\n chip.contentEditable = true;\r\n chip.focus();\r\n\r\n setTimeout(() => {\r\n Manipulator.addStyle(close, { display: \"none\" });\r\n }, 200);\r\n close.classList.add(...this._classes.opacity.split(\" \"));\r\n\r\n const obj = {};\r\n\r\n obj.tag = e.target.textContent;\r\n\r\n EventHandler.trigger(chip, EVENT_SELECT, {\r\n event: e,\r\n allChips: this.allChips,\r\n });\r\n });\r\n\r\n EventHandler.on(document, \"click\", ({ target }) => {\r\n const close = SelectorEngine.findOne(ATTR_SELECTOR_CLOSE, chip);\r\n const chipText = SelectorEngine.findOne(ATTR_SELECTOR_CHIP_TEXT, chip);\r\n\r\n const isContainer = target === chip;\r\n const isContainerContent = chip && chip.contains(target);\r\n\r\n if (!isContainer && !isContainerContent) {\r\n chip.contentEditable = false;\r\n chip.classList.remove(...this._classes.contentEditable.split(\" \"));\r\n\r\n if (chipText.textContent !== \"\") {\r\n setTimeout(() => {\r\n Manipulator.addStyle(close, { display: \"block\" });\r\n close.classList.remove(...this._classes.opacity.split(\" \"));\r\n }, 160);\r\n }\r\n }\r\n\r\n if (chipText.textContent === \"\") {\r\n setTimeout(() => {\r\n chip.classList.add(...this._classes.opacity.split(\" \"));\r\n }, 200);\r\n\r\n setTimeout(() => {\r\n chip.remove();\r\n }, 300);\r\n }\r\n });\r\n });\r\n }\r\n\r\n _handleRemoveActiveClass() {\r\n this.allChips.forEach((chip) => chip.removeAttribute(ATTR_CHIPS_ACTIVE));\r\n }\r\n\r\n _handleAddActiveClass() {\r\n this.allChips.forEach((chip) => chip.setAttribute(ATTR_CHIPS_ACTIVE, \"\"));\r\n }\r\n\r\n _handleRightKeyboardArrow(num) {\r\n this._handleRemoveActiveClass();\r\n\r\n if (num === 0) num = 1;\r\n\r\n this._handleAddActiveClassWithKebyboard(num);\r\n }\r\n\r\n _handleLeftKeyboardArrow(num) {\r\n this._handleRemoveActiveClass();\r\n this._handleAddActiveClassWithKebyboard(num);\r\n }\r\n\r\n _handleActiveChipAfterRemove(index) {\r\n const chipIndex = index === 0 ? 1 : index - 1;\r\n\r\n return this.allChips[chipIndex];\r\n }\r\n\r\n _handleClicksOnChips() {\r\n EventHandler.on(this._element, \"click\", () => {\r\n if (this.allChips.length === 0) {\r\n this.chipsInputWrapper.classList.remove(\r\n ...this._classes.inputWrapperPadding.split(\" \")\r\n );\r\n this.input.removeAttribute(ATTR_CHIPS_ACTIVE);\r\n }\r\n });\r\n }\r\n\r\n _handleTextContent() {\r\n const arr = [];\r\n\r\n this.allChips.forEach((chip) => arr.push({ tag: chip.textContent.trim() }));\r\n\r\n return arr;\r\n }\r\n\r\n _handleEvents(event, eventName) {\r\n const arr = this._handleTextContent();\r\n\r\n const filterActive = this.allChips.filter(\r\n (chip) => chip.hasAttribute(ATTR_CHIPS_ACTIVE) && chip\r\n );\r\n\r\n EventHandler.trigger(this._element, eventName, {\r\n event,\r\n allChips: this.allChips,\r\n arrOfObjects: arr,\r\n active: filterActive,\r\n activeObj: {\r\n tag: filterActive.length <= 0 ? \"\" : filterActive[0].textContent.trim(),\r\n },\r\n });\r\n }\r\n\r\n _handleChipsFocus() {\r\n EventHandler.on(this._element, \"click\", ({ target: { attributes } }) => {\r\n const attrList = [...attributes];\r\n if (\r\n attrList.includes(ATTR_CHIP_INIT) ||\r\n attrList.includes(ATTR_CHIP_CLOSE) ||\r\n attrList.includes(ATTR_CHIP_TEXT)\r\n ) {\r\n return;\r\n }\r\n\r\n this.input.focus();\r\n });\r\n }\r\n\r\n _handleInitialValue() {\r\n this._appendInputToElement(ATTR_CHIPS_INITIAL);\r\n\r\n if (this._element.hasAttribute(ATTR_CHIPS_INITIAL)) {\r\n const { initialValues } = this._options;\r\n\r\n initialValues.forEach(({ tag }) =>\r\n this._handleCreateChip(this.input, tag)\r\n );\r\n\r\n SelectorEngine.findOne(\r\n ATTR_SELECTOR_INPUT_NOTCH_REF,\r\n this.input.parentNode\r\n ).setAttribute(ATTR_INPUT_STATE_ACTIVE, \"\");\r\n this.input.setAttribute(ATTR_CHIPS_ACTIVE, \"\");\r\n this.input.setAttribute(ATTR_INPUT_STATE_ACTIVE, \"\");\r\n }\r\n\r\n if (this.allChips.length > 0) {\r\n this.chipsInputWrapper.classList.add(\r\n ...this._classes.inputWrapperPadding.split(\" \")\r\n );\r\n this.chipsInputWrapper.classList.add(\r\n ...this._classes.transition.split(\" \")\r\n );\r\n }\r\n }\r\n\r\n _handleKeysInputToElement(event) {\r\n const { keyCode, target } = event;\r\n\r\n if (target.hasAttribute(ATTR_CHIP_INIT)) {\r\n const close = SelectorEngine.findOne(ATTR_SELECTOR_CLOSE, target);\r\n\r\n if (keyCode === ENTER) {\r\n target.contentEditable = false;\r\n target.classList.remove(...this._classes.contentEditable.split(\" \"));\r\n\r\n if (target.textContent !== \"\") {\r\n setTimeout(() => {\r\n Manipulator.addStyle(close, { display: \"block\" });\r\n close.classList.remove(...this._classes.opacity.split(\" \"));\r\n }, 160);\r\n } else if (target.textContent === \"\") {\r\n setTimeout(() => {\r\n target.classList.add(...this._classes.opacity.split(\" \"));\r\n }, 200);\r\n\r\n setTimeout(() => {\r\n target.remove();\r\n }, 300);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n if (keyCode === ENTER) {\r\n if (target.value === \"\") return;\r\n\r\n this._handleCreateChip(target, target.value);\r\n\r\n this._handleRemoveActiveClass();\r\n this.numberClicks = this.allChips.length + 1;\r\n\r\n this._handleEvents(event, EVENT_ADD);\r\n }\r\n\r\n if (this.allChips.length > 0) {\r\n this.chipsInputWrapper.classList.add(\r\n ...this._classes.inputWrapperPadding.split(\" \")\r\n );\r\n this.chipsInputWrapper.classList.add(\r\n ...this._classes.transition.split(\" \")\r\n );\r\n } else {\r\n this.chipsInputWrapper.classList.remove(\r\n ...this._classes.inputWrapperPadding.split(\" \")\r\n );\r\n }\r\n }\r\n\r\n _handleBlurInput = ({ target }) => {\r\n if (target.value.length > 0) {\r\n this._handleCreateChip(target, target.value);\r\n }\r\n\r\n if (this.allChips.length > 0) {\r\n target.setAttribute(ATTR_CHIPS_ACTIVE, \"\");\r\n this.input.setAttribute(ATTR_INPUT_STATE_ACTIVE, \"\");\r\n SelectorEngine.findOne(\r\n ATTR_SELECTOR_INPUT_NOTCH_REF,\r\n this.input.parentNode\r\n ).setAttribute(ATTR_INPUT_STATE_ACTIVE, \"\");\r\n this.chipsInputWrapper.classList.add(\r\n ...this._classes.inputWrapperPadding.split(\" \")\r\n );\r\n } else {\r\n target.removeAttribute(ATTR_CHIPS_ACTIVE);\r\n this.input.removeAttribute(ATTR_INPUT_STATE_ACTIVE);\r\n SelectorEngine.findOne(\r\n ATTR_SELECTOR_INPUT_NOTCH_REF,\r\n this.input.parentNode\r\n ).removeAttribute(ATTR_INPUT_STATE_ACTIVE);\r\n this.chipsInputWrapper.classList.remove(\r\n ...this._classes.inputWrapperPadding.split(\" \")\r\n );\r\n }\r\n\r\n this.allChips.forEach((chip) => chip.removeAttribute(ATTR_CHIPS_ACTIVE));\r\n };\r\n\r\n _handleInputText() {\r\n const placeholder = SelectorEngine.findOne(\r\n ATTR_SELECTOR_CHIPS_PLACEHOLDER,\r\n this._element\r\n );\r\n\r\n EventHandler.on(this._element, \"keyup\", placeholder, (e) =>\r\n this._handleKeysInputToElement(e)\r\n );\r\n EventHandler.on(this.input, \"blur\", (e) => this._handleBlurInput(e));\r\n }\r\n\r\n _appendInputToElement(selector) {\r\n if (!this._element.hasAttribute(selector)) return;\r\n\r\n const inputField = getInputField(this._options, this._classes);\r\n\r\n this._element.insertAdjacentHTML(\"beforeend\", inputField);\r\n const inputWrapper = SelectorEngine.findOne(\r\n \"[data-te-chips-input-wrapper]\",\r\n this._element\r\n );\r\n\r\n this._inputInstance = new Input(\r\n inputWrapper,\r\n this._options.inputOptions,\r\n this._options.inputClasses\r\n );\r\n }\r\n\r\n _handleCreateChip(target, value) {\r\n const divElement = element(\"div\");\r\n const instance = Chip.getInstance(divElement);\r\n\r\n const divWithChips = new Chip(instance, { text: value }, this._classes);\r\n\r\n if (this._options.parentSelector !== \"\") {\r\n const parent = document.querySelector(this._options.parentSelector);\r\n parent.insertAdjacentHTML(\"beforeend\", divWithChips.appendChip());\r\n } else {\r\n target.insertAdjacentHTML(\"beforebegin\", divWithChips.appendChip());\r\n }\r\n\r\n target.value = \"\";\r\n\r\n SelectorEngine.find(ATTR_SELECTOR_CHIP_INIT).forEach((chip) => {\r\n let instance = Chip.getInstance(chip);\r\n if (!instance) {\r\n instance = new Chip(chip, {}, this._classes);\r\n }\r\n return instance.init();\r\n });\r\n\r\n this._handleEditable();\r\n }\r\n\r\n _handleChipsOnSelect() {\r\n this.allChips.forEach((chip) => {\r\n EventHandler.on(this._element, \"click\", (e) => {\r\n EventHandler.trigger(chip, EVENT_SELECT, {\r\n event: e,\r\n allChips: this.allChips,\r\n });\r\n });\r\n });\r\n }\r\n\r\n _handleAddActiveClassWithKebyboard(num) {\r\n let chip;\r\n\r\n if (this.allChips[num - 1] === undefined) {\r\n chip = this.allChips[num - 2];\r\n } else {\r\n chip = this.allChips[num - 1];\r\n }\r\n\r\n chip.setAttribute(ATTR_CHIPS_ACTIVE);\r\n }\r\n\r\n _getConfig(options) {\r\n const config = {\r\n ...Default,\r\n ...Manipulator.getDataAttributes(this._element),\r\n ...options,\r\n };\r\n\r\n typeCheckConfig(NAME, config, DefaultType);\r\n return config;\r\n }\r\n\r\n _getClasses(classes) {\r\n const dataAttributes = Manipulator.getDataClassAttributes(this._element);\r\n\r\n classes = {\r\n ...DefaultClasses,\r\n ...dataAttributes,\r\n ...classes,\r\n };\r\n\r\n typeCheckConfig(NAME, classes, DefaultClassesType);\r\n\r\n return classes;\r\n }\r\n\r\n static getInstance(element) {\r\n return Data.getData(element, DATA_KEY);\r\n }\r\n\r\n static getOrCreateInstance(element, config = {}) {\r\n return (\r\n this.getInstance(element) ||\r\n new this(element, typeof config === \"object\" ? config : null)\r\n );\r\n }\r\n}\r\n\r\nexport default ChipsInput;\r\n", "/*\r\n--------------------------------------------------------------------------\r\nTailwind Elements is an open-source UI kit of advanced components for TailwindCSS.\r\nCopyright \u00A9 2023 MDBootstrap.com\r\n\r\nUnless a custom, individually assigned license has been granted, this program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\r\nIn addition, a custom license may be available upon request, subject to the terms and conditions of that license. Please contact tailwind@mdbootstrap.com for more information on obtaining a custom license.\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\r\n--------------------------------------------------------------------------\r\n*/\r\n\r\n// Default options\r\nconst DEFAULT_LEGEND_COLOR = {\r\n plugins: {\r\n legend: {\r\n labels: {\r\n color: \"rgb(102,102,102)\",\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const DEFAULT_OPTIONS = {\r\n line: {\r\n options: {\r\n ...DEFAULT_LEGEND_COLOR,\r\n elements: {\r\n line: {\r\n backgroundColor: \"rgba(59, 112, 202, 0.0)\",\r\n borderColor: \"rgb(59, 112, 202)\",\r\n borderWidth: 2,\r\n tension: 0.0,\r\n },\r\n point: {\r\n borderColor: \"rgb(59, 112, 202)\",\r\n backgroundColor: \"rgb(59, 112, 202)\",\r\n },\r\n },\r\n responsive: true,\r\n legend: {\r\n display: true,\r\n },\r\n tooltips: {\r\n intersect: false,\r\n mode: \"index\",\r\n },\r\n datasets: {\r\n borderColor: \"red\",\r\n },\r\n scales: {\r\n x: {\r\n stacked: true,\r\n grid: {\r\n display: false,\r\n },\r\n ticks: {\r\n fontColor: \"rgba(0,0,0, 0.5)\",\r\n },\r\n },\r\n y: {\r\n stacked: false,\r\n grid: {\r\n borderDash: [2],\r\n drawBorder: false,\r\n zeroLineColor: \"rgba(0,0,0,0)\",\r\n zeroLineBorderDash: [2],\r\n zeroLineBorderDashOffset: [2],\r\n },\r\n ticks: {\r\n fontColor: \"rgba(0,0,0, 0.5)\",\r\n },\r\n },\r\n },\r\n },\r\n },\r\n bar: {\r\n options: {\r\n ...DEFAULT_LEGEND_COLOR,\r\n backgroundColor: \"rgb(59, 112, 202)\",\r\n borderWidth: 0,\r\n responsive: true,\r\n legend: {\r\n display: true,\r\n },\r\n tooltips: {\r\n intersect: false,\r\n mode: \"index\",\r\n },\r\n scales: {\r\n x: {\r\n stacked: true,\r\n grid: {\r\n display: false,\r\n },\r\n ticks: {\r\n fontColor: \"rgba(0,0,0, 0.5)\",\r\n },\r\n },\r\n y: {\r\n stacked: true,\r\n grid: {\r\n borderDash: [2],\r\n drawBorder: false,\r\n zeroLineColor: \"rgba(0,0,0,0)\",\r\n zeroLineBorderDash: [2],\r\n zeroLineBorderDashOffset: [2],\r\n },\r\n ticks: {\r\n fontColor: \"rgba(0,0,0, 0.5)\",\r\n },\r\n },\r\n },\r\n },\r\n },\r\n pie: {\r\n options: {\r\n ...DEFAULT_LEGEND_COLOR,\r\n elements: {\r\n arc: { backgroundColor: \"rgb(59, 112, 202)\" },\r\n },\r\n responsive: true,\r\n legend: {\r\n display: true,\r\n },\r\n },\r\n },\r\n doughnut: {\r\n options: {\r\n ...DEFAULT_LEGEND_COLOR,\r\n elements: {\r\n arc: { backgroundColor: \"rgb(59, 112, 202)\" },\r\n },\r\n responsive: true,\r\n legend: {\r\n display: true,\r\n },\r\n },\r\n },\r\n polarArea: {\r\n options: {\r\n ...DEFAULT_LEGEND_COLOR,\r\n elements: {\r\n arc: { backgroundColor: \"rgba(59, 112, 202, 0.5)\" },\r\n },\r\n responsive: true,\r\n legend: {\r\n display: true,\r\n },\r\n },\r\n },\r\n radar: {\r\n options: {\r\n ...DEFAULT_LEGEND_COLOR,\r\n elements: {\r\n line: {\r\n backgroundColor: \"rgba(59, 112, 202, 0.5)\",\r\n borderColor: \"rgb(59, 112, 202)\",\r\n borderWidth: 2,\r\n },\r\n point: {\r\n borderColor: \"rgb(59, 112, 202)\",\r\n backgroundColor: \"rgb(59, 112, 202)\",\r\n },\r\n },\r\n responsive: true,\r\n legend: {\r\n display: true,\r\n },\r\n },\r\n },\r\n scatter: {\r\n options: {\r\n ...DEFAULT_LEGEND_COLOR,\r\n elements: {\r\n line: {\r\n backgroundColor: \"rgba(59, 112, 202, 0.5)\",\r\n borderColor: \"rgb(59, 112, 202)\",\r\n borderWidth: 2,\r\n tension: 0.0,\r\n },\r\n point: {\r\n borderColor: \"rgb(59, 112, 202)\",\r\n backgroundColor: \"rgba(59, 112, 202, 0.5)\",\r\n },\r\n },\r\n responsive: true,\r\n legend: {\r\n display: true,\r\n },\r\n tooltips: {\r\n intersect: false,\r\n mode: \"index\",\r\n },\r\n datasets: {\r\n borderColor: \"red\",\r\n },\r\n scales: {\r\n x: {\r\n stacked: true,\r\n grid: {\r\n display: false,\r\n },\r\n ticks: {\r\n fontColor: \"rgba(0,0,0, 0.5)\",\r\n },\r\n },\r\n y: {\r\n stacked: false,\r\n grid: {\r\n borderDash: [2],\r\n drawBorder: false,\r\n zeroLineColor: \"rgba(0,0,0,0)\",\r\n zeroLineBorderDash: [2],\r\n zeroLineBorderDashOffset: [2],\r\n },\r\n ticks: {\r\n fontColor: \"rgba(0,0,0, 0.5)\",\r\n },\r\n },\r\n },\r\n },\r\n },\r\n bubble: {\r\n options: {\r\n ...DEFAULT_LEGEND_COLOR,\r\n elements: {\r\n point: {\r\n borderColor: \"rgb(59, 112, 202)\",\r\n backgroundColor: \"rgba(59, 112, 202, 0.5)\",\r\n },\r\n },\r\n responsive: true,\r\n legend: {\r\n display: true,\r\n },\r\n scales: {\r\n x: {\r\n grid: {\r\n display: false,\r\n },\r\n ticks: {\r\n fontColor: \"rgba(0,0,0, 0.5)\",\r\n },\r\n },\r\n y: {\r\n grid: {\r\n borderDash: [2],\r\n drawBorder: false,\r\n zeroLineColor: \"rgba(0,0,0,0)\",\r\n zeroLineBorderDash: [2],\r\n zeroLineBorderDashOffset: [2],\r\n },\r\n ticks: {\r\n fontColor: \"rgba(0,0,0, 0.5)\",\r\n },\r\n },\r\n },\r\n },\r\n },\r\n};\r\n", "'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n", "/*\r\n--------------------------------------------------------------------------\r\nTailwind Elements is an open-source UI kit of advanced components for TailwindCSS.\r\nCopyright \u00A9 2023 MDBootstrap.com\r\n\r\nUnless a custom, individually assigned license has been granted, this program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\r\nIn addition, a custom license may be available upon request, subject to the terms and conditions of that license. Please contact tailwind@mdbootstrap.com for more information on obtaining a custom license.\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\r\n--------------------------------------------------------------------------\r\n*/\r\n\r\nimport { element, typeCheckConfig } from \"../../util/index\";\r\nimport Data from \"../../dom/data\";\r\nimport Manipulator from \"../../dom/manipulator\";\r\nimport { DEFAULT_OPTIONS } from \"./chartDefaults\";\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nimport merge from \"deepmerge\";\r\n\r\nconst NAME = \"chart\";\r\nconst DATA_KEY = \"te.chart\";\r\nconst CLASSNAME_CHARTS = \"chart\";\r\n\r\nconst GENERATE_DATA = (options, type, defaultType) => {\r\n const mergeObjects = (target, source, options) => {\r\n const destination = target.slice();\r\n source.forEach((item, index) => {\r\n if (typeof destination[index] === \"undefined\") {\r\n destination[index] = options.cloneUnlessOtherwiseSpecified(\r\n item,\r\n options\r\n );\r\n } else if (options.isMergeableObject(item)) {\r\n destination[index] = merge(target[index], item, options);\r\n } else if (target.indexOf(item) === -1) {\r\n destination.push(item);\r\n }\r\n });\r\n return destination;\r\n };\r\n return merge(defaultType[type], options, {\r\n arrayMerge: mergeObjects,\r\n });\r\n};\r\n\r\nconst DEFAULT_DARK_OPTIONS = {\r\n darkTicksColor: \"#fff\",\r\n darkLabelColor: \"#fff\",\r\n darkGridLinesColor: \"#555\",\r\n darkmodeOff: \"undefined\",\r\n darkMode: null,\r\n darkBgColor: \"#262626\",\r\n darkBgColorLight: \"#fff\",\r\n options: null,\r\n};\r\n\r\nconst DARK_OPTIONS_TYPE = {\r\n darkTicksColor: \"string\",\r\n darkLabelColor: \"string\",\r\n darkGridLinesColor: \"string\",\r\n darkmodeOff: \"(string|null)\",\r\n darkMode: \"(string|null)\",\r\n darkBgColor: \"string\",\r\n darkBgColorLight: \"string\",\r\n options: \"(object|null)\",\r\n};\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Class Definition\r\n * ------------------------------------------------------------------------\r\n */\r\n//\r\n\r\nclass Chart {\r\n constructor(element, data, options = {}, darkOptions = {}) {\r\n this._waitForCharts(element, data, options, darkOptions);\r\n }\r\n\r\n async _getChartjs() {\r\n const {\r\n Chart: Chartjs,\r\n ArcElement,\r\n LineElement,\r\n BarElement,\r\n PointElement,\r\n BarController,\r\n BubbleController,\r\n DoughnutController,\r\n LineController,\r\n PieController,\r\n PolarAreaController,\r\n RadarController,\r\n ScatterController,\r\n CategoryScale,\r\n LinearScale,\r\n LogarithmicScale,\r\n RadialLinearScale,\r\n TimeScale,\r\n TimeSeriesScale,\r\n Decimation,\r\n Filler,\r\n Legend,\r\n Title,\r\n Tooltip,\r\n SubTitle,\r\n } = await import(\"chart.js\");\r\n Chartjs.register(\r\n ArcElement,\r\n LineElement,\r\n BarElement,\r\n PointElement,\r\n BarController,\r\n BubbleController,\r\n DoughnutController,\r\n LineController,\r\n PieController,\r\n PolarAreaController,\r\n RadarController,\r\n ScatterController,\r\n CategoryScale,\r\n LinearScale,\r\n LogarithmicScale,\r\n RadialLinearScale,\r\n TimeScale,\r\n TimeSeriesScale,\r\n Decimation,\r\n Filler,\r\n Legend,\r\n Title,\r\n Tooltip,\r\n SubTitle\r\n );\r\n\r\n return Chartjs;\r\n }\r\n\r\n async _getChartDataLabels() {\r\n const ChartDataLabels = await import(\"chartjs-plugin-datalabels\");\r\n return ChartDataLabels;\r\n }\r\n\r\n async _waitForCharts(element, data, options = {}, darkOptions = {}) {\r\n this._Chartjs = await this._getChartjs();\r\n this._ChartDataLabels = await this._getChartDataLabels();\r\n this._element = element;\r\n this._data = data;\r\n this._options = options;\r\n this._type = data.type;\r\n this._canvas = null;\r\n this._chart = null;\r\n\r\n // handle mode change (dark- and lightmode)\r\n this._darkOptions = this._getDarkConfig(darkOptions);\r\n this._darkModeClassContainer = document.querySelector(\"html\");\r\n this._prevConfig = null;\r\n this._observer = null;\r\n\r\n if (this._element) {\r\n Data.setData(element, DATA_KEY, this);\r\n Manipulator.addClass(this._element, CLASSNAME_CHARTS);\r\n this._chartConstructor();\r\n }\r\n\r\n if (this._darkOptions.darkmodeOff !== null) {\r\n // check mode on start\r\n const mode =\r\n this._darkOptions.darkMode === \"dark\"\r\n ? \"dark\"\r\n : this._darkOptions.darkMode === \"light\"\r\n ? \"light\"\r\n : this.systemColorMode;\r\n this._handleMode(mode);\r\n // observe darkmode class container change\r\n this._observer = new MutationObserver(this._observerCallback.bind(this));\r\n this._observer.observe(this._darkModeClassContainer, {\r\n attributes: true,\r\n });\r\n }\r\n }\r\n\r\n // Getters\r\n static get NAME() {\r\n return NAME;\r\n }\r\n\r\n get systemColorMode() {\r\n return (\r\n localStorage.theme ||\r\n (this._darkModeClassContainer.classList.contains(\"dark\")\r\n ? \"dark\"\r\n : \"light\")\r\n );\r\n }\r\n\r\n // Public\r\n dispose() {\r\n this._observer.disconnect();\r\n Data.removeData(this._element, DATA_KEY);\r\n this._element = null;\r\n }\r\n\r\n update(data, config) {\r\n if (data) {\r\n this._data = { ...this._data, ...data };\r\n this._chart.data = this._data;\r\n }\r\n\r\n const configOptions = Object.prototype.hasOwnProperty.call(\r\n config,\r\n \"options\"\r\n )\r\n ? config\r\n : { options: { ...config } };\r\n\r\n this._options = merge(this._options, configOptions);\r\n\r\n this._chart.options = GENERATE_DATA(\r\n this._options,\r\n this._type,\r\n DEFAULT_OPTIONS\r\n ).options;\r\n\r\n this._chart.update();\r\n }\r\n\r\n setTheme(theme) {\r\n if ((theme !== \"dark\" && theme !== \"light\") || !this._data) {\r\n return;\r\n }\r\n this._handleMode(theme);\r\n }\r\n\r\n // Private\r\n _getDarkConfig(config) {\r\n let dataAttributes = {};\r\n const dataAttr = Manipulator.getDataAttributes(this._element);\r\n Object.keys(dataAttr).forEach(\r\n (key) => key.startsWith(\"dark\") && (dataAttributes[key] = dataAttr[key])\r\n );\r\n\r\n dataAttributes = {\r\n ...DEFAULT_DARK_OPTIONS,\r\n ...dataAttributes,\r\n };\r\n\r\n const xyScale = {\r\n y: {\r\n ticks: {\r\n color: dataAttributes.darkTicksColor,\r\n },\r\n grid: {\r\n color: dataAttributes.darkGridLinesColor,\r\n },\r\n },\r\n x: {\r\n ticks: {\r\n color: dataAttributes.darkTicksColor,\r\n },\r\n grid: {\r\n color: dataAttributes.darkGridLinesColor,\r\n },\r\n },\r\n };\r\n\r\n const rScale = {\r\n r: {\r\n ticks: {\r\n color: dataAttributes.darkTicksColor,\r\n backdropColor: dataAttributes.darkBgColor,\r\n },\r\n grid: {\r\n color: dataAttributes.darkGridLinesColor,\r\n },\r\n pointLabels: {\r\n color: dataAttributes.darkTicksColor,\r\n },\r\n },\r\n };\r\n\r\n const radials = [\"pie\", \"doughnut\", \"polarArea\", \"radar\"];\r\n\r\n const scales = !radials.includes(this._type)\r\n ? xyScale\r\n : [\"polarArea\", \"radar\"].includes(this._type)\r\n ? rScale\r\n : {};\r\n\r\n const opt = {\r\n scales,\r\n plugins: {\r\n legend: {\r\n labels: {\r\n color: dataAttributes.darkLabelColor,\r\n },\r\n },\r\n },\r\n };\r\n\r\n // combine config\r\n config = {\r\n ...dataAttributes,\r\n options: {\r\n ...opt,\r\n },\r\n ...config,\r\n };\r\n\r\n typeCheckConfig(NAME, config, DARK_OPTIONS_TYPE);\r\n\r\n return config;\r\n }\r\n\r\n _chartConstructor() {\r\n if (this._data) {\r\n this._createCanvas();\r\n\r\n const options = GENERATE_DATA(this._options, this._type, DEFAULT_OPTIONS);\r\n const plugins = [];\r\n\r\n if (options.dataLabelsPlugin) {\r\n plugins.push(this._ChartDataLabels.default);\r\n }\r\n\r\n this._prevConfig = options;\r\n this._chart = new this._Chartjs(this._canvas, {\r\n ...this._data,\r\n ...options,\r\n plugins,\r\n });\r\n }\r\n }\r\n\r\n _createCanvas() {\r\n if (this._canvas) return;\r\n if (this._element.nodeName === \"CANVAS\") {\r\n this._canvas = this._element;\r\n } else {\r\n this._canvas = element(\"canvas\");\r\n this._element.appendChild(this._canvas);\r\n }\r\n }\r\n\r\n _handleMode(systemColor) {\r\n if (systemColor === \"dark\") {\r\n this._changeDatasetBorderColor();\r\n this.update(null, this._darkOptions.options);\r\n } else {\r\n this._changeDatasetBorderColor(false);\r\n this._prevConfig && this.update(null, this._prevConfig);\r\n }\r\n }\r\n\r\n _observerCallback(mutationList) {\r\n for (const mutation of mutationList) {\r\n if (mutation.type === \"attributes\") {\r\n this._handleMode(this.systemColorMode);\r\n }\r\n }\r\n }\r\n\r\n _changeDatasetBorderColor(dark = true) {\r\n [...this._data.data.datasets].forEach(\r\n (set) =>\r\n [\"pie\", \"doughnut\", \"polarArea\"].includes(this._type) &&\r\n (set.borderColor = dark\r\n ? this._darkOptions.darkBgColor\r\n : this._darkOptions.darkBgColorLight)\r\n );\r\n }\r\n\r\n static jQueryInterface(data, options, type) {\r\n return this.each(function () {\r\n let chartData = Data.getData(this, DATA_KEY);\r\n\r\n if (!chartData && /dispose/.test(data)) {\r\n return;\r\n }\r\n\r\n if (!chartData) {\r\n const chartOptions = options\r\n ? GENERATE_DATA(options, type, DEFAULT_OPTIONS)\r\n : DEFAULT_OPTIONS[type];\r\n\r\n chartData = new Chart(this, {\r\n ...data,\r\n ...chartOptions,\r\n });\r\n }\r\n\r\n if (typeof data === \"string\") {\r\n if (typeof chartData[data] === \"undefined\") {\r\n throw new TypeError(`No method named \"${data}\"`);\r\n }\r\n\r\n chartData[data](options, type);\r\n }\r\n });\r\n }\r\n\r\n static getInstance(element) {\r\n return Data.getData(element, DATA_KEY);\r\n }\r\n\r\n static getOrCreateInstance(element, config = {}) {\r\n return (\r\n this.getInstance(element) ||\r\n new this(element, typeof config === \"object\" ? config : null)\r\n );\r\n }\r\n}\r\n\r\nexport default Chart;\r\n", "/*!\n * perfect-scrollbar v1.5.3\n * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors\n * Licensed under MIT\n */\n\nfunction get(element) {\n return getComputedStyle(element);\n}\n\nfunction set(element, obj) {\n for (var key in obj) {\n var val = obj[key];\n if (typeof val === 'number') {\n val = val + \"px\";\n }\n element.style[key] = val;\n }\n return element;\n}\n\nfunction div(className) {\n var div = document.createElement('div');\n div.className = className;\n return div;\n}\n\nvar elMatches =\n typeof Element !== 'undefined' &&\n (Element.prototype.matches ||\n Element.prototype.webkitMatchesSelector ||\n Element.prototype.mozMatchesSelector ||\n Element.prototype.msMatchesSelector);\n\nfunction matches(element, query) {\n if (!elMatches) {\n throw new Error('No element matching method supported');\n }\n\n return elMatches.call(element, query);\n}\n\nfunction remove(element) {\n if (element.remove) {\n element.remove();\n } else {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n }\n}\n\nfunction queryChildren(element, selector) {\n return Array.prototype.filter.call(element.children, function (child) { return matches(child, selector); }\n );\n}\n\nvar cls = {\n main: 'ps',\n rtl: 'ps__rtl',\n element: {\n thumb: function (x) { return (\"ps__thumb-\" + x); },\n rail: function (x) { return (\"ps__rail-\" + x); },\n consuming: 'ps__child--consume',\n },\n state: {\n focus: 'ps--focus',\n clicking: 'ps--clicking',\n active: function (x) { return (\"ps--active-\" + x); },\n scrolling: function (x) { return (\"ps--scrolling-\" + x); },\n },\n};\n\n/*\n * Helper methods\n */\nvar scrollingClassTimeout = { x: null, y: null };\n\nfunction addScrollingClass(i, x) {\n var classList = i.element.classList;\n var className = cls.state.scrolling(x);\n\n if (classList.contains(className)) {\n clearTimeout(scrollingClassTimeout[x]);\n } else {\n classList.add(className);\n }\n}\n\nfunction removeScrollingClass(i, x) {\n scrollingClassTimeout[x] = setTimeout(\n function () { return i.isAlive && i.element.classList.remove(cls.state.scrolling(x)); },\n i.settings.scrollingThreshold\n );\n}\n\nfunction setScrollingClassInstantly(i, x) {\n addScrollingClass(i, x);\n removeScrollingClass(i, x);\n}\n\nvar EventElement = function EventElement(element) {\n this.element = element;\n this.handlers = {};\n};\n\nvar prototypeAccessors = { isEmpty: { configurable: true } };\n\nEventElement.prototype.bind = function bind (eventName, handler) {\n if (typeof this.handlers[eventName] === 'undefined') {\n this.handlers[eventName] = [];\n }\n this.handlers[eventName].push(handler);\n this.element.addEventListener(eventName, handler, false);\n};\n\nEventElement.prototype.unbind = function unbind (eventName, target) {\n var this$1 = this;\n\n this.handlers[eventName] = this.handlers[eventName].filter(function (handler) {\n if (target && handler !== target) {\n return true;\n }\n this$1.element.removeEventListener(eventName, handler, false);\n return false;\n });\n};\n\nEventElement.prototype.unbindAll = function unbindAll () {\n for (var name in this.handlers) {\n this.unbind(name);\n }\n};\n\nprototypeAccessors.isEmpty.get = function () {\n var this$1 = this;\n\n return Object.keys(this.handlers).every(\n function (key) { return this$1.handlers[key].length === 0; }\n );\n};\n\nObject.defineProperties( EventElement.prototype, prototypeAccessors );\n\nvar EventManager = function EventManager() {\n this.eventElements = [];\n};\n\nEventManager.prototype.eventElement = function eventElement (element) {\n var ee = this.eventElements.filter(function (ee) { return ee.element === element; })[0];\n if (!ee) {\n ee = new EventElement(element);\n this.eventElements.push(ee);\n }\n return ee;\n};\n\nEventManager.prototype.bind = function bind (element, eventName, handler) {\n this.eventElement(element).bind(eventName, handler);\n};\n\nEventManager.prototype.unbind = function unbind (element, eventName, handler) {\n var ee = this.eventElement(element);\n ee.unbind(eventName, handler);\n\n if (ee.isEmpty) {\n // remove\n this.eventElements.splice(this.eventElements.indexOf(ee), 1);\n }\n};\n\nEventManager.prototype.unbindAll = function unbindAll () {\n this.eventElements.forEach(function (e) { return e.unbindAll(); });\n this.eventElements = [];\n};\n\nEventManager.prototype.once = function once (element, eventName, handler) {\n var ee = this.eventElement(element);\n var onceHandler = function (evt) {\n ee.unbind(eventName, onceHandler);\n handler(evt);\n };\n ee.bind(eventName, onceHandler);\n};\n\nfunction createEvent(name) {\n if (typeof window.CustomEvent === 'function') {\n return new CustomEvent(name);\n } else {\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(name, false, false, undefined);\n return evt;\n }\n}\n\nfunction processScrollDiff(\n i,\n axis,\n diff,\n useScrollingClass,\n forceFireReachEvent\n) {\n if ( useScrollingClass === void 0 ) useScrollingClass = true;\n if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;\n\n var fields;\n if (axis === 'top') {\n fields = [\n 'contentHeight',\n 'containerHeight',\n 'scrollTop',\n 'y',\n 'up',\n 'down' ];\n } else if (axis === 'left') {\n fields = [\n 'contentWidth',\n 'containerWidth',\n 'scrollLeft',\n 'x',\n 'left',\n 'right' ];\n } else {\n throw new Error('A proper axis should be provided');\n }\n\n processScrollDiff$1(i, diff, fields, useScrollingClass, forceFireReachEvent);\n}\n\nfunction processScrollDiff$1(\n i,\n diff,\n ref,\n useScrollingClass,\n forceFireReachEvent\n) {\n var contentHeight = ref[0];\n var containerHeight = ref[1];\n var scrollTop = ref[2];\n var y = ref[3];\n var up = ref[4];\n var down = ref[5];\n if ( useScrollingClass === void 0 ) useScrollingClass = true;\n if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;\n\n var element = i.element;\n\n // reset reach\n i.reach[y] = null;\n\n // 1 for subpixel rounding\n if (element[scrollTop] < 1) {\n i.reach[y] = 'start';\n }\n\n // 1 for subpixel rounding\n if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {\n i.reach[y] = 'end';\n }\n\n if (diff) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + y)));\n\n if (diff < 0) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + up)));\n } else if (diff > 0) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + down)));\n }\n\n if (useScrollingClass) {\n setScrollingClassInstantly(i, y);\n }\n }\n\n if (i.reach[y] && (diff || forceFireReachEvent)) {\n element.dispatchEvent(createEvent((\"ps-\" + y + \"-reach-\" + (i.reach[y]))));\n }\n}\n\nfunction toInt(x) {\n return parseInt(x, 10) || 0;\n}\n\nfunction isEditable(el) {\n return (\n matches(el, 'input,[contenteditable]') ||\n matches(el, 'select,[contenteditable]') ||\n matches(el, 'textarea,[contenteditable]') ||\n matches(el, 'button,[contenteditable]')\n );\n}\n\nfunction outerWidth(element) {\n var styles = get(element);\n return (\n toInt(styles.width) +\n toInt(styles.paddingLeft) +\n toInt(styles.paddingRight) +\n toInt(styles.borderLeftWidth) +\n toInt(styles.borderRightWidth)\n );\n}\n\nvar env = {\n isWebKit:\n typeof document !== 'undefined' &&\n 'WebkitAppearance' in document.documentElement.style,\n supportsTouch:\n typeof window !== 'undefined' &&\n ('ontouchstart' in window ||\n ('maxTouchPoints' in window.navigator &&\n window.navigator.maxTouchPoints > 0) ||\n (window.DocumentTouch && document instanceof window.DocumentTouch)),\n supportsIePointer:\n typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,\n isChrome:\n typeof navigator !== 'undefined' &&\n /Chrome/i.test(navigator && navigator.userAgent),\n};\n\nfunction updateGeometry(i) {\n var element = i.element;\n var roundedScrollTop = Math.floor(element.scrollTop);\n var rect = element.getBoundingClientRect();\n\n i.containerWidth = Math.round(rect.width);\n i.containerHeight = Math.round(rect.height);\n\n i.contentWidth = element.scrollWidth;\n i.contentHeight = element.scrollHeight;\n\n if (!element.contains(i.scrollbarXRail)) {\n // clean up and append\n queryChildren(element, cls.element.rail('x')).forEach(function (el) { return remove(el); }\n );\n element.appendChild(i.scrollbarXRail);\n }\n if (!element.contains(i.scrollbarYRail)) {\n // clean up and append\n queryChildren(element, cls.element.rail('y')).forEach(function (el) { return remove(el); }\n );\n element.appendChild(i.scrollbarYRail);\n }\n\n if (\n !i.settings.suppressScrollX &&\n i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth\n ) {\n i.scrollbarXActive = true;\n i.railXWidth = i.containerWidth - i.railXMarginWidth;\n i.railXRatio = i.containerWidth / i.railXWidth;\n i.scrollbarXWidth = getThumbSize(\n i,\n toInt((i.railXWidth * i.containerWidth) / i.contentWidth)\n );\n i.scrollbarXLeft = toInt(\n ((i.negativeScrollAdjustment + element.scrollLeft) *\n (i.railXWidth - i.scrollbarXWidth)) /\n (i.contentWidth - i.containerWidth)\n );\n } else {\n i.scrollbarXActive = false;\n }\n\n if (\n !i.settings.suppressScrollY &&\n i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight\n ) {\n i.scrollbarYActive = true;\n i.railYHeight = i.containerHeight - i.railYMarginHeight;\n i.railYRatio = i.containerHeight / i.railYHeight;\n i.scrollbarYHeight = getThumbSize(\n i,\n toInt((i.railYHeight * i.containerHeight) / i.contentHeight)\n );\n i.scrollbarYTop = toInt(\n (roundedScrollTop * (i.railYHeight - i.scrollbarYHeight)) /\n (i.contentHeight - i.containerHeight)\n );\n } else {\n i.scrollbarYActive = false;\n }\n\n if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {\n i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;\n }\n if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {\n i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;\n }\n\n updateCss(element, i);\n\n if (i.scrollbarXActive) {\n element.classList.add(cls.state.active('x'));\n } else {\n element.classList.remove(cls.state.active('x'));\n i.scrollbarXWidth = 0;\n i.scrollbarXLeft = 0;\n element.scrollLeft = i.isRtl === true ? i.contentWidth : 0;\n }\n if (i.scrollbarYActive) {\n element.classList.add(cls.state.active('y'));\n } else {\n element.classList.remove(cls.state.active('y'));\n i.scrollbarYHeight = 0;\n i.scrollbarYTop = 0;\n element.scrollTop = 0;\n }\n}\n\nfunction getThumbSize(i, thumbSize) {\n if (i.settings.minScrollbarLength) {\n thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);\n }\n if (i.settings.maxScrollbarLength) {\n thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);\n }\n return thumbSize;\n}\n\nfunction updateCss(element, i) {\n var xRailOffset = { width: i.railXWidth };\n var roundedScrollTop = Math.floor(element.scrollTop);\n\n if (i.isRtl) {\n xRailOffset.left =\n i.negativeScrollAdjustment +\n element.scrollLeft +\n i.containerWidth -\n i.contentWidth;\n } else {\n xRailOffset.left = element.scrollLeft;\n }\n if (i.isScrollbarXUsingBottom) {\n xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;\n } else {\n xRailOffset.top = i.scrollbarXTop + roundedScrollTop;\n }\n set(i.scrollbarXRail, xRailOffset);\n\n var yRailOffset = { top: roundedScrollTop, height: i.railYHeight };\n if (i.isScrollbarYUsingRight) {\n if (i.isRtl) {\n yRailOffset.right =\n i.contentWidth -\n (i.negativeScrollAdjustment + element.scrollLeft) -\n i.scrollbarYRight -\n i.scrollbarYOuterWidth -\n 9;\n } else {\n yRailOffset.right = i.scrollbarYRight - element.scrollLeft;\n }\n } else {\n if (i.isRtl) {\n yRailOffset.left =\n i.negativeScrollAdjustment +\n element.scrollLeft +\n i.containerWidth * 2 -\n i.contentWidth -\n i.scrollbarYLeft -\n i.scrollbarYOuterWidth;\n } else {\n yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;\n }\n }\n set(i.scrollbarYRail, yRailOffset);\n\n set(i.scrollbarX, {\n left: i.scrollbarXLeft,\n width: i.scrollbarXWidth - i.railBorderXWidth,\n });\n set(i.scrollbarY, {\n top: i.scrollbarYTop,\n height: i.scrollbarYHeight - i.railBorderYWidth,\n });\n}\n\nfunction clickRail(i) {\n var element = i.element;\n\n i.event.bind(i.scrollbarY, 'mousedown', function (e) { return e.stopPropagation(); });\n i.event.bind(i.scrollbarYRail, 'mousedown', function (e) {\n var positionTop =\n e.pageY -\n window.pageYOffset -\n i.scrollbarYRail.getBoundingClientRect().top;\n var direction = positionTop > i.scrollbarYTop ? 1 : -1;\n\n i.element.scrollTop += direction * i.containerHeight;\n updateGeometry(i);\n\n e.stopPropagation();\n });\n\n i.event.bind(i.scrollbarX, 'mousedown', function (e) { return e.stopPropagation(); });\n i.event.bind(i.scrollbarXRail, 'mousedown', function (e) {\n var positionLeft =\n e.pageX -\n window.pageXOffset -\n i.scrollbarXRail.getBoundingClientRect().left;\n var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;\n\n i.element.scrollLeft += direction * i.containerWidth;\n updateGeometry(i);\n\n e.stopPropagation();\n });\n}\n\nfunction dragThumb(i) {\n bindMouseScrollHandler(i, [\n 'containerWidth',\n 'contentWidth',\n 'pageX',\n 'railXWidth',\n 'scrollbarX',\n 'scrollbarXWidth',\n 'scrollLeft',\n 'x',\n 'scrollbarXRail' ]);\n bindMouseScrollHandler(i, [\n 'containerHeight',\n 'contentHeight',\n 'pageY',\n 'railYHeight',\n 'scrollbarY',\n 'scrollbarYHeight',\n 'scrollTop',\n 'y',\n 'scrollbarYRail' ]);\n}\n\nfunction bindMouseScrollHandler(\n i,\n ref\n) {\n var containerHeight = ref[0];\n var contentHeight = ref[1];\n var pageY = ref[2];\n var railYHeight = ref[3];\n var scrollbarY = ref[4];\n var scrollbarYHeight = ref[5];\n var scrollTop = ref[6];\n var y = ref[7];\n var scrollbarYRail = ref[8];\n\n var element = i.element;\n\n var startingScrollTop = null;\n var startingMousePageY = null;\n var scrollBy = null;\n\n function mouseMoveHandler(e) {\n if (e.touches && e.touches[0]) {\n e[pageY] = e.touches[0].pageY;\n }\n element[scrollTop] =\n startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);\n addScrollingClass(i, y);\n updateGeometry(i);\n\n e.stopPropagation();\n if (e.type.startsWith('touch') && e.changedTouches.length > 1) {\n e.preventDefault();\n }\n }\n\n function mouseUpHandler() {\n removeScrollingClass(i, y);\n i[scrollbarYRail].classList.remove(cls.state.clicking);\n i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);\n }\n\n function bindMoves(e, touchMode) {\n startingScrollTop = element[scrollTop];\n if (touchMode && e.touches) {\n e[pageY] = e.touches[0].pageY;\n }\n startingMousePageY = e[pageY];\n scrollBy =\n (i[contentHeight] - i[containerHeight]) /\n (i[railYHeight] - i[scrollbarYHeight]);\n if (!touchMode) {\n i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);\n i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);\n e.preventDefault();\n } else {\n i.event.bind(i.ownerDocument, 'touchmove', mouseMoveHandler);\n }\n\n i[scrollbarYRail].classList.add(cls.state.clicking);\n\n e.stopPropagation();\n }\n\n i.event.bind(i[scrollbarY], 'mousedown', function (e) {\n bindMoves(e);\n });\n i.event.bind(i[scrollbarY], 'touchstart', function (e) {\n bindMoves(e, true);\n });\n}\n\nfunction keyboard(i) {\n var element = i.element;\n\n var elementHovered = function () { return matches(element, ':hover'); };\n var scrollbarFocused = function () { return matches(i.scrollbarX, ':focus') || matches(i.scrollbarY, ':focus'); };\n\n function shouldPreventDefault(deltaX, deltaY) {\n var scrollTop = Math.floor(element.scrollTop);\n if (deltaX === 0) {\n if (!i.scrollbarYActive) {\n return false;\n }\n if (\n (scrollTop === 0 && deltaY > 0) ||\n (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)\n ) {\n return !i.settings.wheelPropagation;\n }\n }\n\n var scrollLeft = element.scrollLeft;\n if (deltaY === 0) {\n if (!i.scrollbarXActive) {\n return false;\n }\n if (\n (scrollLeft === 0 && deltaX < 0) ||\n (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)\n ) {\n return !i.settings.wheelPropagation;\n }\n }\n return true;\n }\n\n i.event.bind(i.ownerDocument, 'keydown', function (e) {\n if (\n (e.isDefaultPrevented && e.isDefaultPrevented()) ||\n e.defaultPrevented\n ) {\n return;\n }\n\n if (!elementHovered() && !scrollbarFocused()) {\n return;\n }\n\n var activeElement = document.activeElement\n ? document.activeElement\n : i.ownerDocument.activeElement;\n if (activeElement) {\n if (activeElement.tagName === 'IFRAME') {\n activeElement = activeElement.contentDocument.activeElement;\n } else {\n // go deeper if element is a webcomponent\n while (activeElement.shadowRoot) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n }\n if (isEditable(activeElement)) {\n return;\n }\n }\n\n var deltaX = 0;\n var deltaY = 0;\n\n switch (e.which) {\n case 37: // left\n if (e.metaKey) {\n deltaX = -i.contentWidth;\n } else if (e.altKey) {\n deltaX = -i.containerWidth;\n } else {\n deltaX = -30;\n }\n break;\n case 38: // up\n if (e.metaKey) {\n deltaY = i.contentHeight;\n } else if (e.altKey) {\n deltaY = i.containerHeight;\n } else {\n deltaY = 30;\n }\n break;\n case 39: // right\n if (e.metaKey) {\n deltaX = i.contentWidth;\n } else if (e.altKey) {\n deltaX = i.containerWidth;\n } else {\n deltaX = 30;\n }\n break;\n case 40: // down\n if (e.metaKey) {\n deltaY = -i.contentHeight;\n } else if (e.altKey) {\n deltaY = -i.containerHeight;\n } else {\n deltaY = -30;\n }\n break;\n case 32: // space bar\n if (e.shiftKey) {\n deltaY = i.containerHeight;\n } else {\n deltaY = -i.containerHeight;\n }\n break;\n case 33: // page up\n deltaY = i.containerHeight;\n break;\n case 34: // page down\n deltaY = -i.containerHeight;\n break;\n case 36: // home\n deltaY = i.contentHeight;\n break;\n case 35: // end\n deltaY = -i.contentHeight;\n break;\n default:\n return;\n }\n\n if (i.settings.suppressScrollX && deltaX !== 0) {\n return;\n }\n if (i.settings.suppressScrollY && deltaY !== 0) {\n return;\n }\n\n element.scrollTop -= deltaY;\n element.scrollLeft += deltaX;\n updateGeometry(i);\n\n if (shouldPreventDefault(deltaX, deltaY)) {\n e.preventDefault();\n }\n });\n}\n\nfunction wheel(i) {\n var element = i.element;\n\n function shouldPreventDefault(deltaX, deltaY) {\n var roundedScrollTop = Math.floor(element.scrollTop);\n var isTop = element.scrollTop === 0;\n var isBottom =\n roundedScrollTop + element.offsetHeight === element.scrollHeight;\n var isLeft = element.scrollLeft === 0;\n var isRight =\n element.scrollLeft + element.offsetWidth === element.scrollWidth;\n\n var hitsBound;\n\n // pick axis with primary direction\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n hitsBound = isTop || isBottom;\n } else {\n hitsBound = isLeft || isRight;\n }\n\n return hitsBound ? !i.settings.wheelPropagation : true;\n }\n\n function getDeltaFromEvent(e) {\n var deltaX = e.deltaX;\n var deltaY = -1 * e.deltaY;\n\n if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {\n // OS X Safari\n deltaX = (-1 * e.wheelDeltaX) / 6;\n deltaY = e.wheelDeltaY / 6;\n }\n\n if (e.deltaMode && e.deltaMode === 1) {\n // Firefox in deltaMode 1: Line scrolling\n deltaX *= 10;\n deltaY *= 10;\n }\n\n if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {\n // IE in some mouse drivers\n deltaX = 0;\n deltaY = e.wheelDelta;\n }\n\n if (e.shiftKey) {\n // reverse axis with shift key\n return [-deltaY, -deltaX];\n }\n return [deltaX, deltaY];\n }\n\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\n // FIXME: this is a workaround for