From 6588f1f773075217c8af8594a15eb947130bba2f Mon Sep 17 00:00:00 2001
From: MarleenGilsing <80678586+MarleenGilsing@users.noreply.github.com>
Date: Fri, 15 Mar 2024 10:02:50 +0100
Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9C=20Cleaning=20up=20level=2012=20up?=
=?UTF-8?q?=20and=20also=20adds=20new=20adventure=20in=20level=2016=20(#52?=
=?UTF-8?q?64)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cleans up level 12 and up
Fixes #3507
Fixes #4514
Fixes #5048
Adds songs 2 adventure in level 16 in all languages.
---
content/adventures/ar.yaml | 57 +++++++++++++++++-------
content/adventures/bg.yaml | 57 +++++++++++++++++-------
content/adventures/bn.yaml | 79 +++++++++++++++++++++++----------
content/adventures/ca.yaml | 59 +++++++++++++++++-------
content/adventures/cs.yaml | 57 +++++++++++++++++-------
content/adventures/cy.yaml | 55 +++++++++++++++++------
content/adventures/da.yaml | 59 +++++++++++++++++-------
content/adventures/de.yaml | 50 ++++++++++++++++-----
content/adventures/el.yaml | 57 +++++++++++++++++-------
content/adventures/en.yaml | 59 +++++++++++++++++-------
content/adventures/eo.yaml | 52 +++++++++++++++++-----
content/adventures/es.yaml | 45 ++++++++++++++++---
content/adventures/et.yaml | 79 +++++++++++++++++++++++----------
content/adventures/fa.yaml | 57 +++++++++++++++++-------
content/adventures/fi.yaml | 59 +++++++++++++++++-------
content/adventures/fr.yaml | 72 ++++++++++++++++++++++--------
content/adventures/fy.yaml | 57 +++++++++++++++++-------
content/adventures/he.yaml | 79 +++++++++++++++++++++++----------
content/adventures/hi.yaml | 79 +++++++++++++++++++++++----------
content/adventures/hu.yaml | 57 +++++++++++++++++-------
content/adventures/ia.yaml | 59 +++++++++++++++++-------
content/adventures/id.yaml | 49 +++++++++++++++-----
content/adventures/it.yaml | 74 +++++++++++++++++++++---------
content/adventures/ja.yaml | 79 +++++++++++++++++++++++----------
content/adventures/kmr.yaml | 55 +++++++++++++++++------
content/adventures/ko.yaml | 52 +++++++++++++++++-----
content/adventures/mi.yaml | 59 +++++++++++++++++-------
content/adventures/nb_NO.yaml | 57 +++++++++++++++++-------
content/adventures/nl.yaml | 48 +++++++++++++++++---
content/adventures/pa_PK.yaml | 79 +++++++++++++++++++++++----------
content/adventures/pap.yaml | 59 +++++++++++++++++-------
content/adventures/pl.yaml | 50 ++++++++++++++++-----
content/adventures/pt_BR.yaml | 50 ++++++++++++++++-----
content/adventures/pt_PT.yaml | 57 +++++++++++++++++-------
content/adventures/ro.yaml | 59 +++++++++++++++++-------
content/adventures/ru.yaml | 52 +++++++++++++++++-----
content/adventures/sq.yaml | 52 +++++++++++++++++-----
content/adventures/sr.yaml | 55 +++++++++++++++++------
content/adventures/sv.yaml | 50 ++++++++++++++++-----
content/adventures/sw.yaml | 57 +++++++++++++++++-------
content/adventures/te.yaml | 59 +++++++++++++++++-------
content/adventures/th.yaml | 79 +++++++++++++++++++++++----------
content/adventures/tl.yaml | 59 +++++++++++++++++-------
content/adventures/tn.yaml | 79 +++++++++++++++++++++++----------
content/adventures/tr.yaml | 50 ++++++++++++++++-----
content/adventures/uk.yaml | 79 +++++++++++++++++++++++----------
content/adventures/ur.yaml | 79 +++++++++++++++++++++++----------
content/adventures/vi.yaml | 59 +++++++++++++++++-------
content/adventures/zh_Hans.yaml | 40 +++++++++++++++--
content/adventures/zh_Hant.yaml | 59 +++++++++++++++++-------
hedy_content.py | 3 +-
51 files changed, 2227 insertions(+), 795 deletions(-)
diff --git a/content/adventures/ar.yaml b/content/adventures/ar.yaml
index 4fd33c55648..9434b9d79b4 100644
--- a/content/adventures/ar.yaml
+++ b/content/adventures/ar.yaml
@@ -376,8 +376,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -433,14 +435,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -575,7 +577,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2523,10 +2525,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2569,7 +2571,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3919,6 +3921,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: لعبة إكس-أو
default_save_name: Tic
@@ -4478,7 +4507,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4618,12 +4647,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/bg.yaml b/content/adventures/bg.yaml
index 614f8b69baf..8e2bc6e3b03 100644
--- a/content/adventures/bg.yaml
+++ b/content/adventures/bg.yaml
@@ -397,8 +397,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -454,14 +456,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -604,7 +606,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2668,10 +2670,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2714,7 +2716,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4032,6 +4034,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4613,7 +4642,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4753,12 +4782,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/bn.yaml b/content/adventures/bn.yaml
index 53b39c567f1..959de30324f 100644
--- a/content/adventures/bn.yaml
+++ b/content/adventures/bn.yaml
@@ -395,8 +395,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -452,14 +454,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -603,7 +605,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2594,10 +2596,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2640,7 +2642,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3872,17 +3874,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -3977,6 +3983,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4541,7 +4574,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4681,12 +4714,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/ca.yaml b/content/adventures/ca.yaml
index c125916ab67..7713160d300 100644
--- a/content/adventures/ca.yaml
+++ b/content/adventures/ca.yaml
@@ -398,8 +398,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -455,14 +457,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -604,7 +606,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2675,10 +2677,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2721,7 +2723,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3993,7 +3995,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4098,6 +4100,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4669,7 +4698,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4809,12 +4838,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/cs.yaml b/content/adventures/cs.yaml
index d609fa46f6a..b49ab6e13a8 100644
--- a/content/adventures/cs.yaml
+++ b/content/adventures/cs.yaml
@@ -393,8 +393,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -450,14 +452,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -600,7 +602,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2667,10 +2669,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2713,7 +2715,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4080,6 +4082,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4646,7 +4675,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4786,12 +4815,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/cy.yaml b/content/adventures/cy.yaml
index 89a7399407b..b0a327fe48f 100644
--- a/content/adventures/cy.yaml
+++ b/content/adventures/cy.yaml
@@ -409,8 +409,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -466,9 +468,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -623,7 +625,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2658,10 +2660,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2704,7 +2706,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3979,7 +3981,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4084,6 +4086,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4623,7 +4652,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4763,12 +4792,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/da.yaml b/content/adventures/da.yaml
index 85e601eb0fe..07b2e4789d0 100644
--- a/content/adventures/da.yaml
+++ b/content/adventures/da.yaml
@@ -410,8 +410,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -467,14 +469,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -616,7 +618,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2655,10 +2657,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2701,7 +2703,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3973,7 +3975,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4052,6 +4054,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4621,7 +4650,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4761,12 +4790,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/de.yaml b/content/adventures/de.yaml
index 91642569187..1dbc92144fa 100644
--- a/content/adventures/de.yaml
+++ b/content/adventures/de.yaml
@@ -411,6 +411,9 @@ adventures:
Der Spieler, der am nächsten an 21 herankommt ohne sie zu überschreiten, gewinnt!
Viel Spaß!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -466,9 +469,9 @@ adventures:
punkte = punkte + 10
{elif} karte_3 == 'Ace':
{if} punkte > 11:
- punkte = punkte + 11
- {else}:
punkte = punkte + 1
+ {else}:
+ punkte = punkte + 11
{else}:
punkte = punkte + karte_3
{print} 'Du hast extra ' karte_3 ' (' punkte ' Punkte)'
@@ -2710,10 +2713,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2756,7 +2759,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4093,6 +4096,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4639,7 +4669,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4779,12 +4809,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/el.yaml b/content/adventures/el.yaml
index 08d825c3135..65a2f4c2e6f 100644
--- a/content/adventures/el.yaml
+++ b/content/adventures/el.yaml
@@ -353,8 +353,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -410,14 +412,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -563,7 +565,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2545,10 +2547,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2591,7 +2593,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3897,6 +3899,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4469,7 +4498,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4609,12 +4638,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/en.yaml b/content/adventures/en.yaml
index d33b588f5eb..8e93c252ae6 100644
--- a/content/adventures/en.yaml
+++ b/content/adventures/en.yaml
@@ -399,8 +399,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -456,9 +458,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -615,7 +617,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -1325,7 +1327,7 @@ adventures:
```
13:
story_text: |
- In the previous levels you learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
+ In the previous levels you've learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
In this system you have to give both the correct username and the correct password.
In this level you will learn the `{and}` command that will make this code a lot shorter and more understandable!
@@ -1344,7 +1346,7 @@ adventures:
```
14:
story_text: |
- With the program below you can calculate if you've passed a subject at school (so, a grade of six or higher).
+ With the example code you can calculate if you've passed a subject at school (so, a grade of six or higher).
You can see this code is extremely inefficient, due to the very long code in line 5.
All the different grades from 1 to 5 had to be programmed separately. Lucky for you, in this level you'll learn how to do this without this extremely long code!
example_code: |
@@ -2686,10 +2688,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2732,7 +2734,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3998,7 +4000,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Tip: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4103,6 +4105,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4642,7 +4671,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4784,12 +4813,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/eo.yaml b/content/adventures/eo.yaml
index 09b3c43c767..8f1de9d20a0 100644
--- a/content/adventures/eo.yaml
+++ b/content/adventures/eo.yaml
@@ -399,6 +399,9 @@ adventures:
La ludanto, kiu plej alproksimiĝos al 21, ne superante 21, gajnos!
Amuziĝu!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'NIGRA FANTO'
@@ -454,9 +457,9 @@ adventures:
poentoj = poentoj + 10
{elif} karto_3 == 'Aso':
{if} poentoj > 11:
- poentoj = poentoj + 11
- {else}:
poentoj = poentoj + 1
+ {else}:
+ poentoj = poentoj + 11
{else}:
poentoj = poentoj + karto_3
print 'Vi akiris kroman karton: ' karto_3 ' (' poentoj ' poentoj)'
@@ -600,7 +603,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2624,10 +2627,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2670,7 +2673,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4000,6 +4003,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tri en Vico
default_save_name: Trienvico
@@ -4559,7 +4589,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4699,12 +4729,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/es.yaml b/content/adventures/es.yaml
index 6b2b2762e45..af32000c87e 100644
--- a/content/adventures/es.yaml
+++ b/content/adventures/es.yaml
@@ -403,6 +403,9 @@ adventures:
¡El jugador que se acerque mas a 21 sin pasarse gana!
¡Buena suerte!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -458,9 +461,9 @@ adventures:
puntos = puntos + 10
{elif} carta_3 == 'As':
{if} puntos > 11:
- puntos = puntos + 11
- {else}:
puntos = puntos + 1
+ {else}:
+ puntos = puntos + 11
{else}:
puntos = puntos + carta_3
{print} 'Tienes un' carta_3 ' extra (' puntos ' puntos)'
@@ -2670,10 +2673,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2716,7 +2719,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4075,6 +4078,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tres en raya
default_save_name: Tres en raya
@@ -4614,7 +4644,7 @@ adventures:
example_code: |
Pista:
```
- letra_elegida {is} {ask} '¿Qué letra te gustaría ver? F, E o L?
+ letra_elegida {is} {ask} '¿Qué letra te gustaría ver? F, E o L?'
{if} _
```
6:
@@ -4754,6 +4784,9 @@ adventures:
story_text: |
### Ejercicio
¡Vuelve a crear los dibujos con la tortuga!
+
+
+ Bracelet Designing program
example_code: |
Sugerencia: Programa para diseñar pulsera
diff --git a/content/adventures/et.yaml b/content/adventures/et.yaml
index a3c93e7f02b..f540a349fa3 100644
--- a/content/adventures/et.yaml
+++ b/content/adventures/et.yaml
@@ -397,8 +397,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -454,14 +456,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -605,7 +607,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2638,10 +2640,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2684,7 +2686,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3904,17 +3906,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4009,6 +4015,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4575,7 +4608,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4715,12 +4748,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/fa.yaml b/content/adventures/fa.yaml
index cab6cc0af84..31aa384f1e3 100644
--- a/content/adventures/fa.yaml
+++ b/content/adventures/fa.yaml
@@ -393,8 +393,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -450,14 +452,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -601,7 +603,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2633,10 +2635,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2679,7 +2681,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4012,6 +4014,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4582,7 +4611,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4722,12 +4751,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/fi.yaml b/content/adventures/fi.yaml
index 7d91a6bf970..1eb187b6f09 100644
--- a/content/adventures/fi.yaml
+++ b/content/adventures/fi.yaml
@@ -410,8 +410,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -467,14 +469,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -616,7 +618,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2656,10 +2658,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2702,7 +2704,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3974,7 +3976,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4079,6 +4081,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4650,7 +4679,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4790,12 +4819,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/fr.yaml b/content/adventures/fr.yaml
index 067a3b7ceb8..e68ce1d84ef 100644
--- a/content/adventures/fr.yaml
+++ b/content/adventures/fr.yaml
@@ -409,8 +409,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -466,14 +468,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -2702,10 +2704,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2748,7 +2750,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4019,17 +4021,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4124,6 +4130,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4702,7 +4735,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4842,6 +4875,9 @@ adventures:
story_text: |
### Exercice
Refait les dessins avec la tortue !
+
+
+ Bracelet Designing program
example_code: |
Hint: Bracelet designing program
diff --git a/content/adventures/fy.yaml b/content/adventures/fy.yaml
index 8748962d3dd..dc740dc76b7 100644
--- a/content/adventures/fy.yaml
+++ b/content/adventures/fy.yaml
@@ -392,8 +392,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -449,14 +451,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -599,7 +601,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2714,10 +2716,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2760,7 +2762,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4130,6 +4132,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4699,7 +4728,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4839,12 +4868,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/he.yaml b/content/adventures/he.yaml
index d8f67323803..fadc4e8997b 100644
--- a/content/adventures/he.yaml
+++ b/content/adventures/he.yaml
@@ -393,8 +393,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -450,14 +452,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -601,7 +603,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2622,10 +2624,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2668,7 +2670,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3901,17 +3903,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4006,6 +4012,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4572,7 +4605,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4712,12 +4745,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/hi.yaml b/content/adventures/hi.yaml
index 11f4127db33..d151152e364 100644
--- a/content/adventures/hi.yaml
+++ b/content/adventures/hi.yaml
@@ -400,8 +400,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -457,14 +459,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -607,7 +609,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2667,10 +2669,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2713,7 +2715,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3943,17 +3945,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4048,6 +4054,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4622,7 +4655,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4762,12 +4795,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/hu.yaml b/content/adventures/hu.yaml
index 39eb88e7536..126ae5ec965 100644
--- a/content/adventures/hu.yaml
+++ b/content/adventures/hu.yaml
@@ -390,8 +390,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -447,14 +449,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -593,7 +595,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2669,10 +2671,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2715,7 +2717,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4079,6 +4081,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4646,7 +4675,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4786,12 +4815,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/ia.yaml b/content/adventures/ia.yaml
index 53ba3e5d46c..f1e68d8e139 100644
--- a/content/adventures/ia.yaml
+++ b/content/adventures/ia.yaml
@@ -399,8 +399,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -456,9 +458,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -615,7 +617,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -1328,7 +1330,7 @@ adventures:
```
13:
story_text: |
- In the previous levels you learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
+ In the previous levels you've learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
In this system you have to give both the correct username and the correct password.
In this level you will learn the `{and}` command that will make this code a lot shorter and more understandable!
@@ -1347,7 +1349,7 @@ adventures:
```
14:
story_text: |
- With the program below you can calculate if you've passed a subject at school (so, a grade of six or higher).
+ With the example code you can calculate if you've passed a subject at school (so, a grade of six or higher).
You can see this code is extremely inefficient, due to the very long code in line 5.
All the different grades from 1 to 5 had to be programmed separately. Lucky for you, in this level you'll learn how to do this without this extremely long code!
example_code: |
@@ -2689,10 +2691,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2735,7 +2737,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3999,7 +4001,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Tip: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4104,6 +4106,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4640,7 +4669,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4780,12 +4809,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/id.yaml b/content/adventures/id.yaml
index 55286c0a3f5..729032b1bba 100644
--- a/content/adventures/id.yaml
+++ b/content/adventures/id.yaml
@@ -391,6 +391,8 @@ adventures:
The player who gets closest to 21, without going over it, wins!
Have fun!
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -446,9 +448,9 @@ adventures:
poin = poin + 10
{elif} kartu_3 == 'Ace':
{if} poin > 11:
- poin = poin + 11
- {else}:
poin = poin + 1
+ {else}:
+ poin = poin + 11
{else}:
poin = poin + kartu_3
{print} 'Anda mendapatkan tambahan ' kartu_3 ' (' poin ' poin)'
@@ -2637,10 +2639,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2683,7 +2685,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4008,6 +4010,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4568,7 +4597,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4708,12 +4737,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/it.yaml b/content/adventures/it.yaml
index b83920549f6..f0fc0c60c93 100644
--- a/content/adventures/it.yaml
+++ b/content/adventures/it.yaml
@@ -417,6 +417,9 @@ adventures:
Vince il giocatore che si avvicina di più al 21, senza superarlo!
Divertiti!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -472,9 +475,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
print 'You get an extra ' card_3 ' (' points ' points)'
@@ -619,7 +622,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2710,10 +2713,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2756,7 +2759,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3950,17 +3953,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4055,6 +4062,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tris
default_save_name: Tic
@@ -4623,7 +4657,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4763,12 +4797,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/ja.yaml b/content/adventures/ja.yaml
index 2c92c4ead9a..1cdbeab5a91 100644
--- a/content/adventures/ja.yaml
+++ b/content/adventures/ja.yaml
@@ -393,8 +393,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -450,14 +452,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -601,7 +603,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2621,10 +2623,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2667,7 +2669,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3901,17 +3903,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4006,6 +4012,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4572,7 +4605,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4712,12 +4745,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/kmr.yaml b/content/adventures/kmr.yaml
index f1f00c03e78..45a31b19edb 100644
--- a/content/adventures/kmr.yaml
+++ b/content/adventures/kmr.yaml
@@ -399,8 +399,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -456,9 +458,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -605,7 +607,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2650,10 +2652,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2696,7 +2698,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3934,7 +3936,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4039,6 +4041,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4607,7 +4636,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4747,12 +4776,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/ko.yaml b/content/adventures/ko.yaml
index 9235927cd8d..0c363297953 100644
--- a/content/adventures/ko.yaml
+++ b/content/adventures/ko.yaml
@@ -399,6 +399,9 @@ adventures:
넘어가지 않고 21에 가장 근접한 선수가 승리!
즐겁게 보내세요!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -454,9 +457,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -2698,10 +2701,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2744,7 +2747,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4003,7 +4006,7 @@ adventures:
### 연습문제
Can you add the right amount of indentation to each line to make the song play correctly?
- Tip: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4108,6 +4111,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4644,7 +4674,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4784,12 +4814,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/mi.yaml b/content/adventures/mi.yaml
index 508175cdf84..e8e23ddb45c 100644
--- a/content/adventures/mi.yaml
+++ b/content/adventures/mi.yaml
@@ -399,8 +399,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -456,9 +458,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -615,7 +617,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -1351,7 +1353,7 @@ adventures:
```
13:
story_text: |
- In the previous levels you learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
+ In the previous levels you've learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
In this system you have to give both the correct username and the correct password.
In this level you will learn the `{and}` command that will make this code a lot shorter and more understandable!
@@ -1370,7 +1372,7 @@ adventures:
```
14:
story_text: |
- With the program below you can calculate if you've passed a subject at school (so, a grade of six or higher).
+ With the example code you can calculate if you've passed a subject at school (so, a grade of six or higher).
You can see this code is extremely inefficient, due to the very long code in line 5.
All the different grades from 1 to 5 had to be programmed separately. Lucky for you, in this level you'll learn how to do this without this extremely long code!
example_code: |
@@ -2712,10 +2714,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2758,7 +2760,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4022,7 +4024,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Tip: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4127,6 +4129,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4664,7 +4693,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4804,12 +4833,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/nb_NO.yaml b/content/adventures/nb_NO.yaml
index 76b2af443a1..c387a23b5ac 100644
--- a/content/adventures/nb_NO.yaml
+++ b/content/adventures/nb_NO.yaml
@@ -388,8 +388,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -445,14 +447,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -591,7 +593,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2621,10 +2623,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2667,7 +2669,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3995,6 +3997,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4569,7 +4598,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4709,12 +4738,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/nl.yaml b/content/adventures/nl.yaml
index c5244c23e61..037c3d57f61 100644
--- a/content/adventures/nl.yaml
+++ b/content/adventures/nl.yaml
@@ -361,7 +361,11 @@ adventures:
description: Probeer zo dicht mogelijk bij 21 te komen
levels:
17:
- story_text: "Blackjack is een simpel kaartspelletje waarbij je zo dicht mogelijk bij 21 punten moet komen. Je krijgt twee kaarten. Elke kaart is het getal waard dat erop staat, en de kaarten met plaatjes (Boer, Vrouw, Heer) zijn 10 punten waard.\nDe Aas is 1 of 11 punten waard (dat mag je zelf kiezen). De dealer, jouw tegenstander, krijgt ook twee kaarten.\nAls je wil, mag je een derde kaart pakken en die punten worden bij jouw score opgeteld. De dealer mag ook een extra kaart pakken.\nMaar pas op dat je nooit over de 21 punten heengaat, want dan verlies je!\nDe speler die het dichtst bij de 21 punten komt, zonder eroverheen te gaan, wint! \n\nVeel plezier!\n"
+ story_text: |
+ Blackjack is een simpel kaartspelletje waarbij je zo dicht mogelijk bij 21 punten moet komen. Je krijgt twee kaarten. Elke kaart is het getal waard dat erop staat, en de kaarten met plaatjes (Boer, Vrouw, Heer) zijn 10 punten waard.\nDe Aas is 1 of 11 punten waard (dat mag je zelf kiezen). De dealer, jouw tegenstander, krijgt ook twee kaarten.\nAls je wil, mag je een derde kaart pakken en die punten worden bij jouw score opgeteld. De dealer mag ook een extra kaart pakken.\nMaar pas op dat je nooit over de 21 punten heengaat, want dan verlies je!\nDe speler die het dichtst bij de 21 punten komt, zonder eroverheen te gaan, wint!
+ Veel plezier!
+ ### Opdracht
+ Dit programma werkt prima, maar de code is verschrikkelijk lang en omslachting. Kun jij de code opruimen en inkorten door fucnties te gebruiken?
example_code: |
```
{print} 'BLACKJACK'
@@ -417,9 +421,9 @@ adventures:
punten = punten + 10
{elif} kaart_3 == 'Aas':
{if} punten > 11:
- punten = punten + 11
- {else}:
punten = punten + 1
+ {else}:
+ punten = punten + 11
{else}:
punten = punten + kaart_3
print 'Je krijgt een extra ' kaart_3 ' (' punten ' punten)'
@@ -578,7 +582,7 @@ adventures:
### Opdracht 1
Maak het sommenoefenprogramma nu extra moeilijk. De speler moet twee sommen achter elkaar goed hebben. Maak de codes op de streepjes af.
- ### Opdracht 2 (extra)
+ ### Opdracht 2
Sommen hebben soms meerdere goede antwoorden. Je kan 10 bijvoorbeeld delen door 5, maar ook door 2. Dus de som 'Door welk getal kan je 10 delen?' heeft twee goede antwoorden.
Verzin zelf een som met meerdere antwoorden, vraag de speler om een antwoord en reken ze beide goed met `{or}`.
Begin opnieuw met een leeg programmeerveld en programmeer het helemaal zelf.
@@ -2647,10 +2651,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2693,7 +2697,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4076,6 +4080,34 @@ adventures:
{print} 'die drinkt zijn melk zo zoetjes'
{call} _
```
+ 16:
+ story_text: |
+ ### Opdracht
+ Maak het liedje af door de ontbrekende regels en variabelen in te vullen. Vul daarna de lijsten aan met nog meer dieren die iets doen, zoals leeuwen die samen geeuwen, koeien die bootje roeien of...?
+ example_code: |
+ ```
+ dieren = ['beren', 'apen', 'bijen', _]
+ lijdend_voorwerp = ['broodjes', 'lekker', 'auto, _']
+ werkwoord = ['smeren', 'slapen', 'rijden', _]
+ _
+ {print} 'Ik zag twee ' dieren[i] ' ' lijdend_voorwerp[i] ' ' werkwoord[i]
+ {print} 'Oh het was een wonder'
+ {print} 'Het was een wonder, boven wonder'
+ {print} 'Dat die ' _ ' ' _ ' konden'
+ {print} 'Hi hi hi'
+ {print} 'Ha ha ha'
+ {print} 'Ik stond erbij en ik keek er naar'
+ {sleep} 5
+ {clear}
+ ```
+ story_text_2: |
+ ### Opdracht 2
+ Maak nu op dezelfde manier je eigen code voor het liedje 'de wielen van de bus'!
+ example_code_2: |
+ ```
+ voorwerp = ['wielen', 'deuren', _]
+ movement = [ 'rond en rond', 'open en dicht', _]
+ ```
tic:
name: Boter Kaas en Eieren
default_save_name: Boter
@@ -4722,6 +4754,8 @@ adventures:
story_text: |
### Opdracht
Maak een code om armbanden te ontwerpen!
+
+ Bracelet Designing program
example_code: |
Hint voor het ontwerpen van armbanden:
diff --git a/content/adventures/pa_PK.yaml b/content/adventures/pa_PK.yaml
index f38f8329682..b7f6c28c438 100644
--- a/content/adventures/pa_PK.yaml
+++ b/content/adventures/pa_PK.yaml
@@ -393,8 +393,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -450,14 +452,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -601,7 +603,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2626,10 +2628,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2672,7 +2674,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3905,17 +3907,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4010,6 +4016,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4576,7 +4609,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4716,12 +4749,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/pap.yaml b/content/adventures/pap.yaml
index 5c6db39404b..326ff1aff77 100644
--- a/content/adventures/pap.yaml
+++ b/content/adventures/pap.yaml
@@ -396,8 +396,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -453,9 +455,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -610,7 +612,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -1340,7 +1342,7 @@ adventures:
```
13:
story_text: |
- In the previous levels you learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
+ In the previous levels you've learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
In this system you have to give both the correct username and the correct password.
In this level you will learn the `{and}` command that will make this code a lot shorter and more understandable!
@@ -1359,7 +1361,7 @@ adventures:
```
14:
story_text: |
- With the program below you can calculate if you've passed a subject at school (so, a grade of six or higher).
+ With the example code you can calculate if you've passed a subject at school (so, a grade of six or higher).
You can see this code is extremely inefficient, due to the very long code in line 5.
All the different grades from 1 to 5 had to be programmed separately. Lucky for you, in this level you'll learn how to do this without this extremely long code!
example_code: |
@@ -2687,10 +2689,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2733,7 +2735,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3986,7 +3988,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Tip: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4088,6 +4090,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4625,7 +4654,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4765,12 +4794,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/pl.yaml b/content/adventures/pl.yaml
index ccde84b0782..cdacd222f16 100644
--- a/content/adventures/pl.yaml
+++ b/content/adventures/pl.yaml
@@ -381,6 +381,9 @@ adventures:
Gracz, który zbliży się do liczby 21, nie przekraczając jej, wygrywa!
Baw się dobrze!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -436,9 +439,9 @@ adventures:
punkty = punkty + 10
{elif} karta_3 == 'As':
{if} punkty > 11:
- punkty = punkty + 11
- {else}:
punkty = punkty + 1
+ {else}:
+ punkty = punkty + 11
{else}:
punkty = punkty + karta_3
{print} 'Dostajesz dodatkowo ' karta_3 ' (' punkty ' punktów)'
@@ -2585,10 +2588,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2631,7 +2634,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3862,6 +3865,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Kółko i Krzyżyk
default_save_name: Tic
@@ -4424,7 +4454,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4564,12 +4594,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/pt_BR.yaml b/content/adventures/pt_BR.yaml
index b87eb34b0b3..ea049ef6ab6 100644
--- a/content/adventures/pt_BR.yaml
+++ b/content/adventures/pt_BR.yaml
@@ -376,6 +376,9 @@ adventures:
The player who gets closest to 21, without going over it, wins!
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'VINTE-E-UM'
@@ -431,9 +434,9 @@ adventures:
pontos = pontos + 10
{elif} carta_3 == 'Ás':
{if} pontos > 11:
- pontos = pontos + 11
- {else}:
pontos = pontos + 1
+ {else}:
+ pontos = pontos + 11
{else}:
pontos = pontos + carta_3
{print} 'Você pegou uma carta extra: ' carta_3 ' (' pontos ' pontos)'
@@ -2619,10 +2622,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2665,7 +2668,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3972,6 +3975,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Jogo da velha
default_save_name: Tic
@@ -4542,7 +4572,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4682,12 +4712,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/pt_PT.yaml b/content/adventures/pt_PT.yaml
index f7a6b95bacf..a45eabfd033 100644
--- a/content/adventures/pt_PT.yaml
+++ b/content/adventures/pt_PT.yaml
@@ -356,8 +356,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -413,14 +415,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -560,7 +562,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2550,10 +2552,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2596,7 +2598,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3932,6 +3934,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4504,7 +4533,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4644,12 +4673,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/ro.yaml b/content/adventures/ro.yaml
index bfc59f79232..206ea4bc2bd 100644
--- a/content/adventures/ro.yaml
+++ b/content/adventures/ro.yaml
@@ -399,8 +399,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -456,14 +458,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -605,7 +607,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2650,10 +2652,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2696,7 +2698,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3968,7 +3970,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4073,6 +4075,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4612,7 +4641,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4752,12 +4781,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/ru.yaml b/content/adventures/ru.yaml
index db9f7fdf395..951d4965ad5 100644
--- a/content/adventures/ru.yaml
+++ b/content/adventures/ru.yaml
@@ -384,6 +384,9 @@ adventures:
Побеждает тот игрок, который ближе всего подойдет к 21 очку, не превысив его!
Веселитесь!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -439,9 +442,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
print 'You get an extra ' card_3 ' (' points ' points)'
@@ -583,7 +586,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2610,10 +2613,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2656,7 +2659,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4024,6 +4027,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Крестики-нолики
default_save_name: Тик
@@ -4594,7 +4624,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4734,12 +4764,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/sq.yaml b/content/adventures/sq.yaml
index 33e46cde3fe..a326f58075e 100644
--- a/content/adventures/sq.yaml
+++ b/content/adventures/sq.yaml
@@ -410,6 +410,9 @@ adventures:
Lojtari që afrohet më shumë me 21, pa e kaluar atë, fiton!
Argëtohu!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -465,9 +468,9 @@ adventures:
pikë = pikë + 10
{elif} karta_3 == 'Njësh':
{if} pikë > 11:
- pikë = pikë + 11
- {else}:
pikë = pikë + 1
+ {else}:
+ pikë = pikë + 11
{else}:
pikë = pikë + karta_3
{print} 'Ju merrni një shtesë ' karta_3 ' (' pikë ' pikë)'
@@ -609,7 +612,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2640,10 +2643,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2686,7 +2689,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4048,6 +4051,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tik tak tou
default_save_name: Tik
@@ -4608,7 +4638,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4748,12 +4778,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/sr.yaml b/content/adventures/sr.yaml
index 9f3b1a19a35..a82e0aec1db 100644
--- a/content/adventures/sr.yaml
+++ b/content/adventures/sr.yaml
@@ -381,8 +381,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -438,9 +440,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -587,7 +589,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2617,10 +2619,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2663,7 +2665,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3901,7 +3903,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4006,6 +4008,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4574,7 +4603,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4714,12 +4743,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/sv.yaml b/content/adventures/sv.yaml
index 74f76c5d9ed..9de1e1ae7e7 100644
--- a/content/adventures/sv.yaml
+++ b/content/adventures/sv.yaml
@@ -413,6 +413,9 @@ adventures:
Den spelare som kommer närmast 21, utan att gå över det, vinner!
Ha det så kul!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -468,9 +471,9 @@ adventures:
poäng = poäng + 10
{elif} kort_3 == 'ess':
{if} poäng > 11:
- poäng = poäng + 11
- {else}:
poäng = poäng + 1
+ {else}:
+ poäng = poäng + 11
{else}:
poäng = poäng + kort_3
{print} 'Du får ett extra ' kort_3 ' (' poäng ' poäng)'
@@ -2710,10 +2713,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2756,7 +2759,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4127,6 +4130,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Luffarschack
default_save_name: Tripp
@@ -4663,7 +4693,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4803,12 +4833,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/sw.yaml b/content/adventures/sw.yaml
index b9a886dc63f..b7bfa9f525e 100644
--- a/content/adventures/sw.yaml
+++ b/content/adventures/sw.yaml
@@ -392,8 +392,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -449,14 +451,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -599,7 +601,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2692,10 +2694,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2738,7 +2740,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4106,6 +4108,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4678,7 +4707,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4818,12 +4847,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/te.yaml b/content/adventures/te.yaml
index e0b71953531..b9c2d7d2920 100644
--- a/content/adventures/te.yaml
+++ b/content/adventures/te.yaml
@@ -407,8 +407,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -464,14 +466,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -613,7 +615,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2655,10 +2657,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2701,7 +2703,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3973,7 +3975,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4078,6 +4080,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4649,7 +4678,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4789,12 +4818,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/th.yaml b/content/adventures/th.yaml
index 5e8031d8182..da9a43a2969 100644
--- a/content/adventures/th.yaml
+++ b/content/adventures/th.yaml
@@ -393,8 +393,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -450,14 +452,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -601,7 +603,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2628,10 +2630,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2674,7 +2676,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3907,17 +3909,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4012,6 +4018,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4578,7 +4611,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4718,12 +4751,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/tl.yaml b/content/adventures/tl.yaml
index 8de60d896e0..c6145537943 100644
--- a/content/adventures/tl.yaml
+++ b/content/adventures/tl.yaml
@@ -409,8 +409,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -466,14 +468,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -615,7 +617,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2657,10 +2659,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2703,7 +2705,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3975,7 +3977,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4080,6 +4082,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4651,7 +4680,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4791,12 +4820,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/tn.yaml b/content/adventures/tn.yaml
index 3c3d30a2ca9..0fb3115f3f3 100644
--- a/content/adventures/tn.yaml
+++ b/content/adventures/tn.yaml
@@ -393,8 +393,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -450,14 +452,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -601,7 +603,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2637,10 +2639,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2683,7 +2685,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3921,17 +3923,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4026,6 +4032,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4592,7 +4625,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4732,12 +4765,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/tr.yaml b/content/adventures/tr.yaml
index 178494caea2..b9e98bc34a4 100644
--- a/content/adventures/tr.yaml
+++ b/content/adventures/tr.yaml
@@ -412,6 +412,9 @@ adventures:
21'i aşmadan 21'e en çok yaklaşan oyuncu kazanır!
İyi eğlenceler!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'YİRMİBİR'
@@ -467,9 +470,9 @@ adventures:
puanlar = puanlar + 10
{elif} kart_3 == 'As':
{if} puanlar < 11:
- puanlar = puanlar + 11
- {else}:
puanlar = puanlar + 1
+ {else}:
+ puanlar = puanlar + 11
{else}:
puanlar = puanlar + kart_3
{print} 'Çektiğin ek kart bir ' kart_3 ' (' puanlar ' puan)'
@@ -2734,10 +2737,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2780,7 +2783,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -4160,6 +4163,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4706,7 +4736,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4846,12 +4876,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/uk.yaml b/content/adventures/uk.yaml
index d10705e2a8b..701fab1da1e 100644
--- a/content/adventures/uk.yaml
+++ b/content/adventures/uk.yaml
@@ -400,8 +400,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -457,14 +459,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -608,7 +610,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2627,10 +2629,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2673,7 +2675,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3908,17 +3910,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4013,6 +4019,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4579,7 +4612,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4719,12 +4752,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/ur.yaml b/content/adventures/ur.yaml
index 096a45bb13e..8301c3fc037 100644
--- a/content/adventures/ur.yaml
+++ b/content/adventures/ur.yaml
@@ -393,8 +393,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -450,14 +452,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -601,7 +603,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2634,10 +2636,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2680,7 +2682,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3913,17 +3915,21 @@ adventures:
```
12:
story_text: |
- In this song we can make it even easier to program '{if} you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+ In this song we can make it even easier to program 'if you're happy and you know it, clap your hands'. Because we can put all of the actions in a variable, check it out:
+
+ ### Exercise
+ Can you add the right amount of indentation to each line to make the song play correctly?
+ Hint: Not all lines need indentation.
example_code: |
```
- actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
- {for} action {in} actions
- {for} i {in} {range} 1 {to} 2
- {print} 'if youre happy and you know it'
- {print} action
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it'
- {print} action
+ _ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
+ _ {for} action {in} actions
+ _ {for} i {in} {range} 1 {to} 2
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
+ _ {print} 'if youre happy and you know it and you really want to show it'
+ _ {print} 'if youre happy and you know it'
+ _ {print} action
```
13:
story_text: |
@@ -4018,6 +4024,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4584,7 +4617,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4724,12 +4757,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/vi.yaml b/content/adventures/vi.yaml
index f382854fac7..3254cf9bbbd 100644
--- a/content/adventures/vi.yaml
+++ b/content/adventures/vi.yaml
@@ -426,8 +426,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -483,14 +485,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -632,7 +634,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2678,10 +2680,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2724,7 +2726,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3996,7 +3998,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4101,6 +4103,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4672,7 +4701,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4812,12 +4841,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/content/adventures/zh_Hans.yaml b/content/adventures/zh_Hans.yaml
index 33ac906ecc7..7c6bde1aa1f 100644
--- a/content/adventures/zh_Hans.yaml
+++ b/content/adventures/zh_Hans.yaml
@@ -387,6 +387,9 @@ adventures:
最接近21但没有超过它的玩家获胜。
好好享受游戏吧!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -442,9 +445,9 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
{print} 'You get an extra ' card_3 ' (' points ' points)'
@@ -2628,7 +2631,7 @@ adventures:
```
12:
story_text: |
- 在你的歌曲中使用函数!正如您在示例代码中看到的,您可以为Twinkle Twinkle little star的每一行创建一个函数。一旦您编写了前三行代码,您所要做的就是按照您想要的顺序调用函数。
+ 在你的歌曲中使用函数!正如您在示例代码中看到的,您可以为Twinkle Twinkle Little Star的每一行创建一个函数。一旦您编写了前三行代码,您所要做的就是按照您想要的顺序调用函数。
### 练习
完成《闪烁小星星》这首歌。
@@ -3999,6 +4002,33 @@ adventures:
{print} '好像一颗钻石'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: 井字游戏
default_save_name: 井字游戏
@@ -4535,7 +4565,7 @@ adventures:
example_code: |
提示:
```
- 选择的字母 {is} {ask} '您想看哪个字母? F, E 或 L?
+ 选择的字母 {is} {ask} '您想看哪个字母? F, E 或 L?'
{if} _
```
6:
@@ -4675,6 +4705,8 @@ adventures:
story_text: |
### 练习
用小海龟重画图画!
+
+ Bracelet Designing program
example_code: |
提示: 手环设计程序
diff --git a/content/adventures/zh_Hant.yaml b/content/adventures/zh_Hant.yaml
index 85af584ef76..7f27252a402 100644
--- a/content/adventures/zh_Hant.yaml
+++ b/content/adventures/zh_Hant.yaml
@@ -409,8 +409,10 @@ adventures:
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!
-
Have fun!
+
+ ### Exercise
+ This code works fine, but it's awfully long and cumbersome. Can you shorten the code by using functions?
example_code: |
```
{print} 'BLACKJACK'
@@ -466,14 +468,14 @@ adventures:
points = points + 10
{elif} card_3 == 'Ace':
{if} points > 11:
- points = points + 11
- {else}:
points = points + 1
+ {else}:
+ points = points + 11
{else}:
points = points + card_3
- print 'You get an extra ' card_3 ' (' points ' points)'
+ {print} 'You get an extra ' card_3 ' (' points ' points)'
{else}:
- print 'No extra cards'
+ {print} 'No extra cards'
# Winner
{if} points > 21 {or} dealer_points > points {or} dealer_points == 21:
{print} 'You lose'
@@ -615,7 +617,7 @@ adventures:
### 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 Extra
+ ### 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.
@@ -2657,10 +2659,10 @@ adventures:
```
12:
story_text: |
- Use functions in you 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.
+ Use functions in your songs! As you can see in the example code, you can make a function for each line of Twinkle Twinkle Little Star. Once you've programmed the first three lines, all you have to do is call the functions in the order you want them played in.
### Exercise
- Finish the song of Twinkle Twinkle little star.
+ Finish the song of Twinkle Twinkle Little Star.
Then look back at all the songs you've programmed in the levels before, can you make those codes better and shorter using functions too?
example_code: |
```
@@ -2703,7 +2705,7 @@ adventures:
```
13:
story_text: |
- You can use a function with an argument for songs that have line taht are almost the same, but slightly different each time.
+ You can use a function with an argument for songs that have line that are almost the same, but slightly different each time.
One example is the song 'Yankee Doodle'. The first 4 notes of the first lines are the same, buyt each time they are followed by a different couple of notes.
### Exercise
@@ -3975,7 +3977,7 @@ adventures:
### Exercise
Can you add the right amount of indentation to each line to make the song play correctly?
- Mind: Not all lines need indentation
+ Hint: Not all lines need indentation.
example_code: |
```
_ actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'
@@ -4080,6 +4082,33 @@ adventures:
{print} 'Like a diamond in the sky'
{call} _
```
+ 16:
+ story_text: |
+ ### Exercise
+ Finish the nursery rhyme!
+ example_code: |
+ ```
+ number = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
+ object = ['on his drum', 'on his shoe', 'on his knee', 'on his door', 'on his hive', 'on his sticks', 'up in heaven', 'on his gate', 'on his vine', 'once again']
+
+ _
+ {print} 'This old man'
+ {print} 'He played ' _
+ {print} 'He played knick-knack ' _
+ {print} 'With a knick-knack paddywhack'
+ {print} 'Give the dog a bone'
+ {print} 'This old man came rolling home'
+ {sleep} 8
+ {clear}
+ ```
+ story_text_2: |
+ ### Exersice 2
+ Now create your own code for the nursery rhyme 'The wheels on the bus' on the same way!
+ example_code_2: |
+ ```
+ object = ['wheels', 'doors', _]
+ movement = [ 'round and round', 'open and shut', _]
+ ```
tic:
name: Tic Tac Toe
default_save_name: Tic
@@ -4651,7 +4680,7 @@ adventures:
example_code: |
Hint:
```
- chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?
+ chosen_letter {is} {ask} 'Which letter would you like to see? F, E or L?'
{if} _
```
6:
@@ -4791,12 +4820,10 @@ adventures:
story_text: |
### Exercise
Recreate the drawings with the turtle!
+ Hint: Bracelet designing program. Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
+
+ Bracelet Designing program
example_code: |
- Hint: Bracelet designing program
-
-
- Firstly, define a function **for each shape** you want to use on the bacelet. Then, add the shapes to the bacelet like this:
-
```
{define} draw_a_square
_
diff --git a/hedy_content.py b/hedy_content.py
index 9b8d5c942c7..4c2aec7ecf8 100644
--- a/hedy_content.py
+++ b/hedy_content.py
@@ -230,8 +230,8 @@
12: [
'default',
'maths',
- 'functions',
'quotation_marks',
+ 'functions',
'story',
'fortune',
'music',
@@ -297,6 +297,7 @@
'random_command',
'haunted',
'songs',
+ 'songs_2',
'language',
'debugging',
'quiz',