diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
similarity index 85%
rename from PULL_REQUEST_TEMPLATE.md
rename to .github/PULL_REQUEST_TEMPLATE.md
index d8b0c0d2309..7bdc76ff9e8 100644
--- a/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -19,19 +19,19 @@ _Changes in detail. For example: "**Adds** translations of levels 1 to 12 to Pol
**Fixes _issue or discussion number_**
Always link the number of the issue or of the discussion that your PR concerns.
-Tip, if you use the word `fixes` before the issue number in this description, the related issue will automatically close then the PR is merged!
+Tip, if you use the word `fixes` before the issue number in this description, the related issue will automatically close then the PR is merged!
**How to test**
-* If this is a UI change: _describe how to run your code to see it in action. See this https://github.com/Felienne/hedy/pull/880#issue-1016304308 for an example_
+* If this is a UI change: _describe how to run your code to see it in action. See this https://github.com/hedyorg/hedy/pull/880#issue-1016304308 for an example_
* If this is a language change: _add a few tests showing the difference_
**Checklist**
-Done? Check if you have it all in place using this list:*
-
+Done? Check if you have it all in place using this list: (mark with x if done)
+
- [ ] Contains one of the PR categories in the name
- [ ] Describes changes in the format above
-- [ ] Links to an existing issue or discussion
+- [ ] Links to an existing issue or discussion
- [ ] Has a "How to test" section
If you're unsure about any of these, don't hesitate to ask. We're here to help!
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1a1a48c84c9..06c3d40f24f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,9 +1,9 @@
repos:
- - repo: https://github.com/pre-commit/mirrors-autopep8
- rev: v2.0.2
+ - repo: https://github.com/hhatto/autopep8
+ rev: v2.0.4
hooks:
- id: autopep8
- repo: https://github.com/pycqa/flake8
- rev: 6.0.0
+ rev: 6.1.0
hooks:
- id: flake8
diff --git a/CITATION.cff b/CITATION
similarity index 100%
rename from CITATION.cff
rename to CITATION
diff --git a/License.txt b/LICENSE
similarity index 100%
rename from License.txt
rename to LICENSE
diff --git a/README.md b/README.md
index be3adf83caf..b34afc34649 100644
--- a/README.md
+++ b/README.md
@@ -6,15 +6,26 @@ Hedy is a gradual programming language aimed at teaching programming and teachin
The latest version of Hedy can be found at [hedy.org](https://hedy.org).
+# Repo stats
+
+![](https://img.shields.io/github/commit-activity/m/hedyorg/hedy)
+![](https://img.shields.io/github/last-commit/hedyorg/hedy)
+![](https://img.shields.io/github/stars/hedyorg/hedy)
+![](https://img.shields.io/github/contributors/hedyorg/hedy)
+![](https://img.shields.io/github/issues/hedyorg/hedy)
+
+![Repo Beats statistics](https://repobeats.axiom.co/api/embed/a3206e7c42293ee71446a7081b9c98636953501c.svg "Repobeats analytics image")
+
+
What's next?
------------
-If you want to see what the core team will work on next, you can follow [our Project](https://github.com/Felienne/hedy/projects/5), the [Discussions](https://github.com/Felienne/hedy/discussions) or join our [Discord](https://discord.gg/8yY7dEme9r) channel.
+If you want to see what the core team will work on next, you can follow [our Project Board](https://github.com/orgs/hedyorg/projects/1/views/5), the [Discussions](https://github.com/hedyorg/hedy/discussions) or join our [Discord](https://discord.gg/8yY7dEme9r) channel.
Živjo Hedy! Привет Hedy! !Hedy سلام
----------------------------------------------
-A simple way to help out Hedy is to [help us translate Hedy](TRANSLATING.md) using Weblate! You do not need programming experience or knowledge to translate Hedy. Below the current status, help us complete a language, or add a new one.
+A simple way to help out Hedy is to [help us translate Hedy](docs/TRANSLATING.md) using Weblate! You do not need programming experience or knowledge to translate Hedy. Below the current status, help us complete a language, or add a new one.
@@ -26,12 +37,12 @@ I have an idea for what you should build or improve!
Great! We have multiple ways of monitoring ideas.
-If it is a small fix, it is best to [make an issue](https://github.com/Felienne/hedy/issues/new/choose). Issues are meant for things we know that we want to work on, such as:
+If it is a small fix, it is best to [make an issue](https://github.com/hedyorg/hedy/issues/new/choose). Issues are meant for things we know that we want to work on, such as:
* Error messages that need to be improved
* Crashes or bugs
-If it is a new idea, [start a discussion](https://github.com/Felienne/hedy/discussions/categories/ideas). Discussions are a place to chat about stuff we do not know if we want to work on yet, or we are not sure how to do, such as:
+If it is a new idea, [start a discussion](https://github.com/hedyorg/hedy/discussions/categories/ideas). Discussions are a place to chat about stuff we do not know if we want to work on yet, or we are not sure how to do, such as:
* New keywords
* New meanings for existing keywords
@@ -42,6 +53,6 @@ Please note that we want to be a friendly and welcoming open source project. If
Want to help improve Hedy?
--------------------------
-We would love to have a few more programmers join the Hedy team as regular contributors! See how you can get started with contributing in our docs: [CONTRIBUTING.md](CONTRIBUTING.md).
+We would love to have a few more programmers join the Hedy team as regular contributors! See how you can get started with contributing in our docs: [CONTRIBUTING.md](docs/CONTRIBUTING.md).
-You can follow the [Discussions](https://github.com/Felienne/hedy/discussions) to stay up to date on things we are working on and considering. Full documentation including our design and design principles can be found [DESIGN.md](DESIGN.md)
+You can follow the [Project Board](https://github.com/orgs/hedyorg/projects/1/views/5) to see what we are currently working on, and [Discussions](https://github.com/hedyorg/hedy/discussions) to stay up to date on things we are considering. Full documentation including our design and design principles can be found [DESIGN.md](docs/DESIGN.md).
diff --git a/all_snippet_hashes.pkl b/all_snippet_hashes.pkl
index 7dd7060b0f7..5fc4c517c22 100644
Binary files a/all_snippet_hashes.pkl and b/all_snippet_hashes.pkl differ
diff --git a/app.py b/app.py
index eb7c3c5dfe2..563d7179695 100644
--- a/app.py
+++ b/app.py
@@ -356,6 +356,7 @@ def setup_language():
session['lang'] = request.accept_languages.best_match(
ALL_LANGUAGES.keys(), 'en')
g.lang = session['lang']
+ querylog.log_value(lang=session['lang'])
if 'keyword_lang' not in session:
session['keyword_lang'] = g.lang if g.lang in ALL_KEYWORD_LANGUAGES.keys() else 'en'
@@ -475,10 +476,11 @@ def parse():
return "body.code must be a string", 400
if 'level' not in body:
return "body.level must be a string", 400
- if 'skip_faulty' not in body:
- return "body.skip_faulty must be a boolean", 400
if 'adventure_name' in body and not isinstance(body['adventure_name'], str):
return "if present, body.adventure_name must be a string", 400
+ # TODO: Once we figure out whats wrong with the skip faulty code, we need to reinstantiate this
+ # if 'skip_faulty' not in body:
+ # return "body.skip_faulty must be a boolean", 400
error_check = False
if 'error_check' in body:
@@ -486,7 +488,7 @@ def parse():
code = body['code']
level = int(body['level'])
- skip_faulty = bool(body['skip_faulty'])
+ skip_faulty = False # bool(body['skip_faulty'])
# Language should come principally from the request body,
# but we'll fall back to browser default if it's missing for whatever
@@ -527,18 +529,18 @@ def parse():
try:
response['Code'] = transpile_result.code
- source_map_result = transpile_result.source_map.get_result()
-
- for i, mapping in source_map_result.items():
- if mapping['error'] is not None:
- source_map_result[i]['error'] = translate_error(
- source_map_result[i]['error'].error_code,
- source_map_result[i]['error'].arguments,
- keyword_lang
- )
-
- response['source_map'] = source_map_result
-
+ # source_map_result = transpile_result.source_map.get_result()
+
+ # for i, mapping in source_map_result.items():
+ # if mapping['error'] is not None:
+ # source_map_result[i]['error'] = translate_error(
+ # source_map_result[i]['error'].error_code,
+ # source_map_result[i]['error'].arguments,
+ # keyword_lang
+ # )
+
+ # response['source_map'] = source_map_result
+ response['source_map'] = transpile_result.source_map.get_result()
if transpile_result.has_pygame:
response['has_pygame'] = True
@@ -1662,12 +1664,12 @@ def explore():
achievement = ACHIEVEMENTS.add_single_achievement(
current_user()['username'], "indiana_jones")
- programs = normalize_explore_programs(DATABASE.get_public_programs(
+ programs = normalize_public_programs(DATABASE.get_public_programs(
limit=40,
level_filter=level,
language_filter=language,
adventure_filter=adventure))
- favourite_programs = normalize_explore_programs(DATABASE.get_hedy_choices())
+ favourite_programs = normalize_public_programs(DATABASE.get_hedy_choices())
adventures_names = hedy_content.Adventures(session['lang']).get_adventure_names()
@@ -1675,7 +1677,7 @@ def explore():
'explore.html',
programs=programs,
favourite_programs=favourite_programs,
- filtered_level=str(level),
+ filtered_level=str(level) if level else None,
achievement=achievement,
filtered_adventure=adventure,
filtered_lang=language,
@@ -1685,8 +1687,8 @@ def explore():
current_page='explore')
-def normalize_explore_programs(programs):
- """Normalize the content for all programs in the given array, for showing on the /explore page.
+def normalize_public_programs(programs):
+ """Normalize the content for all programs in the given array, for showing on the /explore or /user page.
Does the following thing:
@@ -2113,23 +2115,28 @@ def public_user_page(username):
if not user:
return utils.error_page(error=404, ui_message=gettext('user_not_private'))
user_public_info = DATABASE.get_public_profile_settings(username)
+ page = request.args.get('page', default=None, type=str)
if user_public_info:
- user_programs = DATABASE.public_programs_for_user(username)
+ user_programs = DATABASE.public_programs_for_user(username,
+ limit=10,
+ pagination_token=page)
+ next_page_token = user_programs.next_page_token
+ user_programs = normalize_public_programs(user_programs)
user_achievements = DATABASE.progress_by_username(username) or {}
favourite_program = None
if 'favourite_program' in user_public_info and user_public_info['favourite_program']:
favourite_program = DATABASE.program_by_id(
user_public_info['favourite_program'])
- if len(user_programs) >= 5:
- user_programs = user_programs[:5]
last_achieved = None
if user_achievements.get('achieved'):
last_achieved = user_achievements['achieved'][-1]
certificate_message = safe_format(gettext('see_certificate'), username=username)
+ print(user_programs)
# Todo: TB -> In the near future: add achievement for user visiting their own profile
-
+ next_page_url = url_for('public_user_page', username=username, **dict(request.args,
+ page=next_page_token)) if next_page_token else None
return render_template(
'public-page.html',
user_info=user_public_info,
@@ -2139,7 +2146,8 @@ def public_user_page(username):
programs=user_programs,
last_achieved=last_achieved,
user_achievements=user_achievements,
- certificate_message=certificate_message)
+ certificate_message=certificate_message,
+ next_page_url=next_page_url)
return utils.error_page(error=404, ui_message=gettext('user_not_private'))
diff --git a/build-tools/heroku/tailwind/styles.css b/build-tools/heroku/tailwind/styles.css
index e71f2f0e3c1..f027941774d 100644
--- a/build-tools/heroku/tailwind/styles.css
+++ b/build-tools/heroku/tailwind/styles.css
@@ -162,8 +162,10 @@ strong {
}
-.green-btn:hover:enabled {
+.green-btn:hover:enabled,
+a.green-btn:hover {
@apply bg-green-400 border-green-500;
+ @apply active:bg-green-700 active:border-green-700;
}
.red-btn {
@@ -173,6 +175,7 @@ strong {
.red-btn:hover {
@apply bg-red-400 border-red-500;
+ @apply active:bg-red-700 active:border-red-700;
}
.yellow-btn {
@@ -182,6 +185,7 @@ strong {
.yellow-btn:hover {
@apply bg-yellow-400 border-yellow-500;
+ @apply active:bg-yellow-700 active:border-yellow-700;
}
.pink-btn {
@@ -191,6 +195,7 @@ strong {
.pink-btn:hover {
@apply bg-pink-300 border-pink-400;
+ @apply active:bg-pink-700 active:border-pink-500;
}
.blue-btn {
@@ -205,6 +210,7 @@ strong {
.blue-btn:hover {
@apply bg-blue-400 border-blue-500;
+ @apply active:bg-blue-700 active:border-blue-700;
}
/* Styles only for use in MarkDown blocks */
@@ -294,6 +300,7 @@ code {
.btn:hover {
@apply bg-blue-400 border-blue-500;
+ @apply active:bg-blue-700 active:border-blue-700
}
.menubar-item {
@@ -817,3 +824,15 @@ div[class^="ace_incorrect_hedy_code"] {
cursor: pointer !important;
pointer-events: auto;
}
+
+.student_adventure_checkbox[disabled] {
+ @apply relative bg-gray-200 rounded border-gray-500 !important
+}
+
+.student_adventure_checkbox {
+ @apply relative bg-white rounded border-gray-500 !important
+}
+
+.student_adventure_checkbox:checked {
+ @apply relative bg-green-300 rounded border-gray-500 !important
+}
diff --git a/content/adventures/ar.yaml b/content/adventures/ar.yaml
index abc82b4335e..5f1a06976ea 100644
--- a/content/adventures/ar.yaml
+++ b/content/adventures/ar.yaml
@@ -154,7 +154,7 @@ adventures:
{print} "أنا أحب " حيوان
```
11:
- story_text: |-
+ story_text: |2-
`{print}` لا زال يعمل بالطريقة نفسها، ولكن أضفنا شكلاً جديداً من الأمر `{for}`. بامكاننا الان أن نكتب `{for} دورة {in} {range} ١ {to} ٥` وأن نستخدم بعدها المتغير `دورة` في البرنامج.
@@ -837,7 +837,7 @@ adventures:
description: Try linking a keyboard key to a command!
default_save_name: Pressed
print_command:
- name: print
+ name: "{print}"
levels:
1:
story_text: "## The print command\nYou can print text to the screen using the `{print}` command.\n"
@@ -875,7 +875,7 @@ adventures:
example_code_2: "```\n{print} Hello!\n{ask} What is your name?\n{echo} hello\n```\n"
example_code_3: "```\n_ How are you doing?\n_\n```\n"
start_code: "{print} Hello!\n{ask} What is your name?\n{echo} hello\n"
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
random_command:
@@ -892,11 +892,11 @@ adventures:
start_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}\n"
story_text_3: "### Exercise\nTry out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price!\nCan you do it? We have already put the first lines into the example code.\n"
example_code_3: "```\n{print} The big gameshow!\n{print} There are 3 suitcases in front of you...\nchosen {is} {ask} Which suitcase do you choose?\nprices {is} _\n_\n```\n"
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -943,7 +943,7 @@ adventures:
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
for_command:
@@ -956,7 +956,7 @@ adventures:
start_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal"
story_text: "## For\nIn this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements.\n`{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces."
example_code: "```\nanimals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal\n```\n"
- name: for
+ name: "{for}"
description: for command
default_save_name: for
maths:
@@ -993,7 +993,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -1012,7 +1012,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1021,7 +1021,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -1038,7 +1038,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -1049,7 +1049,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -1064,7 +1064,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1073,7 +1073,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1082,7 +1082,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1090,3 +1090,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/bg.yaml b/content/adventures/bg.yaml
index a50e86fc622..9f65ebd5272 100644
--- a/content/adventures/bg.yaml
+++ b/content/adventures/bg.yaml
@@ -171,7 +171,7 @@ adventures:
In the example code, we continue until a correct answer has been given.
If the correct answer is never given, the loop never ends!
- example_code: |
+ example_code: |2
```
answer = 0
@@ -186,7 +186,7 @@ adventures:
story_text: |-
We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.
You can use the square brackets as well to point out a place in the lists.
- example_code: |
+ example_code: |2
```
friends = ['Ahmed', 'Ben', 'Cayden']
@@ -246,7 +246,7 @@ adventures:
За тази цел ти ще напишеш малко повече код. Ха!
- example_code: |
+ example_code: |2
```
name is ask Как се нарича главаната героиня?
@@ -271,7 +271,7 @@ adventures:
start_code: "repeat 5 times print 'Помо-о-о-щ!'"
5:
- story_text: |
+ story_text: |2
В четвърто ниво ще направиш историята си дори по-цветиста и забавна!
Тук ще прибавиш различни възможни завършеци, за да има изненадващ край.
@@ -318,7 +318,7 @@ adventures:
```
start_code: "print 'Твоята история ще се появи тук!'"
3:
- story_text: |
+ story_text: |2
Към историята, която пишеш можеш да добавиш нещо произволно и неочаквано, примерно чудовище, животно или някаква пречка.
@@ -335,7 +335,7 @@ adventures:
```
story_text_3: |
This is an example of the `{remove}` command in your story
- example_code_3: |
+ example_code_3: |2
```
@@ -390,7 +390,7 @@ adventures:
story_text: |
Songs often contain a lot of repetition. Sometimes the repetition is also based on counting.
For example, in the well-known song 'Bottles of beer'. You can program that song with a little math.
- example_code: |
+ example_code: |2
```
@@ -416,7 +416,7 @@ adventures:
Baby Shark
You can make this song much shorter with a `{repeat}`! Can you finish the code?
- example_code: |
+ example_code: |2
```
@@ -429,7 +429,7 @@ adventures:
8:
story_text: |
In a previous level you've programmed the song 'Bottles of beer'. You made one verse and then had to copy the verses 99 times. In level 7 you can repeat the song 99 times, just by adding one simple line!
- example_code: |
+ example_code: |2
```
@@ -505,7 +505,7 @@ 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:
- example_code: |
+ example_code: |2
```
@@ -592,7 +592,7 @@ adventures:
Ползвай 90 градуса, за да завиеш 1/4 (една четвърт). Едно пълно завъртане е равно на 360 градуса.
Представи си как би могла да "нарисуваш" фигура от свързани линии с програмиране? Може би триъгълник? Кръг?
- example_code: |
+ example_code: |2
```
print "Рисуване на фигура"
@@ -685,14 +685,14 @@ adventures:
example_code_2: "```\n{color} {white}\n{forward} -80\n{color} {green}\n{forward} 50\n{color} {yellow}\n{forward} 50\n{color} {red}\n{forward} 50\n```\n"
story_text_2: "You can also change the color of the lines with the command `{color}`. Check out the example.\nYou can also use the command `{color} {white}` to make 'invisible' lines. You could use these white lines to move the turtle anywhere in the screen before you start drawing.\n"
3:
- story_text: |
+ story_text: |2
Докато рисуваш костенурката можеш да добавиш и командата `random`. С нея костенурката ще поеме в произволна посока всеки път.
Ползвай `at random` в комбинация с променлива с повече стойности, не само една.
Ползвай примера отдолу и увеличи листа с още стойности, освен 10, 50, 90, 150, 250.
- example_code: |
+ example_code: |2
```
ъгли is 10, 50, 90, 150, 250
@@ -754,7 +754,7 @@ adventures:
story_text_2: "If you are extremely unlucky the previous program might choose you to to the dishes for the whole week! That's not fair!\nTo create a fairer system you can use the `{remove}` command to remove the chosen person from the list. This way you don't have to do the dishes again untill everybody has had a turn.\n\nMonday and tuesday are ready for you! Can you add the rest of the week?\nAnd... can you come up with a solution for when your list is empty?\n"
example_code_2: "```\npeople = mom, dad, Emma, Sophie\ndishwasher = people {at} {random}\n{print} 'Monday the dishes are done by: ' dishwasher\n{remove} dishwasher {from} people\ndishwasher = people {at} {random}\n{print} 'Tuesday the dishes are done by: ' dishwasher\n{remove} dishwasher {from} people\ndishwasher = people {at} {random}\n```\n"
5:
- story_text: |
+ story_text: |2
С командата `if` ще създадем възможност за повече избор в програмата ни.
Можеш да програмираш реакция на системата по определен избор.
@@ -772,7 +772,7 @@ adventures:
start_code: "print 'Кой мие чиниите?'"
4:
- story_text: |
+ story_text: |2
Сега ползвай кавички, за да подобриш графика на миячите на чинии.
Този път в кода има пропуски, отбелязани с черта за подчертаване '_'.
@@ -1127,7 +1127,7 @@ adventures:
In this level you can use nesting to make your restaurant more realistic and more fun!
For example you would {ask} for sauce {if} somebody orders fries, but you wouldn't {if} someone orders pizza!
Check out the example, and try this at your own virtual restaurant!
- example_code: |
+ example_code: |2
```
@@ -1155,7 +1155,7 @@ adventures:
10:
story_text: |
In this level you'll learn how to easily {ask} your guests' orders in a short code.
- example_code: |
+ example_code: |2
```
@@ -1164,7 +1164,7 @@ adventures:
food = {ask} 'What would you like to eat as your ' course '?'
{print} food ' will be your ' course
```
- story_text_2: |
+ story_text_2: |2
Of course, you could also order for multiple people!
@@ -1181,7 +1181,7 @@ adventures:
11:
story_text: |
We can use the `{for} i {in} {range} 1 {to} 5` to {print} the orders from multiple customers in an orderly manner.
- example_code: |
+ example_code: |2
```
@@ -1203,7 +1203,7 @@ adventures:
12:
story_text: |
From this level on you can use decimal numbers to make you menu more realistic.
- example_code: |
+ example_code: |2
```
@@ -1226,7 +1226,7 @@ adventures:
In this level we can use the new commands to upgrade our restaurant.
We use `{and}` to see {if} two things are both the case.
- example_code: |
+ example_code: |2
```
price = 10
@@ -1242,7 +1242,7 @@ adventures:
story_text: |
With the `{while}` you can make sure your costumers can keep adding orders until they are done.
- example_code: |
+ example_code: |2
```
@@ -1309,7 +1309,7 @@ adventures:
If you pick the right door you'll survive, but {if} not a terrible monster might...
In level 1 we start our haunted house game by making up a scary story and {ask} the player what monster they'll see in the haunted house.
- example_code: |
+ example_code: |2
@@ -1333,7 +1333,7 @@ adventures:
2:
story_text: |
In this haunted house you can choose your monsters with emojis. Of course you could also use words.
- example_code: |
+ example_code: |2
```
monster_1 {is} 👻
@@ -1377,7 +1377,7 @@ adventures:
Up until this level the haunted house game always asked the player to choose a door, but as you might have noticed, they didn't really have to answer correctly.
If the player filled in a completely random answer, the game would still work and the player might even win (despite not picking a door).
In this level you can only win the game by picking the same door Hedy picked randomly.
- example_code: |
+ example_code: |2
```
@@ -1400,7 +1400,7 @@ adventures:
Now it's very hard to win this game, can you make it easier to win?
For example by only having 1 wrong door and 2 correct doors instead of 1 correct door and 2 wrong ones?
- example_code: |
+ example_code: |2
```
@@ -1427,7 +1427,7 @@ adventures:
11:
story_text: |
In this level we've changed the repeat command and we've added a line to our haunted house that tells the player in which room they are.
- example_code: |
+ example_code: |2
```
@@ -1455,7 +1455,7 @@ adventures:
14:
story_text: |
In this level you can use the `<` and `>` symbol to introduce lives to your game.
- example_code: |
+ example_code: |2
```
@@ -1486,7 +1486,7 @@ adventures:
This haunted house game uses the connection between the lists you can use in this level.
For example: all the properties that belong to the zombie are first in all the lists, witch second and vampire third.
Check out the code!
- example_code: |
+ example_code: |2
```
@@ -1546,7 +1546,7 @@ adventures:
5:
story_text: |
Make your own program to practice your vocabulary in a new language.
- example_code: |
+ example_code: |2
```
{print} 'Learn French!'
@@ -1562,7 +1562,7 @@ adventures:
story_text: |
Make your own program to practice your vocabulary in a new language.
- example_code: |
+ example_code: |2
```
french_words = ['bonjour', 'ordinateur', 'pomme de terre']
@@ -1651,7 +1651,7 @@ adventures:
start_code: '# place your code here'
example_code: "```\npoints = 0\nletters = a, b, c, d, e\n{repeat} 10 {times}\n letter = _ _ _\n {print} 'Press the letter ' letter\n {if} letter {is} {pressed}\n _\n _\n _\n```\n"
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -1675,7 +1675,7 @@ adventures:
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
random_command:
default_save_name: random_command
- name: random
+ name: "{random}"
description: introducing at random command
levels:
3:
@@ -1704,11 +1704,11 @@ adventures:
start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -1719,7 +1719,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -1734,7 +1734,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1761,7 +1761,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
name: Harry Potter
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -1780,7 +1780,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -1799,7 +1799,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -1812,7 +1812,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1842,7 +1842,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -1859,7 +1859,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -1887,7 +1887,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1896,7 +1896,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1904,3 +1904,12 @@ adventures:
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
+ clear_command:
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ name: '{clear}'
+ description: clear command
diff --git a/content/adventures/bn.yaml b/content/adventures/bn.yaml
index 210612467bc..4726552d44f 100644
--- a/content/adventures/bn.yaml
+++ b/content/adventures/bn.yaml
@@ -947,7 +947,7 @@ adventures:
{print} 'those are' points ' point'
```
Can you make the code so that you get the total score for 8 dice? To do that, you have to cut and paste some lines of the code.
- example_code_2: |
+ example_code_2: |2
Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7!
start_code: "{print} 'What will the die indicate this time?'"
@@ -1022,7 +1022,7 @@ adventures:
```
start_code: "# place your code here"
3:
- story_text: |
+ story_text: |2
In this level we can enter lists and choose things from them.
You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`.
@@ -1381,7 +1381,7 @@ adventures:
story_text: |
In this level you can use maths to calculate the total price of your customer's order, which can make your virtual restaurant more realistic.
- example_code: |
+ example_code: |2
You can make a simple restaurant code, like this:
```
@@ -1465,7 +1465,7 @@ adventures:
food = {ask} 'What would you like to eat as your ' course '?'
{print} food ' will be your ' course
```
- story_text_2: |
+ story_text_2: |2
Of course, you could also order for multiple people!
example_code_2: |
@@ -1578,7 +1578,7 @@ adventures:
story_text: |
In the previous levels you've created your first fortune telling machine, but Hedy couldn't really predict anything, only {echo}.
In this level you can use a variable and the `{at} {random}` command to really let Hedy choose an answer for you. Check out this code for instance:
- example_code: |
+ example_code: |2
In this example the player can {ask} Hedy a yes-no question and Hedy will pick a random answer for you.
```
@@ -2475,7 +2475,7 @@ adventures:
name: Key presses
default_save_name: Pressed
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -2513,7 +2513,7 @@ adventures:
example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
random_command:
@@ -2530,7 +2530,7 @@ adventures:
start_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]"
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore।"
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
add_remove_command:
@@ -2543,11 +2543,11 @@ adventures:
example_code_2: "```\nanimals {is} dog, cat, kangaroo\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}\n```\n"
story_text_3: "### Exercise\nTry out the new commands in this virtual restaurant. Add the flavor the player is hpoing for to the list and remove the flavors they are allergic to.\n"
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -2569,11 +2569,11 @@ adventures:
start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -2597,11 +2597,11 @@ adventures:
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -2616,7 +2616,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -2635,7 +2635,7 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
- name: elif
+ name: "{elif}"
description: elif
rock_2:
name: Rock, paper, scissors 2
@@ -2656,7 +2656,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -2711,7 +2711,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers।"
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -2720,7 +2720,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct।"
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -2728,3 +2728,12 @@ adventures:
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/ca.yaml b/content/adventures/ca.yaml
index 04a4e0296d4..ede0e080bd8 100644
--- a/content/adventures/ca.yaml
+++ b/content/adventures/ca.yaml
@@ -667,7 +667,7 @@ adventures:
name: Key presses
print_command:
description: Introduction print command
- name: print
+ name: "{print}"
default_save_name: print
levels:
1:
@@ -689,7 +689,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -717,7 +717,7 @@ adventures:
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
start_code: "{print} 'decimal numbers now need to use a dot'\n{print} 2.5 + 2.5"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -735,7 +735,7 @@ adventures:
start_code: '# place your code here'
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -754,7 +754,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -773,7 +773,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -790,7 +790,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -803,7 +803,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -813,7 +813,7 @@ adventures:
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
in_command:
default_save_name: in_command
- name: in
+ name: "{in}"
description: Introducing the in command
levels:
5:
@@ -823,7 +823,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -861,7 +861,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -878,7 +878,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -893,7 +893,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -907,7 +907,7 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
rock_2:
@@ -919,3 +919,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/cs.yaml b/content/adventures/cs.yaml
index 64cbb1dcaac..dab0a14c27e 100644
--- a/content/adventures/cs.yaml
+++ b/content/adventures/cs.yaml
@@ -915,7 +915,7 @@ adventures:
story_text: "We are going to learn more new items. You might know them already from mathematics, the `<` and `>`.\nThe `<` checks if the first number is smaller than the second, for example age `<` 12 checks if age is smaller than 12.\nIf you want to check if the first number is smaller or equal to the second, you can use `<=`, for example age `<=` 11.\nThe `>` checks if the first number is bigger than the second, for example points `>` 10 checks if points is larger than 10.\nIf you want to check if the first number is bigger or equal to the second, you can use `>=`, for example points `>=` 11.\nYou use these comparisons in an `{if}`, like this:\n"
example_code: "```\nage = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'\n```\n"
story_text_2: "From this level on, if you want to compare exactly, you can use two equal signs. This is what most programming languages do:\n"
- name: is
+ name: "{is}"
ask_command:
levels:
1:
@@ -932,11 +932,11 @@ adventures:
story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n"
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -953,7 +953,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -985,7 +985,7 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
- name: elif
+ name: "{elif}"
description: elif
rock_2:
name: Rock, paper, scissors 2
@@ -1006,7 +1006,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -1019,7 +1019,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1028,7 +1028,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -1079,7 +1079,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
repeat_command_2:
@@ -1094,11 +1094,11 @@ adventures:
example_code: "```\n{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'\n```\n"
example_code_2: "```\n{print} 'Yay! It is your birthday!'\nage = {ask} 'How old are you now?'\n{repeat} age {times} {print} 'Hip Hip Hurray!'\n```\n"
start_code: "{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'"
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -1111,7 +1111,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1120,7 +1120,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1129,7 +1129,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -1151,3 +1151,12 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
start_code: "name = 'Hedy'\n{print}('My name is ', name)"
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/cy.yaml b/content/adventures/cy.yaml
index 9232383e4ae..40689553757 100644
--- a/content/adventures/cy.yaml
+++ b/content/adventures/cy.yaml
@@ -665,7 +665,7 @@ adventures:
default_save_name: Blackjack
name: Blackjack
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -688,7 +688,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
levels:
1:
example_code: "```\n{print} Hello!\n{ask} What is your name?\n```\n"
@@ -707,7 +707,7 @@ adventures:
description: Introduction ask command
default_save_name: ask_command
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -729,13 +729,13 @@ adventures:
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
and_or_command:
description: introducing and or
default_save_name: and or
- name: and or
+ name: "{and} & {or}"
levels:
13:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
@@ -751,7 +751,7 @@ adventures:
description: Part 2 of rock, paper, scissors
name: Rock, paper, scissors 2
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -770,7 +770,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -787,7 +787,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -800,7 +800,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -817,7 +817,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -860,11 +860,11 @@ adventures:
story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n## Exercise\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n"
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/da.yaml b/content/adventures/da.yaml
index 178a3a60f1a..84586000bd2 100644
--- a/content/adventures/da.yaml
+++ b/content/adventures/da.yaml
@@ -664,7 +664,7 @@ adventures:
default_save_name: Pressed
name: Key presses
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -687,7 +687,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -721,11 +721,11 @@ adventures:
example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -738,7 +738,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -770,7 +770,7 @@ adventures:
description: Introduction quotation marks
default_save_name: quotation_marks
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -787,7 +787,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -805,7 +805,7 @@ adventures:
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
rock_2:
@@ -827,7 +827,7 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -844,7 +844,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -853,7 +853,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -870,7 +870,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -900,7 +900,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -909,7 +909,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -917,3 +917,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ name: '{clear}'
+ description: clear command
diff --git a/content/adventures/de.yaml b/content/adventures/de.yaml
index 71807728646..e99712d46dc 100644
--- a/content/adventures/de.yaml
+++ b/content/adventures/de.yaml
@@ -6,11 +6,11 @@ adventures:
levels:
1:
story_text: |
- In Level 1 kannst du die Befehle `{print}`, `{ask}` und `{echo}` verwenden.
- Tippe den Code in das Programmierfeld. Oder drücke den grünen Knopf beim Beispielcode um ihn in dein Programm zu übernehmen!
- Probiere den Code selbst mit der grünen Schaltfläche 'Code ausführen' unter dem linken Programmierfeld aus.
+ Willkommen bei Hedy! In Level 1 kannst du anfangen eine Geschichte auszugeben.
- Du kannst Text auf dem Bildschirm ausgeben lassen indem du den Befehl `{print}` verwendest.
+ Probiere den Code selbst mit der grünen Schaltfläche 'Code ausführen' unter dem Programmierfeld aus.
+
+ Bereit? Dann gehe zum nächsten Tab um deinen ersten Befehl zu lernen!
start_code: "{print} Hallo Welt!"
2:
story_text: |
@@ -1209,9 +1209,9 @@ adventures:
3:
story_text: |
- In this level we can enter lists and choose things from them.
- You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`.
- For example, you can let the computer pick from rock, paper and scissors.
+ In this level we can enter lists and choose things from them.
+ You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`.
+ For example, you can let the computer pick from rock, paper and scissors.
example_code: |
```
@@ -1581,20 +1581,20 @@ adventures:
example_code: |
- Du kannst einen einfachen Restaurant Code erstellen. Das geht so:
- ```
- {print} 'Willkommen im Restaurant Chez Hedy'
- {print} 'Hier ist unsere Karte:'
- {print} 'Unsere Hauptgerichte sind Pizza, Lasagne oder Spaghetti'
- haupt = {ask} 'Welches Hauptgericht möchten Sie?'
- preis = 0
- {if} haupt {is} Pizza preis = 10
- {if} haupt {is} Lasagne preis = 12
- {if} haupt {is} Spaghetti preis = 8
- {print} 'Sie bestellten ' haupt
- {print} 'Das kostet ' preis ' Euro, bitte'
- {print} 'Danke, genießen Sie Ihre Mahlzeit!'
- ```
+ Du kannst einen einfachen Restaurant Code erstellen. Das geht so:
+ ```
+ {print} 'Willkommen im Restaurant Chez Hedy'
+ {print} 'Hier ist unsere Karte:'
+ {print} 'Unsere Hauptgerichte sind Pizza, Lasagne oder Spaghetti'
+ haupt = {ask} 'Welches Hauptgericht möchten Sie?'
+ preis = 0
+ {if} haupt {is} Pizza preis = 10
+ {if} haupt {is} Lasagne preis = 12
+ {if} haupt {is} Spaghetti preis = 8
+ {print} 'Sie bestellten ' haupt
+ {print} 'Das kostet ' preis ' Euro, bitte'
+ {print} 'Danke, genießen Sie Ihre Mahlzeit!'
+ ```
start_code: "# setze hier deinen Code hin"
5:
story_text: |
@@ -1875,16 +1875,16 @@ adventures:
example_code: |
- In diesem Beispiel kann die Spielerin Hedy eine Ja-Nein-Frage {ask} und Hedy wird eine zufällige Antwort für dich aussuchen.
- ```
- {print} Ich bin Hedy, die Wahrsagerin!
- Frage {is} {ask} Was würdest du gerne wissen?
- {print} Das würdest du gerne wissen: Frage
- Antworten {is} ja, nein, vielleicht
- {print} Meine Kristallkugel sagt...
- {sleep} 2
- {print} Antworten {at} {random}
- ```
+ In diesem Beispiel kann die Spielerin Hedy eine Ja-Nein-Frage {ask} und Hedy wird eine zufällige Antwort für dich aussuchen.
+ ```
+ {print} Ich bin Hedy, die Wahrsagerin!
+ Frage {is} {ask} Was würdest du gerne wissen?
+ {print} Das würdest du gerne wissen: Frage
+ Antworten {is} ja, nein, vielleicht
+ {print} Meine Kristallkugel sagt...
+ {sleep} 2
+ {print} Antworten {at} {random}
+ ```
start_code: "# setze hier deinen Code hin"
story_text_2: "### Übung\nBis hierhin konnte Hedy nur mit ja, nein oder vielleicht antworten. Kannst du Hedy mit zusätzlichen Antwortmöglichkeiten ausstatten, wie zum Beispiel 'auf jeden Fall' oder 'frag nochmal'?\n"
haunted:
@@ -2385,7 +2385,7 @@ adventures:
# Beachte jedoch, dass Python nur englische Befehle auslesen kann. Wenn du sonst also mit anderen Sprachen gearbeitet hast, musst du jetzt auch Englisch wechseln.
# start_code: "{print} ('Great job!!!')"
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -2408,7 +2408,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -2440,11 +2440,11 @@ adventures:
start_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}\n"
story_text_3: "### Exercise\nTry out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price!\nCan you do it? We have already put the first lines into the example code.\n"
example_code_3: "```\n{print} The big gameshow!\n{print} There are 3 suitcases in front of you...\nchosen {is} {ask} Which suitcase do you choose?\nprices {is} _\n_\n```\n"
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -2453,7 +2453,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -2488,7 +2488,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
name: Harry Potter
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -2507,7 +2507,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -2520,7 +2520,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -2537,7 +2537,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -2569,7 +2569,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -2584,7 +2584,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -2612,7 +2612,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -2621,7 +2621,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -2630,7 +2630,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -2638,3 +2638,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/el.yaml b/content/adventures/el.yaml
index c66519720dc..d92829dd27e 100644
--- a/content/adventures/el.yaml
+++ b/content/adventures/el.yaml
@@ -290,7 +290,7 @@ adventures:
start_code: "print Η ιστορία σου"
story_text_2: "### Exercise\nNow it's time to add variables to your own story that you've made in the previous level.\nGo to 'My programs', look for your level 1 story adventure and copy the code. Paste the code in your input screen in this level.\n\nThis code won't work in this level, because you have not used variables yet.\nChange the `{ask}` commands and `{echo}` commands in your code to the correct form that you've learned in this level.\n\n**Extra** Add a sleep command to your code to build up tension in your story.\n"
7:
- story_text: |
+ story_text: |2
Σε μια ιστορία, κάποιος μπορεί να αναφέρει διάφορες λέξεις πολλές φορές. Για παράδειγμα, όταν κάποιος φωνάζει βοήθεια ή τραγουδά ένα τραγούδι.
Μπορείς να βάλεις μια τέτοια επανάληψη στην ιστορία σου στο επίπεδο 5 με την `repeat`.
@@ -327,7 +327,7 @@ adventures:
```
start_code: "print 'Εδώ θα βρίσκεται σύντομα η ιστορία σου!'"
4:
- story_text: |
+ story_text: |2
Θα παρατήρησες πως υπάρχει ακόμα ένα σφάλμα στο επίπεδο 2.
@@ -349,7 +349,7 @@ adventures:
```
start_code: "print 'Η ιστορία σου θα εμφανιστεί εδώ!'"
3:
- story_text: |
+ story_text: |2
Μπορείς επίσης να προσθέσεις κάτι τυχαίο στην ιστορία σου. Οποιοδήποτε τέρας, ζώο ή άλλο εμπόδιο.
@@ -729,7 +729,7 @@ adventures:
start_code: "print 'Καλωσήλθες στο δικό σου παιχνίδι Πέτρα, ψαλίδι, χαρτί!'"
3:
- story_text: |
+ story_text: |2
Στο επίπεδο 2 μπορούμε να εισάγουμε λίστες και να επιλέξουμε πράγματα από αυτές.
@@ -860,7 +860,7 @@ adventures:
start_code: "# place your code here"
- example_code: |-
+ example_code: |2-
```
print Καλωσήλθατε στο εστιατόριο της Hedy!
@@ -1400,7 +1400,7 @@ adventures:
default_save_name: Pressed
description: Try linking a keyboard key to a command!
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -1423,7 +1423,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -1443,7 +1443,7 @@ adventures:
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
default_save_name: random_command
- name: random
+ name: "{random}"
description: introducing at random command
levels:
3:
@@ -1459,7 +1459,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -1490,7 +1490,7 @@ adventures:
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
maths:
levels:
@@ -1517,7 +1517,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -1536,7 +1536,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -1549,7 +1549,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1558,7 +1558,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -1599,11 +1599,11 @@ adventures:
start_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter"
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
- name: for
+ name: "{for}"
description: for command
default_save_name: for
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -1618,7 +1618,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1627,7 +1627,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1636,7 +1636,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1653,3 +1653,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ name: '{clear}'
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/en.yaml b/content/adventures/en.yaml
index 2ae85dd3429..ce41cc076be 100644
--- a/content/adventures/en.yaml
+++ b/content/adventures/en.yaml
@@ -18,6 +18,8 @@ adventures:
In the first level you might've notice that the `{echo}` command can only save one bit of information at a time.
For example in the restaurant adventure, you could echo what the costumer wanted to eat, or what they wanted to drink, but not both in one sentence.
example_code: |
+ **Warning! This code does not work!**
+ In Hedy commands will change sometimes. `echo` for example only works in level 1. In this level you'll learn a better way to echo answers back.
```
{print} Welcome at Hedy's
{ask} What would you like to eat?
@@ -260,7 +262,7 @@ adventures:
start_code: "{print} ('Great job!!!')"
print_command:
- name: "print"
+ name: "{print}"
description: "Introduction print command"
default_save_name: print
levels:
@@ -328,7 +330,7 @@ adventures:
{print}('So your name is ', name)
```
ask_command:
- name: "ask"
+ name: "{ask}"
description: "Introduction ask command"
default_save_name: "ask_command"
levels:
@@ -387,8 +389,8 @@ adventures:
Copy your code from the previous tab and make the variables interactive by using `{ask}` commands.
example_code_2: |
```
- favorite_animals is ask What is your favorite animal?
- print I like favorite_animals
+ favorite_animals {is} {ask} What is your favorite animal?
+ {print} I like favorite_animals
```
start_code: |-
name {is} {ask} What is your name?
@@ -396,7 +398,7 @@ adventures:
age {is} {ask} How old are you?
{print} name is age years old.
is_command:
- name: "is"
+ name: "{is}"
description: "introducing is command"
default_save_name: "is_command"
levels:
@@ -462,7 +464,7 @@ adventures:
{print} 'You are not Hedy'
```
random_command:
- name: "random"
+ name: "{random}"
description: "introducing at random command"
default_save_name: "random_command"
levels:
@@ -514,7 +516,7 @@ adventures:
{print} 'is ' lucky_numbers[i]
```
add_remove_command:
- name: "add and remove"
+ name: "{add} {to} & {remove} {from}"
description: "introducing add to and remove from"
default_save_name: "add_remove_command"
levels:
@@ -560,7 +562,7 @@ adventures:
{remove} dislike {from} animals
{print} I choose animals {at} {random}
sleep_command:
- name: "sleep"
+ name: "{sleep}"
description: "introducing sleep command"
default_save_name: "sleep_command"
levels:
@@ -581,7 +583,7 @@ adventures:
{sleep} 2
{print} green!
if_command:
- name: "if else"
+ name: "{if} & {else}"
description: "Introducing the if command"
default_save_name: "if_command"
levels:
@@ -639,7 +641,7 @@ adventures:
### Exercise
Add an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.
in_command:
- name: "in"
+ name: "{in}"
description: "Introducing the in command"
default_save_name: "in_command"
levels:
@@ -743,7 +745,7 @@ adventures:
{if} name = 'Hedy the Robot'
{print} 'Hi there!'
repeat_command:
- name: "Repeat"
+ name: "{repeat}"
description: "repeat command"
default_save_name: "repeat_command"
levels:
@@ -802,7 +804,7 @@ adventures:
{print} 'pizza is better'
```
repeat_command_2:
- name: "Repeat 2"
+ name: "{repeat} 2"
description: "repeat command 2"
default_save_name: "repeat_command_2"
levels:
@@ -853,7 +855,7 @@ adventures:
{print} 'This one too...'
{print} 'but this one will not!'
for_command:
- name: "for"
+ name: "{for}"
description: "for command"
default_save_name: "for"
levels:
@@ -927,7 +929,7 @@ adventures:
{print} 2.5 + 2.5
```
and_or_command:
- name: "and or"
+ name: "{and} & {or}"
description: "introducing and or"
default_save_name: "and or"
levels:
@@ -950,7 +952,7 @@ adventures:
```
while_command:
- name: "while"
+ name: "{while}"
description: "while"
default_save_name: "while_command"
levels:
@@ -974,7 +976,7 @@ adventures:
{print} 'A correct answer has been given'
```
elif_command:
- name: "elif"
+ name: "{elif}"
description: "elif"
default_save_name: "elif"
levels:
@@ -1005,6 +1007,40 @@ adventures:
{else}:
{print} 'Better luck next time..'
+ clear_command:
+ name: "{clear}"
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: |
+ {print} '3'
+ {sleep}
+ {clear}
+ {print} '2'
+ {sleep}
+ {clear}
+ {print} '1'
+ {sleep}
+ {clear}
+ {print} 'SURPRISE!'
+ story_text: |
+ Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.
+ Beware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!
+ example_code: |
+ ```
+ {print} '3'
+ {sleep}
+ {clear}
+ {print} '2'
+ {sleep}
+ {clear}
+ {print} '1'
+ {sleep}
+ {clear}
+ {print} 'SURPRISE!'
+ ```
+
story:
name: "Story"
description: "Story"
@@ -1101,7 +1137,8 @@ adventures:
You can solve that in this level. You must use quotation marks for everything that you are going to print.
### Exercise
- Copy the example code and make it work by adding quotation marks on the lines.
+ Copy the example code and finish it by adding quotation marks on the blanks in lines 1 and 2.
+ The blanks in line 3 and 4 should not be replaced by quotation marks, but a `{sleep}` and a `{clear}` command. Can you make it work?
### Exercise 2
Go back to the previous level and copy your story code. Make the code work in this level by adding quotation marks in the right spots.
@@ -1110,6 +1147,8 @@ adventures:
```
name {is} {ask} _ What is your name? _
{print} _ The main character is called _ name
+ _
+ _
{print} name _ is now going to walk in the woods _
{print} name _ is a bit scared _
animals {is} 🦔, 🐿, 🦉, 🦇
@@ -2007,7 +2046,7 @@ adventures:
{if} throw {is} earthworm points = points + 5 {else} points = points + throw
{print} 'those are ' points ' points'
```
- example_code_2: |
+ example_code_2: |2
Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7!
start_code: "{print} 'What will the die indicate this time?'"
@@ -2334,7 +2373,7 @@ adventures:
{if} answer {is} _ {print} 'good job!'
{else} {print} 'Wrong! It was ' _
```
- story_text_3: |
+ story_text_3: |2
**Extra** You can also let the computer do random sums on its own using random.
@@ -2566,9 +2605,10 @@ adventures:
### Exercise
Add the quotation marks to this code to make it work! Be careful: variables should not be in quotation marks.
+ Then, use the `{clear}` command to only show one line at a time in your output screen.
### Exercise 2
- Go back to the previous level and copy your restaurant code. Make the code work in this level by adding quotation marks in the right spots.
+ Go back to the previous level and copy your restaurant code. Make the code work in this level by adding quotation marks in the right spots and add some `{clear}` commands.
example_code: |
```
_ Add the quotation marks to this code _
@@ -2613,21 +2653,20 @@ adventures:
- add a children's menu?
- think of other fun things to add?
example_code: |
-
- You can make a simple restaurant code, like this:
- ```
- {print} 'Welcome to Restaurant Chez Hedy'
- {print} 'Here is our menu:'
- {print} 'Our main courses are pizza, lasagne, or spaghetti'
- main = {ask} 'Which main course would you like?'
- price = 0
- {if} main {is} pizza price = 10
- {if} main {is} lasagne price = 12
- {if} main {is} spaghetti price = 8
- {print} 'You have ordered ' main
- {print} 'That will be ' price ' dollars, please'
- {print} 'Thank you, enjoy your meal!'
- ```
+ You can make a simple restaurant code, like this:
+ ```
+ {print} 'Welcome to Restaurant Chez Hedy'
+ {print} 'Here is our menu:'
+ {print} 'Our main courses are pizza, lasagne, or spaghetti'
+ main = {ask} 'Which main course would you like?'
+ price = 0
+ {if} main {is} pizza price = 10
+ {if} main {is} lasagne price = 12
+ {if} main {is} spaghetti price = 8
+ {print} 'You have ordered ' main
+ {print} 'That will be ' price ' dollars, please'
+ {print} 'Thank you, enjoy your meal!'
+ ```
start_code: "# place your code here"
7:
story_text: |
diff --git a/content/adventures/eo.yaml b/content/adventures/eo.yaml
index c575a7d8046..13754caca12 100644
--- a/content/adventures/eo.yaml
+++ b/content/adventures/eo.yaml
@@ -760,11 +760,11 @@ adventures:
start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'"
story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n"
example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'\n```\n"
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
is_command:
- name: is
+ name: "{is}"
levels:
2:
example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n"
@@ -783,7 +783,7 @@ adventures:
description: introducing is command
default_save_name: is_command
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -801,7 +801,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
story_text: "## The sleep command\nAnother new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds.\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
quotation_marks:
@@ -839,12 +839,12 @@ adventures:
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
for_command:
description: for command
- name: for
+ name: "{for}"
default_save_name: for
levels:
10:
@@ -905,7 +905,7 @@ adventures:
story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n"
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
- name: ask
+ name: "{ask}"
description: Introduction ask command
random_command:
levels:
@@ -921,11 +921,11 @@ adventures:
start_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]"
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -942,7 +942,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
default_save_name: in_command
description: Introducing the in command
levels:
@@ -964,7 +964,7 @@ adventures:
story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n## Exercise\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n"
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
and_or_command:
@@ -975,18 +975,18 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
- name: and or
+ name: "{and} & {or}"
while_command:
levels:
15:
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -994,3 +994,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/es.yaml b/content/adventures/es.yaml
index 7c600a9da46..d1462882627 100644
--- a/content/adventures/es.yaml
+++ b/content/adventures/es.yaml
@@ -6,131 +6,129 @@ adventures:
levels:
1:
story_text: |
- En el Nivel 1 puedes usar los comandos `{print}`,`{ask}` y `{echo}`.
- Escribe tu código en el panel de programación o presiona el botón verde en los bloques de ejemplo y ¡el código se escribirá automáticamente!
- Prueba el código con el botón verde 'Ejecutar código' debajo del espacio de programación de la izquierdo.
+ ¡Bienvenido a Hedy! En el nivel 1 puede empezar imprimiendo una historia.
- Puedes mostrar texto por pantalla usando el comando `{print}`.
+ Prueba el código por ti mismo con el botón verde 'Ejecutar código' bajo el bloque de programación.
+
+ ¿Preparado? ¡Entonces ve a la siguiente pestaña para aprender tu primer comando!
start_code: "{print} hola mundo!"
2:
story_text: |
- En el nivel 2 aprendemos dos nuevos comandos: `{is}` and `{sleep}`.
- Puedes nombrar una palabra con `{is}`. Esto es llamado una variable. En este ejemplo hemos hecho una variable llamada nombre y una variable llamada edad. Puedes usar la palabra nombre en donde sea en tu código y será reemplazada por Hedy, así:
-
- ¡De esta forma ya no necesitas el comando `{echo}`!
+ ¡Enhorabuena! Has alcanzado el nivel 2. ¡Espero que ya hayas hecho algunos códigos increíbles!
+ Quizás te has dado cuenta en el primer nivel que el comando `{echo}` sólo puede guardar un bit de información cada vez.
+ Por ejemplo en la aventura del restaurante, puedes imprimir lo que el cliente quiere comer, o que quiere de beber, pero no ambas en una misma frase.
start_code: "{print} hola mundo!"
- example_code: "```\nnombre {is} Hedy\nedad {is} 15\n{print} nombre tiene edad años\n```\n"
- story_text_2: "El comando `{print}` sigue funcionando igual, pero el comando `{ask}` ha cambiado. Ahora hay que utilizar una variable en el comando `{ask}`. Algo como esto:\n"
+ example_code: "```\n{print} Bienvenido a Hedy's\n{ask} ¿Qué le gustaría comer?\n{echo} Así que quiere\n{ask} ¿qué le gustaría beber?\n{echo} Así que quiere\n```\n"
+ story_text_2: "Si el jugador escribe una hamburguesa y un refresco, no puedes decir \"así que quieres una hamburguesa y un refresco\", pero tendrás que hacerlo en dos líneas separadas.\nTambién, el comando `{echo}` sólo imprime la palabra al final de la frase. Así que no puedes decir \"¡tu hamburguesa viene enseguida!\".\n\nEsos cambios en el nivel 2. En el nivel 2 aprenderás a trabajar con variables, que te permiten guardar varias partes de información e imprimirlas donde quieras.\n¡Así que vayamos a la siguiente pestaña!\n"
3:
story_text: |
- En el nivel 3 también puedes hacer una lista. Puedes dejar al ordenador escoger algo aleatorio de la lista, usando `{at} {random}`.
+ En el nivel anterior has aprendido lo que es una variable y como puedes usarla para hacer tus aventuras más interactivas.
+ Pero... ¡eso no es lo único que puedes hacer con las variables! También puedes usar variables para hacer listas.
+ Incluso puedes dejar que Hedy elija una palabra al azar de una lista, ¡lo que te permite hacer juegos de verdad!
+ ¡Echa un vistazo a la siguiente pestaña!
start_code: "{print} hola mundo!"
4:
story_text: |
- En el nivel 4 `{ask}` y `{print}` han cambiado.
- Debes poner el texto que quieres imprimir entre comillas.
- Esto es útil porque ahora puedes imprimir todas las palabras que quieras. También las palabras que usaste para guardar algo con `{is}`.
- La mayoría de lenguajes de programación usan comillas para imprimir, ¡entonces nos estamos acercando cada vez más a programación de verdad!
+ En los niveles anteriores has estado practicando con variables, pero puede que te hayas encontrado con un problema.
+ Quizás hayas intentado ejecutar un código como este:
+
+ Por supuesto que querías mostrar
+
+ `Mi nombre es Sofía`
+
+ pero Hedy mostró
+
+ `Mi Sofía es Sofía`.
+
+ En este nivel el problema se soluciona usando comillas.
start_code: "{print} 'Hola mundo'"
- example_code: "```\n{print} '¡Necesitas usar comillas de ahora en adelante!'\nrespuesta {is} {ask} '¿Que necesitamos usar de ahora en adelante?'\n{print} ' Necesitamos usar ' respuesta \n```\n"
+ example_code: "```\nnombre {is} Sofia\n{print} Mi nombre es nombre\n```\n"
5:
start_code: |-
nombre {is} {ask} '¿Cómo te llamas?'
{if} nombre {is} Hedy {print} '¡genial!' {else} {print} 'meh'
story_text: |
- En el nivel 5 hay una novedad, ¡el `{if}`! Con el `{if}` puedes elegir entre dos opciones.
- El siguiente código muestra por pantalla bien si introduces el nombre Hedy sino mostrará buu.
- `{ask}` y `{print}` siguen funcionando como en el nivel 4.
- example_code: "```\nnombre {is} {ask} '¿Cuál es tu nombre?'\n{if} nombre {is} Hedy {print} 'bien' {else} {print} 'buu'\n```\n"
+ En los niveles anteriores ya has aprendido a usar `{at} {random}` lo que hizo tus juegos distintos cada vez que ejecutaste el código.
+ Pero no es muy interactivo, el jugador no tiene ningún efecto en lo que ocurre en el juego.
+
+ En este nivel aprenderás el comando `{if}` , que te permite dar respuestas distintas en tu programa. De esta manera, por ejemplo, puedes programa una contraseña secreta para tu ordenador.
+ ¡Así que vayamos a la siguiente pestaña para el nuevo comando!
+ example_code: "```\ncontraseña {is} {ask} '¿Cuál es la contraseña correcta?'\n```\n"
6:
- start_code: "{print} '5 por 5 es ' 5 * 5"
+ start_code: "# pon tu código aquí"
story_text: |
- En este nivel aprenderás algo nuevo: ahora puedes hacer cálculos.
-
- La suma es fácil, se escribe igual que en matemáticas, por ejemplo: `5 + 5`. Las restas también `5 - 5`
+ En el nivel anterior has practicado con `{ask}` y `{if}`. Por ejemplo puedes preguntar a los clientes qué les gustaría comer.
+ Lo que todavía no puedes hacer, es calcular el precio de la cena de todos.
- La multiplicación es un poco diferente, porque el símbolo multiplicar no está en tu teclado, busca, ¡no existe!
- Por esa razón utilizamos el símbolo asterisco, al lado del enter: `5 * 5`. Léelo como "5 por 5" y te ayudará a recordarlo mejor.
- example_code: "```\n{print} '5 más 5 es ' 5 + 5\n{print} '5 menos 5 es ' 5 - 5\n{print} '5 por 5 es ' 5 * 5\n```\n"
+ El siguiente nivel te permitirá usar la suma, resta y multiplicación en tus programas. De esta manera podrás calcular los precios en tu restaurante, pero también podrás añadir un código secreto para dar un descuento a tus amigos y familiares.
+ \vOtra opción en el siguiente nivel es programar tu propio juego de matemáticas, para que tus hermanos pequeños practiquen sus multiplicaciones.
+ ¡Ve a verlo por tí mismo!
+ example_code: "```\nprecio_comida {is} 0\nprecio_bebida {is} 0\nprecio_total {is} 0\n{print} 'Bienvenido a McHedy'\npedido {is} {ask} '¿Qué le gustaría comer?'\n{if} pedido {is} precio_comida hamburguesa {is} 5\n{if} pedido {is} precio_comida patatas fritas {is} 2\nbebida {is} {ask} '¿Qué le gustaría beber?'\n{if} bebida {is} precio_bebida agua {is} 0\ndemás precio_bebida {is} 3\nprecio_total {is} precio_comida + precio_bebida\n{print} 'Serán ' precio_total ' dólares, por favor'\n```\n"
7:
- start_code: "{repeat} 3 {times} {print} 'Hedy es divertido!'"
+ start_code: "{print} 'cumpleaños feliz'\n{print} 'cumpleaños feliz'\n{print} 'cumpleaños feliz querido Hedy'\n{print} 'cumpleaños feliz'\n"
story_text: |
- El nivel 7 agrega el comando `{repeat}`. `{repeat}` puede ser usado para ejecutar una línea de código varias veces.
+ ¡Gran trabajo! Has alcanzado el siguiente nivel, lo que significa que has practicado con `{if}` and `{else}`. Te habrás dado cuenta de que tus códigos son cada vez más extensos.
+ Por ejemplo, si quieres programar 'Feliz Cumpleaños'.
+
+ Eso es mucho trabajo para básicamente las mismas palabrar una y otra vez. Por fortuna, en la siguiente pestaña aprenderás una solución con el comando `{repeat}`, que te permitirá repetir una línea de código varias veces.
example_code: |
```
- {repeat} 3 {times} {print} '¡Hedy es divertido!'
+ {print} 'cumpleaños feliz'
+ {print} 'cumpleaños feliz'
+ {print} 'cumpleaños feliz querido Hedy'
+ {print} 'cumpleaños feliz'
```
8:
start_code: |-
- {repeat} 5 {times}
- {print} 'Hola amigos'
- {print} 'Esto se va a mostrar 5 veces'
+ {print} '¡Vayamos a la siguiente pestaña!'
story_text: |
- `{ask}` y `{print}` siguen funcionando como los conoces. Pero `{if}`, `{else}` y `{repeat}` han cambiado.
- Ahora puedes agrupar varias líneas, pero tendrás que *sangrar* el código.
- Eso significa poner cuatro espacios al principio de la línea. También tendrás que sangrar cuando sólo quieras crear un bloque de una sola línea.
+ Ahora has aprendido a como repetir una única línea de código. Esto es útil, pero no siempre es suficiente. A veces quieres repetir varias líneas de una vez.
+ Este nivel te permite agrupar un par de líneas de código, ¡y repetir ese pequeño grupo de líneas de una vez!
example_code: |
- Así es como funciona ahora el comando `{repeat}`:
- ```
- {repeat} 5 {times}
- {print} 'Hola a todos'
- {print} 'Esto se repite 5 veces'
- ```
- Así es como funcionan ahora los comandos `{if}` y `{else}`:
-
```
- nombre {is} {ask} '¿Cuál es tu nombre?'
- {if} nombre {is} Hedy
- {print} 'Bienvenida Hedy'
- {print} '¡Puedes jugar con tu ordenador!'
- {else}
- {print} '¡Intruso!'
- {print} '¡No puedes usar este ordenador!'
+ {repeat} 5 {times} {print} '¡En la siguiente pestaña puedes repetir varias líneas de código a la vez!'
```
9:
- start_code: "{repeat} 3 {times}\n comida = {ask} '¿Qué quieres comer?'\n {if} comida {is} 'pizza'\n {print} '¡bien!'\n {else}\n {print} 'pizza es mejor'"
- story_text: "En este nivel no solo puedes usar múltiples líneas con `{if}` y `{repeat}`, ¡pero también los puedes usar juntos!\nEn el ejemplo puedes ver un comando `{if}` dentro de un `{repeat}`. También está permitido de forma contraria, y un `{if}` también está permitido dentro de un `{if}` y un `{repeat}` dentro de un `{repeat}`.\nGive it a try!\n"
- example_code: "```\n{repeat} 3 {times}\n comida = {ask} '¿Qué quieres?'\n {if} comida {is} pizza\n {print} '¡bien!'\n {else}\n {print} 'mejor pizza'\n```\n"
+ start_code: "{print} ¡Vayamos a la siguiente pestaña!"
+ story_text: "¡Buen trabajo! ¡Has alcanzado otro nuevo nivel! En el nivel anterior aprendiste a usar varias líneas de código en un comando {if} o {repeat}. Pero todavía no puedes combinar los dos...\n\\v¡Buenas noticias! En este nivel se te permitirá poner un {if} dentro de otro {if}, o dentro de un comando {repeat}.\n"
+ example_code: "```\nrespuesta = {ask} '¿Estás preparado para aprender algo nuevo?'\n{if} respuesta {is} sí\n {print} '¡Genial! !Puedes aprender a usar el comando repetir en el comando si!'\n {print} '!Hurra!'\n {print} '!Hurra!'\n {print} '!Hurra!'\n{else}\n {print} 'Tal vez deberías practicar un poco más en el nivel anterior'\n"
10:
- story_text: "En este nivel vamos a aprender un nuevo código llamado `{for}`. Con `{for}` Puedes hacer una lista y usar todos sus elementos.\n`{for}` crea un bloque, como `{repeat}` y `{if}` por lo que todas las líneas del bloque necesitan empezar con espacios."
- start_code: "animales {is} perros, gatos, peces\n{for} animal {in} animales\n {print} 'Me gustan los ' animal"
- example_code: "```\nanimales {is} perros, gatos, peces globo\n{for} animal {in} animales\n {print} 'Amo a los ' animal\n```\n"
+ story_text: "¡Lo estás haciendo genial! En el nivel anterior todavía nos encontramos con un pequeño problema. Has aprendido a repetir líneas, pero ¿y si quisieras cambiar ligeramente la línea?\nPor ejemplo, si quieres cantar la canción 'si eres feliz y lo sabes'. Se parecería a algo como esto:\n\n\\vSi también quisieras el siguiente verso 'pisa con los pies', y el siguiente, y el siguiente, tendrías que cambiar por completo tu código.\nEn este nivel aprenderás el comando `{for}`, que te permite hacer una lista de acciones y repetir el código con otra acción !cada vez!\n¡Échale un vistazo!\n"
+ start_code: "{print} '!Vayamos a la siguiente pestaña!'"
+ example_code: "```\n{repeat} 2 {times}\n {print} 'si eres feliz y lo sabes aplaude con tus manos'\n{print} 'si eres feliz y lo sabes y realmente quieres mostrarlo'\n{print} 'si eres feliz y lo sabes aplaude con tus manos'\n```\n"
11:
- start_code: "{for} contador {in} {range} 1 {to} 5\n {print} contador"
- story_text: '## Bucles
-
- En este nivel, añadimos una nueva forma para el `{for}`. En anteriores niveles, usabamos `{for}` con una lista, pero tambien podemos usar `{for}` con numeros.
-
- Hacemos eso añadiendo un nombre para la variable, seguida de `{in}` `{range}`. Despues ecribimos el numero para comenzar at, se utiliza `{to}` y el numero para terminar at.
+ start_code: "{print} '!Vayamos a la siguiente pestaña!'"
+ story_text: 'Has alcanzado el nivel 10, ¡lo estás haciendo genial! En los niveles superiores, Hedy se centra más y más en enseñarte el lenguaje de programación Python.
+ En Python no hay comando `{repeat}`, pere hay un comando que funciona como {repeat}.\v¿Tienes curiosidad de saber cómo se llama `{repeat}` en el idioma Python? Averígualo rápidamente.
- Prueba el ejemplo para ver lo que ocurre! Nuevamente en este nivel, deberá usar sangrías en las líneas debajo de las declaraciones `{for}`.'
+ '
12:
- start_code: "{print} 'los números decimales ahora necesitan usar un punto'\n{print} 2.5 + 2.5"
- story_text: "**Números decimales**\nHasta ahora, Hedy no permitía números decimales como 1.5, pero a partir de ahora sí lo permitiremos. Fíjate que los ordenadores utilizan el punto `.` para los decimales, no la coma."
- example_code: "```\n{print} 'Dos y medio más dos y medio es...'\n{print} 2.5 + 2.5\n```\n"
+ start_code: "{print} '¡Vayamos a la siguiente pestaña!'"
+ story_text: "Quizá hayas intentado usar números decimales en aventura del restaurante. Si lo hiciste, te habrás dado cuenta que Hedy no todavía los entendía y siempre los redondeaba.\nDesde este nivel en adelante puedes usar números decimales.\n"
+ example_code: "```\nhamburguesa = 5\nbebida = 2\ntotal = hamburguesa + bebida\nprint 'Has pedido una hamburguesa y una bebida'\nprint 'Eso cuesta ' total ' dólares por favor'\n```\n"
13:
- start_code: "nombre = {ask} '¿Cuál es tu nombre?'\nedad = {ask} '¿Cuántos años tienes?'\n{if} nombre {is} 'Hedy' {and} edad {is} 2\n {print} '¡Eres la verdadera Hedy!'"
- story_text: "¡Ahora vamos a aprender sobre `{and}` y `{or}`! Si quieres comprobar dos condiciones, no necesitas utilizar dos`{if}` si no que puedes utilizar `{and}` y `{or}`. \n\nSi utilizas `{and}`, ambas condiciones, a derecha e izquierda del `{and}`, deberán ser ciertas. También puedes utilizar `{or}`, en cuyo caso solo una debe ser cierta."
- example_code: "```\nname = {ask} '¿Cuál es tu nombre?'\nage = {ask} '¿Qué edad tienes?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} '¡Eres la verdadera Hedy!'\n```\n"
+ start_code: "{print} '¡Vayamos al siguiente nivel!'"
+ story_text: "En los niveles anteriores aprendiste cómo poner dos comandos `{if}` uno dentro de otro. Esto funciona bien, pero resulta en códigos extensos e inmanejables como este:\n\nEn este sistema tienes que poner el nombre de usuario correcto y la contraseña correcta.\nEn este nivel aprenderas el comando `{and}` que hará este código !mucho más corto y más entendible!\n¡Compruébalo!\n"
+ example_code: "```\nnombre_usuario = {ask} '¿Cúal es tu nombre de usuario?'\ncontraseña = {ask} '¿Cúal es tu contraseña?'\n{if} nombre_usuario {is} 'Hedy'\n {if} contraseña {is} 'secret'\n {print} '¡Bienvenido Hedy!'\n {else}\n {print} 'Accesso denegado'\n{else}\n {print} '¡Accesso denegado!'\n```\n"
14:
- start_code: "age = {ask} '¿Qué edad tienes?'\n{if} age < 13\n {print} '¡Eres más joven que yo!'\n{else}\n {print} '¡Eres mayor que yo!'"
- story_text: "¡Vamos a aprender más! Puede que ya los conozcas de matemáticas, el `<` y `>`.\nEl `<`comprueba si el primer número es mas pequeño que el segundo, por ejemplo edad `<` 12 comprueba si edad es menor que 12.\nSi quieres comprobar si el primer número es menor o igual al segundo, puedes utilizar `<=`, por ejemplo, edad `<=` 11.\nEl `>` comprueba si el primer número es mayor que el segundo, por ejemplo puntos `>`10 comprueba si puntos es mayor que 10.\nSi quieres comprobar si el primer número es mayor o igual al segundo, puedes utilizar `>=`, por ejemplo, puntos `>=` 11.\nPuedes utilizar estos símbolos en un `{if}`. Ejemplo:\n"
- example_code: "```\nage = {ask} '¿Qué edad tienes?'\n{if} age > 12\n {print} '¡Eres más viejo que yo!'\n```\n"
+ start_code: "{print} 'Vayamos a la siguiente pestaña'"
+ story_text: "Con el programa de abajo puedes calcular si has aprobado una asignatura en el colegio (por lo tanto, una nota de seis o superior).\nPuedes ver que este código es extremadamente ineficiente, debido al código tan largo en la línea 5.\nTodas las diferentes notas de 1 a 5 tuvieron que programarse por separado. Afortunadamente para tí, en este nivel aprenderás como hacer esto sin este código !extremadamente largo!\n"
+ example_code: "```\nprimer_curso = {ask} '¿Qué nota conseguiste en tu primer examen?'\nsegundo_curso = {ask} '¿Qué nota conseguiste en tu segundo examen?'\nsuma = primer_curso + segundo_curso\nmedia_curso = suma / 2\n{if} media_curso = 1 {or} media_curso = 2 {or} media_curso = 3 {or} media_curso = 4 {or} media_curso = 5\n {print} '¡Oh no! Has suspendido la asignatura...'\n{else}\n {print} '¡Genial! ¡Has aprobado la asignatura!'\n```\n"
15:
- start_code: "respuesta = 0\n{while} respuesta != 25\n respuesta = {ask} 'Cuanto es 5 por 5?'\n{print} 'Tenemos la respuesta correcta'"
- story_text: "Vamos a aprender una nueva forma de bucles, ¡el bucle `{while}`! Este bucle se repetirá hasta que la condición sea cierta.\nAsí que no te olvides de cambiar el valor en el bucle.\n\nEn el código de ejemplo, este continuará hasta que se le dé una respuesta correcta.\nSi no se le da nunca la respuesta correcta, ¡el bucle nunca acaba!"
- example_code: "```\nrespuesta = 0\n{while} respuesta != 25\n respuesta = {ask} '¿Cuánto es 5 por 5?'\n{print} 'Una respuesta correcta ha sido dada'\n```\n"
+ start_code: "{print} '¡Vayamos al siguiente nivel!'"
+ story_text: "En el juego de abajo, se ha preparado un código para asegurarse que el jugador pueda jugar tanto como quieran...\nPero el código es ineficiente y tarda mucho. Además, ¿y si el jugador quiere jugar 101 partidas en vez de 100?\n¿No puede jugar hasta el infinito?\n!En este nivel aprenderás un comando que hará todo esto mucho más fácil!\n"
+ example_code: "```\njuego {is} 'iniciado'\n{for} i {in} {range} 1 {to} 100\n {if} juego {is} 'iniciado'\n respuesta = {ask} '¿Quieres continuar?'\n {if} respuesta {is} 'no'\n juego {is} 'finalizado'\n {if} respuesta {is} 'si'\n {print} 'Ok continuemos'\n```\n"
16:
- start_code: "fruta = ['manzana', 'banana', 'cereza']\n{print} fruta"
- story_text: "Vamos a hacer listas como en Python, ¡con corchetes ('[]') alrededor de las listas! También mantendremos las comillas alrededor de cada elemento como hemos aprendido en los niveles anteriores.\nTambién puedes utilizar los corchetes para seleccionar una posición en la lista. El comando {at} no puede ser usado mas."
- example_code: "```\namigos = ['Ahmed', 'Ben', 'Cayden']\nnumero_de_suerte = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'El número de la suerte de ' amigos[i]\n {print} 'es ' numero_de_suerte[i]\n```\n"
+ start_code: "{print} '¡Vayamos a la siguiente pestaña!'"
+ story_text: "En este nivel creceremos un poco más hacia código real de Python. También aprenderás como hacer que dos listas coincidan.\nAsí puedes programar un código en el que el animal correcto coincide con el sonido correcto.\nPorque los dos código de abajo... !Obciamente no tienen sentido!\n"
+ example_code: "```\nanimales = 'gallina', 'caballo', 'vaca'\nsonidos = 'cacarear', 'relinchar', 'mugir'\n{for} animal {in} animales\n {print} 'Un ' animal ' dice ' sonidos {at} {random}\n```\nTambien puedes intentar hacer que funcione de esta manera, pero....\n```\nanimales = 'gallina', 'caballo', 'vaca'\nsonidos = 'cacarear', 'relinchar', 'mugir'\n{for} animal {in} animales\n {for} sonido {in} sonidos\n {print} 'Un ' animal ' dice ' sound\n```\n"
17:
- start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Listo o no, ¡Allá voy!'"
- story_text: "Ahora vamos a cambiar la indentación un poquito. Cada vez que necesitamos indentación, necesitamos `:` en la línea antes de la indentación.\n\nEn este nivel puedes usar un nuevo comando: `{elif}`. `{elif}` es una abreviación de `{else}` `{if}` y la necesitas cuando quieres hacer 3 (o más) opciones.\n¡Pruébalas!\n"
+ start_code: "{print} '¡Vayamos al siguiente nivel!'"
+ story_text: "Ya casi has alcanzado el último nivel de Hedy, ¡bien hecho! En este nivel aprenderás una forma real de Python de usar `{print}`.\n"
18:
- start_code: "nombre = 'Hedy'\n{print}('Mi nombre es ', nombre)"
- story_text: "¡Llegamos código real de Python! Eso significa que necesitamos usar paréntesis con `{print}` y `{range}` de ahora en adelante.\nTambién significa que puedes usar código Hedy de este nivel en cualquier ambiente Python siempre y cuando utilizes los comandos en Inglés. Si no lo has hecho hasta ahora, puedes cambiar el interruptor en el menú de comandos para hacerlo."
+ start_code: "{print} ('¡¡¡Gran trabajo!!!')"
+ story_text: "¡Enhorabuena! Has alcanzado el último nivel de Hedy! El código que has creado aqui se puede copiar a entornos reales de Python como replit o PyCharm, ¡y puedes continuar aprendiendo allí!\nSin embargo ten en cuenta que Python sólo puede leer comando en inglés, así que si has estado usando otros idiomas, ahora los tendrás que cambiar a inglés.\n"
story:
name: "Una historia"
description: "Una historia"
@@ -173,7 +171,7 @@ adventures:
```
start_code: "{print} Aquí viene tu historia"
- story_text_2: "### Ejercicio\nAhora es momento de añadir variables a la historia que hiciste en el nivel anterior.\nve a 'Mis Programas', busca tu historia del nivel 1 y copia el codigo. Pegua el código en tu pantalla de entrada en este nivel.\n\nEste codigo no funcionará en este nivel por que no has usado variables aún.\nCambia los comandos `{ask}` y los comandos `{echo}` en tu codigo a la forma correcta que aprendiste en este nivel.\n\n**Extra** añade un comando de suspensión a tu codigo para crear tension en la historia.\n"
+ story_text_2: "### Ejercicio\nAhora es momento de añadir variables a la historia que hiciste en el nivel anterior.\nVe a 'Mis Programas', busca tu historia del nivel 1 y copia el codigo. Pega el código en tu pantalla de entrada en este nivel.\n\nEste código no funcionará en este nivel, porque no has usado variables aún.\nCambia los comandos `{ask}` y `{echo}` en tu código a la forma correcta que aprendiste en este nivel.\n\n**Extra** añade un comando {sleep} a tu codigo para crear tensión en la historia.\n"
7:
story_text: |
En una historia, a veces es necesario repetir algo. Por ejemplo, si alguien pide ayuda, o si se canta una canción.
@@ -192,21 +190,20 @@ adventures:
start_code: "{repeat} 5 {times} {print} 'Ayuda!'"
5:
story_text: |
- ##Historia
- En este nivel puedes programar distintos finales, lo que hará que tu historia sea aún más interesante.
- En el codigo de ejemplo puedes ver como hacer 2 finales diferentes.
+ En este nivel puedes programar distintos finales, lo que hará que tu historia sea incluso más divertida.
+ En el código de ejemplo puedes ver como hacer 2 finales diferentes.
### Ejercicio 1
- Escribe una nueva historia con 6 lineas de codigo por lo menos, sobreun tema de tu elección.
- Sin inspiración? Escoje uno de estos temas: un superheroe, un día aburrido en la escuela, varado en una isla desierta.
+ Escribe una nueva breve historia con al menos 6 líneas de código, sobre un tema de tu elección.
+ ¿Sin inspiración? Escoge uno de estos temas: un superhéroe, un día aburrido en la escuela, perdido en una isla desierta.
- Ahora dale al jugador la oportunidad de esoger una final bueno o malo, como en el codigo de ejemplo.
+ Ahora dale al jugador la oportunidad de escoger una final bueno o malo, como en el código de ejemplo.
Programa ambos finales.
### Ejercicio 2
- copia la historia que has creado en los nieles anteriores.
- Encuentra una forma de añadir por lo menos 2 comandos `{if}` y 2 comandos `{else}` a tu historia.
- Estos pueden ser finales buenos o malos, pero puedes buscar otras formas de incorporar los comandos.
+ Copia la historia que has creado para tu propia aventura en los niveles anteriores.
+ Encuentra una forma de añadir por lo menos 2 comandos `{if}` y `{else}` a tu historia.
+ Esto puede ser un final bueno o malo, pero puedes intentar buscar otras formas de incorporar los comandos.
example_code: |
```
nombre {is} {ask} '¿Quién camina por el bosque?'
@@ -219,24 +216,27 @@ adventures:
start_code: "{print} '¡Aquí viene tu historia!'"
4:
story_text: |
- Quizá te hayas dado cuenta que aún hay un problema en los niveles anteriores. ¿Has intentado mostrar por pantalla una frase que contenga la palabra nombre? por ejemplo `{print}` mi nombre es nombre.
- Puedes solucionar ese problema en este nivel. Debes utilizar comillas para todo lo que quieras mostrar por pantalla.
+ Quizá te hayas dado cuenta de que aún hay un problema en los niveles anteriores. ¿Has intentado mostrar por pantalla una frase que contenga la palabra nombre? por ejemplo `{print}` mi nombre es nombre.
+ Puedes solucionarlo en este nivel. Debes utilizar comillas para todo lo que quieras mostrar por pantalla.
### Ejercicio
- Copia el codigo de ejemplo y hazlo funcionar añadiendo comillas en las lineas .
+ Copia el código de ejemplo y complétalo añadiendo comillas en los huecos de las líneas 1 y 2.
+ Los huecos en blanco en las líneas 3 y 4 no se deben reemplazar por comillas, sino por un comando `{sleep}` y un `{clear}`. ¿Puedes hacerlo funcionar?
### Ejercicio 2
- Ve al nivel anterior y copia el codigo de tu historia. Haz funcionar el codigo en esta historia añadiendo comillas en los lugares correctos.
- Recuerda: Las variables en tu propia historia tienen que estar fuera de las comillas. Como en la segunda linea de el codigo de ejemplo. En esa linea el nombre de la variable esta situado fuera de las comillas.
+ Vuelve al nivel anterior y copia el código de tu historia. Haz funcionar el código en este nivel añadiendo comillas en los lugares correctos.
+ Recuerda: Las variables en tu propia historia tienen que estar fuera de las comillas. Como en la segunda línea del código de ejemplo. En esa línea el nombre de la variable esta situado fuera de las comillas.
example_code: |
```
- nombre {is}{ask} _Cual es tu nombre_
+ nombre {is}{ask} _ ¿Cuál es tu nombre? _
{print} _ El protagonista de esta historia es _ nombre
- {print} nombre _ está caminando por el bosque _
+ _
+ _
+ {print} nombre _ ahora está caminando por el bosque _
{print} nombre _ está un poco asustado _
animales {is} 🦔, 🐿, 🦉, 🦇
- {print} _ Él/Ella escucha el ruido de un_ animales {at} {random}
- {print} nombre _tiene miedo de que éste sea un bosque encantado_
+ {print} _ Él escucha el ruido de un _ animales {at} {random}
+ {print} nombre _ teme que éste sea un bosque encantado _
```
start_code: "{print} '¡Aquí viene tu historia!'"
3:
@@ -283,7 +283,7 @@ adventures:
example_code: "```\nnombre = 'La Reina de Inglaterra'\n{print} nombre ' estaba comiendo un pedazo de pastel, cuando de pronto...'\n```\n"
start_code: '# coloca tu código aquí'
8:
- story_text: "En este nivel puedes usar múltiples líneas en tu comandos `{if}`, de esta manera puedes mejorar tu final malo o bueno.\n\n### Ejercicio 1\nEl código de ejemplo muestra dos finales diferentes; uno donde los personajes usan una máquina del tiempo y otro en el que no.\nCompleta los espacios vacíos con al menos una frase por final. \n**(extra)** Haz la historia más larga. ¿Qué ocurre en la historia? Puedes también añadir un segundo `{ask}` con diferentes opciones.\n\n### Ejercicio 2\nVuelve a tus historias guardadas y escoge la del Nivel 5. Escribe un final bueno y uno malo de al menos tres líneas cada uno.\n"
+ story_text: "En este nivel puedes usar varias líneas en tus comandos `{if}`, ¡de esta manera puedes mejorar tu final malo o bueno!\n\n### Ejercicio 1\nEl código de ejemplo muestra dos finales diferentes; uno donde los personajes usan una máquina del tiempo y otro en el que no.\nCompleta los espacios en blanco con al menos una frase por cada final. \n**Extra** Haz que la historia dure más. ¿Qué ocurre en la historia? Puedes también añadir un segundo `{ask}` con diferentes opciones.\n\n### Ejercicio 2\nVuelve a tus historias guardadas, escoge la historia del nivel 5. Escribe un final bueno y uno malo de al menos tres líneas cada uno.\n"
example_code: "```\n{print} '¡OH NO! ¡El T-rex se está acercando!'\nfinal = {ask} '¿Quieres un final triste o feliz?'\n{if} final {is} feliz\n {print} 'Justo a tiempo Richard salta de vuelta en la máquina del tiempo!'\n {print} _\n{else}\n {print} '¡Oh, no! Richard es demasiado lento...\n {print} _\n```\n"
start_code: '# coloca tu código aquí'
15:
@@ -295,7 +295,7 @@ adventures:
story_text: "Usando los comandos `{and}` y `{or}` puedes hacer tus historias mas versátiles. Puedes hacer dos preguntas y responder a la combinación de respuestas.\n\n### Ejercicio 1\nMira el codigo de ejemplo de este nivel y completalo. Luego añade por lo menos 2 `{if}` con `{and}` o `{or}`.\n\n### Ejercicio 2\nEncuentra una historia de un nivel anterior y añade un `{and}` o `{or}`.\n"
start_code: '# coloca tu código aquí'
10:
- story_text: "En este nivel puedes usar el comando {for} en tu historia. De esta manera puedes programar fácilmente el libro para niños 'oso pardo, oso pardo, ¿qué ves?'\n\n\n### Ejercicio\n\nmira en la historia si no la conoces, asegurate que este igual que el libro.\n"
+ story_text: "En este nivel puedes usar el comando {for} en tu historia. De esta manera puedes programar fácilmente el libro para niños 'oso pardo, oso pardo, ¿qué ves?'\n\n### Ejercicio\n\nMira en la historia si no la conoces, asegurate que este igual que el libro.\n"
example_code: "```\nanimales = _ , _ , _ \n{print} 'Oso pardo, Oso pardo'\n{print} '¿Qué ves?'\n```\n"
start_code: '# coloca tu código aquí'
18:
@@ -383,14 +383,14 @@ adventures:
example_code: "```\nfamilia = bebé, mamá, papá, abuela, abuelo\n_ _ _ _ \n {print} _\n```\n"
start_code: '# pon tu código aquí'
example_code_2: "```\nmonkeys = 5, 4, 3, 2, 1\n```\n"
- story_text_2: "### Ejercicio 2\nEscribe la cancion 5 pequeños monos saltando en la cama. Mira el texto sin no lo recuerdas.\n\n**(extra)** Escribe la cancion el viejo MacDonald tenia una granja, y asegurate que todos los animales hagan sonidos diferentes usando `{if}`.\n"
+ story_text_2: "### Ejercicio 2\nEscribe la canción Cinco monitos saltando en la cama. Mira el texto si no lo recuerdas.\n\n**Extra** Escribe la canción Old MacDonald tenía una granja, y asegúrate que todos los animales hagan sonidos diferentes usando `{if}`.\n"
16:
story_text: "En este nivel puedes programar una canción como la del Viejo McDonald incluso más rápido. Puedes conectar el animal con el sonido correcto simplemente poniéndolos en el mismo lugar en la lista.\nEl Marinero Borracho también se puede hacer rápidamente en este nivel. Solo necesitas 8 líneas de código para toda la canción, ¡mira!\n"
start_code: '# pon tu código aquí'
example_code: "```\nanimals = ['pig', 'dog', 'cow']\nsounds = ['oink', 'woof', 'moo']\n{for} i {in} {range} 1 {to} 3\n animal = animals[i]\n sound = sounds[i]\n {print} 'Old McDonald had a farm'\n {print} 'E I E I O!'\n {print} 'and on that farm he had a ' animal\n {print} 'E I E I O!'\n {print} 'with a ' sound sound ' here'\n {print} 'and a ' sound sound ' there'\n {print} 'here a ' sound\n {print} 'there a ' sound\n {print} 'everywhere a ' sound sound\n```\n\n```\nlines = ['what shall we do with the drunken sailor', 'shave his belly with a rusty razor', 'put him in a long boat till hes sober']\n{for} line {in} lines\n {for} i {in} {range} 1 {to} 3\n {print} line\n {print} 'early in the morning'\n {for} i {in} {range} 1 {to} 3\n {print} 'way hay and up she rises'\n {print} 'early in the morning'\n```\n"
18:
start_code: '# pon tu codigo aqui'
- story_text: "En el nivel 16 hizimos canciones usando listas. Sin embargo estos programas no funcionan bien en este nivel. [colons] del nivel 17 y los [brackets] del nivel 18 aún tienen que ser añadidas.\n\n### Ejercicio 1\n\n### Exercise 2\nNow also look up your Old MacDonald song from level 16, and correct it.\n"
+ story_text: "En el nivel 16 hizimos canciones usando listas. Sin embargo estos programas no funcionan bien en este nivel. [colons] del nivel 17 y los [brackets] del nivel 18 aún tienen que ser añadidas.\n\n### Ejercicio 1\nSe da la canción del Marinero borracho como ejemplo, pero todavía no funciona.\n¿Puedes asegurarte de que todo funciona de nuevo? Para ayudarte, hemos puesto _ en los lugares _some_ errores.\n\n### Ejercicio 2\nAhora también busca tu canción de Old MacDonald del nivel 16, y corrígela.\n"
example_code: "```\nlines = ['Que hacemos con el marinero borracho, 'Afeita su vientre con una navaja oxidada', 'Ponganlo en un barco hasta que este sobrio']\n{for} linea {in} lineas _\n {for} i {in} {range} 1 {to} 3 _\n {print} _ linea_\n {print} 'temprano en la mañana'\n {for} i {in} {range} 1 {to} 3\n {print} 'Ella se levanta de un camino de heno'\n {print} 'temprano en la mañana'\n```\n"
turtle:
name: "La tortuga"
@@ -456,7 +456,7 @@ adventures:
{forward} 50
```
story_text_2: |
- **(extra)**Podemos mejorar el programa para que haga diferentes preguntas. Termina el codigo y puedes dibujar un polígono si gustas!
+ **Extra** Podemos mejorar el programa que dibuja diferentes figuras. Completa el código y ¡puedes dibujar cualquier polígono que te guste!
example_code_2: |
```
ángulos = {ask} '¿Cuántos ángulos debo dibujar?'
@@ -557,7 +557,7 @@ adventures:
{turn} angulo {at} {random}
{forward} 25
9:
- story_text: "Ahora podemos crear figuras mas complejas usando `{repeat}` dentro de otro `{repeat}`\n\n### Ejercicio 1\nEste codigo crea 3 triangulos negros, haz que sean 5 cuadrados rosados.\n\n **(extra)** Crea una figura de tu elección que consista de minimo dos diferentes tipos de formas.\n"
+ story_text: "Ahora que podemos usar un `{repeat}` dentro de otro `{repeat}`, podemos crear figuras más complejas\n\n### Ejercicio 1\nEste código crea tres triángulos negros, cámbialo a cinco cuadrados rosados.\n\n **Extra** Crea una figura de tu elección que consista de al menos dos tipos diferentes de formas.\n"
example_code: "```\n{color} {black}\n{repeat} 3 {times}\n {repeat} 3 {times}\n {forward} 10\n {turn} 120\n {color} {white}\n {forward} 50\n {color} {black}\n```\n"
start_code: '# pon tu codigo aquí'
@@ -568,10 +568,10 @@ adventures:
levels:
7:
story_text: |
- Con el comando `{repeat}` puedes repetir partes del código. Puedes usarlo para calcular quién va a lavar los platos por varios días!
+ Con `{repeat}` puedes repetir partes del código. Puedes usarlo para calcular quién va a lavar los platos por varios días!
### Ejercicio
- Usa el comando de `{repeat}` para decidir quien debe lavar los platos toda la semana. Cada espacio debe ser rellenado con un comando o numero!
- **(extra)**Puedes pensar en otras tareas para la casa? Adapta el codigo para que decida sobre 3 tareas domesticas. No te olvides de decir de que tarea se trata!
+ Usa el comando de `{repeat}` para decidir quien debe lavar los platos toda la semana. ¡Cada espacio en blanco debe rellenarse con un comando o numero!
+ **Extra** ¿Puedes pensar en otras tareas para la casa? Adapta el código para que decida sobre tres tareas domésticas. !No te olvides mostrar de que tareas se tratan!
example_code: |
```
people = mamá, papá, Emma, Sofía
@@ -595,19 +595,19 @@ adventures:
¿Puedes hacer el código para toda la semana?
start_code: "{print} '¿Quién lavará los platos?'"
story_text_2: "Si tienes muy mala suerte, ¡el programa anterior puede que te elija para lavar los platos toda la semana! ¡Eso no es justo!\nPara crear un sistema mas justo puedes utilizar el comando `{remove}` para eliminar la persona elegida de la lista. De esta forma no tendrás que lavar los platos hasta que todos hayan hecho un turno.\n\n¡Lunes y martes ya están añadidos! ¿Puedes añadir el resto de la semana?\nY ¿puedes dar con una solución para cuando la lista esté vacía?\n"
- example_code_2: "```\npersonas = mamá, papá, Genésis, María\nlavaplatos = personas {at} {random}\n{print} 'El lunes los platos serán lavados por ' lavaplatos\n{remove} lavaplatos {from} personas\nlavaplatos = personas {at} {random}\n{print} 'El martes los platos serán lavados por ' lavaplatos\n{remove} lavaplatos {from} personas\nlavaplatos = personas {at} {random}\n```\n"
+ example_code_2: "```\npersonas = mamá, papá, Emma, Sofía\nlavavajillas = personas {at} {random}\n{print} 'El lunes los platos serán lavados por ' lavavajillas \n{remove} lavavajillas {from} personas\nlavavajillas = personas {at} {random}\n{print} 'El martes los platos serán lavados por ' lavavajillas \n{remove} lavavajillas {from} personas\n```\n"
5:
story_text: |
Usando el comando `{if}` ahora puedes hacer tu programa todavía más divertido. Ahora tu programa puede reaccionar de acuerdo a la elección de quien lavará los platos.
-
- Puede hacer que tu programa imprima 'oh no' si es tu turno de lavar los platos, y '¡sí!' en caso de que no sea tu turno de lavar los platos?
+ ### Ejercicio
+ ¿Puede hacer que tu programa imprima 'oh no' si es tu turno de lavar los platos, y '¡sí!' en caso contrario?
¡No olvides las comillas!
example_code: |
```
personas {is} mamá, papá, Emma, Sofía
- lavador {is} personas {at} {random}
- lavador {is} Sofía {print} _ oh no, hoy me toca lavar los platos_
- {print} 'por suerte no debo lavar los platos porque' _ 'los lavará hoy!'
+ lavavajillas {is} personas {at} {random}
+ lavavajillas {is} Sofía {print} _ lástima que tengo que lavar los platos _
+ {print} 'afortunadamente no hay platos porque' _ 'ya los está lavando'
```
start_code: "{print} '¿Quien lavará los platos hoy?'"
4:
@@ -629,10 +629,10 @@ adventures:
{print} personas {at} {random} tiene que lavar los platos
```
start_code: "{print} ¿Quien lavará los platos hoy?"
- story_text_2: "Haz tu propia version del programa.Primero haz una lista de los miembros de tu familia.\nLuego piensa en una tarea que tenga que ser hecha, y deja que la computadora decida quien debe hacer la tarea con el comando `{at} {random}`.\n\n**Extra**No quieres lavar los platos por ti mismo? Hackea el programa quitando tu nombre de la lista con `{remove}``{from}`.\n"
+ story_text_2: "### Ejercicio\nHaz tu propia version del programa. Primero haz una lista de los miembros de tu familia.\nLuego piensa en una tarea que tenga que ser hecha, y deja que la computadora decida quien debe hacer la tarea con el comando `{at} {random}`.\n\n**Extra** ¿No quieres lavar los platos por ti mismo? Hackea el programa quitando tu nombre de la lista con `{remove}``{from}`.\n"
10:
- example_code: "```\ndías = Lunes, Martes, Miércoles, Jueves, Viernes, Sábado, Domingo\nnombres = mamá, papá, Emma, Sofía\n{for} día en días\n {print} nombres {at} {random} ' Hará los platos el ' día\n```"
- story_text: "En este nivel puedes hacer un horario de lavado de platos de forma facíl.\n\n### Ejercicio\nAgrega una tarea secundaria, como aspirar o planchar, y recuerda que tambien sea dividido para toda la semana.\n **(extra)**El programa no es justo, puedes tener mala suerte y lavar toda la semana. Como puedes hacer el programa mas justo?\n"
+ example_code: "```\ndías = Lunes, Martes, Miércoles, Jueves, Viernes, Sábado, Domingo\nnombres = mamá, papá, Emma, Sofía\n{for} día {in} días\n {print} nombres {at} {random} ' Hará los platos el ' día\n```\n"
+ story_text: "En este nivel puedes hacer un horario de lavado de platos de forma fácil.\n\n### Ejercicio\nAgrega una tarea secundaria, como aspirar o planchar, y asegúrate que también esté dividida para toda la semana.\n **Extra** El programa no es justo, puedes tener mala suerte y lavar toda la semana. ¿Como puedes hacer el programa más justo?\n"
start_code: '# pon tu código aquí'
dice:
name: "Dados"
@@ -641,10 +641,10 @@ adventures:
levels:
7:
story_text: |
- Puedes hacer un dado otra vez en el nivel 5. Con el comando `{repeat}` puedes tirar el dado muchas veces fácilmente.
+ Puedes hacer un dado otra vez en este nivel. Con el código `{repeat}` puedes tirar fácilmente una mano entera de dados.
### Ejercicio
- ¡Intenta terminar el código de ejemplo! **(extra)**Piensa en un juego que conozcas que tenga un dado y programalo usando `{repeat}`.
+ ¡Intenta terminar el código de ejemplo! **Extra** Piensa en un juego que conozcas que tenga un dado y prográmalo usando `{repeat}`.
example_code: |
```
opciones = 1, 2, 3, 4, 5, 6
@@ -661,16 +661,16 @@ adventures:
¿Puedes hacer que el código obtenga la puntuación total por 8 dados? Para hacer eso tienes que cortar y copiar algunas líneas de código.
example_code: |
```
- opciones = 1, 2, 3, 4, 5, tierra
+ opciones = 1, 2, 3, 4, 5, lombriz
puntos = 0
- tirar = opciones {at} {random}
- {print} 'tú lanzaste' tirar
- {if} tirar {is} tierra puntos = puntos + 5 {else} puntos = puntos + tirar
- {print} 'este' puntos 'punto'
+ tirada = opciones {at} {random}
+ {print} 'tú lanzaste ' tirada
+ {if} tirada {is} lombriz puntos = puntos + 5 {else} puntos = puntos + tirada
+ {print} 'esos son ' puntos ' puntos'
```
start_code: "{print} '¿Qué salió esta vez?'"
- example_code_2: "\n¿Pudiste calcular la puntuación para los 8 dados? Eso necesito que copiaras y pegaras mucho, ¿verdad? ¡Vamos a hacer eso más fácil en el nivel 7!\n"
+ example_code_2: "\n ¿Pudiste calcular la puntuación para 8 dados? Eso necesitó que copiaras y pegaras mucho, ¿verdad? ¡Vamos a hacerlo más fácil en el nivel 7!\n"
5:
story_text: |
Vamos a añadir los comandos `{if}` y `{else}` a nuestros dados!
@@ -680,11 +680,11 @@ adventures:
**Extra** Tal vez quieras recrear una muerte de un juego totalmente diferente. Tambien esta bien! Luego haz tu propia reacción, por ejemplo, 'Si!' para 6 y 'Lastima!' para algo mas.
example_code: |
```
- opciones {is} 1, 2, 3, 4, 5, gusanito
+ opciones {is} 1, 2, 3, 4, 5, lombriz
tirada {is} opciones {at}{random}
- {print} 'haz tirado' opciones
- _ lanzar{is} gusanito {print} 'Puedes dejar de tirar los dados'
- _ {print} 'Debes tirar los dados nuevamente!'
+ {print} 'haz tirado ' opciones
+ _ lanzar{is} lombriz {print} 'Puedes dejar de tirar los dados'
+ _ {print} '!Debes tirar los dados otra vez!'
```
start_code: "{print} '¿Qué salió esta vez?'"
@@ -718,13 +718,13 @@ adventures:
example_code: "```\nopciones = 1, 2, 3, 4, 5, 6\n{print} '¡Lanza un 6 lo más rápido que puedas!'\nlanzado = 0\nintentos = 0\n{while} lanzado != 6\n lanzado = opciones {at} {random}\n {print} 'Lanzaste un ' lanzado\n intentos = intentos + 1\n{print} '¡Sí! Lanzaste un 6 en ' intentos ' intentos.'\n```\n"
start_code: '# pon tú código aquí'
10:
- story_text: "¿Todo el mundo está tardando mucho lanzando el dado? ¡En este nivel puedes lanzar todos los dados a la vez!\n¿Puedes rellenar los espacios con la línea de código correcta?\n"
- example_code: "```\njugadores = Ana, Juan, Pedro\nopciones = 1, 2, 3, 4, 5, 6\n _ \n{print} jugador ' tiró un ' opciones {at} {random}\n{sleep}\n```\n"
+ story_text: "### Ejercicio\n¿Todo el mundo tarda mucho lanzando el dado? ¡En este nivel puedes dejar que Hedy lance todos los dados a la vez!\nCambia los nombres por nombres de tus amigos o familia, y completa el código para que cada uno pueda lanzarlos.\n"
+ example_code: "```\njugadores = Ana, Juan, Pedro\nopciones = 1, 2, 3, 4, 5, 6\n_ _ _ _\n {print} jugador ' tiró un ' opciones {at} {random}\n {sleep}\n```\n"
start_code: '# Coloca tu código aquí'
pressit:
name: Presiónalo
description: ¡Intenta vincular una tecla del teclado a un comando!
- default_save_name: Presione
+ default_save_name: Presionado
levels:
5:
story_text: |
@@ -767,11 +767,11 @@ adventures:
start_code: "# pon tu código aquí"
9:
story_text: |
- Ahora que sabes como combinar sentencias, puedes crear una herramienta de escritura a ciegas con `{pressed}`
+ Ahora que sabes como combinar sentencias, puedes crear una herramienta de mecanografía con `{pressed}`
- ### Ejercicio
- Termina el código. Cada vez una letra aleatoria va a ser escogida, la cual debes presionar. Obtienes un punto cuando presionas la tecla correcta, y una deducción de dos puntos cuando presionas una tecla equivocada.
- **(extra)** Limpia la pantalla luego de cada letra, y muestra al usuario cuántos puntos han obtenido.
+ ### Ejercicio
+ Completa el código. Cada vez se elegirá una letra al azar, que deberás pulsar. Obtienes un punto cuando presionas la tecla correcta, y una deducción de dos puntos cuando presionas una tecla equivocada.
+ **Extra** Limpia la pantalla tras cada letra, y muestra al usuario cuántos puntos han obtenido.
example_code: |
```
puntos = 0
@@ -788,7 +788,7 @@ adventures:
rock:
name: "Piedra, papel o tijera"
description: "Crea tu propio juego de piedra, papel y tijera"
- default_save_name: "Piedra"
+ default_save_name: "Piedra_2"
levels:
1:
story_text: |
@@ -803,69 +803,72 @@ adventures:
```
start_code: "{print} ¡Bienvenide a tu propio piedra, papel o tijera!\n{ask} ?Que escoges?\n"
- story_text_2: "En lugar de usar palabras, puedes también usar emojis: ✊✋✌\n¿Puedes hacer el código usando emojis?\n"
+ story_text_2: "### Ejercicio\nEn lugar de usar palabras, puedes también usar emojis: ✊✋✌\n¿Puedes hacer el código usando emojis?\n"
example_code_2: "```\n{print} ¿Qué escoges?\n{ask} escoge _\n{echo} tu elección fue\n```\n"
5:
story_text: |
- En el nivel 4 podemos determinar quien ha ganado el juego.
- Para eso necesitamos un nuevo comando: `{if}`.
+ En este nivel podemos determinar si es un empate o no. Para ello necesitas el nuevo código `{if}`.
- Graba tu opción con el nombre opción y la opción de la computadora como opción computadora.
- Luego puedes usar `{if}` para comprobar si ambas opciones fueron iguales o si fueron distintas.
- Puedes escribir el código?
+ ### Ejercicio
+ Completa el código rellenando los huecos en blanco:
+ * Deja que el ordenador elija un opción al azar
+ * Pregunta al jugador qué quieren elegir
+ * Rellena las variables correctas en las líneas 4 y 5
+ * Completa la línea 6 para que Hedy pueda comprobar si es un empate o no.
example_code: |
```
- opciones {is} piedra, papel, tijera
- opción_computadora {is} _
- opción {is} {ask} 'Que eliges?'
- {print} 'Has elegido ' _
- {print} 'La computadora ha elegido ' _
- {if} _ {is} _ {print} 'empate!' {else} {print} 'no hay empate'
+ opciones {is} piedra, papel, tijeras
+ opción_ordenador {is} _
+ opción {is} _
+ {print} 'Elegiste ' _
+ {print} 'El ordenador eligió ' _
+ {if} _ {is} _ {print} '¡empate!' {else} {print} 'no hay empate'
```
- Reemplaza los guiones bajos con el código correcto para comprobar si alguien ganó el juego o si el juego resultó empatado.
+ Rellena el código correcto en los huecos en blanco para ver si es un empate.
start_code: "{print} 'Bienvenide a tu propio piedra, papel o tijera!'"
4:
story_text: |
- En el nivel 3 podemos seguir desarrollando nuestro juego de piedra, papel o tijera. Pero ahora, si ({if}) quieres imprimir texto, debes usar comillas.
- ¿Eres capaz de imprimir un texto adicional? Reemplaza el guión bajo con el código correcto.
+ En este nivel podemos programar el juego de piedra, papel, tijera. Pero si quieres añadir texto, aquí también tienes que usar comillas.
+ ### Ejercicio
+ Copia el código del nivel anterior y haz que funcione usando comillas después de cada comando `{print}` o `{ask}`.
start_code: "{print} 'Bienvenide a tu propio piedra, papel o tijera!'"
3:
story_text: |
+ ¡Puedes usar el comando `{at} {random}` para dejar que el ordenador elija piedra, papel o tijeras!
- En el nivel 2 puedes ingresar listas de elementos y luego escoger uno de ellos.
- Primero debes ingresar una lista con el comando `{is}`. Luego puedes hacer que la computadora escoja un elemento de la lista con el comando `{at} {random}`.
- De esa manera, la computadora puede elegir una opción: piedra, papel o tijera.
+ ### Ejercicio
+ Completa el código usando el comando `{at} {random}`.
example_code: |
```
opciones {is} piedra, papel, tijera
- {print} opciones {at} {random}
+ {print} opciones _
```
start_code: "{print} ¡Bienvenide a tu propio piedra papel o tijera!"
- story_text_2: "Ahora solo tienes un solo jugador, ¿puedes agregar un segundo jugador?\nPuedes usar variables para nombrar al jugador 1 y al jugador 2.\n"
- example_code_2: "```\nopciones {is} piedra, papel o tijera\n{print} el jugador 1 escoge... opciones {at} {random}\n{print} jugador 2 _\n```\n"
+ story_text_2: "**Extra** Haz un juego de dos jugadores. Lo primero, pregunta a los dos jugadores que pongan sus nombres. Después, deja que el ordenador elija aleatoriamente sus opciones.\n"
+ example_code_2: "```\nopciones {is} piedra, papel o tijera\njugador_1 {is} {ask} Nombre del jugador 1:\n_\n```\n"
10:
- story_text: "¿No tienes ganas de jugar el juego? ¡Deja que Hedy lo haga por ti!\nLo único que tiense que hacer es llenar el nombre de los jugadores\n"
- example_code: "```\nopciones = piedra, papel, tijera\njugadores = _\n{for} jugador {in} jugadores\n {print} jugador ' escoge ' opciones {at} {random}\n```\n"
+ story_text: "### Ejercicio\nEn los niveles anteriores hiciste tu propio juego de piedra, papel, tijeras. ¿Puedes completar el código y usar el comando {for} adecuadamente para hacer que el juego funcione?\n"
+ example_code: "```\nopciones = _\njugadores = _\n{for} _\n```\n"
start_code: '# pon tu código aquí'
2:
- story_text: "En este nivel puedes practicar usando las variables, ¡así puedes hacer un juego de piedra, papel o tijeras en el próximo nivel!\n"
- example_code: "```\n_ {is} {ask} ¿piedra, papel o tijera?\n{print} Escojo _\n```\n"
+ story_text: "En este nivel puedes practicar usando las variables, ¡así puedes hacer un juego de piedra, papel o tijeras en el próximo nivel!\n### Ejercicio\nCompleta el código poniendo la **variable** en los huecos en blanco.\nEste juego no es muy interactivo, ¡pero no te preocupes! !En la siguiente pestaña aprenderás como usar las variables con el comando `{ask}` para hacer tu juego interactivo!\n"
+ example_code: "```\nopción es piedra\n{print} Yo elijo _\n```\n"
start_code: '# pon tu codigo aquí'
15:
story_text: "¡Juega hazta que le ganes a la computadora! Pero primero termina el código de ejemplo...\n"
example_code: "```\nganó = 'no'\nopciones = 'piedra', 'papel', 'tijeras'\n{while} ganó == 'no'\n tu_opcion = {ask} '¿Que escoges?'\n opcion_computadora = opciones {at} {random}\n {print} 'Escogiste ' tu_opcion\n {print} 'La computadora escogió ' opcion_computadora\n {if} opcion_computadora == tu_opcion\n {print} '¡Empate!'\n {if} opcion_computadora == 'roca' {and} tu_opcion == 'tijera'\n {print} '¡Perdiste!'\n {if} opcion_computadora == 'roca' {and} tu_opcion == 'papel'\n {print} '¡Ganaste!'\n ganó = 'sí'\n_\n```\n"
start_code: '# pon tu código aquí'
9:
- story_text: "En este nivel puedes hacer el juego de piedra, papel o tijera completo aninando comandos `{if}`. ¿Puedes terminar el código?\n"
+ story_text: "En este nivel puedes programar el juego completo de piedra, papel, tijeras anidando los comandos `{if}`. \n\n### Ejercicio\n¿Puedes completar el código? El programa debe decir quien ha ganado para cada combinación.\n\n**Extra** ¿Quieres jugar más de una partida? Amplia el código para que puedas jugar varias rondas. Incluso puedes usar un `{ask}` para preguntar al usuario cuantas rondas quieren jugar.\n"
example_code: "```\nopciones {is} piedra, papel, tijera\ntu_opción {is} {ask} '¿Que escoges?'\n{print} 'Escogiste ' tu_opción\nopción_computadora {is} opciones {at} {random}\n{print} 'La computadora escogió ' opción_computadora\n{if} opción_computadora {is} tu_opción\n {print} 'Empate'\n{if} opción_computadora {is} piedra\n {if} tu_opción {is} papel\n {print} '¡Ganaste!'\n {if} tu_opción {is} tijera\n {print} '¡Perdiste!'\n# termina este código\n```\n"
start_code: '# pon tu código aquí'
13:
example_code: "```\nopciones = 'piedra', 'papel', 'tijera'\ntu_opcion = {ask} '¿Qué quieres escoger?'\nopcion_computadora = opciones {at} {random}\n{print} 'Escogiste ' tu_opcion\n{print} 'La computadora escoge ' opcion_computadora\n{if} opcion_computadora {is} tu_opcion\n {print} 'Empate'\n{if} opcion_computadora {is} 'piedra' {and} tu_opcion {is} 'papel'\n {print} 'You win!'\n{if} opcion_computadora {is} 'piedra' {and} tu_opcion {is} 'tijera'\n {print} '¡La computadora ganó!'\n_\n```\n"
- story_text: "¡Con el comando `{and}` puedes reducir tu código del juego de piedra, papel o tijera! Mira el ejemplo de abajo e intenta terminarlo.\n"
+ story_text: "¡Con el comando `{and}` puedes reducir tu código del juego de piedra, papel o tijera! Mira el ejemplo de abajo e intenta terminarlo.\n\n### Ejercicio\nCompleta tu código de manera que siempre se elija un ganador. Ejecuta tu código un par de veces para verificar que siempre se muestra un ganador.\n"
start_code: '# pon tú código aquí'
calculator:
name: "Calculadora"
@@ -874,8 +877,13 @@ adventures:
levels:
9:
story_text: |
- En nivel 6 has aprendido a hacer una calculadora, en nivel 7 puedes expandir ese código y convertirlo en un pequeño juego de matemáticas.
- ¿Puedes terminar la línea 10 y hacer que el programa funcione?
+ En el nivel 6 creaste una calculadora, en este nivel puedes ampliar el código para que haga varias preguntas.
+
+ ### Ejercicio 1
+ ¿Puedes completar la línea 1' para hacer que el programa funcione?
+
+ ### Ejercicio 2
+ Dale al jugador información cuando introduzcan una pregunta acertada o errónea. Para conseguir eso, amplía tu programa con un `{else}`.
example_code: |
```
puntuación = 0
@@ -903,6 +911,7 @@ adventures:
{print} numero_1 ' por ' numero_2 ' is ' respuesta_correcta
```
story_text_2: |
+ ### Ejercicio
La calcula va a ser capaz de calcular las respuestas por ti, pero también puedes hacer un programa para probar tus propias habilidades matemáticas, así:
¡Rellena los espacios para completar el código!
example_code_2: |
@@ -913,29 +922,37 @@ adventures:
{else} {print} '¡Incorrecto! Era ' _
```
start_code: "{print} '¡Bienvenide a tu propia calculadora!'"
- story_text_3: "También puedes hacer que la computadora haga sumas aleatorias por su propia cuenta.\nAsí es como puedes escoger un número de tablas para practicar, y de ahí puedes tener siempre una suma diferente:\n"
+ story_text_3: "\n **Extra** También puedes dejar que el ordenador haga sumas aleatorias por sí mismo usando random.\n\n Así es como eliges un número de tablas para practicar, y desde ahí siempre consigues una suma diferente:\n"
14:
story_text: "En este nivel puedes programar el juego 'Adivina el número'\n"
example_code: "```\n{print} 'Adivina el número'\nnúmeros = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnúmero = números {at} {random}\njuego = 'en marcha'\n{for} i {in} {range} 1 {to} 10\n {if} juego == 'en marcha'\n intento = {ask} '¿Que número piensas que es?'\n {if} intento > número\n {print} '¡Muy alto!'\n {if} intento < número\n {print} '!Muy bajo!'\n {if} intento == número\n {print} '¡Ganaste!'\n juego = 'terminó'\n```\n"
start_code: '# pon tú código aquí'
12:
- story_text: "Ahora puedes hacer una calculadora que funcione con números decimales. ¡Rellena los espacios para hacer que funcione correctamente!\n"
+ story_text: "En este nivel puedes hacer una calculadora que funcione para números decimales.\n\n### Ejercicio 1\nRellena los huecos en blanco para completar la calculadora. Recuerda usar un punto y no una coma para los números decimales.\n\n### Ejercicio 2\nCrea un nuevo programa de práctica de matemáticas, pero ahora usa números decimales.\nCrea una lista de números, elige dos a multiplicar y deja que el jugador responda.\n¡Y por supuesto tienes que validar la respuesta! **Extra** Aumenta la dificultad añadiendo vidas: Un jugador pierde una vida por cada respuesta incorrecta y tras fallar tres respuestas el juego termina.\n"
example_code: "```\nnúmero1 = {ask} '¿Cuál es el primer número?'\nnúmero2 = {ask} '¿Cuál es el segundo número?'\nrespuesta = _\n{print} número1 ' más ' número2 ' es ' respuesta\n```\n"
start_code: '# pon tu código aquí'
10:
- story_text: "¡Este juego de calcular te ayudar a practicar las tablas de la multiplicación!\nPuedes agregar más números a la lista, así puedes practicar todas las multiplicaciones.\n"
- example_code: "```\nnúmeros = 1, 2, 3\n{for} número1 {in} números\n {for} número2 {in} números\n respuesta = {ask} '¿Cuánto es ' número2 ' por ' número1 '?'\n correcta = número1 * número2\n {if} respuesta {is} correcta\n {print} 'Muy bien!'\n {else}\n {print} 'Estás equivocade. La respuesta correcta es ' correcta\n```\n"
+ story_text: "¡Este juego de cálculo te ayuda a practicar las tablas de multiplicar!\n### Ejercicio\n¿Puedes añadir más números a la lista para practicar las tablas de multiplicar hasta el 10?\n"
+ example_code: "```\nnúmeros = 1, 2, 3\n{for} número1 {in} números\n {for} número2 {in} números\n respuesta = {ask} '¿Cuánto es ' número2 ' por ' número1 '?'\n correcta = número1 * número2\n {if} respuesta {is} correcta\n {print} '¡Muy bien!'\n {else}\n {print} 'Te equivocas. La respuesta correcta es ' correcta\n```\n"
start_code: '# pon tu código aquí'
15:
- story_text: "Puedes agregar el bucle `{while}` al jugo de la calculadora que aprendiste en el nivel anterior.\nEsto asegura que el jugador no pueda continuar a la siguiente pregunta {if} (si) se responde incorrectamente.\n"
+ story_text: "Puedes agregar el bucle `{while}` al jugo de la calculadora que aprendiste a hacer en el nivel anterior.\nEsto asegura que el jugador no pueda continuar a la siguiente pregunta si se responde incorrectamente.\n"
example_code: "```\npuntaje = 0\n{for} i {in} {range} 0 {to} 9\n números = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\n número1 = números {at} {random}\n número2 = números {at} {random}\n correcta = número1 * número2\n respuesta = 0\n {while} respuesta != correcta\n {print} '¿Cuánto es ' número1 ' por ' número2 '?'\n respuesta = {ask} 'Escribe tu respuesta:'\n {print} 'Tu respuesta es ' respuesta\n {print} '¡Buen trabajo!'\n{print} '¡Ganaste!'\n```\n"
start_code: '# pon tu código aquí'
11:
- example_code: "```\nnumero = 10\n{for} i {in} {range} 1 {to} 10\n {print} i * numero\n```\n"
+ example_code: "```\nnumber = 10\n{for} i {in} {range} 1 a 10\n {print} i * number\n```\n"
story_text: "Con `{for}` puedes simplificar programas de practica de las tablas de multiplicación.\n\n### Ejercicio 1\nMejora el codigo de ejemplo para que\n\n### Exercise 2\nGo back to your level 10 multiplication code, and modify it so that it uses a `{for}` and `{range}`.\n"
start_code: '# pon tu codigo aquí'
13:
- story_text: "\n### Ejercicio 1\nHagamos el programa de practica un poco mas dificíl. El jugador tiene que responder 2 preguntas correctamente. llena los espacios para completar el programa.\n\n### Ejercicio 2 (extra)\nAveces las calculadoras tienen muktiples respuestas. Por ejemplo, 10 se puede dividir por 5 y 2. Entonces la pregunta 'Que numero divide el 10?' se puede responder con 2 o 5.\nPide un cálculo que tenga múltiples respuestas correctas, pídele al jugador que lo responda y determine si es correcto usando`{or}`.\nVacía el campo de programación y crea tu propia solución.\n"
+ story_text: |2
+
+ ### Ejercicio 1
+ Hagamos el programa de practica un poco mas difícil. El jugador tiene que responder dos preguntas correctamente. Llena los espacios en blanco para completar el programa.
+
+ ### Ejercicio 2 Extra
+ A veces las calculadoras tienen múltiples respuestas correctas. Por ejemplo, 10 se puede dividir por 5 y 2. Entonces la pregunta '¿Qué numero divide el 10?' se puede responder con 2 y con 5.
+ Pide un cálculo que tenga múltiples respuestas correctas, pídele al jugador que lo responda y determine si es correcto usando`{or}`.
+ Vacía el campo de programación y crea tu propia solución.
example_code: "```\nrespuesta1 = {ask} 'Cuanto es 10 por 7?'\nrespuesta2 = {ask} 'Cuanto es 6 por 7?'\n{if} _ _ _ _ _ _ _\n {print} _\n```\n"
start_code: '# Escribe tu codigo aqui'
restaurant:
@@ -949,62 +966,90 @@ adventures:
example_code: |
```
{print} Bienvenido al restaurante Hedy's
- {ask} ¿Qué te gustaría pedir?
+ _ ¿Qué te gustaría pedir?
{echo} Así que te gustaría ordenar
{print} ¡Gracias por su pedido!
{print} ¡Está en camino!
```
start_code: "# pon tu código aquí"
- story_text_2: "¿Se te ocurre más líneas para añadir al código de tu restaurante? Por ejemplo, ¿puedes {ask} a los invitados qué les gustaría beber?, decirles el precio, o desearles una comida agradable?\n"
+ story_text_2: "### Ejercicio\nCopia el código de ejemplo en tu entrada en pantalla haciendo clic en el botón amarillo.\nPrimero, completa el comando correcto en los huecos en blanco para hacer que tu código funcione correctamente.\nDespués añade al menos 4 líneas más de código al programa del restaurante.\nPregunta a los clientes qué les gustaría beber y pregunta si quieren pagar en efectivo o con tarjeta.\nPor último, piensa una manera adecuada de despedirte de tus clientes.\n"
2:
story_text: |
- En nivel 2 puede expandir su restaurante mediante variables. En nivel 1 Hedy solo podía hacer eco ({echo}) de la orden una vez y solo recordar lo último que se ordenó.
- ¡Ahora puedes usar variables y Hedy puede recordar tanto la comida como las bebidas!
+ En el nivel 2 puedes ampliar su restaurante usando variables. En el nivel 1 Hedy sólo podía `{echo}` la orden una vez y sólo podía recordar lo último que se le pidió.
+ ¡Ahora puedes usar variables y Hedy puede recordar tanto la comida como los ingredientes!
start_code: "# pon tu código aquí"
example_code: "```\n{print} ¡Bienvenido al restaurante Hedy's!\n{print} Hoy estamos sirviendo pizza o lasaña.\ncomida {is} {ask} ¿Qué te gustaría comer?\n{print} ¡Muy buena elección! ¡La comida es mi favorita!\ncobertura {is} {ask} ¿Te gustaría carne o verduras en eso?\n{print} ¡La comida con cobertura está en camino!\n```\n"
- story_text_2: "¿Puedes hacer este código más elaborado? Por ejemplo, agregando bebidas a la orden, o...?\n"
+ story_text_2: "### Ejercicio\nCopia tu propio código del restaurante del nivel anterior a la pantalla de entrada de abajo.\nCorrige el código reemplazando los comandos `{ask}` y `{echo}` y usando variables, como las que has aprendido en este nivel.\n\nAhora que tu código funciona otra vez, es hora de añadir más cosas.\nObserva la última línea de código del ejemplo: ¡Marchando la comida `{print}` con cobertura!\nEn esta línea se han usado 2 variables para crear un resumen de tu pedido.\nAhora añade tu propio resumen de la comida y las bebidas pedidas por el cliente.\n\n**Extra** Ahora que has aprendido a usar variables, puedes usar tantas variables como quieras en una línea de código. ¿Puedes añadir más variables a tu código, como comer aquí o para llevar, efectivo o tarjeta, con o sin pajita etc.?\n"
11:
story_text: |
- Podemos usar `{for} i {in} {range} 1 {to} 5` para imprimir (`{print}`) los pedidos de varios clientes de manera ordenada.
+ Podemos usar el `{for}` con `{range}` para imprimir los pedidos de varios clientes de manera ordenada.
+
+ ### Ejercicio
+ Completa el código del restaurante, así podrás preguntar el pedido a varias personas. Imprime el número de pedido cada vez: 'Pedido 1', 'Pedido 2', etc.
+ ¿Estás seguro como va esto? Echa un vistazo a tu código del nivel 8.
- ¿Puedes con otro desafío de indetación?¡Haz que el código funcione agregando la cantidad correcta de indetación antes de cada línea!
+ **Extra** En el nivel 9 el restaurante también usó precios. ¡También puedes añadir eso aquí!
start_code: "# pon tu código aquí"
- example_code: "```\n{print} '¡Bienvenido al restaurante Hedys!'\npersona {is} {ask} '¿Para cuántas personas te gustaría pedir?'\n{for} i {in} {range} 1 {to} persona\n_ {print} 'El número de pedido ' i\n_ comida {is} {ask} '¿Qué te gustaría comer?'\n_ {print} comida\n_ {if} comida {is} papas fritas\n_ salsa {is} {ask} '¿Qué tipo de salsa te gustaría con eso?'\n_ {print} salsa\n_ bebidas {is} {ask} '¿Qué quieres tomar?'\n_ {print} bebidas\nprecio {is} 4 * persona\n{print} '¡Eso será ' precio ' dólares, por favor!'\n```\n"
+ example_code: "```\n{print} '¡Bienvenido al restaurante Hedy!'\npersonas = {ask} '¿Para cuanta gente le gustaría pedir?'\n{print} 'Así que quieres pedir para ' personas ' personas.'\n{print} \"¡Vamos!\"\n```\n"
10:
story_text: |
- En este nivel puedes aprender como {ask} (preguntar) las ordenes a tus clientes con un código muy corto.
+ Ene ste nivel aprenderás cómo preguntar los pedidos fácilmente para los diferentes platos.
+
+ ### Ejercicio 1
+ Completa el código con un `{ask}` en los espacios en blanco para que se le pregunte al cliente qué quieren comer en cada plato.
start_code: "platos = apertivo, plato principal, postre"
- story_text_2: "¡Por supuesto, también puedes ordenar para varias personas!\n¿Puedes agregar la cantidad correcta de indetanción a cada línea para hacerla funcionar correctamente?\nConsejo: algunas líneas no necesita tener indentación.\n"
- example_code: "```\nplatos = apertivo, principal, postre\n{for} plato {in} platos\n comida = {ask} '¿Que te gustaría ordenar como tu ' plato '?'\n {print} comida ' va a ser tu ' plato\n```\n"
+ story_text_2: "### Ejercicio\nPor supuesto, ¡también puedes pedir para varias personas!\n¿Puedes agregar la cantidad correcta de sangría a cada línea para hacer funcionar el código correctamente?\nConsejo: algunas líneas no necesita tener sangría.\n"
+ example_code: "```\nplatos = aperitivo, principal, postre\n{for} plato {in} platos\n {print} '¿Cuál es su pedido de ' platos '?'\n _ \n _\n```\n"
example_code_2: "```\n_ platos = apertivo, plato principal, postre\n_ nombres = Jesús, Génesis\n_ {for} nombre {in} nombres\n_ {for} plato {in} platos\n_ comida = {ask} '¿Que te gustaría ordenar como tu ' plato '?'\n_ {print} nombre ' ordenó ' comida ' como su ' plato\n```\n"
7:
story_text: |
En este nivel aprendiste a usar el comando `{repeat}` para repetir una línea de código un número de veces
- Puedes usar eso en tu restaurante para `{ask}` (preguntar) a varias personas qué les gustaría ver.
+ Puedes usar eso en tu restaurante para `{ask}` a varias personas qué les gustaría ver.
- ¿Puedes rellenar los espacios? Hedy necesitar repetir esta pregunta tantas veces como personas halla. Entonces si hay 5 personas, Hedy necesita hacer la pregunta 5 veces.
+ ### Ejercicio
+ ¿Puedes acabar el código? Hedy necesita repetir esta pregunta tantas veces como gente haya. Así que si hay 5 personas, tiene que hacer la pregunta 5 veces.
+ **Extra** Amplía tu código con mas preguntas, por ejemplo sobre bebidas o salsas.
start_code: "# pon tú código aquí"
- example_code: "```\n{print} '¡Bienvenido al restaurante Hedys!'\npersonas = {ask} '¿Cuántas personas se unen a nosotros hoy?'\n{repeat} _ {times} comida = {ask} '¿Qué te gustaría comer?'\n{print} '¡Gracias por su orden! ¡Ya casi está lista!'\n```\n"
+ example_code: "```\n{print} '¡Bienvenido al restaurante Hedys!'\npersonas = {ask} '¿Cuántas personas se unen a nosotros hoy?'\n```\n"
6:
story_text: |
- En este nivel puedes usar las matemáticas para calcular el precio total de la orden de tu cliente, lo que puede hacer que tu restaurante virtual más realista.
+ En este nivel puedes usar las matemáticas para calcular el precio total del pedido de tus clientes, que puede hacer tu restaurante virtual más realista.
+ Pero también puedes añadir más cosas a tu restaurante virtual, por ejemplo más platos.
+
+ ### Ejercicio
+ Puedes añadir más cosas a tu restaurante virtual. Por ejemplo, puedes...
+ - ¿preguntar cuanta gente va a venir y multiplicar el precio por esa cantidad?
+ - ¿añadir otro plato?
+ - ¿hacer un descuento cuando introduzcan un cupón de descuento (secreto)?
+ - ¿añadir un menú infantil?
+ - ¿piensa en otras cosas divertidas para añadir?
start_code: "# pon tú código aquí"
- example_code: "\nPuedes hacer un código de restaurante simple, como este:\n```\n{print} 'Bienvenido al restaurante Hedys'\n{print} 'Aquí está nuestro menú:'\n{print} 'Nuestros platos principales son pizza, lasaña o espaguetis'\nplato_principal {is} {ask} '¿Qué plato principal te gustaría?'\nprecio {is} 0\n{if} plato_principal {is} pizza precio {is} 10\n{if} plato_principal {is} lasaña precio {is} 12\n{if} plato_principal {is} espaguetis precio {is} 8\n{print} 'Has ordenado ' plato_principal\n{print} 'Eso será ' precio ' dólares, por favor'\n{print} '¡Gracias, disfruta de tu comida!'\n```\n"
+ example_code: "Puedes hacer un código de restaurante simple, como este:\n```\n{print} 'Bienvenido al restaurante Casa Hedy'\n{print} 'Aquí está nuestro menú:'\n{print} 'Nuestros platos principales son pizza, lasaña o espaguetis'\nplato_principal = {ask} '¿Qué plato principal te gustaría?'\nprecio = 0\n{if} plato_principal {is} pizza precio = 10\n{if} plato_principal {is} lasaña precio = 12\n{if} plato_principal {is} espaguetis precio = 8\n{print} 'Has pedido ' plato_principal\n{print} 'Eso será ' precio ' dólares, por favor'\n{print} '¡Gracias, que aproveche!'\n```\n"
5:
story_text: |
- En nivel 4 el comando `{if}` le permite `{ask}` (preguntar) a tus clientes y dar diferentes respuestas a las respuestas.
- En el ejemplo siguiente, ves que puedes `{ask}` (preguntar) al cliente `{if}`(si) si quiere escuchar los especiales y Hedy puede responder en consecuencia.
+ ### Ejercicio
+ El código de ejemplo te enseña como podrías programar que te has quedado sin una opción del menú en tu restaurante.
+ Copia tu propio código del restaurante de los niveles anteriores. Crea un problema en tu restaurante y añade el código, como el código de ejemplo que hiciste.
+ Por ejemplo, también puedes quedarte sin una opción del menú, o no aceptar tarjetas de crédito, o que la máquina del helado esté rota.
+
+ **Extra** ¿Has programado el problema y las respuestas apropiadas? Entonces intenta añadir más comandos `{if}` y `{else}` a tu código.
+ ¡Intenta añadir un `{if}` tras cada comando`{ask}` en tu código para hacer el código tan interactivo como sea posible!
start_code: "# pon tu código aquí"
- example_code: "```\n{print} '¡Bienvenido al restaurante Hedys!'\nespecial {is} {ask} '¿Te gustaría escuchar nuestros especiales hoy?'\n{if} especial {is} sí {print} 'El eespecial de hoy es el pollo piri piri y arroz.' {else} {print} 'No hay problema.'\ncomida {is} {ask} '¿Qué te gustaría comer?'\n{print} '¡Un ' comida ', ya mismo!'\nbebida {is} {ask} '¿Qué te gustaría beber con eso?'\n{if} bebida {is} cola {print} 'Lo siento, ¡nos quedamos sin cola!' {else} {print} '¡Muy buena elección!'\notra_cosa {is} {ask} '¿Te gustaría algo más?'\n{print} 'Déjame repetir tu pedido...'\n{print} 'Un ' comida\n{if} bebida {is} cola {print} 'y...' {else} {print} 'Un ' bebida\n{if} otra_cosa {is} no {print} '¡Eso es todo!' {else} {print} 'Un ' otra_cosa\n{print} '¡Gracias por su pedido y disfrute de su comida!'\n```\n"
+ example_code: "```\nbebidas_disponibles {is} agua, limonada, refresco de cola, zumo de naranja\nbebida {is} {ask} '¿Qué quieres beber?'\n{if} bebida {in} bebidas_disponibles {print} '¡Una ' bebida 'de camino!'\n{else} {print} 'Lo siento, no servimos eso'\n```\n"
4:
story_text: |
- En nivel 3 tienes que usar comillas cuando usas los comandos `{print}` y `{ask}`.
+ En este nivel tienes que usar comillas cuando uses los comandos `{print}` o `{ask}`.
- Agrega comillas a este código para hacer que funcione. Ten cuidado: las variables no deberían estar entre comillas.
+ ### Ejercicio
+ ¡Añade las comillas a este código para hacerlo funcionar! Ten cuidado: las variables no deben ir entre comillas.
+ Después, usa el comando `{clear}` para sólo mostrar una línea cada vez en tu pantalla de salida.
+
+ ### Ejercicio 2
+ Vuelve al nivel anterior y copia el código de tu restaurante. Haz que el código funcione en este nivel añadiendo comillas en el lugar correcto y añade varios comandos `{clear}`.
start_code: "# pon tu código aquí"
example_code: "```\n_ Agrega comillas a este código_\n{print} ¡Bienvenido al restaurante Hedys!\n{print} Hoy estamos sirviendo pizza o lasaña\ncomida {is} {ask} ¿Que te gustaría comer?\n{print} ¡Gran elección! ¡La comida es mi favorita!\ncobertura {is} {ask} ¿Te gustaría carne o vegetales encima de eso?\n{print} comida con cobertura está en camino!\nbebidas {is} {ask} ¿Que te gustaría para beber?\n{print} Gracias por tu orden.\n{print} Tu comida y bebidas ya van a estar!\n```\n"
3:
@@ -1012,31 +1057,30 @@ adventures:
¿Tienes problemas para decidir qué quieres cenar? ¡Puedes dejar que Hedy elija por ti!
Simplemente agregue listas de sus favoritos (o menos favorito) comidas y Hedy puede elegir al azar su cena.
También puedes divertirte un poco, ¡dejando que Hedy elija el precio de su cena también! ¿Qué vas a conseguir?
- ¿Puedes pensar en alguna adición divertida en el código de tu restaurante?
start_code: "# pon tu código aquí"
- example_code: "```\n{print} ¡Bienvenido a Hedy's Random Restaurant!\n{print} ¡El único restaurante que elegirá al azar su comida y su precio para usted!\nentradas {is} ensalada, sopa, carpaccio\nplato_principal {is} pizza, coles de Bruselas, espaguetis\npostres {is} brownies, helados, quesos franceses\nbebidas {is} cola, cerveza, agua\nprecios {is} 1 dólar, 10 dólares, 100 dólares\n{print} Comenzarás con: entradas {at} {random}\n{print} Luego serviremos: plato_principal {at} {random}\n{print} Y como postre: postres {at} {random}\n{print} Obtendrás una bebidas {at} {random} para beber\n{print} Eso será: precios {at} {random}\n{print} ¡Gracias y disfruta de tu comida!\n```\n"
- story_text_2: "¿Tu cliente tiene alguna alergía o no le gusta ciertos platos? Puedes usar el comando `{remove}` para quitarlos del menú.\n"
- example_code_2: "```\n{print} Malteada misteriosa\nsabores {is} fresa, chocolate, vainilla\nalergías {is} {ask} ¿Eres alérgico a algún sabor?\n_\n{print} Vas a beber una malteada de sabores {at} {random}\n```\n"
+ example_code: "```\nplatos {is} espaguetis, coles de Bruselas, hamburguesas\n{print} ¡Te servirán platos {at} {random} esta noche!\nprecio {is} 1 euro, 10 euros, 100 euros\n{print} Serán precio {at} {random} por favor.\n```\n"
+ story_text_2: "### Ejercicio\nAhora haz tu propia versión del restaurante al azar.\nHaz tú mismo una lista de entrantes, platos principales, postres, bebidas y precios.\nDespués usa los comandos `{print}` y `{at} {random}` para decirle los clientes qué habrá en su menú esta noche.\n"
+ example_code_2: "```\n{print} ¡Bienvenido a tu propio restaurante aleatorio!\nentrantes {is} _\nplatos principales {is} _\npostres {is} _\nbebidas {is} _\nprecios {is} _\n_\n```\n"
8:
story_text: "En este nivel puedes hacer tu restaurant más complejo repitiendo múltiples líneas de código. Así:\n"
- example_code: "```\n{print} '¡Bienvenido al restaurant Hedys'\npersonas = {ask} '¿Cuántas personas se nos van a unir hoy?'\n{print} '¡Genial!'\n{repeat} personas {times}\n comida = {ask} '¿Que te gustaría ordenar?'\n {print} comida\n{print} '¡Gracias por ordenar!'\n{print} '¡Disfruta tu comida!'\n```\n"
+ example_code: "```\n{print} '¡Bienvenido al restaurante Casa Hedy!'\npersonas = {ask} '¿Cuántas personas serán hoy?'\n{print} '¡Genial!'\n{repeat} personas {times}\n comida = {ask} '¿Que les gustaría pedir?'\n {print} comida\n{print} '¡Gracias por pedir!'\n{print} '¡Disfruten su comida!'\n```\n"
start_code: '# pon tú código aquí'
- story_text_2: "Claro, puedes expandir este código agregando más comidas al menú, ofreciendo bebidas, y/o múltiples platos, ¡agrega tantas opciones como quieras!\n"
+ story_text_2: "### Ejercicio\nEste código puede ampliarse con más cosas en el menú, por ejemplo ofreciendo bebidas, y/o varios platos o postres. Añade al menos una cosa más.\n**Extra** Añade incluso más cosas, ¡tantas opciones como quieras!\n"
12:
- story_text: "A partir de este nivel puedes usar números decimales para hacer que tu menú se vea más realista.\n\n¿Puedes pensar en un código para darle a tus amigos y familiares un 15% de descuento?\n"
- example_code: "```\nprecio = 0\ncomida = {ask} '¿Qué te gustaría ordenar?'\nbebida = {ask} '¿Que te gustaría beber?'\n{if} comida {is} 'hamburguesa'\n precio = precio + 6.50\n{if} comida {is} 'pizza'\n precio = precio + 5.75\n{if} bebida {is} 'agua'\n precio = precio + 1.20\n{if} bebida {is} 'refresco'\n precio = precio + 2.35\n{print} 'Serán ' precio ' dólares, por favor'\n```\n"
+ story_text: "A partir de este nivel puedes usar números decimales para hacer que tu menú sa más realista.\n\n### Ejercicio\n¿Puedes pensar en un código para darle a tus amigos y familiares un 15% de descuento?\n"
+ example_code: "```\nprecio = 0.0\ncomida = {ask} '¿Qué te gustaría pedir?'\nbebida = {ask} '¿Que te gustaría beber?'\n{if} comida {is} 'hamburguesa'\n precio = precio + 6.50\n{if} comida {is} 'pizza'\n precio = precio + 5.75\n{if} bebida {is} 'agua'\n precio = precio + 1.20\n{if} bebida {is} 'refresco'\n precio = precio + 2.35\n{print} 'Serán ' precio ' dólares, por favor'\n```\n"
start_code: '# pon tu código aquí'
9:
- story_text: "¡En este nivel puedes usar anidación para hacer tu restaurant más realista y divertido!\nPor ejemplo, puedes ofrecer una salsa si alguien ordena papas fritas, ¡pero no lo harías si alguien pide pizza!\n\n¡Este es un desafío para los cerebritos! Cada línea que necesita identación tiene un guión bajo.\n¿Puedes hacer que el código funcione agregando la cantidad correcta de indentación a cada línea que lo necesite!\n¡Buena suerte!\nTip: Si el cliente quiere una pizza, ¡Hedy no debería preguntar que salsa quiere el cliente!\n"
- example_code: "```\n{print} '¡Bienvenido al restaurant Hedys'\npersonas = {ask} '¿Cuántas personas se nos van a unir hoy?'\n{print} 'Great!'\nprecio = 0\n{repeat} persona {times}\n_ comida = {ask} '¿Que te gustaría ordenar?'\n_ {print} comida\n_ {if} comida {is} papas fritas\n_ precio = precio + 3\n_ salsa = {ask} '¿Qué clase de salsa te gustaría con esas papas fritas?'\n_ {if} salsa {is} no\n_ {print} 'sin salsa'\n_ {else}\n_ precio = precio + 1\n_ {print} 'con ' salsa\n_ {if} comida {is} pizza\n_ precio = precio + 4\n{print} 'Eso te va a costar ' precio ' dólares'\n{print} '¡Disfruta tu comida!'\n```\n"
+ story_text: "¡En este nivel puedes usar anidación para hacer tu restaurant más realista y divertido!\n\n### Ejercicio\nSe ha eliminado la sangría en el código de ejemplo. \n¿Puedes averiguar cuánta sangría necesita cada línea para que el código funcione correctamente?\nSi el cliente pide pizza, Hedy no debería preguntarle al cliente qué salsa quiere.\n\n**Extra** Un restaurante no almacena todas las salsas. Haz una lista de las salsas disponibles y da una respuesta con cada pedido si lo vendes. \n**Extra** Las pizzas tienen ingredientes. Pregunta al cliente cuál quieren. \n**Extra** ¿Los clientes quieren una bebida? ¡Pregúntaselo también! \n"
+ example_code: "```\n{print} '¡Bienvenido al restaurante Casa Hedy!'\npersonas = {ask} '¿Cuántas personas se nos van a unir hoy?'\n{print} '¡Genial!'\nprecio = 0\n{repeat} persona {times}\n_ comida = {ask} '¿Que le gustaría pedir?'\n_ {print} comida\n_ {if} comida {is} patatas fritas\n_ precio = precio + 3\n_ salsa = {ask} '¿Qué salsa le gustaría con sus patatas fritas?'\n_ {if} salsa {is} no\n_ {print} 'sin salsa'\n_ {else}\n_ precio = precio + 1\n_ {print} 'con ' salsa\n_ {if} comida {is} pizza\n_ precio = precio + 4\n{print} 'Serán ' precio ' dólares'\n{print} '¡Disfruta tu comida!'\n```\n"
start_code: '# pon tu código aquí'
15:
example_code: "```\n{print} 'Bienvenido a McHedy'\nmás = 'sí'\n{while} más == 'sí'\n pedido = {ask} '¿Qué te gustaría ordenar?'\n {print} pedido\n más = {ask} '¿Te gustaría pedir algo más?'\n{print} '¡Gracias!'\n```\n"
story_text: "Con el comando `{while}` puedes asegurarte que tus clientes sigan agregando ordenes hasta que gusten.\n"
start_code: '# pon tu código'
13:
- story_text: "En este nivel podemos usar los nuevos comandos para mejorar nuestro restaurantes.\nUsamos `{and}` para ver {if} si dos cosas son verdaderas.\n"
- example_code: "```\nprecio = 10\ncomida = {ask} '¿Qué te gustaría comer?'\nbebidas = {ask} '¿Qué te gustaría beber?'\n{if} comida {is} 'sandwich' {and} bebidas {is} 'jugo'\n {print} 'Ese es nuestro menú de descuento'\n precio = precio - 3\n{print} 'Eso sería ' precio ' dólares'\n```\n"
+ story_text: "En este nivel aprenderás nuevos comandos para ampliar tu código mucho más.\n\n### Ejercicio 1\nColoca un `{and}` y un `{or}` en la parte lógica del programa.\n\n### Ejercicio 2\nAmplia tu restaurante con al menos un `{and}` y un `{or}` más.\nPor ejemplo, crea un cupón de descuento especial que sólo se aplique a la pizza, o dale una bebida gratis a tu cliente\ncon sus patatas y tortitas. ¡O por supuesto algo completamente diferente!\n"
+ example_code: "```\n {print} 'Ese es nuestro menú de descuentos'\n precio = precio - 3\n{if} bebidas {is} 'agua' _ bebidas {is} 'zumo'\n {print} 'Esa es una opción sana'\n{print} 'Serán ' precio ' dólares'\n```\n"
start_code: '# pon tú código aquí'
fortune:
name: "El adivino"
@@ -1045,59 +1089,59 @@ adventures:
levels:
1:
story_text: |
- ¿Alguna vez has estado en un carnaval y tu futuro ha sido predicho por un adivino? ¿O alguna vez has jugado con una bola mágica de ocho?
+ ¿Alguna vez has estado en un carnaval y un adivino ha predecido tu futuro? ¿O alguna vez has jugado con una bola mágica de ocho?
Entonces probablemente sepas que realmente no pueden predecir tu futuro, ¡pero sigue siendo divertido jugar!
- ¡En los próximos niveles puedes aprender a crear tu propia máquina de adivinación!
- En nivel 1 puedes comenzar fácil dejando que Hedy se presente como adivina y dejes que se haga eco ({echo}) de las respuestas de los jugadores.
+ ¡En los próximos niveles puedes aprender a crear tu propia máquina de la fortuna!
+ En el nivel 1 puedes comenzar fácil dejando que Hedy se presente como adivina y dejes que haga `{echo}` de las respuestas de los jugadores.
Así:
start_code: "# pon tu código aquí"
example_code: "```\n_ ¡Hola, soy Hedy la adivina!\n_ ¿Quién es usted?\n_ Déjame mirar en mi bola de cristal\n_ Veo... Veo...\n_ Tu nombre es\n```\n"
- story_text_2: "Hedy ahora solo te dice tu nombre. ¿Puedes expandir el código para que Hedy pueda predecir más cosas sobre ti?\nObviamente, Hedy aún no es una muy buena adivina, ¡ya que solo puede repetir las respuestas que dieron los jugadores!\nEcha un vistazo en el nivel 2 para mejorar tu adivina.\n"
+ story_text_2: "### Ejercicio\nCopia el código de ejemplo en tu pantalla de entrada y rellena los espacios en blanco para hacer que tu código funcione.\n**Extra** Cambia el código y deja que el adivino no sólo prediga tu nomber, sino tambien tu edad, tu equipo favorito de deporte o cualquier otra cosa sobre tí mismo.\n"
3:
story_text: |
- En el nivel anterior has creado tu primera máquina de adivinación, pero Hedy realmente no podía predecir nada, sólo repetir ({echo}).
- En este nivel puedes utilizar una variable y el comando `{at} {random}` para dejar que Hedy escoja una pregunta. Mira este código, por ejemplo:
+ En los niveles anteriores has creado tu primera máquina de la fortuna, pero Hedy realmente no podía predecir nada, sólo `{echo}`.
+ En este nivel puedes utilizar una variable y el comando `{at} {random}` para dejar que Hedy escoja una respuesta para tí. Mira este código, por ejemplo:
start_code: "# pon tu código aquí"
- example_code: "\nEn este ejemplo, el jugador puede hacerle {ask} (preguntar) a Hedy una pregunta de sí-no y Hedy elegirá una respuesta aleatoria para ti.\n```\n{print} ¡Soy Hedy la adivina!\npregunta {is} {ask} ¿Qué quieres saber?\n{print} Esto es lo que quieres saber: pregunta\nrespuesta {is} yes, no, maybe\n{print} Mi bola de cristal dice...\n{sleep} 2\n{print} respuesta {at} {random}\n```\n"
- story_text_2: "Ahora Hedy solo puede responder si, no o quizás. ¿Puedes darle más opciones a Hedy, como 'definitivamente' o 'pregunta de nuevo'.\n"
+ example_code: "```\n{print} ¡Soy Hedy el adivino!\npregunta {is} {ask} ¿Qué quieres saber?\n{print} Esto es lo que quieres saber: pregunta\nrespuestas {is} sí, no, quizás\n{print} Mi bola de cristal dice...\n{sleep} 2\n{print} respuestas {at} {random}\n```\n"
+ story_text_2: "### Ejercicio\nAhora Hedy sólo puede responder si, no o quizás. ¿Puedes darle más opciones a Hedy, como 'sin duda' o 'pregunta de nuevo'.\n"
12:
story_text: "Desde el nivel 12, tendrás que usar comillas en las listas, antes y después de cada elemento.\n\n### Ejercicio \nAñade dos predicciones a la lista"
- example_code: "```\nfortuna = 'te resbalarás en una cáscara de plátano', _\n{print} 'Echaré un vistazo en mi bola de cristal para tu futuro'.\n{print} 'Veo... Veo...'\n{sleep}\n{print} 'Fortuna' {at} {random}\n```\n"
+ example_code: "```\nfortuna = 'te resbalarás con una cáscara de plátano', _\n{print} 'Echaré un vistazo en mi bola de cristal para tu futuro'.\n{print} 'Veo... Veo...'\n{sleep}\n{print} 'Fortuna' {at} {random}\n```\n"
start_code: '# pon tu código aquí'
10:
- story_text: "En este nivel vas a aprender como programar el juego MASH (mansión, apartamento, cabaña, casa). En ete juego puedes predecir el futuro de todos los jugadores al mismo tiempo.\n"
- example_code: "```\ncasas = mansión, apartmento, cabaña, casa\nama = nadie, alguien de la realeza, su vecino, su verdadero amor\nmascotas = perro, gato, elefante\nnombres = Genésis, Luis, Ashli\n{for} nombre {in} nombres\n {print} nombre ' vive en una ' casas {at} {random}\n {print} nombre ' se casará con ' ama {at} {random}\n {print} nombre ' tendrá un ' mascotas {at} {random} ' como su mascota.'\n {sleep}\n```\n"
+ story_text: "En este nivel aprenderás a programar el juego MACC (mansión, apartamento, cabaña, casa). En este juego puedes predecir para todos los jugadores a la vez, cuál será su futuro.\n\n### Ejercicio\nLlena los huecos en blanco usando el nuevo comando que has aprendido en este nivel.\n"
+ example_code: "```\ncasas = mansión, apartmento, cabaña, casa\nama = nadie, alguien de la realeza, su vecino, su verdadero amor\nmascotas = perro, gato, elefante\nnombres = Jenna, Ryan, Jim\n_\n {print} nombre ' vive en una ' casas {at} {random}\n {print} nombre ' se casará con ' ama {at} {random}\n {print} nombre ' tendrá un ' mascotas {at} {random} ' como su mascota.'\n {sleep}\n```\n"
start_code: '# pon tú código aquí'
6:
- story_text: "En este nivel puedes usar matemáticas para en tus predicciones de adivino. Esto te permite crear fórmulas (bobas) para calcular el futuro.\nPor ejemplo, puedes calcular cuán rico vas a ser o cuantos niños vas a tener cuando crezcas.\n\n\n\n¿Puedes pensar en tu (boba) máquina adivina?\n"
- example_code: "```\n{print} '¡Soy Hedy la adivina!'\n{print} '¡Puedo predecir cuantos niños tendrás cuando crezcas!'\nedad = {ask} '¿Qué edad tienes?'\nhermanos = {ask} '¿Cuántos hermanos tienes?'\nlongitud = {ask} '¿Cuántos centimetros mides?'\nniños = longitud / edad\nniños = niños - hermanos\n{print} 'Tendrás ...'\n{sleep}\n{print} niños ' niños!'\n```\n\n¡Si el ejemplo anterior no te parece lo suficientemente bobo, mira este!\n```\n{print} '¡Soy Hedy la adivina!'\n{print} '¡Voy a predecir que tan inteligente eres!'\nfutbol = {ask} '¿En una escala del 1-10 cuánto amas el fútbol?'\nbananas = {ask} '¿Cuántas bananas comiste esta semana?'\nhigiene = {ask} '¿Cuántas veces te lavaste las manos hoy'\nresultado = bananas + higiene\nresultado = resultado * futbol\n{print} 'Eres ' resultado ' por ciento inteligente.'\n```\n"
+ story_text: "En este nivel puedes usar matemáticas para en tus predicciones de adivino. Esto te permite crear fórmulas (bobas) para calcular el futuro.\nPor ejemplo, puedes calcular cuán rico vas a ser o cuantos niños vas a tener cuando crezcas.\n\n\n\n### Ejercicio\n¿Puedes pensar en tu (boba) máquina adivina?\n"
+ example_code: "```\n{print} '¡Soy Hedy el adivino!'\n{print} '¡Puedo predecir cuántos hijos tendrás cuando crezcas!'\nedad = {ask} '¿Cuántos años tienes?'\nhermanos = {ask} '¿Cuántos hermanos tienes?'\naltura = {ask} '¿Qué altura tienes en centímetros?'\nniños = altura / edad\nniños = niños - hermanos\n{print} 'Tendrás...'\n{sleep}\n{print} niños ' niños!'\n```\n"
start_code: '# pon tu código aquí'
5:
- story_text: "¡En este nivel vas a aprender a (secretamente) voltear las chances a tu favor cuando usas el adivino!\nUsando `{if}` y `{else}` puedes asegurarte que siempre vas a tener buena suerte, mientras otras personas puede que no.\nMira este ejemplo para descubrir como.\n"
- example_code: "```\n{print} '¡Soy Hedy la adivina!'\n{print} '¡Puedo predecir si ganarás la lotería mañana!'\npersona {is} {ask} '¿Quién eres?'\n{if} persona {is} Hedy {print} '¡Definitivamente vas a ganar!🤩' {else} {print} '¡Mala suerte! ¡Alguien más va a ganar!😭'\n```\n"
+ story_text: "### Ejercicio\nEn este código de ejemplo verás como hacer un programa adivino que te permita inclinar las posibilidades a tu favor. Este programa de trampas siempre te dice que vas a ganar la lotería, pero tus amigos nunca ganarán.\n\nUsa esto para hacer tu propio programa, ¡sé creativo! Por ejemplo puedes crear un código que prediga que:\n* ¡tu equipo favorito vencerá a todos sus rivales!\n* ¡se elegirá tu película favorita para la película de la noche!\n* ¡ganas entrada para tu espectáculo favorito!\n* eres el más hermoso de todos, como el espejo mágico de Blancanieves.\n¡Deja que tu imaginación haga el trabajo!\n\nTu programa tiene que ser de al menos 10 líneas de código y tiene que tener al menos un comando `{if}` y `{else}`.\n"
+ example_code: "```\namigos {is} Jordan, Lucía, David\n{print} '¡Puedo predecir si ganarás mañana la lotería!'\npersona {is} {ask} '¿Quién eres?'\nrespuesta_buena {is} ¡Hurra! ¡Ganaste!, ¡Seguro que ganarás!, ¡Tenemos un ganador!\nrespuesta_mala {is} ¡Mala suerte! ¡Inténtalo de nuevo!, ¡Otra persona ganará, Tú perderás!\n{if} persona {in} amigos {print} respuesta_buena {at} {random}\n{else} {print} respuesta_mala {at} {random}\n```\n"
start_code: '# pon tu código aquí'
4:
example_code: "```\n_ Agrega las comillas a este código _\n{print} ¡Soy Hedy la adivina!\npregunta {is} {ask} ¿Qué quieres saber?\n{print} Esta es tu pregunta: pregunta\nrespuesta {is} sí, no, quizás\n{print} Mi bola de cristal dice...\n{sleep} 2\n{print} respuesta {at} {random}\n```\n"
- story_text: "Este nivel no tiene funciones nuevas, pero te permite practicar usando las comillas.\nPuedes rehacer tu código del nivel 3, ¡y asegurarte de agregar las comillas en los lugares correctos!\n\nTen en cuenta que en el nivel 3 no podíamos usar la palabra 'pregunta' como el nombre de la variable y una palabra normal que podía ser mostrada en pantalla.\n¡Las comillas en el nivel 3 hacen que eso sea posible!\n\n¡Importante! Ten en cuenta que ahora que Hedy usa comillas, se va a confundir cuando uses el apóstrofe o comillas dentro de las palabras.\nAsegúrate de quitar ese apóstrofe.\n\nHemos quitado todas las comillas de este código de ejemplo, ¿puedes agregarla en los lugares correctos?\n"
+ story_text: "Este nivel no tiene funciones nuevas, pero te permite practicar usando las comillas.\nPuedes rehacer tu código del nivel 3, ¡y asegurarte de añadir las comillas en los lugares correctos!\n\nTen en cuenta que en el nivel 3 no podíamos usar la palabra 'pregunta' como el nombre de la variable y una palabra normal que podía ser mostrada en pantalla.\n¡Las comillas en el nivel 4 hacen que eso sea posible!\n\n### Ejercicio\nHemos eliminado todas las comiilas del código de ejemplo, ¿puedes añadirlas en todos los lugares correctos?\n\n### Ejercicio 2\nVuelve al nivel anterior y copia tu código del adivino. Haz que el código funcione en este nivel añadiendo comillas en los puntos correctos.\n"
start_code: '# pon tu código aquí'
8:
- story_text: "En el nivel anterior aprendiste como usar el `{repeat}` para hacer que el adivino responda 3 preguntas seguidas, pero teníamos un problema cuando queríamos mostrar las preguntas.\nAhora el problema está resuelto, por la nueva forma de usar el comando `{repeat}`.\n¡En el próximo ejemplos puedes pedirle al adivino que pregunte y muestre 3 preguntas!\n\n### Exercise\n¿Puedes rellenar los espacios en el comando `{repeat}` para que funcione?\n"
+ story_text: "!En el siguiente ejemplo puedes hacer que tu adivino haga varias preguntas y también que las imprima!\n\n### Ejercicio\n¿Puedes poner los comandos correctos en los huecos en blanco?\n"
example_code: "```\n{print} '¡Soy Hedy la adivina!'\n{print} 'Puedes hacerme 3 preguntas'\nrespuestas = sí, no, quizás\n_ _ _\n pregunta = {ask} '¿Que quieres saber?'\n {print} pregunta\n {sleep}\n {print} 'Mi bola de cristal dice...' respuestas {at} {random}\n```\n"
start_code: '#pon tu código aquí'
7:
- story_text: "En este nivel pudes usar el comando `{repeat}` para hacer que tú máquina pueda hacer varias predicciones a la vez.\n"
- example_code: "```\n{print} '¡Soy Hedy la adivina!'\n{print} '¡Puedes hacer 3 preguntas!'\n{repeat} 3 {times} pregunta = {ask} '¿Que quieres saber?'\nrespuesta = sí, no, quizás\n{repeat} 3 {times} {print} 'Mi bola de cristal dice... ' respuesta {at} {random}\n```\n"
+ story_text: "### Ejercicio\nCompleta este programa que te dice si tu romance te quiere o no.\n"
+ example_code: "```\n{print} 'Tengo una flor con pétalos mágicos'\n{print} 'Si coges los pétalos la flor te dirá si tu amor también te querrá'\ncantidad = {ask} '¿Cuántos pétalos quieres coger?'\nopciones = te quiere, no te quiere\n_ _ _ _ opciones {at} {random}\n```\n"
start_code: '# pon tu código aquí'
parrot:
name: Loro
levels:
2:
- story_text: "Crea tu propia mascota online, ¡un loro que copiará lo que digas!\n"
- example_code: "```\n{print} Soy Hedy la lora\nnombre {is} {ask} ¿Cuál es tu nombre?\n{print} nombre\n{sleep}\n{print} squawk\n{sleep}\n{print} nombre\n```\n"
+ story_text: "En el nivel anterior has hecho un loro que repetirá todo después de ti. En este nivel harás que el loro interactivo usando una variable y el comando `{ask}`.\nTambién haremos el loro más realista añadiendo comandos `{sleep}` después de que diga algo.\n"
+ example_code: "```\n{print} Soy Hedy el loro\nnombre _ _ ¡cómo te llamas?\n{print} nombre\n_\n{print} graznido\n_\n{print} nombre\n```\n"
start_code: '{print} ¡Soy Hedy la lora!'
- story_text_2: "### Desafío\nPuedes utilizar variables para hacer que el loro diga más cosas aparte de tu nombre. ¿Puedes completar este código?\n"
+ story_text_2: "### Ejercicio\nLo primero de todo, acaba la línea 2 con un comando `{is}` y un `{ask}`.\nDespués pon un comando `{sleep}` en la línea 4 y 6 para dejar al loro tranquilo durante un rato.\n\n**Extra** ¿Puedes hacer que el loro pregunte algo más que tu nombre añadiendo más líneas de código?\n"
1:
story_text: "¡Crea tu propia mascota online, un loro que copiará lo que digas!\n"
example_code: "```\n{print} Soy Hedy la lora\n{ask} ¿Cuál es tu nombre?\n{echo}\n{echo}\n```\n"
@@ -1117,8 +1161,8 @@ adventures:
story_text: "¡Recompensa tu loro si dice la ¡palabra correcta!\n\n### Ejercicio\nFinaliza el código llenando los 4 comandos que faltan.\n"
start_code: '# pon tu código aquí'
3:
- story_text: "Enseña a tu loro una nueva palabra con `{add}`.\n### Desafío\n¿Cómo puedes hacer que tu loro diga varias palabras?\n"
- example_code: "```\npalabras {is} squawk, Hedy\n{print} ¡Entrena a tu lora!\nnueva_palabra {is} {ask} ¿Que palabra le quieres enseñar?\n{add} nueva_palabra {to_list} palabras\n{print} 🧒 ¡Di nueva_palabra, Hedy!\n{print} 🦜 palabras {at} {random}\n```\n"
+ story_text: "Enseña a tu loro una nueva palabra con `{add}`.\n### Ejercicio\n¿Puedes añadir el comando`{add} {to}` para hacer que el código funcione?\n"
+ example_code: "```\npalabras {is} graznido, Hedy\n{print} ¡Entrena a tu loro!\nnueva_palabra {is} {ask} ¿Que palabra le quieres enseñar?\n_ nueva_palabra _ palabras\n{print} 🧒 Di nueva_palabra, Hedy!\n{print} 🦜 palabras {at} {random}\n```\n"
start_code: '# pon tu código aquí'
4:
start_code: '# Escribe tu código aquí'
@@ -1133,9 +1177,9 @@ adventures:
example_code: "```\n{print} 'Escape de la Casa Embrujada'\nvidas = 3\npuertas = 1, 2, 3\nmonstruos = 'la bruja malvada', 'un zombie', 'un perro de 3 cabezas durmiendo'\n{for} i {in} {range} 1 {to} 10\n {if} vidas > 0\n puerta_buena = puertas {at} {random}\n monstruo = monstruos {at} {random}\n puerta_escogida = {ask} '¿Que puerta escoges?'\n {if} puerta_buena == puerta_escogida\n {print} 'Has escogido la puerta correcta'\n {else}\n {print} 'Ves un...' monstruo\n {if} monstruo == 'un perro de 3 cabezas durmiendo'\n {print} 'Fiiiuuuuu.... Esta durmiendo'\n {else}\n {print} 'Pierdes una vida'\n vidas = vidas -1\n {else}\n {print} 'JUEGO TERMINADO'\n```\n"
start_code: '# pon tu código aquí'
4:
- story_text: "En este nivel vas a aprender como usar comillas en tus juegos.\n¿Puedes hacer que tu Casa Encantada resistente al nivel 4?\n"
+ story_text: "En este nivel vas a aprender como usar comillas en tus juegos.\n\n### Ejercicio\n¿Puedes hacer que tu Casa Encantada resistente al nivel 4?\n\n### Ejercicio 2\nVuelve al nivel anterior y copia el código de tu casa embrujada. Haz que el código funcione en este nivel añadiendo comillas en los lugares adecuados.\n"
start_code: '# pon tú código aquí'
- example_code: "```\n{print} _¡Escapa de la casa encantada!_\n{print} _Hay 3 puertas..._\nelección {is} {ask} _¿Qué púerta quieres escoger?_\n{print} _Escogiste ..._ elección\nmonstruo {is} un zombie, un vampiro, NADA ESCAPASTE\n{print} _Ves..._\n{sleep}\n{print} monstruo {at} {random}\n ```\n"
+ example_code: "```\n_ Añade comillas a este código _\n{print} ¡Escapa de la casa encantada!\n{print} Hay 3 puertas delante de tí...\nelección {is} {ask} ¿Qué puerta eliges?\n{print} Escogiste ... elección\nmonstruo {is} un zombi, un vampiro, NADA DE LO QUE HAYAS ESCAPADO\n{print} Ves...\n{sleep}\n{print} monstruo {at} {random}\n ```\n"
16:
story_text: "Este juego de la casa embrujada usa la conexión entre las listas que aprendiste a usr en este nivel.\nPor ejemplo: todas las características que pertenecen al primer zombie están todas en las listas, la segunda para la bruja y la tercera para el vampiro.\n¡Échale un vistazo al códgio!\n"
example_code: "```\nnumbers = [1, 2, 3]\ni = numbers[{random}]\nhint = ['growling', 'a cackling laugh', 'fluttering batwings']\nmonsters = ['zombie', 'witch', 'vampire']\nbad_fate = ['Your brain is eaten', 'You are forever cursed', 'You are bitten']\ngood_fate = ['You throw the ham. The zombie is distracted and starts eating it.', 'You set the curtains on fire. The witch flees out of fear for the fire', 'The vampire hates garlic and flees']\nweapons = ['ham', 'lighter', 'garlic']\n{print} 'You are standing in front of an old mansion'\n{print} 'Something is not right here'\n{print} 'You hear ' hint[i]\n{print} 'You are going to explore it'\n{print} 'You enter the kitchen and see a lighter, a raw ham and a garlic.'\nyour_weapon = {ask} 'What do you bring with you?'\n{print} 'With your ' your_weapon ' you enter the living room'\n{print} 'There you find a ' monsters[i]\nneeded_weapon = weapons[i]\n{if} your_weapon == needed_weapon\n {print} 'You use your ' your_weapon\n {print} good_fate[i]\n {print} 'YOU WIN!'\n{else}\n {print} 'You have chosen the wrong weapon...'\n {print} bad_fate[i]\n {print} 'GAME OVER'\n```\n"
@@ -1144,36 +1188,36 @@ adventures:
story_text: "En esta aventura vas a a empezar a hacer un juego en el cual necesitas escapar de una casa embrujada escogiendo la puerta correcta.\nSi escoges la puerta correcta vas a sobrevivir, pero sino un terrible monstruo podría...\n\nEn el nivel 1 vamos a empezar nuestro juego de la casa embrujada haciendo una historia de terror y preguntando al jugador que ven en la casa embrujada.\n"
example_code: "```\n{print} ¿Cómo llegué aquí?\n{print} Recuerdo que mi amigo me estaba diciendo que fuéramos a la mansión...\n{print} y de repente todo se volvio negro.\n{print} ¿Pero como termine en el suelo...?\n{print} ¡Mi cabeza me duele como si me hubieran golpeado con un bate de baseball!\n{print} ¿Qué es ese sonido?\n{print} Oh no! ¡Siento que no estoy solo en esta casa!\n{print} ¡Necesito salir de aquí!\n{print} Hay 3 puertas...\n{ask} ¿Cual puerta debería escoger?\n{echo} Escogo la puerta\n{print} ...?\n```\n"
start_code: '{print} ¿Cómo llegue aquí?'
- story_text_2: "¿Puedes terminar la historia de terror? ¿O hacer tu propia historia de una casa embrujada?\n"
+ story_text_2: "### Ejercicio\nCopia el código de ejemplo a tu entrada de pantalla haciendo clic en el botón amarillo.\nAhora completa la historia añadiendo al menos 5 líneas de código.\nRecuerda que cada línea de código empiece con un comando `{print}` .\n"
2:
story_text: "En esta casa embrujada puedes escoger tus monstruos con emojis. Claro que también puedes usar palabras.\n"
start_code: monstruo1 {is} _
- example_code: "```\nmonstruo_1 {is} 👻\nmonstruo_2 {is} 🤡\nmonstruo_3 {is} 👶\n{print} Entras en la casa embrujada\n{print} De repende ves un monstruo_1\n{print} ¡Vas al otro cuarto, pero ves que un monstruo_2 te está esperando allí!\n{print} ¡Oh no! Ve rápido a la cocina.\n{print} ¡Pero tan pronto entras allí el monstruo_3 te ataca!\n```\n"
- story_text_2: "En el ejemplo de arriba los monstruos están predeterminados. De forma que cada vez que ejecutas tu código, el resultado es el mismo.\n¿Puedes agregar un comando `{ask}` para hacer que interactiva la casa embrujada y dejar que los jugadores escojan que monstruos se encuentran?\n"
- example_code_2: "```\nmonstruo_1 {is} _\nmonstruo_2 {is} _\nmonstruo_3 {is} _\n{print} Entras en la casa embrujada\n{print} De repende ves un monstruo_1\n{print} ¡Vas al otro cuarto, pero ves que un monstruo_2 te está esperando allí!\n{print} ¡Oh no! Ve rápido a la cocina.\n{print} ¡Pero tan pronto entras allí el monstruo_3 te ataca!\n```\n"
+ example_code: "```\nmonstruo_1 {is} 👻\nmonstruo_2 {is} 🤡\nmonstruo_3 {is} 👶\n{print} Entras en la casa embrujada.\n{print} De repende ves al monstruo_1\n{print} Vas al otro cuarto...\n{print} Pero ves que el monstruo_2 ¡te está esperando allí!\n{print} ¡Oh no! Rápido, ve a la cocina.\n{print} ¡Pero tan pronto entras allí el monstruo_3 te ataca!\n```\n"
+ story_text_2: "### Ejercicio\nEn el ejemplo de arriba los monstruos están predeterminados. De forma que cada vez que ejecutas tu código, el resultado es el mismo.\n¿Puedes agregar un comando `{ask}` para hacer que interactiva la casa embrujada y dejar que los jugadores escojan que monstruos se encuentran?\n"
+ example_code_2: "```\nmonstruo_1 {is} _\nmonstruo_2 {is} _\nmonstruo_3 {is} _\n{print} Entras en la casa embrujada.\n{print} De repende ves al monstruo_1\n{print} Vas al otro cuarto...\n{print} Pero ves que el monstruo_2 ¡te está esperando allí!\n{print} ¡Oh no! Rápido, ve a la cocina.\n{print} ¡Pero tan pronto entras allí el monstruo_3 te ataca!\n```\n"
11:
- story_text: "En este nivel hemos cambiado el comando repetir (repeat) y hemos añadido una línea a nuestra casa encantada que le dice al jugador en qué habitación están.\n\nTermina el programa con la línea correcta de código. Ten en cuenta que el jugador debe sobrevivir 3 habitaciones antes de ganar.\n"
- example_code: "```\n{print} '¡Escapa de la casa encantada!'\njugador {is} vivo\npuertas = 1, 2, 3\nmonstruos = zombie, vampiro, araña gigante\n_\n {if} jugador {is} vivo\n puerta_correcta = puertas {at} {random}\n {print} 'Habitación ' i\n {print} 'Hay 3 puertas frente a ti...'\n puerta_elegida = {ask} '¿Qué puerta eliges?'\n {if} puerta_elegida {is} puerta_correcta\n {print} '¡No hay monstrous aquí!'\n {else}\n {print} 'The ha comido un ' monstruos {at} {random}\n jugador = muerto\n {else}\n {print} '¡FIN DEL JUEGO!'\n{if} jugador {is} vivo\n {print} '¡Genial! ¡Has sobrevivido!'\n```\n"
+ story_text: "En este nivel hemos cambiado el comando `{for}` para que podamos decirle al jugador donde están. \n\n### Ejercicio 1\nCompleta el programa para que el jugador sepa en qué habitación están.\n\n### Ejercicio 2\nConvierte el programa en una aventura siguiendo estos pasos:\n\n1. Haz una lista de opciones (como: pelear o volar)\n2. Asegúrate que el jugador puede elegir una opción con `{ask}`\n3. ¿Es la respuesta correcta? Entonces pueden pasar al siguiente monstruo. ¿Dieron una respuesta incorrecta? Házselo saber con un `{print}`. \n\n**Extra** Si haces una opción incorrecta, ¡se sigue mostrando un monstruo! ¿Cómo cambiarías eso?\n"
+ example_code: "```\n{print} '¡Escapa de la Casa Encantada!'\nmonstruos = zombi, vampiro, araña gigante\n_\n {print} '¡Habitación ' i\n monstruo = monstruos {at} {random}\n```\n"
start_code: "{print} '¡Escapa de la casa encantada!'"
9:
- story_text: "En este nivel, puedes utilizar anidados (nesting), ¡que te permitirán hacer la casa encantada aún mas interactiva!\n\nAhora es muy difícil ganar, ¿Puedes hacer que sea más fácil ganar?\nPor ejemplo, ¿puedes hacer que solo haya 1 puerta incorrecta y 2 correctas?\n"
+ story_text: "En este nivel puedes usar anidaciones, ¡lo que te permite hacer tu casa encantada incluso más interactiva!\n\n### Ejercicio\nAhora este juego es muy dificil de vencer, ¿lo puedes hacer más fácil de ganar?\n¿Cambias tu código para que sólo tenga una puerta incorrecta y dos correctas en vez de una correcta y dos incorrectas?\nConsejo: Esto significa cambiar tu variable puerta_correcta a puerta_incorrecta, y cambiar el código `{if}` y `{else}` .\nY claro que puedes cambiar la historia y hacerla a tu manera. ¡Cambia los monstruos o conviértelo en un concurso donde recibirás un regalo!\n"
example_code: "```\n{print} 'Escape de la Casa Embrujada!'\njugador = vivo\npuertas = 1, 2, 3\nmonstruos = zombie, vampiro, araña gigante\n{repeat} 3 {times}\n {if} jugador {is} vivo\n puerta_correcta {is} puertas {at} {random}\n {print} 'Hay 3 puertas...'\n puerta_escogida = {ask} '¿Qué puerta quieres escoger?'\n {if} puerta_escogida {is} puerta_correcta\n {print} '¡No hay monstruos aquí!'\n {else}\n {print} 'Te comió un ' monstruos {at} {random}\n jugador = muerto\n {else}\n {print} 'JUEGO TERMINADO'\n{if} jugador {is} vivo\n {print} '¡Genial! ¡Sobreviviste!'\n```\n"
start_code: "{print} '¡Escapa de la casa encantada!'"
5:
- story_text: "Hasta este nivel el juego de la casa encantada siempre preguntaba al jugador que eligiera una puerta, pero como puede que te hayas dado cuenta los jugadores no necesitaban responder correctamente.\nSi el jugador respondía algo aleatorio, el juego funcionaría igual y el jugador ¡puede que hasta ganase! (pese a que no eligiese una puerta).\nEn este nivel, solo podrás ganar el juego si eliges la puerta que Hedy eligió de forma aleatoria.\n\n¿Puedes encontrar las cuatro palabras faltantes para completar el código?\n"
+ story_text: "Hasta este nivel el juego de la casa encantada siempre preguntaba al jugador que eligiera una puerta, pero como puede que te hayas dado cuenta los jugadores no necesitaban responder correctamente.\nSi el jugador respondía algo aleatorio, el juego funcionaría igual y el jugador ¡puede que hasta ganase! (pese a que no eligiese una puerta).\nEn este nivel, solo podrás ganar el juego si eliges la puerta que Hedy eligió de forma aleatoria.\n\n### Ejercicio\n¿Puedes encontrar las cuatro palabras faltantes para completar el código?\n"
example_code: "```\n{print} '¡Escapa de la casa encantada!'\n{print} 'Hay tres puertas frente a ti...'\npuertas {is} 1, 2, 3\nmonstruos {is} hombre lobo, momia, vampiro, zombie\npuerta_elegida {is} {ask} '¿Qué puerta eliges?'\n{print} 'Has elegido la puerta...' puerta_elegida\n{sleep}\npuerta_correcta {is} puertas {at} {random}\n_ _ _ _ {print} '¡Genial! ¡Has escapado!'\n{else} {print} '¡O no! The ha comido un...' monstruos {at} {random}\n```\n"
start_code: '# pon tu código aquí'
3:
- story_text: "En los niveles anteriores hiciste la introducción al juego de la casa embrujada, pero como te habrás dado cuenta, la historia siempre termina en un final tenebroso.\nEn este nivel puedes hacer que tu historia sea más interactiva cambiando el resultado del juego; ¡algunas veces te comerán, otras veces escaparás!\n¡Deja que Hedy decida aleatoriamente!\n"
+ story_text: "En los niveles anteriores hiciste la introducción al juego de la casa embrujada, pero como te habrás dado cuenta, la historia siempre termina en un final tenebroso.\nEn este nivel puedes hacer que tu historia sea más interactiva cambiando el resultado del juego; ¡algunas veces te comerán, otras veces escaparás!\n¡Deja que Hedy decida aleatoriamente!\n\n### Ejercicio\nCopia los códigos de ejemplo y rellena los espacios ¡para hacerlo funcionar!\n\n**Extra** Esta historia es bastante sencilla, tal vez puedes asustarla más añadiendo una historia más emocionante.\nAdemás ahora mismo tienes finales muy limitados, sólo hay 3 opciones sobre que hay detrás de las puertas. ¡Quizá puede pensar en más monstruos para añadir a la lista!\n"
start_code: '# pon tu código aquí'
- example_code: "```\n_ Escape from the haunted house!\n_ There are 3 doors in front of you...\n_ _ _ Which door do you choose?\n_ You picked door ... choice\nmonsters _ a zombie, a vampire, NOTHING YOUVE ESCAPED\n_ You see...\n{sleep}\n_ _ _ _\n```\n"
+ example_code: "```\n_ ¡Escapa de la casa embrujada!\n_ Hay 3 puertas delante de tí...\n_ _ _ ¡Qué puerta eliges?\n_ Elegiste ... opción\nmonstruos _ a zombi, a vampiro, NADA DE LO QUE HAYAS ESCAPADO\n_ Mira...\n{sleep}\n_ _ _ _\n```\n"
name: La Casa Embrujada
description: Escapa de la casa embrujada
default_save_name: La Casa Embrujada
piggybank:
levels:
12:
- story_text: "En esta aventura aprenderás como hacer una hucha virtual.\nTermina el código que calculará cuanto dinero tienes y cuando tiempo debes ahorrar para comprar lo que quieres\n"
+ story_text: "En esta aventura aprenderás como hacer una hucha virtual.\n\n### Ejercicio\nTermina el código para calcular cuánto dinero tienes y cuando tiempo debes ahorrar ¡para comprar lo que quieres!\n**Extra** ¿Quizás ya hayas ahorrado algo de dinero? Réstalo de la cantidad que tendrás que ahorrar.\n"
example_code: "```\n{print} '¡La hucha virtual!'\ndeseo = {ask} '¿Qué quieres comprar?'\nprecio = {ask} '¿Cuánto cuesta?'\nahorrado = {ask} '¿Cuánto dinero tienes ahorrado?'\npaga = {ask} '¿Cuánto dinero obtienes por semana?'\na_ahorrar = precio - ahorrado\nsemanas = a_ahorrar / paga\n{print} 'Podrás comprar un ' _ ' en ' _ ' semanas.'\n```\n"
start_code: '# pon tu código aquí'
14:
@@ -1199,7 +1243,7 @@ adventures:
example_code: "```\npalabras_francesas = ['bonjour', 'ordinateur', 'pomme de terre']\ntraducción = ['hola', 'computadora', 'papa']\npuntuación = 0\n{for} i {in} {range} 1 {to} 3\n respuesta = {ask} '¿Qué signfica ' palabras_francesas[i] '?'\n correcta = traducción[i]\n {if} respuesta == correcta\n {print} '¡Correcto!'\n puntuación = puntuación + 1\n {else}\n {print} 'No, ' palabras_francesas[i] ' significa ' traducción[i]\n{print} 'Tuviste ' puntuación ' respuestas correctas.'\n```\n"
start_code: '# pon tu código aquí'
5:
- story_text: "Haz tu propio programa para practicar tu vocabulario en un nuevo idioma.\n\n¿Puedes hacer un programa para un idioma diferente? ¿Puedes añadir más palabras al Francés?\n"
+ story_text: "Haz tu propio programa para practicar tu vocabulario en un nuevo idioma.\n\n### Ejercicio\nHaz tu código más largo añadiendo al menos 3 palabras más para que las aprenda el jugador.\n**Extra** Por supuesto, puedes elegir un idioma distinto al francés. Puedes cambiar tu código a cualquier idioma que te gustaría aprender.\n"
start_code: '# pon tu código aquí'
example_code: "```\n{print} '¡Aprende Francés!'\ngato {is} {ask} '🐱'\n{if} gato {is} chat {print} '¡Muy bien!'\n{else} {print} 'No, gato es chat'\nrana {is} {ask} '🐸'\n{if} rana {is} grenouille {print} '¡Wow! ¡Genial!'\n{else} {print} 'No, rana es grenouille'\n```\n"
name: Idioma
@@ -1208,11 +1252,11 @@ adventures:
secret:
levels:
12:
- story_text: "En esta aventura podrás crear tu propio código secreto. Codifica un mensaje que solo la persona correcta podrá descifrar.\nSi el enemigo intenta descifrar el código, obtendrán un mensaje falso para hacerles perder el tiempo.\n\nCrea tu propio código secrete para tu super espía. ¿Puedes hacer que use aún más variables?\n"
- example_code: "```\nnombre {is} {ask} '¿Cual es tú nombre?'\nif nombre {is} 'Agente007'\n a {is} 'Ve al aeropuerto '\n{else}\n a {is} 'Ve a la estación '\ncontraseña {is} {ask} '¿Cuál es la contraseña?'\n{if} contraseña {is} 'SUPERSECRETO'\n b {is} 'mañana a las 02.00'\n{else}\n b {is} 'hoy a las 10.00'\n{print} a + b\n```\n"
+ story_text: "En esta aventura podrás crear tu propio código secreto. Codifica un mensaje que solo la persona correcta podrá descifrar.\nSi el enemigo intenta descifrar el código, obtendrán un mensaje falso para hacerles perder el tiempo.\n\n### Ejercicio 1\nCrea tu propio código secrete para tu super espía. ¿Puedes hacer que use aún más variables?\n\n### Ejercicio 2\nAñade un tercer componente al código, como una prenda de ropa o un objeto.\n"
+ example_code: "```\nnombre {is} {ask} '¿Cuál es tu nombre?'\nif nombre {is} '_'\n a {is} 'Ve al aeropuerto '\n{else}\n a {is} 'Ve a la estación de trenes '\ncontraseña {is} {ask} '¿Cuál es la contraseña?'\n{if} contraseña {is} _\n b {is} 'mañana a las 02.00'\n{else}\n b {is} 'hoy a las 10.00'\n{print} _ _ _\n```\n"
start_code: '# pon tu código aquí'
13:
- story_text: "¿Puedes poner el comando correcto en el espacio vacío? ¡Ten en cuenta que el super espía debe contestar las DOS preguntas correctamente antes de que obtengan la información confidencial!\n"
+ story_text: "Podemos simplificar el código superespía con `{and}`, entonces sólo necesitamos un `{if}`.\n\n### Ejercicio 1\nCompleta el cógido rellenando el comando correcto en el hueco en blanco. Consejo:El superespía tiene que responder a AMBAS preguntas correctamente, ¡antes de que consigan la información confidencial!\n\n### Ejercicio 2\n¡Queremos confundir aún más al enemigo! Crea una lista con respuestas falsas y selecciona una al azar cuando den una respuesta incorrecta.\n"
example_code: "```\nnombre {is} {ask} '¿Cuál es tu nombre?'\ncontraseña {is} {ask} '¿Cuál es tu contraseña?'\n{if} nombre {is} 'Agente007' _ contraseña {is} 'SUPERSECRETO'\n {print} 'Ve al aeropuerto a las 02.00'\n{else}\n {print} 'Ve a la estación de tren a las 10.00'\n ```\n"
start_code: '# pon tu código aquí'
name: Super espía
@@ -1233,11 +1277,11 @@ adventures:
example_code: "```\nsímbolo = 'x'\ncasillas_disponibles = 1, 2, 3, 4, 5, 6, 7, 8, 9\njuego = 'en marcha'\ncasilla_1 = '.'\ncasilla_2 = '.'\ncasilla_3 = '.'\ncasilla_4 = '.'\ncasilla_5 = '.'\ncasilla_6 = '.'\ncasilla_7 = '.'\ncasilla_8 = '.'\ncasilla_9 = '.'\n{print} '¡Tres en raya!'\n{print} casilla_1 casilla_2 casilla_3\n{print} casilla_4 casilla_5 casilla_6\n{print} casilla_7 casilla_8 casilla_9\n{print} ' '\n{while} juego != 'terminado'\n elección = {ask} 'Jugador ' símbolo ', ¿cuál casilla quieres tomar?'\n {if} elección {in} casillas_disponibles\n {remove} elección {from} casillas_disponibles\n {if} elección == 1\n casilla_1 = símbolo\n {if} elección == 2\n casilla_2 = símbolo\n {if} elección == 3\n casilla_3 = símbolo\n {if} elección == 4\n casilla_4 = símbolo\n {if} elección == 5\n casilla_5 = símbolo\n {if} elección == 6\n casilla_6 = símbolo\n {if} elección == 7\n casilla_7 = símbolo\n {if} elección == 8\n casilla_8 = símbolo\n {if} elección == 9\n casilla_9 = símbolo\n {else}\n {print} 'Esa casilla ya está tomada'\n {print} casilla_1 casilla_2 casilla_3\n {print} casilla_4 casilla_5 casilla_6\n {print} casilla_7 casilla_8 casilla_9\n {print} ' '\n ganador = {ask} '¿Ganaste?'\n {if} ganador == 'yes'\n {print} '¡Bien hecho, jugador ' símbolo '!'\n juego = 'terminado'\n {else}\n {if} símbolo == 'x'\n símbolo = 'o'\n {else}\n símbolo = 'x'\n```\n"
17:
start_code: '# pon tu código aquí'
- story_text: "En los niveles anteriores el juego tenía un comportamiento algo molesto. Después de cada movimiento, tenías que decidir tú mismo si habías ganado o no.\nDe esta forma se podía jugar, pero era algo lento. En este nivel hemos aprendido el comando `{elif}`, podemos utilizarlo para solucionar el problema.\nPara que Hedy pueda utilizar {elif} para comprobar si el jugador ha ganado o no requiere unas cuantas líneas de código extra.\n\nEn el código de ejemplo verás que hemos añadido los requisitos para ganar (3 fichas en línea, en horizontal, vertical o diagonal).\nPuedes encontrarlas en las líneas 46 a 69. Puedes comprobar que cada vez que se cumple el requisito el jugador a ganado y la variable juego se actualiza a 'fin'.\nEso significa que el bucle {while} terminará y el juego se acabará.\n"
+ story_text: "En los niveles anteriores el juego Tres en raya tenía un comportamiento algo molesto. Después de cada movimiento, tenías que decidir tú mismo si habías ganado o no.\nDe esta forma se podía jugar, pero era algo lento. En este nivel hemos aprendido el comando `{elif}`, que podemos utilizarlo para solucionar el problema.\nUsar el {elif} para que Hedy pueda comprobar si el jugador ha ganado o no es divertido, pero también requiere unas cuantas líneas de código extra.\n\nEn el código de ejemplo verás que hemos añadido los requisitos para ganar (3 casillas en línea, en horizontal, vertical o diagonal).\nPuedes encontrarlas en las líneas 46 a 69. Puedes comprobar que cada vez que se cumple el requisito el jugador a ganado y la variable juego se actualiza a 'fin'.\nEso significa que el bucle `{while}` terminará y el juego se acabará.\n"
example_code: "```\nsímbolo = 'x'\ncasillas_disponibles = [1, 2, 3, 4, 5, 6, 7, 8, 9]\njuego = 'en marcha'\ncasilla_1 = '.'\ncasilla_2 = '.'\ncasilla_3 = '.'\ncasilla_4 = '.'\ncasilla_5 = '.'\ncasilla_6 = '.'\ncasilla_7 = '.'\ncasilla_8 = '.'\ncasilla_9 = '.'\n{print} '¡Tres en raya!'\n{print} casilla_1 casilla_2 casilla_3\n{print} casilla_4 casilla_5 casilla_6\n{print} casilla_7 casilla_8 casilla_9\n{print} ' '\n{while} juego != 'terminado':\n elección = {ask} 'Jugador ' símbolo ', ¿cuál casilla quieres tomar?'\n {if} elección {in} casillas_disponibles:\n {remove} elección {from} casillas_disponibles\n {if} elección == 1:\n casilla_1 = símbolo\n {if} elección == 2:\n casilla_2 = símbolo\n {if} elección == 3:\n casilla_3 = símbolo\n {if} elección == 4:\n casilla_4 = símbolo\n {if} elección == 5:\n casilla_5 = símbolo\n {if} elección == 6:\n casilla_6 = símbolo\n {if} elección == 7:\n casilla_7 = símbolo\n {if} elección == 8:\n casilla_8 = símbolo\n {if} elección == 9:\n casilla_9 = símbolo\n {else}:\n {print} 'Esa casilla ya está tomada'\n {print} casilla_1 casilla_2 casilla_3\n {print} casilla_4 casilla_5 casilla_6\n {print} casilla_7 casilla_8 casilla_9\n {print} ' '\n {if} casilla_1 == casilla_2 {and} casilla_2 == casilla_3 {and} casilla_1 != '.':\n {print} '¡Jugador ' símbolo ' gana!'\n juego = 'terminado'\n {elif} casilla_4 == casilla_5 {and} casilla_5 == casilla_6 {and} casilla_4 != '.':\n {print} '¡Jugador ' símbolo ' gana!'\n juego = 'terminado'\n {elif} casilla_7 == casilla_8 {and} casilla_8 == casilla_9 {and} casilla_7 != '.':\n {print} '¡Jugador ' símbolo ' gana!'\n juego = 'terminado'\n {elif} casilla_1 == casilla_4 {and} casilla_4 == casilla_7 {and} casilla_1 != '.':\n {print} '¡Jugador ' símbolo ' gana!'\n juego = 'terminado'\n {elif} casilla_2 == casilla_5 {and} casilla_5 == casilla_8 {and} casilla_2 != '.':\n {print} '¡Jugador ' símbolo ' gana!'\n juego = 'terminado'\n {elif} casilla_3 == casilla_6 {and} casilla_6 == casilla_9 {and} casilla_3 != '.':\n {print} '¡Jugador ' símbolo ' gana!'\n juego = 'terminado'\n {elif} casilla_1 == casilla_5 {and} casilla_5 == casilla_9 {and} casilla_1 != '.':\n {print} '¡Jugador ' símbolo ' gana!'\n juego = 'terminado'\n {elif} casilla_3 == casilla_5 {and} casilla_5 == casilla_7 {and} casilla_3 != '.':\n {print} '¡Jugador ' símbolo ' gana!'\n juego = 'terminado'\n {else}:\n {if} símbolo == 'x':\n símbolo = 'o'\n {else}:\n símbolo = 'x'\n```\n"
13:
- story_text: "En esta aventura podrás programar el juego Tres en Raya. Puedes jugar con dos personas. En turnos, eliges un número (1-9) del sitio donde quieres poner tu señal (x u o).\n¡El primer jugador que obtenga tres en línea (horizontal, vertical o en diagonal) gana!\n"
- example_code: "```\nsímbolo = 'x'\ncasillas_disponibles = 1, 2, 3, 4, 5, 6, 7, 8, 9\njuego = 'en marcha'\ncasilla_1 = '.'\ncasilla_2 = '.'\ncasilla_3 = '.'\ncasilla_4 = '.'\ncasilla_5 = '.'\ncasilla_6 = '.'\ncasilla_7 = '.'\ncasilla_8 = '.'\ncasilla_9 = '.'\n{print} '¡Tres en raya!'\n{print} casilla_1 casilla_2 casilla_3\n{print} casilla_4 casilla_5 casilla_6\n{print} casilla_7 casilla_8 casilla_9\n{print} ' '\n{for} i {in} {range} 1 {to} 9\n {if} juego {is} 'en marcha'\n elección = {ask} 'Jugador ' símbolo ', ¿cuál casilla quieres tomar?'\n {if} elección {in} casillas_disponibles\n {remove} elección {from} casillas_disponibles\n {if} elección {is} 1\n casilla_1 = símbolo\n {if} elección {is} 2\n casilla_2 = símbolo\n {if} elección {is} 3\n casilla_3 = símbolo\n {if} elección {is} 4\n casilla_4 = símbolo\n {if} elección {is} 5\n casilla_5 = símbolo\n {if} elección {is} 6\n casilla_6 = símbolo\n {if} elección {is} 7\n casilla_7 = símbolo\n {if} elección {is} 8\n casilla_8 = símbolo\n {if} elección {is} 9\n casilla_9 = símbolo\n {else}\n {print} 'Esa casilla ya está tomada'\n {print} casilla_1 casilla_2 casilla_3\n {print} casilla_4 casilla_5 casilla_6\n {print} casilla_7 casilla_8 casilla_9\n {print} ' '\n ganador = {ask} '¿Ganaste?'\n {if} ganador {is} 'yes'\n {print} '¡Bien hecho, jugador ' símbolo '!'\n juego = 'terminado'\n {else}\n {if} símbolo {is} 'x'\n símbolo = 'o'\n {else}\n símbolo = 'x'\n```\n"
+ story_text: "En esta aventura podrás programar el juego Tres en Raya. Puedes jugar con dos personas. En turnos, eliges un número (1-9) del sitio donde quieres poner tu señal (x u o).\n¡El primer jugador que obtenga tres en línea (horizontal, vertical o en diagonal) gana!\n\n### Ejercicio 1\nEl juego funciona, pero tiene algunos errores. Por ejemplo, cualquier jugador puede elegir cualquier casilla, ¡incluso si ya estaba elegida! Usa un `{if}` allá donde la casilla esté tomada, y si lo está, avisa al jugador.\n\n### Ejercicio 2\nEl juego tampoco decide quién ha ganado. Tienes que añadir ésto comprobando si las 3 casilla en fila tienen el mismo símbolo.\n\n### Ejercicio 3 Extra\nNo siempre tienes un amigo con el que jugar. ¿Puedes crear un rival informático?\n"
+ example_code: "```\njugador = 'x'\ncasilla = '.', '.', '.', '.', '.', '.', '.', '.', '.'\n\n{for} i {in} {range} 1 {to} 9\n opción = {ask} 'Jugador ' jugador ' ¿qué casillas eliges?'\n casilla {at} opción = jugador\n {clear}\n print casilla {at} 1 casilla {at} 2 casilla {at} 3\n print casilla {at} 4 casilla {at} 5 casilla {at} 6\n print casilla {at} 7 casilla {at} 8 casilla {at} 9\n {if} jugador = 'x'\n jugador = 'o'\n {else}\n jugador = 'x'\n```\n"
start_code: '# pon tu código aquí'
blackjack:
name: Blackjack
@@ -1246,7 +1290,7 @@ adventures:
levels:
17:
story_text: "Blackjack es un juego simple de cartas en el cual debes acercarte lo máximo posible a 21. Recibes dos cartas. El valor de cada carta es el número que llevan, la Jota, Reina y Rey valen 10 puntos.\nEl As vale 1 o 11 puntos (puedes elegir). El repartidor, tu oponente, también obtiene dos cartas.\nSi quieres, puedes obtener otra carta, y sus puntos se sumarán al total. El repartidor también puede obtener otra carta.\nPero ten mucho cuidado de no pasarte de 21 puntos, porque si lo haces, ¡Pierdes!\n¡El jugador que se acerque mas a 21 sin pasarse gana!\n\n¡Buena suerte!\n"
- example_code: "```\n{print} 'BLACKJACK'\ncartas = [2, 3, 4, 5, 6, 7, 8, 9, 10, 'Jota', 'Reina','Rey', 'As']\npuntos = 0\npuntos_dealer = 0\ncarta_1 = cartas[{random}]\ncarta_2 = cartas[{random}]\ncarta_3 = cartas [{random}]\ncarta_dealer_1 = cartas[{random}]\ncarta_dealer_2 = cartas[{random}]\ncarta_dealer_3 = cartas[{random}]\n# Puntos por carta 1\n{if} carta_1 == 'Jota' {or} carta_1 == 'Reina' {or} carta_1 == 'Rey':\n puntos = puntos + 10\n{elif} carta_1 == 'As':\n puntos = puntos + 11\n{else}:\n puntos = puntos + carta_1\n# Puntos por carta 2\n{if} carta_2 == 'Jota' {or} carta_2 == 'Reina' {or} carta_2 == 'Rey':\n puntos = puntos + 10\n{elif} carta_2 == 'As':\n puntos = puntos + 11\n{else}:\n puntos = puntos + carta_2\n# Puntos para el dealer por la carta 1\n{if} carta_dealer_1 == 'Jota' {or} carta_dealer_1 == 'Reina' {or} carta_dealer_1 == 'Rey':\n puntos_dealer = puntos_dealer + 10\n{elif} carta_dealer_1 == 'As':\n puntos_dealer = puntos_dealer + 11\n{else}:\n puntos_dealer = puntos_dealer + carta_dealer_1\n# Puntos para el dealer por la carta 2\n{if} carta_dealer_2 == 'Jota' {or} carta_dealer_2 == 'Reina' {or} carta_dealer_2 == 'Rey':\n puntos_dealer = puntos_dealer + 10\n{elif} carta_dealer_2 == 'As':\n puntos_dealer = puntos_dealer + 11\n{else}:\n puntos_dealer = puntos_dealer + carta_dealer_2\n# Dos ases\n{if} carta_1 == 'As' {and} carta_2 == 'As':\n puntos = 12\n{if} carta_dealer_1 == 'As' {and} carta_dealer_2 == 'As':\n puntos_dealer = 12\n# Puntaje\n{print} 'Tienes un ' carta_1 ' y un ' carta_2 ' (' puntos ' puntos)'\n{print} 'El dealer tene un ' carta_dealer_1 ' y un ' carta_dealer_2 ' (' puntos_dealer ' puntos)'\n# Carta extra para el dealer\nagarrar = {ask} '¿Quieres una carta extra?'\n{if} agarrar == 'si':\n {if} carta_3 == 'Jota' {or} carta_3 == 'Reina' {or} carta_3 == 'Rey':\n puntos = puntos + 10\n {elif} carta_3 == 'As':\n {if} puntos > 11:\n puntos = puntos + 11\n {else}:\n puntos = puntos + 1\n {else}:\n puntos = puntos + carta_3\n print 'Tienes un' carta_3 ' extra (' puntos ' puntos)'\n{else}:\n print 'Sin cartas extra'\n# Ganador\n{if} puntos > 21 {or} puntos_dealer > puntos {or} puntos_dealer == 21:\n {print} 'Perdiste'\n{elif} puntos_dealer < 17:\n {print} 'El dealer toma una carta extra. Es un... ' carta_dealer_3\n {if} carta_dealer_3 == 'Jota' {or} carta_dealer_3 == 'Reina' {or} carta_dealer_3 == 'Rey':\n puntos_dealer = puntos_dealer + 10\n {elif} carta_dealer_3 == 'As':\n {if} puntos_dealer < 11:\n puntos_dealer = puntos_dealer + 11\n {else}:\n puntos_dealer = puntos_dealer + 1\n {else}:\n puntos_dealer = puntos_dealer + carta_dealer_3\n {print} 'El dealer tiene ' puntos_dealer ' puntos ahora'\n {if} puntos_dealer < 21 {and} puntos_dealer > puntos:\n {print} 'Pierdes'\n {else}:\n {print} 'Ganas'\n{elif} puntos > puntos_dealer {and} puntos < 21:\n {print} '¡Ganaste!'\n```\n"
+ example_code: "```\n{print} 'BLACKJACK'\ncartas = [2, 3, 4, 5, 6, 7, 8, 9, 10, 'Jota', 'Reina', 'Rey', 'As']\npuntos = 0\npuntos_repartidor = 0\ncarta_1 = cartas[{random}]\ncarta_2 = cartas[{random}]\ncarta_3 = cartas [{random}]\ncarta_repartidor_1 = cartas[{random}]\ncarta_repartidor_2 = cartas[{random}]\ncarta_repartidor_3 = cartas[{random}]\n# Puntos por carta 1\n{if} carta_1 == 'Jota' {or} carta_1 == 'Reina' {or} carta_1 == 'Rey':\n puntos = puntos + 10\n{elif} carta_1 == 'As':\n puntos = puntos + 11\n{else}:\n puntos = puntos + carta_1\n# Puntos por carta 2\n{if} carta_2 == 'Jota' {or} carta_2 == 'Reina' {or} carta_2 == 'Rey':\n puntos = puntos + 10\n{elif} carta_2 == 'As':\n puntos = puntos + 11\n{else}:\n puntos = puntos + carta_2\n# Puntos para el repartidor por la carta 1\n{if} carta_repartidor_1 == 'Jota' {or} carta_repartidor_1 == 'Reina' {or} carta_repartidor_1 == 'Rey':\n puntos_repartidor = puntos_repartidor + 10\n{elif} carta_repartidor_1 == 'As':\n puntos_repartidor = puntos_repartidor + 11\n{else}:\n puntos_repartidor = puntos_repartidor + carta_repartidor_1\n# Puntos del repartidor por la carta 2\n{if} carta_repartidor_2 == 'Jota' {or} carta_repartidor_2 == 'Reina' {or} carta_repartidor_2 == 'Rey':\n puntos_repartidor = puntos_repartidor + 10\n{elif} carta_repartidor_2 == 'As':\n puntos_repartidor = puntos_repartidor + 11\n{else}:\n puntos_repartidor = puntos_repartidor + carta_repartidor_2\n# Dos ases\n{if} carta_1 == 'As' {and} carta_2 == 'As':\n puntos = 12\n{if} carta_repartidor_1 == 'As' {and} carta_repartidor_2 == 'As':\n puntos_repartidor = 12\n# Marcador\n{print} 'Tienes un ' carta_1 ' y un ' carta_2 ' (' puntos ' puntos)'\n{print} 'El repartidor tiene un ' carta_repartidor_1 ' y un ' carta_repartidor_2 ' (' puntos_repartidor ' puntos)'\n# Carta extra para el repartidor\nvisita = {ask} '¿Quieres una carta extra?'\n{if} visita == 'si':\n {if} carta_3 == 'Jota' {or} carta_3 == 'Reina' {or} carta_3 == 'Rey':\n puntos = puntos + 10\n {elif} carta_3 == 'As':\n {if} puntos > 11:\n puntos = puntos + 11\n {else}:\n puntos = puntos + 1\n {else}:\n puntos = puntos + carta_3\n {print} 'Tienes un' carta_3 ' extra (' puntos ' puntos)'\n{else}:\n {print} 'Sin cartas extra'\n# Ganador\n{if} puntos > 21 {or} puntos_repartidor > puntos {or} puntos_repartidor == 21:\n {print} 'Perdiste'\n{elif} puntos_repartidor < 17:\n {print} 'El repartidor toma una carta extra. Es un... ' carta_repartidor_3\n {if} carta_repartidor_3 == 'Jota' {or} carta_repartidor_3 == 'Reina' {or} carta_repartidor_3 == 'Rey':\n puntos_repartidor = puntos_repartidor + 10\n {elif} carta_repartidor_3 == 'As':\n {if} puntos_repartidor < 11:\n puntos_repartidor = puntos_repartidor + 11\n {else}:\n puntos_repartidor = puntos_repartidor + 1\n {else}:\n puntos_repartidor = puntos_repartidor + carta_repartidor_3\n {print} 'El repartidor tiene ' puntos_repartidor ' puntos ahora'\n {if} puntos_repartidor < 21 {and} puntos_repartidor > puntos:\n {print} 'Pierdes'\n {else}:\n {print} 'Ganas'\n{elif} puntos > puntos_repartidor {and} puntos < 21:\n {print} '¡Ganaste!'\n```\n"
start_code: '# pon tu código aquí'
years:
name: Año Nuevo
@@ -1333,254 +1377,263 @@ adventures:
print_command:
levels:
18:
- example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n"
- story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
- example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
- start_code: "name = 'Hedy'\n{print}('My name is ', name)"
- story_text: "We arrived at real Python code! That means we need to use parentheses with `{print}` and `{range}` from now on.\nIt also means you can use Hedy code from this level in any Python environment as long as you use the English commands. If you haven't until now, you can switch the toggle in the commands menu to do so."
- example_code: "```\n{print}('Hello!')\n{for} i {in} {range}(1, 10):\n {print}('This is line ', i)\n```\n"
- story_text_2: If you want to print more than one item, you need to separate them by commas.
+ example_code_2: "```\ntemperatura = 25\n{print}('Hay ', temperatura, ' grados fuera')\n```\n"
+ story_text_3: El último cambio que tenemos que hacer para conseguir el código en Python es cambiar `{ask}` por `{input}`.
+ example_code_3: "```\n{print}('¡Mi nombre es Hedy!')\nnombre = {input}('¿Cómo te llamas?')\n{print}('Así que te llamas ', nombre)\n```\n"
+ start_code: "nombre = 'Hedy'\n{print}('Mi nombre es ', nombre)"
+ story_text: "¡Hemos llegado a código real de Python! Eso significa que tendremos que usar paréntesis con `{print}` y `{range}` de ahora en adelante.\nTambién significa que puedes usar el código de Hedy desde este nivel en cualquier entorno de Python mientras uses comandos en inglés. Si hasta ahora no lo has hecho, puedes cambiar el interruptor en el menú de comandos para hacerlo."
+ example_code: "```\n{print}('¡Hola!')\n{for} i {in} {range}(1, 10):\n {print}('Esta es la línea ', i)\n```\n"
+ story_text_2: Si quieres imprimir más de una línea, tienes que separarla por comas.
1:
- story_text: "## The print command\nYou can print text to the screen using the `{print}` command.\n"
- story_text_2: "### Exercise\nIn Hedy you will find exercises in every adventure. An exercise allows you to practise the new commands and concepts, and lets you give your own twist to the example codes.\nIn this exercise you will see a pink blank space. You have to fill something in the place of the blank space before the code can be ran.\n\nFill in the `{print}` command in the blank space and then add five more lines of code. Each line has to start with a `{print}` command.\nHave fun!\n"
- example_code: "```\n{print} Hi there, programmer!\n{print} Welcome to Hedy!\n```\n"
- example_code_2: "```\n_ Hello!\n```\n"
- start_code: "{print} Welcome to Hedy!\n"
+ story_text: "## El comando print\nPuedes imprimir texto por pantalla usando el comando `{print}`.\n"
+ story_text_2: "### Ejercicio\nEn Hedy puedes encontrar ejercicios en cada aventura. Un ejercicio te permite practicar los nuevos comandos y conceptos, y te permite darle tu propio toque a los códigos de ejemplo.\nEn este ejercicio verás un espacio en blanco rosa. Tienes que rellenar algo en el lugar del espacio en blanco antes de que se pueda ejecutar tu código.\n\nRellena el comando `{print}` en el espacio en blanco y después añade cinco líneas de código. Cada línea tiene que empezar con un comando `{print}`.\n¡Diviértete!\n"
+ example_code: "```\n{print} ¡Hola, programador!\n{print} ¡Bienvenido a Hedy!\n```\n"
+ example_code_2: "```\n_ ¡Hola!\n```\n"
+ start_code: "{print} ¡Bienvenido a Hedy!\n"
17:
- start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'"
- story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n"
- example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'\n```\n"
- name: print
- description: Introduction print command
+ start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} '¡Preparado o no, allá voy!'"
+ story_text: "Ahora vamos a cambiar la sangría un poco. Cada vez que necesitemos una sangría, necesitamos `:` en la línea antes de la sangría.\n"
+ example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} '¡Preparado o no, allá voy!'\n```\n"
+ name: "{print}"
+ description: Introducción al comando print
default_save_name: print
is_command:
- name: is
- description: introducing is command
- default_save_name: is_command
+ name: "{is}"
+ description: introducción al comando es
+ default_save_name: comando_es
levels:
2:
- story_text: "## Variables\nYou can name a word with `{is}`. This is called a **variable**. In this example we made a variable called name and a variable called age. You can use the word name anywhere in your code and it will be replaced by Hedy, like this:\n"
- example_code: "```\nname {is} Hedy\nage {is} 15\n{print} name is age years old\n```\n"
- story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animals`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command.\nFirstly, finish our example by filling in your favorite animal in the blanks. Then make at least 3 of these codes yourself. Pick a variable, and set the variable with the {is} command. Then use it with a {print} command, just like we did.\n"
- example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n"
- start_code: "name {is} Hedy\nage {is} 15\n{print} name is age years old"
+ story_text: "## Variables\nPuedes nombrar una palabra con `{is}`. A esto se le llama **variable**. En este ejemplo creamos una variable llamada nombre y una variable llamada edad. Puedes usar la palabra nombre en cualquier parte de tu código y será reemplazada por Hedy, tal que así:\n"
+ example_code: "```\nnombre {is} Hedy\nedad {is} 15\n{print} nombre tiene edad años\n```\n"
+ story_text_2: "### Ejercicio\n¡Hora de crear tus propias variables!\nEn el código de ejemplo hicimos un ejemplo de la variable `favorite_animals`. En la línea 1 se crea la variable, y en la línea 2 usamos la variable en un comando de impresión.\nLo primero de todo, termina nuestro ejemplo rellenando tu animal favorito en el hueco en blanco. Después haz 3 códigos como estos por tí mismo. Elige una variable, y establece la variable con el comando {is}. Entonces úsala con un comando {print}, como hicimos.\n"
+ example_code_2: "```\nanimales_favoritos es _\n{print} me gusta animales_favoritos\n```\n"
+ start_code: "nombre {is} Hedy\nedad {is} 15\n{print} nombre tiene edad años"
14:
- start_code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'\n{else}\n {print} 'You are older than me!'"
- story_text: "We are going to learn more new items. You might know them already from mathematics, the `<` and `>`.\nThe `<` checks if the first number is smaller than the second, for example age `<` 12 checks if age is smaller than 12.\nIf you want to check if the first number is smaller or equal to the second, you can use `<=`, for example age `<=` 11.\nThe `>` checks if the first number is bigger than the second, for example points `>` 10 checks if points is larger than 10.\nIf you want to check if the first number is bigger or equal to the second, you can use `>=`, for example points `>=` 11.\nYou use these comparisons in an `{if}`, like this:\n"
- example_code: "```\nage = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'\n```\n"
- story_text_2: "From this level on, if you want to compare exactly, you can use two equal signs. This is what most programming languages do:\n"
- example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
- story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
- example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
+ start_code: "edad = {ask} '¿Cúantos años tienes?'\n{if} edad < 13\n {print} '¡Eres más jóven que yo!'\n{else}\n {print} '¡Eres mayor que yo!'"
+ story_text: "Vamos a aprender más cosas nuevas. Quizá ya las conozcas de matemáticas, el `<` y `>`.\nEl `<` comprueba si el primer número es menor que el segundo, por ejemplo edad `<` 12 comprueba si edad es menor que 12.\nSi queieres comprobar si el primer número es menor o igual que el segundo, puedes usar `<=`, por ejemplo edad `<=` 11.\nEl `>` comprueba si el primer número es mayor que el segundo, por ejemplo puntos `>` 10 comprueba si puntos es mayor que 10.\nSi quieres comprobar si el primer número es mayor o igual que el segundo, puedes usar `>=`, por ejemplo puntos `>=` 11.\nUsa estas comparaciones en un `{if}`, tal que así:\n"
+ example_code: "```\nedad = {ask} '¿Cúantos años tienes?'\n{if} edad > 12\n {print} '¡Eres mayor que yo!'\n```\n"
+ story_text_2: "A partir de este nivel, si quieres comparar exactamente, puedes usar dos signos de igualdad. Esto es lo que hacen la mayoría de los lenguajes de programación:\n"
+ example_code_2: "```\nnombre = {ask} '¿Cómo te llamas?'\n{if} nombre == 'Hedy'\n {print} '¡Cómo molas!'\n```\n"
+ story_text_3: "También puedes comparar si algo *no* es igual a otra cosa usando `!=` tal que así:\n"
+ example_code_3: "```\nnombre = {ask} '¿Cómo te llamas?'\n{if} nombre != 'Hedy'\n {print} 'Tu no eres Hedy'\n```\n"
add_remove_command:
levels:
3:
- story_text_3: "### Exercise\nTry out the new commands in this virtual restaurant. Add the flavor the player is hpoing for to the list and remove the flavors they are allergic to.\n"
- story_text: "## Add to\nYou can add items to the list with the `{add} {to}` command. To add an item to a list you can simply type: `{add} penguin {to} animals` or you can use the `{ask}` command like in the example code.\n"
- example_code: "```\nanimals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\n{print} I choose animals {at} {random}\n```\n"
- story_text_2: "## Remove from\nIf you can add items to a list, of course you can also take them off. This is done with the `{remove} {from}` command.\n"
- example_code_2: "```\nanimals {is} dog, cat, kangaroo\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}\n```\n"
- example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
- start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
- name: add and remove
- description: introducing add to and remove from
+ story_text_3: "### Exercise\nPrueba los nuevos comandos en este restaurante virtual. Añade el sabor que el jugador está esperando a la lista y elimina los sabores a los que es alérgico.\n"
+ story_text: "## Add to\nPuedes añadir objetos a la lista con el comando `{add} {to}`. Para añadir un objecto a una lista puedes escribir: `{add} penguin {to} animals` o puedes usar el comando `{ask}` como en el código de ejemplo.\n"
+ example_code: "```\nanimales {is} perro, gato, canguro\ngusta {is} {ask} ¿Cúal es tu animal preferido?\n{add} gusta {to_list} animales\n{print} Yo elijo animales {at} {random}\n```\n"
+ story_text_2: "## Remove from\nSi puedes añadir objetos a una lista, por supuesto que también puedes quitarlos. Esto se hace con el comando `{remove} {from}`.\n"
+ example_code_2: "```\nanimales {is} perro, gato, canguro\nno_gustar {is} {ask} ¿Qué animal no te gusta?\n{remove} no_gustar {from} animales\n{print} Elijo animales {at} {random}\n```\n"
+ example_code_3: "```\n{print} Batido misterioso\nsabores {is} fresa, chocolate, vainilla\nespera {is} {ask} ¿Qué sabor estás esperando?\n_\nalergias {is} {ask} ¿Eres alégico a cualquiera de los sabores?\n_\n{print} Recibe un batido de sabores {at} {random}\n```\n"
+ start_code: "animales {is} perro, gato, canguro\ngustar {is} {ask} ¿Cúal es tu animal preferido?\n{add} gustar {to_list} animales\nno_gustar {is} {ask} ¿Qué animal no te gusta?\n{remove} no_gustar {from} animales\n{print} Elijo animales {at} {random}"
+ name: "{add} {to} & {remove} {from}"
+ description: introducción a add to y remove from
default_save_name: add_remove_command
sleep_command:
- name: sleep
- description: introducing sleep command
+ name: "{sleep}"
+ description: introducción al comando sleep
default_save_name: sleep_command
levels:
2:
- story_text: "## The sleep command\nAnother new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds.\n"
- example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
- start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
+ story_text: "Otro comando nuevo en este nivel es `{sleep}`, el cual pausa tu programa durante un segundo. Si escribes un número despues del comando {sleep}, el programa se pausa por esa cantidad de segundos.\n\n### Ejercicio\nPractica este nuevo comando haciendo un código por tí mismo en que uses el comando {sleep} al menos 3 veces. En cada comando {sleep} el tiempo de pausa debe ser diferente.\n"
+ example_code: "```\n{print} Mi color favorito es...\n{sleep} 2\n{print} ¡verde!\n```\n"
+ start_code: "{print} Mi color favorito es...\n{sleep} 2\n{print} ¡verde!"
if_command:
- name: if else
- description: Introducing the if command
+ name: "{if} & {else}"
+ description: Introducción al comando if
default_save_name: if_command
levels:
5:
- story_text: "## If... else....\nIn level 5 there is something new, the `{if}`! With the `{if}` you can choose between two different options.\nThis code prints nice if you enter Hedy as a name, and boo! if you enter something else.\n`{ask}` and `{print}` still work like they did in level 4.\n"
- example_code: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'\n```\n"
- story_text_2: "Sometimes code with an `{if}` gets really long and does not fit on the line well. You may also divide the code over two lines, starting the second line at the `{else}` like this:\n"
- example_code_2: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'\n```\n"
- story_text_3: "### Exercise\nTry to create your own code with `{if}` and `{else}`. You can use the example code if you want.\n"
- example_code_3: "```\nanswer {is} {ask} '2 + 2 = ?'\n_ _ _ 4 _ 'Great job!'\n_ _ 'No 2 + 2 = 4'\n```\n"
- start_code: "name {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'"
+ story_text: "## If... else....\nEn el nivel 4 hay algo nuevo, !`{if}`! Con `{if}` puedes elegir entre dos opciones diferentes.\nEste código imprime genial si pones Hedy como nombre, y boo! si pones cualquier otra cosa.\n`{ask}` y `{print}` todavía funcionan como hicieron en el nivel 4.\n"
+ example_code: "```\nnombre {is} {ask} '¿cómo te llamas?'\n{if} nombre {is} Hedy {print} 'genial' {else} {print} 'boo!'\n```\n"
+ story_text_2: "A veces el código con un `{if}` se alarga mucho y no encaja bien en una linea. también puedes dividir el código en dos líneas, empezando la segunda línea en el `{else}` tal que así:\n"
+ example_code_2: "```\nnombre {is} {ask} '¿cúal es tu nombre?'\n{if} nombre {is} Hedy {print} 'genial'\n{else} {print} 'boo!'\n```\n"
+ story_text_3: "### Ejercicio\nIntenta crear tu propio código con `{if}` y `{else}`. Si quieres puedes usar el código de ejemplo.\n"
+ example_code_3: "```\nrespuesta {is} {ask} '2 + 2 = ?'\n_ _ _ 4 _ '¡Gran trabajo!'\n_ _ 'No 2 + 2 = 4'\n```\n"
+ start_code: "nombre {is} {ask} '¡cúal es tu nombre?'\n{if} nombre {is} Hedy {print} 'genial'\n{else} {print} 'boo!'"
8:
- start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
- example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
- story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
+ start_code: "nombre {is} {ask} '¿Cómo te llamas?'\n{if} nombre {is} Hedy\n {print} 'Bienvenido Hedy'\n {print} '¡Puedes jugar en tu ordenador!'\n"
+ example_code: "```\nnombre {is} {ask} '¿Cómo te llamas?'\n{if} nombre {is} Hedy\n {print} 'Bienvenido Hedy'\n {print} '¡Puedes jugar en tu ordenador!'\n```\n"
+ story_text: "## If... Else...\nHas aprendido a repetir un bloque de líneas de código tras un comando `{repeat}`.\nAhora puedes usar la sangría para hacer bloques tras un comando {if} o {else}.\nComprueba el código de ejemplo.\n\n### Ejercicio\nAñade un comando {else} al código de ejemplo. Haz un bloque de línea usando sangría. Haz esto empezand cada línea con 4 espacios.\n"
repeat_command:
- name: Repeat
- description: repeat command
+ name: "{repeat}"
+ description: comando repeat
default_save_name: repeat_command
levels:
7:
- story_text: "## Repeat! Repeat! Repeat!\nLevel 7 adds the `{repeat}` command. `{repeat}` can be used to execute one line of code multiple times. Like this:\n\n### Exercise\nPlay around with the repeat command. Can you make the happy birthday song in only 3 lines of code instead of 4 now?\n"
- example_code: "```\n{repeat} 3 {times} {print} 'Hedy is fun!'\n```\n"
- start_code: "{print} 'happy birthday to you'\n{print} 'happy birthday to you'\n{print} 'happy birthday dear Hedy'\n{print} 'happy birthday to you'\n"
+ story_text: "## Repeat! Repeat! Repeat!\nEl nivel 7 añade el comando `{repeat}`. `{repeat}` se puede usar para ejecutar una línea de código varias veces. Tal que así:\n\n### Ejercicio\nJuega con el comando repeat. ¿Puedes ahora hacer la canción de cumpleaños feliz en sólo 3 líneas de código en vez de en 4?\n"
+ example_code: "```\n{repeat} 3 {times} {print} '¡Hedy es divertido!'\n```\n"
+ start_code: "{print} 'cumpleaños feliz'\n{print} 'cumpleaños feliz'\n{print} 'cumpleaños feliz querido Hedy'\n{print} 'cumpleaños feliz'\n"
8:
- start_code: "{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This will be printed 5 times'"
- story_text: "### Repeat commands and indentation\nIn this level you can repeat multiple lines of code with only 1 repeat command.\nYou do this by making a block of lines that you want to repeat.\nThe lines in this block will need **indentation** .\nThat means putting four spaces at the beginning of each line. You will also have to indent when you just want to create a block of one line.\n"
- example_code: "```\n{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This is all repeated 5 times'\n```\n"
+ start_code: "{repeat} 5 {times}\n {print} 'Hola a todos'\n {print} 'Esto se imprimirá 5 veces'"
+ story_text: "### Repetir comandos y sangría\nEn este nivel puede repetir varias líneas de código con sólo 1 comando repeat.\nHaz esto haciendo un bloque de líneas que quieras repetir.\nLas líneas en este bloque necesitarán **sangría** .\nEso significa poner cuatro espacios al inicio de cada línea. También tendrás que sangrar cuando quieras crear un bloque de una sola línea.\n"
+ example_code: "```\n{repeat} 5 {times}\n {print} 'Hola a todos'\n {print} 'Todo esto se repite 5 veces'\n```\n"
9:
- start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
- story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
- example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
+ start_code: "{repeat} 3 {times}\n comida = {ask} '¿Qué quieres?'\n {if} comida {is} pizza\n {print} '¡genial!'\n {else}\n {print} 'la pizza es mejor'"
+ story_text: "En este nivel no puedes usar varias líneas sólo con `{if}` y `{repeat}`, ¡pero si puedes juntarlas!\nEn este ejemplo ves un comando `{if}` dentro de un comando `{repeat}`. También se permite lo contrario, y también un `{if}` se permite en un `{if}` y un `{repeat}` en un `{repeat}`.\n¡Pruébalo!\n"
+ example_code: "```\n{repeat} 3 {times}\n comida = {ask} '¿Qué quieres?'\n {if} comida {is} pizza\n {print} '¡genial!'\n {else}\n {print} 'la pizza es mejor'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
levels:
7:
- story_text_2: "Another interesting thing you can so with the `{repeat}` command is using variables to set the amount of times something should be repeated. In the example code you can see that we first ask the person how old they are.\nThen, in line 3, the question is repeated 'age' times. So we have used the variable 'age' with the `{repeat}` command.\n"
- example_code: "```\n{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'\n```\n"
- example_code_2: "```\n{print} 'Yay! It is your birthday!'\nage = {ask} 'How old are you now?'\n{repeat} age {times} {print} 'Hip Hip Hurray!'\n```\n"
- start_code: "{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'"
- story_text: "## Repeat with other commands and with variables\nYou have practiced the `{repeat}` command in combination with the `{print}` command now, but did you know you could also use other commands with `{repeat}` ?\nIn this example code you can see that `{repeat}` can also be used with an `{ask}`, `{if}` or `{else}` command.\n"
+ story_text_2: "Otra cosa interesante que puedes hacer con el comando `{repeat}` es usar variables para establecer las veces que algo debería repetirse. En el código de ejemplo puedes ver que primero preguntamos a la persona qué edad tiene.\nEntonces, en la línea 3, la pregunta se repite 'edad' veces. Así que hemos usado la variable 'edad' con el comando `{repeat}`.\n"
+ example_code: "```\n{repeat} 2 {times} respuesta = {ask} '¿Sabías que puedes hacer una pregunta varias veces?'\n{if} respuesta {is} sí {repeat} 2 {times} {print} '¡Ya lo sabías!'\n{else} {repeat} 3 {times} {print} '¡Has aprendido algo nuevo!'\n```\n"
+ example_code_2: "```\n{print} '¡Viva! ¡Es tu cumpleaños!'\nedad = {ask} '¿Cuántos años tienes?'\n{repeat} edad {times} {print} '¡Hip Hip Hurra!'\n```\n"
+ start_code: "{repeat} 2 {times} respuesta = {ask} '¿Sabías que puedes hacer una pregunta varias veces?'\n{if} respuesta {is} sí {repeat} 2 {times} {print} '¡Ya lo sabías!'\n{else} {repeat} 3 {times} {print} '¡Has aprendido algo nuevo!'"
+ story_text: "## Repeat con otros comandos y variables\nAhora has practicado el comando `{repeat}` en combinación con el comando `{print}`, pero ¿sabías que también puedes usar otros comandos con `{repeat}` ?\nEn este ejemplo puedes ver que `{repeat}` también se puede usar con un comando `{ask}`, `{if}` o `{else}`.\n"
8:
- example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
- story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n## Exercise\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n"
- start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
- description: repeat command 2
+ example_code: "```\n_ {print} '¿Conoces al hombre magdalena?'\n_ {repeat} 2 {times}\n_ {print} 'El hombre magdalena'\n_ {print} '¿Conoces al hombre magdalena, que vive en la Calle Drury?'\n```\n"
+ story_text: "### ¿En el bloque o no?\nEn este nivel tienes que pensar con cuidado que líneas de código deben ir en el bloque y cuales no.\nPor ejemplo: Si quieres cantar la canción *el hombre magdalena*. Sólo quieres que la línea con 'el hombre magdalena' se repita dos veces.\nEsto significa que la última línea no debe comenzar con sangría ya que no pertenece al bloque.\nSi comienzas la última línea con sangría la canción será incorrecta.\n\n## Ejercicio\nCada linea en el ejemplo empieza con un espacio en blanco. Elimina los espacios en blanco e intenta averiguar qué línea necesita sangría y cual no para hacer la canción del hombre magdalena.\n"
+ start_code: "{repeat} 3 {times}\n {print} 'Esta línea se repetirá...'\n {print} 'Esta también...'\n{print} '¡pero esta no!'"
+ description: comando repeat 2
default_save_name: repeat_command_2
and_or_command:
- name: and or
- description: introducing and or
- default_save_name: and or
+ name: "{and} & {or}"
+ description: introducción a y o
+ default_save_name: y o
levels:
13:
- start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
- story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
- example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
+ start_code: "nombre = {ask} '¿cómo te llamas?'\nedad = {ask} '¿cuántos años tienes?'\n{if} nombre {is} 'Hedy' {and} edad {is} 2\n {print} '¡Tú eres el verdadero Hedy!'"
+ story_text: "¡Ahora vamos a aprender `{and}` y `{or}`! Si quieres comprobar dos sentencias, no tienes que usar dos `{if}`s pero puedes usar `{and}` y `{or}`.\n\nSi usas `{and}`, ambas sentencias, a la izquierda y derecha de `{and}` tienen que ser verdaderas. También podemos usar `{or}`. Entonces sólo una sentencia tiene que ser correcta."
+ example_code: "```\nnombre = {ask} '¿cómo te llamas?'\nedad = {ask} '¿cuántos años tienes?'\n{if} nombre {is} 'Hedy' {and} edad {is} 2\n {print} '¡Tú eres el verdadero Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
levels:
15:
- example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
- start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
- story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
+ example_code: "```\nrespuesta = 0\n{while} respuesta != 25\n respuesta = {ask} '¿Cuánto es 5 veces 5?'\n{print} 'La respuesta es correcta'\n```\n"
+ start_code: "respuesta = 0\n{while} respuesta != 25\n respuesta = {ask} '¿Cuánto es 5 veces 5?'\n{print} 'La respuesta es correcta'"
+ story_text: "Vamos a aprender un nuevo bucle, ¡el bucle `{while}`! Continuamos el bucle mientras la sentencia sea verdadera.\nAsí que no olvides cambiar el valor en el bucle.\n\nEn el código de ejemplo, continuamos hasta que se de una respuesta verdadera.\nSi nunca se da la respuesta correcta, 'el bucle nunca termina!"
description: while
default_save_name: while_command
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
17:
- story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
- example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
- start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ story_text: "En este nivel también puedes usar un comando nuevo: `{elif}`. `{elif}` es la abreviatura para `{else}` `{if}` y lo necesitas cuando quieres hacer 3 (o más) opciones.\n¡Compruébalo!\n"
+ example_code: "```\npremios = ['1 millón de dólares', 'una tarta de manzana', 'nada']\ntu_premio = premios[{random}]\n{print} 'Ganaste ' tu_premio\n{if} tu_premio == '1 millón de dólares' :\n {print} '¡Sí! ¡Eres rico!'\n{elif} tu_premio == 'una tarta de manzana' :\n {print} '¡Delicioso, una tarta de manzana!'\n{else}:\n {print} 'Más suerte la próxima vez..'\n```\n"
+ start_code: "premios = ['1 millón de dólares', 'una tarta de manzana', 'nada']\ntu_premio = premios[{random}]\n{print} 'Ganaste ' tu_premio\n{if} tu_premio == '1 millón de dólares' :\n {print} '¡Sí! ¡Eres rico!'\n{elif} tu_premio == 'una tarta de manzana' :\n {print} '¡Delicioso, una tarta de manzana!'\n{else}:\n {print} 'Más suerte la próxima vez..'"
rock_2:
- name: Rock, paper, scissors 2
- description: Part 2 of rock, paper, scissors
- default_save_name: rock_2
+ name: Piedra, papel, tijeras 2
+ description: Parte 2 de piedra, papel, tijeras
+ default_save_name: piedra_2
levels:
2:
- story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
- example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
- start_code: "# place your code here"
+ story_text: "Ahora que has aprendido como usar el comando `{ask}, ¡también puedes hacer tu código interactivo de piedra, papel, tijeras!\n\n### Ejercicio\nHaz el código interactivo de piedra, papel, tijeras añadiendo el comando `{ask}` y una pregunta a tu código de piedra, papel, tijeras.\n"
+ example_code: "```\nopción es _\n{print} Yo elijo opción\n```\n"
+ start_code: "# pon tu código aquí"
harry_potter:
name: Harry Potter
- description: Harry Potter adventures
+ description: Aventuras de Harry Potter
default_save_name: Harry Potter
levels:
10:
- start_code: '# place your code here'
- story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
- example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
+ start_code: '# pon tu código aquí'
+ story_text: "### Ejercicio\nTambién podemos hacer un adivino ambientado en Harry Potter. Rellena los huecos en blanco de forma que se impriman 9 líneas.\n**Extra** Cambia la temática del adivino a algo distinto, como tu libro, película o espectáculo de la tele favoritos.\n"
+ example_code: "```\ncasas = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nasignaturas = pociones, defensa frente a artes oscuras, encantos, transfiguración\nmiedos = Voldemort, arañas, fallar tu examen de LECHUZA\nnombres = Harry, Ron, Hermione\n_\n_ {print} nombre ' pertenece a ' casas {at} {random}\n_ {print} nombre ' es mejor en ' asignaturas {at} {random}\n_ {print} nombre ' su gran miedo es ' miedos {at} {random}\n```\n"
ask_command:
- name: ask
- description: Introduction ask command
- default_save_name: ask_command
+ name: "{ask}"
+ description: Introducción al comando ask
+ default_save_name: comando_ask
levels:
1:
- story_text: "## The ask command\nNow that you can use the `{print}` command, you are ready to learn the next command: `{ask}`. With the `{ask}` command, you can ask a question. Check it out:\n"
- example_code: "```\n{print} Hello!\n{ask} What is your name?\n```\n"
- story_text_2: "## The echo command\nIf you want the computer to repeat the answer back to you, you can use the `{echo}` command. Mind that the answer is echoed back at the end of the sentence, so it this example after hello.\n"
- story_text_3: "### Exercise\nTry out the `{ask}` and `{echo}` commands. Firstly, fill in the blanks to make this program work.\nThen ask 2 more questions using the `{ask}` command, after each `{ask}` use an `{echo}` to print the answer on the screen.\n"
- example_code_2: "```\n{print} Hello!\n{ask} What is your name?\n{echo} hello\n```\n"
- example_code_3: "```\n_ How are you doing?\n_\n```\n"
- start_code: "{print} Hello!\n{ask} What is your name?\n{echo} hello\n"
+ story_text: "## El comando ask\nAhora que puedes usar el comando `{print}`, estás preparado para usar el siguiente comando: `{ask}`. Con el comando `{ask}`, puedes hacer una pregunta. Compruébalo:\n"
+ example_code: "```\n{print} ¡Hola!\n{ask} ¿Cómo te llamas?\n```\n"
+ story_text_2: "## El comando echo\nSi quieres que el ordenador te repita la respuesta, puedes usar el comando `{echo}`. Ten en cuenta que la respuesta es repetida al final de la frase, como este ejemplo después del hola.\n"
+ story_text_3: "### Ejercicio\nPrueba los comandos `{ask}` y `{echo}`. Lo primero, rellena los huecos en blanco para hacer que el programa funcione.\nDespués, haz 2 preguntas más usando el comando `{ask}`, tras cada `{ask}` usa un `{echo}` para imprimir la respuesta en pantalla.\n"
+ example_code_2: "```\n{print} ¡Hola!\n{ask} ¿Cómo te llamas?\n{echo} hola\n```\n"
+ example_code_3: "```\n_ ¿Qué tal estás?\n_\n```\n"
+ start_code: "{print} ¡Hola!\n{ask} ¿Cómo te llamas?\n{echo} hola\n"
2:
- story_text: "## The ask command\nNow that we can use **variables** in our codes, we no longer need the `{echo}` command.\nWe can use variables to store the answers to our questions and this way we can use the answer to multiple questions in our codes.\nCheck it out:\n\nThis way your code is becoming interactive!\n"
- example_code: "```\nname {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old.\n```\n"
- story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n"
- example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
- start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
+ story_text: "## El comando ask\nAhora que podemos usar **variables** en nuestros códigos, ya no necesitamos el comando `{echo}`.\nPodemos usar variables para almacenar las respuestas a nuestras pregunta y de esta manera podemos usar la respuesta a varias preguntas en nuestros códigos.\nCompruébalo:\n\n¡De esta manera tu código se convierte interactivo!\n"
+ example_code: "```\nnombre {is} {ask} ¿Cómo te llamas?\n{print} Hola nombre\nedad {is} {ask} ¿Cúantos años tienes?\n{print} nombre tiene edad años.\n```\n"
+ story_text_2: "### Ejercicio\nEn la pestaña anterior has practicado estableciendo variables con el comando `{is}`.\nHas creado al menos 3 variables y las has usado con el comando print.\nAhora, en vez de establecer las variables queremos que hagas las variables interactivas, como hicimos en nuestro ejemplo.\n\nCopia tu código de la pestaña anterior y haz las variables interactivas usando el comando `{ask}`.\n"
+ example_code_2: "```\nanimales_favoritos {is} {ask} ¿Cuál es tu animal favorito?\n{print} Me gusta animales_favoritos\n```\n"
+ start_code: "nombre {is} {ask} ¿Cómo te llamas?\n{print} Hola nombre\nedad {is} {ask} ¿Cúantos años tienes?\n{print} nombre tiene edad años."
random_command:
- name: random
- description: introducing at random command
- default_save_name: random_command
+ name: "{random}"
+ description: introducción al comando random
+ default_save_name: comando_random
levels:
3:
- story_text: "## At random\nIn this level you can make a list using the `{is}` command. You can let the computer choose a random item from that list. You do that with `{at} {random}`.\n"
- example_code: "```\nanimals {is} dogs, cats, kangaroos\n{print} animals {at} {random}\n```\n"
- story_text_2: "You can use the `{at} {random}` command in a sentence as well.\n"
- example_code_2: "```\nfood {is} sandwich, slice of pizza, salad, burrito\n{print} I am going to have a food {at} {random} for lunch.\n```\n"
- start_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}\n"
- story_text_3: "### Exercise\nTry out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price!\nCan you do it? We have already put the first lines into the example code.\n"
- example_code_3: "```\n{print} The big gameshow!\n{print} There are 3 suitcases in front of you...\nchosen {is} {ask} Which suitcase do you choose?\nprices {is} _\n_\n```\n"
+ story_text: "## At random\nEn este nivel puedes hacer una lista usando el comando `{is}`. Puedes dejar que el ordenador elija un objeto aleatorio de esa lista. Esto se hace con `{at} {random}`.\n"
+ example_code: "```\nanimales {is} perros, gatos, canguros\n{print} animales {at} {random}\n```\n"
+ story_text_2: "También puedes usar el comando `{at} {random}` en una frase.\n"
+ example_code_2: "```\ncomida {is} sandwich, trozo de pizza, ensalada, burrito\n{print} Voy a tomar un/a comida {at} {random} para comer.\n```\n"
+ start_code: "animales {is} perro, gato, canguro\n{print} animales {at} {random}\n"
+ story_text_3: "### Ejercicio\nPrueba el comando `{at} {random}` haciendo tu propio espectáculo (como los de la tele) donde eliges una puerta o maleta y ¡tendrá un gran premio!\n¿Puedes hacerlo? Ya hemos puesto las primeras líneas en el código de ejemplo.\n"
+ example_code_3: "```\n{print} ¡El gran espectáculo!\n{print} Hay 3 maletas delante tuyo...\nelegida {is} {ask} ¿Qué maleta eliges?\npremios {is} _\n_\n```\n"
16:
- start_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]"
- story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
- example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
+ start_code: "fruta = ['manzana', 'plátano', 'cereza']\n{print} fruta[random]"
+ story_text: "Vamos a hacer listas a la manera de Python, con corchetes alrededor de las listas! También mantendremos las comillas en cada objeto como hemos aprendido en los niveles anteriores.\nUsamos corchetes para señalar una posición en una lista. El comando {at} {random} ya no se puede utilizar."
+ example_code: "```\namigos = ['Ahmed', 'Ben', 'Cayden']\nnumeros_suerte = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'el número de la suerte de ' amigos[i]\n {print} 'es ' numeros_suerte[i]\n```\n"
in_command:
- name: in
- description: Introducing the in command
+ name: "{in}"
+ description: Introducción al comando in
default_save_name: in_command
levels:
5:
- story_text: "## Lists\nWhen we want to check if something is in a list, we can now use the `{in}` command.\nThis code prints pretty! if you choose green or yellow, and meh otherwise.\n"
- example_code: "```\npretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'\n```\n"
- example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
- story_text_2: "### Exercise\nFinish the example code by filling in the blanks with commands that you've learned.\nWhen you've finished the code, try to create a code of your own and use a question that you've thought of yourself.\n"
- start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
+ story_text: "## Listas\nCuando queremos comprobar si algo se encuentra en una lista, podemos usar el comando `{in}`.\nEste código imprime ¡bonito! si eliges verde o amarillo, y meh en caso contrario.\n"
+ example_code: "```\ncolores_bonitos {is} verde, amarillo\ncolor_favorito {is} {ask} '¿Cúal es tu color favorito?'\n{if} color_favorito {in} colores_bonitos {print} '!bonito!'\n{else} {print} 'meh'\n```\n"
+ example_code_2: "```\nanimales is perro, vaca, oveja\nrespuesta is preguntar '¿Cúal es tu animal preferido?'\n_ respuesta _ animales _ '¡También el mío!'\n_ _ 'Mis animales preferidos son perrros, vacas y ovejas'\n```\n"
+ story_text_2: "### Ejercicio\nCompleta el código de ejemplo rellenando los huecos en blanco con los comandos que aprendiste.\nCuando completes el código, intenta crear por tí mismo un código y usa una pregunta que se te haya ocurrido.\n"
+ start_code: "colores_bonitos {is} verde, amarillo\ncolor_favorito {is} {ask} '¿Cúal es tu color preferido?'\n{if} color_favorito {in} colores_bonitos {print} '¡bonito!'\n{else} {print} 'meh'"
quotation_marks:
- name: "'quotation marks'"
- description: Introduction quotation marks
+ name: "'comillas'"
+ description: Introducción a las comillas
default_save_name: quotation_marks
levels:
4:
- story_text: "## 'Quotation marks'\nIn level 4 `{ask}` and `{print}` have changed.\nYou must put text that you want to print between quotation marks.\nThis is useful, because now you can print all the words you want. Also the words you used to store something with `{is}`.\nMost programming languages also use quotation marks when printing, so we are also getting a step closer to real programming!\n"
- story_text_2: "## Contractions\nImportant! Mind that now that we're using quotation marks, Hedy will get confused when you use the apostrophe for contractions like I'm or What's.\nMake sure to remove those apostrophes and change the spelling to I am or What is.\nCheck out the example code to see the wrong way of using apostrophes.\n"
- example_code: "```\n{print} 'You need to use quotation marks from now on!'\nanswer {is} {ask} 'What do we need to use from now on?'\n{print} 'We need to use ' answer\n```\n"
- example_code_2: "```\n_ This is the wrong way of using apostrophes _\n{print} 'I'm babysitting my sister's kids'\n{print} 'What's more fun than that?'\n```\n"
- start_code: "{print} 'You need to use quotation marks from now on!'\nanswer {is} {ask} 'What do we need to use from now on?'\n{print} 'We need to use ' answer"
+ story_text: "## 'Comillas'\nEn el nivel 4 `{ask}` y `{print}` han cambiado.\nDebes poner el texto que quieras imprimir entre comillas.\nEsto es útil, porque puedes imprimir todas las palabras que quieras. También las palabras que solías almacenar algo con `{is}`.\nLa mayoría de los lenguajes de programación también usan comillas al imprimir, asi que nos estamos acercando ¡a la programación real!\n"
+ story_text_2: "## Contracciones\n¡Importante! Ten en cuenta que estamos usando comillas, Hedy se confundirá cuando uses el apóstrofe para contracciones como I'm o What's.\nAsegúrate de eliminar esos apóstrofes y cambia la ortografía a I am o What is.\nComprueba el código de ejemplo para ver la forma incorrecta de usar los apóstrofes.\n"
+ example_code: "```\n{print} '¡A partir de ahora tienes que usar las comillas!'\nrespuesta {is} {ask} '¿Qué tienes que usar a partir de ahora?'\n{print} 'Tenemos que usar ' respuesta\n```\n"
+ example_code_2: "```\n_ Esta es la manera incorrecta de usar apóstrofes _\n{print} 'I'm babysitting my sister's kids'\n{print} 'What's more fun than that?'\n```\n"
+ start_code: "{print} '¡A partir de ahora tienes que usar las comillas!'\nrespuesta {is} {ask} '¿Qué tienes que usar a partir de ahora?'\n{print} 'Tenemos que usar ' respuesta"
12:
- story_text: "**All texts need to be in quotation marks**\nFor this level on you will also have to use quotation marks when storing a text with `=`:\n"
- example_code: "```\nname = 'Hedy the Robot'\n{print} 'Hello ' name\n```\n"
- story_text_2: "**All items in lists need quotation marks too**\nLists are texts, so they need quotation marks too. Mind that each single item on the list has quotation marks.\nThis allows you to save two words as 1 item on the list, for example 'Iron Man'.\n"
+ story_text: "**Todos los textos tienen que ir entre comillas**\nPara este nivel también tendrás que usar comillas cuando almacenes un texto con `=`:\n"
+ example_code: "```\nnombre = 'El Robot Hedy'\n{print} 'Hola ' nombre\n```\n"
+ story_text_2: "**Todos los objetos en las listas también necesitan comillas**\nLas listas son textos, así que también necesitan comillas. Ten en cuenta que cada objeto en la lista tiene comillas.\nEsto te permite guardar dos palabras como un objeto en la lista, por ejemplo 'Iron Man'.\n"
example_code_2: "```\nsuperheroes = 'Spiderman', 'Batman', 'Iron Man'\n{print} superheroes {at} {random}\n```\n"
- story_text_3: "**All text after `{if}` comparisons need quotation marks too**\n"
- example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'\n```\n"
- story_text_4: "**Numbers don't need quotation marks**\nFor numbers, you do not use quotation marks in the `=`:\n"
- example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
- start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
+ story_text_3: "**Todos los textos tras las comparaciones `{if}` también necesitan comillas**\n"
+ example_code_3: "```\nnombre = {ask} '¿Cúal es tu nombre?'\n{if} nombre = 'El Robot Hedy'\n {print} '¡Hola!'\n```\n"
+ story_text_4: "**Los números no necesitan comillas**\nPara los números, no utilizas comillas en el `=`:\n"
+ example_code_4: "```\npuntuación = 25\n{print} 'Obtuviste ' puntuación\n```\n"
+ start_code: "nombre = {ask} '¿Cúal es tu nombre?'\n{if} nombre = 'El Robot Hedy'\n {print} '¡Hola!'"
for_command:
- name: for
- description: for command
+ name: "{for}"
+ description: comando for
default_save_name: for
levels:
10:
- start_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal"
- story_text: "## For\nIn this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements.\n`{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces."
- example_code: "```\nanimals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal\n```\n"
+ start_code: "animales {is} perro, gato, pez globo\n{for} animal {in} animales\n {print} 'Yo amo ' animal"
+ story_text: "## For\nEn este nivel aprendemos un nuevo código llamado `{for}`. Con `{for}` puedes hacer una lista y usar todos los elementos.\n`{for}` crea un bloque, como `{repeat}` y `{if}` así todas las líneas dentro del bloque necesita empezar con 4 espacios."
+ example_code: "```\nanimales {is} perro, gato, pez globo\n{for} animal {in} animales\n {print} 'Yo amo ' animal\n```\n"
11:
- start_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter"
- story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
- example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
+ start_code: "{for} contador {in} {range} 1 {to} 5\n {print} contador"
+ story_text: "En este nivel, añadimos una nueva forma del `{for}`. En niveles anteriores, usamos `{for}` con una lista, pero también podemos usar `{for}` con números.\nEsto lo hacemos añadiendo un nombre de variable, seguido por `{in}` `{range}`. Entonces escribimos el número en el que empezar, `{to}` y el número en el que terminar.\n\n¡Prueba este ejemplo a ver qué pasa! Otra vez en este nivel, tendrás que usar sangrías en las líneas situadas debajo de las sentencias `{for}`."
+ example_code: "```\n{for} contador {in} {range} 1 {to} 5\n {print} contador\n```\n"
maths:
name: maths
- description: Introducing maths
+ description: Introducción a maths
default_save_name: maths
levels:
6:
- start_code: "{print} '5 times 5 is ' 5 * 5"
- story_text: "## 1 + 1\nIn this level you learn something new: you can now also calculate.\n\nThe plus is easy, you write it like with math: `5 + 5` for example. The minus also works fine, it is `5 - 5`.\n\nThe times is a bit different, because there is no times symbol on your keyboard. Just search, there really isn't!\nThat is why we multiply with the asterisk above 8: `5 * 5`. Read that as \"5 times 5\" that helps you remember it best.\n"
- example_code: "```\n{print} '5 plus 5 is ' 5 + 5\n{print} '5 minus 5 is ' 5 - 5\n{print} '5 times 5 is ' 5 * 5\n```\n"
- story_text_2: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n"
- example_code_2: "```\nname = Hedy\nanswer = 20 + 4\n```\n"
+ start_code: "{print} '5 veces 5 es ' 5 * 5"
+ story_text: "## 1 + 1\nEn este nivel aprenderás algo nuevo: ahora también puedes calcular.\n\nLa suma es fácil, se escribe como en matemáticas: `5 + 5` por ejemplo. La resta funciona igual, es `5 - 5`.\n\nLa multiplicación es un poco diferente, porque no hay símbolo de multiplicar en tu teclado. 'Sólo busca, no hay realmente!\nEso es porque multiplicamos con el asterísco sobre el 8: `5 * 5`. Leelo como \"5 veces 5\" para recordarlo mejor.\n"
+ example_code: "```\n{print} '5 más 5 es ' 5 + 5\n{print} '5 menos 5 es ' 5 - 5\n{print} '5 veces 5 es ' 5 * 5\n```\n"
+ story_text_2: "¡También podemos hacer un cambio al cambiar una palabra en una variable! Ahora puedes usar `=` en vez de `{is}` cuando almacenamos un nombre o número en una variable, tal que así:\n"
+ example_code_2: "```\nnombre = Hedy\nrespuesta = 20 + 4\n```\n"
12:
- start_code: "{print} 'decimal numbers now need to use a dot'\n{print} 2.5 + 2.5"
- story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
- example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
+ start_code: "{print} 'los números decimales ahora tienen que usar un punto'\n{print} 2.5 + 2.5"
+ story_text: "**Números decimales**\nHasta ahora, Hedy no permitía números decimales como 1.5, pero ahora permitimos eso. Ten en cuenta que los ordenadores usan el `.` para los números decimales."
+ example_code: "```\n{print} 'Dos y media más dos y medio es...'\n{print} 2.5 + 2.5\n```\n"
+ clear_command:
+ description: comando clear
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "{print} '3'\n{sleep}\n{clear}\n{print} '2'\n{sleep}\n{clear}\n{print} '1'\n{sleep}\n{clear}\n{print} '¡SORPRESA!'\n"
+ story_text: "¡Hora para un nuevo comando! Con `{clear}` puedes limpiar todo el texto de la pantalla de salida. De esta manera puedes evitar que tu pantalla se llene de texto.\n¡Atención! Si usas un comando `{clear}`, recuerda usar un `{sleep}` encima de él. En caso contrario, ¡Hedy limpiará tu pantalla sin darte tiempo a leer lo que pone!\n"
+ example_code: "```\n{print} '3'\n{sleep}\n{clear}\n{print} '2'\n{sleep}\n{clear}\n{print} '1'\n{sleep}\n{clear}\n{print} '¡SORPRESA!'\n```\n"
+ name: '{clear}'
diff --git a/content/adventures/et.yaml b/content/adventures/et.yaml
index 1c5aa78945f..640d2cab6e3 100644
--- a/content/adventures/et.yaml
+++ b/content/adventures/et.yaml
@@ -665,7 +665,7 @@ adventures:
default_save_name: Pressed
name: Key presses
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -688,7 +688,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -723,10 +723,10 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
story_text: "We are going to learn more new items. You might know them already from mathematics, the `<` and `>`.\nThe `<` checks if the first number is smaller than the second, for example age `<` 12 checks if age is smaller than 12.\nIf you want to check if the first number is smaller or equal to the second, you can use `<=`, for example age `<=` 11.\nThe `>` checks if the first number is bigger than the second, for example points `>` 10 checks if points is larger than 10.\nIf you want to check if the first number is bigger or equal to the second, you can use `>=`, for example points `>=` 11.\nYou use these comparisons in an `{if}`, like this:\n"
- name: is
+ name: "{is}"
description: introducing is command
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
levels:
3:
example_code_2: "```\nanimals {is} dog, cat, kangaroo\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}\n```\n"
@@ -739,7 +739,7 @@ adventures:
description: introducing add to and remove from
default_save_name: add_remove_command
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -769,7 +769,7 @@ adventures:
description: Introduction quotation marks
default_save_name: quotation_marks
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -788,7 +788,7 @@ adventures:
and_or_command:
description: introducing and or
default_save_name: and or
- name: and or
+ name: "{and} & {or}"
levels:
13:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
@@ -813,7 +813,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -830,7 +830,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -847,7 +847,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -858,7 +858,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -873,7 +873,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -910,7 +910,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/fa.yaml b/content/adventures/fa.yaml
index e30bfd2b48b..5805447cb96 100644
--- a/content/adventures/fa.yaml
+++ b/content/adventures/fa.yaml
@@ -670,7 +670,7 @@ adventures:
description: Try linking a keyboard key to a command!
default_save_name: Pressed
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -693,7 +693,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -702,7 +702,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -734,7 +734,7 @@ adventures:
description: Introduction quotation marks
default_save_name: quotation_marks
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -751,7 +751,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
levels:
7:
example_code: "```\n{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'\n```\n"
@@ -766,7 +766,7 @@ adventures:
description: repeat command 2
default_save_name: repeat_command_2
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -784,7 +784,7 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
rock_2:
@@ -806,7 +806,7 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -825,7 +825,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -844,7 +844,7 @@ adventures:
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -861,7 +861,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -887,7 +887,7 @@ adventures:
start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
maths:
@@ -906,7 +906,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -915,7 +915,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -923,3 +923,12 @@ adventures:
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
+ clear_command:
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ name: '{clear}'
+ description: clear command
diff --git a/content/adventures/fi.yaml b/content/adventures/fi.yaml
index 2134d4eb45f..bdd249a05d0 100644
--- a/content/adventures/fi.yaml
+++ b/content/adventures/fi.yaml
@@ -665,7 +665,7 @@ adventures:
default_save_name: Pressed
name: Key presses
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -688,7 +688,7 @@ adventures:
story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n"
example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -707,7 +707,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -760,11 +760,11 @@ adventures:
start_code: "{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This will be printed 5 times'"
story_text: "### Repeat commands and indentation\nIn this level you can repeat multiple lines of code with only 1 repeat command.\nYou do this by making a block of lines that you want to repeat.\nThe lines in this block will need **indentation** .\nThat means putting four spaces at the beginning of each line. You will also have to indent when you just want to create a block of one line.\n"
example_code: "```\n{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This is all repeated 5 times'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
levels:
7:
story_text: "## Repeat with other commands and with variables\nYou have practiced the `{repeat}` command in combination with the `{print}` command now, but did you know you could also use other commands with `{repeat}` ?\nIn this example code you can see that `{repeat}` can also be used with an `{ask}`, `{if}` or `{else}` command.\n"
@@ -788,7 +788,7 @@ adventures:
start_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal"
story_text: "## For\nIn this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements.\n`{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces."
example_code: "```\nanimals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal\n```\n"
- name: for
+ name: "{for}"
description: for command
default_save_name: for
maths:
@@ -812,11 +812,11 @@ adventures:
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -843,7 +843,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -860,7 +860,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -873,7 +873,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -882,7 +882,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -899,7 +899,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -910,7 +910,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -918,3 +918,12 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ levels:
+ 4:
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ default_save_name: clear_command
diff --git a/content/adventures/fr.yaml b/content/adventures/fr.yaml
index 265d25d92a0..614ea0d06f0 100644
--- a/content/adventures/fr.yaml
+++ b/content/adventures/fr.yaml
@@ -19,7 +19,7 @@ adventures:
Par exemple, dans l'aventure du restaurant, tu peux re-dire ce que le client voulait manger ou ce qu'il voulait boire, mais pas les deux en une seule phrase.
start_code: "{print} bonjour le monde !"
story_text_2: "Si le joueur écrit un hamburger et un coca, il n'est pas possible de dire « donc tu voudrais un hamburger et un coca », pour le moment tu dois écrire deux lignes différentes.\nAussi, la commande `{echo}` ne sait re-dire le mot qu'à la fin de la phrase. Donc tu ne peux pas dire « ton hamburger est en route ! ».\n\nÀ partir du niveau 2, ça change. Au niveau 2, tu vas apprendre à travailler avec des variables, ce qui te permet de sauver plusieurs réponses et les afficher où tu veux.\nAlors, allons à l'onglet suivant !\n"
- example_code: "```\n{print} BIenvenue chez Hedy\n{ask} Que voudrais-tu manger ?\n{echo} Donc, tu voudrais\n{ask} Que voudrais-tu boire ?\n{echo} Donc, tu voudrais\n```\n"
+ example_code: "```\n{print} Bienvenue chez Hedy\n{ask} Que voudrais-tu manger ?\n{echo} Donc, tu voudrais\n{ask} Que voudrais-tu boire ?\n{echo} Donc, tu voudrais\n```\n"
3:
story_text: |
Dans le niveau précédent tu as appris ce qu'est une variable et comment tu peux l'utiliser pour rendre tes aventures plus interactives.
@@ -35,18 +35,18 @@ adventures:
Bien sûr, tu voulais afficher
- `Mon nom est Sophie`
+ "Mon nom est Sophie"
mais Hedy affiche
- `Mon Sophie est Sophie`.
+ "Mon Sophie est Sophie".
Dans ce niveau, ce problème est résolu à l'aide des guillemets.
example_code: "```\nnom {is} Sophie\n{print} Mon nom est nom\n```\n"
5:
start_code: |-
- nom {is} {ask} 'quel est ton nom?'
- {if} nom {is} Hedy {print} 'cool!' {else} {print} 'mouais'
+ nom {is} {ask} "quel est ton nom ?"
+ {if} nom {is} Hedy {print} "cool !" {else} {print} "mouais"
story_text: |
Dans les niveaux précédents tu as appris à utiliser `{at} {random}` pour rendre tes jeux différents à chaque exécution.
Ce n'est pas vraiment interactif et le joueur n'a pas d'influence sur le déroulement du jeu.
@@ -63,9 +63,9 @@ adventures:
Le niveau suivant rend possible l'addition, la soustraction et la multiplication dans tes programmes. Tu pourras calculer les prix dans ton restaurant mais aussi ajouter un code secret pour faire une réduction à tes amis et ta famille.
Une autre possibilité sera de programmer ton propre jeu de mathématiques, pour que ton petit frère ou ta petite sœur s'entraîne aux multiplications.
En selle !
- example_code: "```\nprix_plat {is} 0\nprix_boisson {is} 0\nprix_total {is} 0\n{print} 'Bonjour chez McHedy'\ncommande {is} {ask} 'Que désirez-vous manger ?'\n{if} commande {is} hamburger prix_plat {is} 5\n{if} commande {is} frites prix_plat {is} 2\nboisson {is} {ask} 'Que désirez-vous boire ?'\n{if} boisson {is} eau prix_boisson {is} 0\nelse prix_boisson {is} 3\nprix_total {is} prix_plat + prix_boisson\n{print} 'Ça fera ' prix_total ' euros, s'il vous plait'\n```\n"
+ example_code: "```\nprix_plat {is} 0\nprix_boisson {is} 0\nprix_total {is} 0\n{print} \"Bonjour chez McHedy\"\ncommande {is} {ask} \"Que désirez-vous manger ?\"\n{if} commande {is} hamburger prix_plat {is} 5\n{if} commande {is} frites prix_plat {is} 2\nboisson {is} {ask} \"Que désirez-vous boire ?\"\n{if} boisson {is} eau prix_boisson {is} 0\nelse prix_boisson {is} 3\nprix_total {is} prix_plat + prix_boisson\n{print} \"Ça fera \" prix_total \" euros, s'il vous plait\"\n```\n"
7:
- start_code: "{print} 'Joyeux anniversaire'\n{print} 'Joyeux anniversaire'\n{print} 'Joyeux anniversaire cher Hedy'\n{print} 'Joyeux anniversaire'\n"
+ start_code: "{print} \"Joyeux anniversaire\"\n{print} \"Joyeux anniversaire\"\n{print} \"Joyeux anniversaire cher Hedy\"\n{print} \"Joyeux anniversaire\"\n"
story_text: |
Bon travail ! Vous avez atteint le niveau suivant, ce qui signifie que vous avez pratiqué avec `{if}` et `{else}`. Vous avez probablement remarqué que vos codes deviennent de plus en plus longs.
Par exemple, si vous voulez programmer 'Joyeux anniversaire'.
@@ -80,224 +80,233 @@ adventures:
```
8:
start_code: |-
- {print} "Allons à l'onglet suivant !"
+ {print} "Allons à l'onglet suivant !"
story_text: |
Maintenant, vous avez appris comment répéter une seule ligne de code. C'est pratique, mais ce n'est pas toujours suffisant. Parfois, vous voulez répéter plusieurs lignes en même temps.
- Ce niveau vous permet de regrouper quelques lignes de code et de répéter ce petit groupe de lignes en une seule fois !
+ Ce niveau vous permet de regrouper quelques lignes de code et de répéter ce petit groupe de lignes en une seule fois !
example_code: |
```
- {repeat} 5 {times} {print} 'Dans le prochain onglet, vous pourrez répéter plusieurs lignes de code en une seule fois!'
+ {repeat} 5 {times} {print} "Dans le prochain onglet, vous pourrez répéter plusieurs lignes de code en une seule fois !"
```
9:
start_code: |-
- {print} Allons à l'onglet suivant !
+ {print} Allons à l'onglet suivant !
story_text: |
- Super travail ! Vous avez atteint un nouveau niveau ! Dans le niveau précédent, vous avez appris à utiliser plusieurs lignes de code dans une commande {if} ou {repeat}. Mais vous ne pouvez pas encore les combiner...
- Bonne nouvelle ! Dans ce niveau, vous aurez la possibilité de mettre un {if} à l'intérieur d'un autre {if}, ou à l'intérieur d'une commande {repeat}.
+ Super travail ! Vous avez atteint un nouveau niveau ! Dans le niveau précédent, vous avez appris à utiliser plusieurs lignes de code dans une commande {if} ou {repeat}. Mais vous ne pouvez pas encore les combiner…
+ Bonne nouvelle ! Dans ce niveau, vous aurez la possibilité de mettre un {if} à l'intérieur d'un autre {if}, ou à l'intérieur d'une commande {repeat}.
- example_code: "```\nréponse = {ask} 'Es-tu prêt.e à apprendre quelque chose de nouveau ?'\n{if} réponse {is} oui\n {print} 'Super ! Tu vas apprendre à utiliser la commande de répétition dans la commande de condition !'\n {print} 'Hourra !'\n {print} 'Hourra !'\n {print} 'Hourra !'\n{else}\n {print} 'Peut-être devrais-tu t'entraîner davantage en retournant au niveau précédent.'\n"
+ example_code: "```\nréponse = {ask} \"Es-tu prêt·e à apprendre quelque chose de nouveau ?\"\n{if} réponse {is} oui\n {print} \"Super ! Tu vas apprendre à utiliser la commande de répétition dans la commande de condition !\"\n {print} \"Hourra !\"\n {print} \"Hourra !\"\n {print} \"Hourra !\"\n{else}\n {print} \"Peut-être devrais-tu t'entraîner davantage en retournant au niveau précédent.\"\n"
10:
start_code: |-
- {print} "Allons à l'onglet suivant !"
+ {print} "Allons à l'onglet suivant !"
story_text: |
- Vous vous débrouillez très bien ! Dans les niveaux précédents, nous avons encore rencontré un petit problème. Vous avez appris à répéter des lignes, mais que faire si vous souhaitez apporter une légère modification à la ligne ?
- Par exemple, si vous voulez chanter la chanson 'Si tu es heureux et que tu le sais'. Cela ressemblerait à ceci :
+ Tu te débrouilles très bien ! Aux niveaux précédents, nous avons encore rencontré un petit problème. Tu as appris à répéter des lignes, mais que faire si tu voulais modifier légèrement la ligne ?
+ Par exemple, si tu veux chanter la chanson "Si tu es heureux et que tu le sais". Cela ressemblerait à ceci :
- Si vous souhaitez également la prochaine strophe 'Tape des pieds', puis la suivante, et la suivante, vous devriez changer complètement le code.
- Dans ce niveau, vous apprendrez la commande `{for}`, qui vous permet de créer une liste d'actions et de répéter le code avec une autre action à chaque fois !
- Jetez-y un coup d'œil, s'il vous plaît !
- example_code: "```\n{repeat} 2 {times}\n {print} 'Si tu es heureux et que tu le sais, tape des mains'\n{print} 'Si tu es heureux et que tu le sais, et que tu veux vraiment le montrer'\n{print} 'Si tu es heureux et que tu le sais, tape des mains'\n```\n"
+ Mais si tu veux également la strophe suivante "Tape des pieds", puis la suivante, et la suivante… tu vas devoir changer complètement le code.
+ Dans ce niveau, tu vas apprendre la commande `{for}`, qui te permet d'utiliser une liste d'actions et de répéter le code avec une action différente à chaque fois !
+ Jettes-y un œil !
+ example_code: "```\n{repeat} 2 {times}\n {print} \"Si tu es heureux et que tu le sais, tape des mains\"\n{print} \"Si tu es heureux et que tu le sais, et que tu veux vraiment le montrer\"\n{print} \"Si tu es heureux et que tu le sais, tape des mains\"\n```\n"
11:
start_code: |-
- {print} "Allons à l'onglet suivant !"
- story_text: "Vous avez atteint le niveau 10, vous vous en sortez très bien ! Dans les niveaux supérieurs, Hedy se concentre de plus en plus sur l'enseignement du langage de programmation Python.\nEn Python, il n'y a pas de commande `{repeat}`, mais il existe une commande similaire à `{repeat}`. Êtes-vous curieux de découvrir comment dire `{repeat}` en langage Python ? Poursuivez rapidement pour le découvrir !\n"
+ {print} "Allons à l'onglet suivant !"
+ story_text: "Tu as atteint le niveau 10, tu t'en sors très bien ! Dans les niveaux à venir, Hedy s'occupe de plus en plus de t'apprendre le langage de programmation Python.\nEn Python, il n'y a pas de commande `{repeat}`, mais il existe une commande similaire à `{repeat}`. Es-tu curieux de découvrir comment dire `{repeat}` en langage Python ? Dépêche-toi d'avancer pour le découvrir !\n"
12:
- start_code: "{print} \"Allons à l'onglet suivant !\""
- story_text: "Vous avez peut-être essayé d'utiliser des nombres décimaux dans votre aventure au restaurant. Si c'est le cas, vous avez probablement remarqué que Hedy ne les comprenait pas encore et les arrondissait toujours.\nÀ partir de ce niveau, vous pouvez utiliser des nombres décimaux.\n"
- example_code: "```\nburger = 5\nboisson = 2\ntotal = burger + boisson\nprint 'Vous avez commandé un burger et une boisson'\nprint 'Le coût total est de 'total' euros s'il vous plait'\n```\n"
+ start_code: "{print} \"Allons à l'onglet suivant !\""
+ story_text: "Tu as peut-être essayé d'utiliser des nombres décimaux dans ton aventure au restaurant. Si c'est le cas, tu as remarqué que Hedy ne les comprenait pas encore et les arrondissait toujours.\nÀ partir de ce niveau, tu peux utiliser des nombres décimaux.\n"
+ example_code: "```\nburger = 5\nboisson = 2\ntotal = burger + boisson\nprint \"Vous avez commandé un burger et une boisson\"\nprint \"Ça coûte \" total \" euros, s'il vous plait\"\n```\n"
13:
- start_code: "{print} 'Allons au niveau suivant !'"
- story_text: "Dans les niveaux précédents, vous avez appris à mettre deux commandes `{if}` l'une à l'intérieur de l'autre. Cela fonctionne bien, mais cela crée des codes très longs et peu pratiques, comme celui-ci :\n\nDans ce système, vous devez fournir à la fois le nom d'utilisateur correct et le mot de passe correct.\nDans ce niveau, vous allez apprendre la commande `{and}` qui permettra de raccourcir considérablement ce code et le rendre plus compréhensible !\nJetez-y un coup d'œil !\n"
- example_code: "```\nnom_utilisateur = {ask} 'Quel est ton nom d'utilisateur ?'\nmot_de_passe = {ask} 'Quel est ton mot de passe ?'\n{if} nom_utilisateur {is} 'Hedy' \n {if} mot_de_passe {is} 'secret'\n {print} 'Bienvenue Hedy !'\n {else}\n {print} 'Accès refusé'\n{else}\n {print} 'Accès refusé'\n```\n"
+ start_code: "{print} 'Allons au niveau suivant !'"
+ story_text: "Dans les niveaux précédents, vous avez appris à mettre deux commandes `{if}` l'une à l'intérieur de l'autre. Cela fonctionne bien, mais cela crée des codes très longs et peu pratiques, comme celui-ci :\n\nIci, vous devez fournir à la fois le nom d'utilisateur correct et le mot de passe correct.\nDans ce niveau, vous allez apprendre la commande `{and}` qui permettra de raccourcir considérablement ce code et le rendre plus compréhensible !\nVérifions ça !\n"
+ example_code: "```\nnom_utilisateur = {ask} \"Quel est ton nom d'utilisateur ?\"\nmot_de_passe = {ask} \"Quel est ton mot de passe ?\"\n{if} nom_utilisateur {is} \"Hedy\"\n {if} mot_de_passe {is} \"secret\"\n {print} \"Bienvenue Hedy !\"\n {else}\n {print} \"Accès refusé\"\n{else}\n {print} \"Accès refusé !\"\n```\n"
14:
- start_code: "{print} 'Allons à l'onglet suivant'"
- story_text: "Avec le programme ci-dessous, vous pouvez calculer si vous avez réussi une matière à l'école (c'est-à-dire si vous avez obtenu une note de 6 ou plus).\nVous pouvez voir que ce code est extrêmement inefficace en raison de la longueur excessive du code dans la ligne 5.\nToutes les différentes notes de 1 à 5 doivent être programmées séparément. Heureusement pour vous, dans ce niveau, vous apprendrez comment faire cela sans avoir à écrire ce code extrêmement long !\n"
- example_code: "```\npremiere_note = {ask} 'Quelle note as-tu eu à ton premier test ?'\ndeuxieme_note = {ask} 'Quelle note as-tu eu sur ton deuxième test ?'\nsomme = premiere_note + deuxieme_note\nmoyenne = somme / 2\n{if} moyenne = 1 {or} moyenne = 2 {or} moyenne = 3 {or} moyenne = 4 {or} moyenne = 5\n {print} 'Oh non! Tu as échoué sur ce sujet ...'\n{else}\n {print} 'Super ! Tu as réussi le sujet !'\n```\n"
+ start_code: "{print} \"Allons à l'onglet suivant\""
+ story_text: "Avec le programme ci-dessous, tu peux calculer si tu as réussi une matière à l'école (c'est-à-dire si tu as obtenu une note de 6 ou plus).\nTu peux voir que ce code est extrêmement inefficace en raison de la longueur excessive du code dans la ligne 5.\nToutes les différentes notes de 1 à 5 doivent être programmées séparément. Heureusement pour toi, dans ce niveau, tu vas apprendre comment le faire sans avoir à écrire ce code extrêmement long !\n"
+ example_code: "```\npremiere_note = {ask} \"Quelle note as-tu eu à ton premier test ?\"\ndeuxieme_note = {ask} \"Quelle note as-tu eu sur ton deuxième test ?\"\nsomme = premiere_note + deuxieme_note\nmoyenne = somme / 2\n{if} moyenne = 1 {or} moyenne = 2 {or} moyenne = 3 {or} moyenne = 4 {or} moyenne = 5\n {print} \"Oh non ! Tu as raté le sujet…\"\n{else}\n {print} \"Super ! Tu as réussi le sujet !\"\n```\n"
15:
- start_code: "{print} 'Allons au niveau suivant !'"
- story_text: "Dans le jeu ci-dessous, un code a été créé pour permettre au joueur de jouer autant qu'il le souhaite...\nMais le code est inefficace et beaucoup trop long. De plus, que se passe-t-il si le joueur veut jouer à 101 jeux au lieu de 100 ?\nOn ne peut pas jouer à l'infini ?\nDans ce niveau, vous apprendrez une commande qui rendra tout cela beaucoup plus facile !\n"
- example_code: "```\njeu {is} 'en cours'\n{for} i {in} {range} 1 {to} 100\n {if} jeu {is} 'en cours'\n réponse = {ask} 'Est-ce que tu veux continuer ?'\n {if} réponse {is} 'non'\n jeu {is} 'fini'\n {if} réponse {is} 'oui'\n {print} 'Ok on continue'\n```\n"
+ start_code: "{print} \"Allons au niveau suivant !\""
+ story_text: "Dans le jeu ci-dessous, un code a été créé pour permettre au joueur de jouer autant qu'il le souhaite…\nMais le code est inefficace et beaucoup trop long. De plus, que se passe-t-il si le joueur veut jouer à 101 jeux au lieu de 100 ?\nOn ne peut pas jouer à l'infini ?\nDans ce niveau, tu vas apprendre une commande qui rendra tout cela beaucoup plus facile !\n"
+ example_code: "```\njeu {is} \"en cours\"\n{for} i {in} {range} 1 {to} 100\n {if} jeu {is} \"en cours\"\n réponse = {ask} \"Est-ce que tu veux continuer ?\"\n {if} réponse {is} \"non\"\n jeu {is} \"fini\"\n {if} réponse {is} \"oui\"\n {print} \"Ok on continue\"\n```\n"
16:
- start_code: "{print} \"Allons à l'onglet suivant !\""
- story_text: "Dans ce niveau, nous allons nous rapprocher un peu plus du véritable code Python. Vous allez également apprendre comment faire correspondre deux listes ensemble.\nDe cette manière, vous pourrez programmer un code dans lequel le bon animal est associé au bon son.\nParce que les deux codes ci-dessous... Sont évidemment absurdes !\n"
- example_code: "```\nanimaux = 'poule', 'cheval', 'vache'\ncris = 'cot', 'hiiii', 'meuh'\n{for} animal {in} animaux\n {print} 'Un.e ' animal ' fait ' cris {at} {random}\n```\nVous pourriez également essayer de le faire fonctionner de cette manière, mais...\n```\nanimaux = 'poule', 'cheval', 'vache'\ncris = 'cot', 'hiiii', 'meuh'\n{for} animal {in} animaux\n {for} cri {in} cris\n {print} 'Un.e ' animal ' fait ' cri\n```\n"
+ start_code: "{print} \"Allons à l'onglet suivant !\""
+ story_text: "Dans ce niveau, nous allons nous rapprocher un peu plus du véritable code Python. Tu vas également apprendre comment faire correspondre deux listes ensemble.\nDe cette manière, tu peux programmer un code dans lequel le bon animal est associé au bon son.\nParce que les deux codes ci-dessous… n'ont aucun sens, évidemment !\n"
+ example_code: "```\nanimaux = \"poule\", \"chèvre\", \"vache\"\ncris = \"cot\", \"bêêêê\", \"meuh\"\n{for} animal {in} animaux\n {print} \"Une \" animal \" fait \" cris {at} {random}\n```\nVous pourriez également essayer de le faire fonctionner de cette manière, mais…\n```\nanimaux = \"poule\", \"chèvre\", \"vache\"\ncris = \"cot\", \"bêêêê\", \"meuh\"\n{for} animal {in} animaux\n {for} cri {in} cris\n {print} \"Une \" animal \" fait \" cri\n```\n"
17:
start_code: |-
- {print} 'Allons au niveau suivant !'
+ {print} "Allons au niveau suivant !"
story_text: "Tu as presque atteint le dernier niveau de Hedy, félicitations ! Dans ce niveau, tu apprendras une véritable façon d'utiliser `{print}` en Python.\n"
18:
start_code: |-
- {print} ('Félicitations !!!')
+ {print} ("Félicitations !!!")
story_text: |
- Félicitations ! Vous avez atteint le dernier niveau de Hedy ! Le code que vous avez créé ici peut être copié dans des environnements Python réels tels que Replit ou PyCharm, et vous pouvez continuer à apprendre là-bas !
- Notez cependant que Python ne peut lire que des commandes en anglais, donc si vous avez utilisé d'autres langues, vous devrez maintenant passer à l'anglais.
+ Félicitations ! Tu as atteint le dernier niveau de Hedy ! Le code que tu as créé ici peut être copié dans des environnements Python réels tels que Replit ou PyCharm, et tu peux continuer à apprendre là-bas !
+ Note cependant que Python ne peut lire que des commandes en anglais, donc si tu as utilisé une autre langue pour les commandes, tu dois maintenant basculer sur les commandes en anglais.
story:
name: "Histoire"
description: "Histoire"
- default_save_name: "Histoire"
+ default_save_name: "Story"
levels:
1:
story_text: |
- In level 1 you can make a story with a different main character that you enter yourself.
+ Au niveau 1 tu peux faire une histoire avec un personnage principal dont tu auras choisi le nom toi-même.
- In the first line, use `{ask}` and ask who the main character of the story will be.
+ À la première ligne, utilise `{ask}` pour demander le nom du personnage de ton histoire.
- After that first line, start with `{print}` if the sentence needs to be printed.
- You use `{echo}` if you want your main character to be at the end of the sentence.
+ Après la première ligne, commence avec `{print}` si la phrase a besoin d'être affichée.
+ Où utilise `{echo}` si tu veux que le nom de ton personnage principal soit à la fin de la phrase.
example_code: |
```
- {ask} The main character of this story is
- {print} The main character is now going to walk in the forest
- {echo} He's a bit scared,
- {print} He hears crazy noises everywhere
- {print} He's afraid this is a haunted forest
+ {ask} Le nom du personnage principal de cette histoire est
+ {print} Le personnage principal est en train de marcher dans la forêt
+ {echo} Il a un peu peur,
+ {print} Il entend de drôles de bruits tout autour
+ {print} Il craint que cette forêt soit hantée
```
start_code: "{print} Ton histoire commence ici"
- story_text_2: "### Défi\nCréez maintenant votre propre histoire à l'aide d'au moins 6 lignes de code.\nCette histoire doit être différente de celle proposée dans le code de l'exemple.\nUtilisez au moins une commande `{ask}` et une commande `{echo}`.\nVous pouvez choisir n'importe quel sujet.\nSi vous n'avez pas d'idée, vous pouvez parler de l'un des sujets suivants : un film, un match ou une journée au zoo.\n"
+ story_text_2: "### Défi\nCrée maintenant ta propre histoire à l'aide d'au moins 6 lignes de code.\nCette histoire doit être différente de celle proposée dans le code d'exemple.\nUtilise au moins une commande `{ask}` et une commande `{echo}`.\nTu peux choisir n'importe quel sujet.\nSi tu n'as pas d'idée, tu peux parler de l'un des sujets suivants : un film, un match ou une journée au zoo.\n"
2:
story_text: |
- Dans le niveau 2 tu peux créer une histoire plus drôle. Le nom de ton personnage principal peut être dans n'importe quel endroit de la phrase
+ Dans le niveau 2 tu peux créer une histoire plus drôle. Le nom de ton personnage principal peut être à n'importe quel endroit de la phrase
- Tu devras programmer un petit peu plus pour ça. Tu dois d'abord donner un nom à ton personnage principal.
+ Tu vas devoir programmer un petit supplément pour ça. Maintenant, tu dois commencer par donner un nom à ton personnage principal.
- Tu peux ensuite mettre ce nom n'importe où dans la phrase.
-
- Peux-tu créer une histoire en utilisant une variable toi-même ? Tu peux ajouter plusieurs variables ?
+ Tu peux ensuite mettre ce nom n'importe où dans une phrase.
example_code: |-
```
- name {is} {ask} What is the name of the main character?
- {print} name is now going to run in the woods
- {print} name is a bit scared
- {print} Suddenly he hears a crazy noise...
+ nom {is} {ask} Quel est le nom du personnage principal ?
+ {print} nom va courir dans les bois
+ {print} nom a un peu peur
+ {print} Soudain, il entend un bruit étrange…
{sleep}
- {print} name is afraid this is a haunted forest
+ {print} nom craint que cette forêt soit hantée
```
start_code: "{print} Ton histoire"
- story_text_2: "### Défi\nIl est maintenant temps d'ajouter des variables à votre propre histoire créée au niveau précédent.\nAllez dans 'Mes programmes', cherchez votre histoire créée au niveau 1 et copiez le code. Collez le code dans l'écran de saisie de ce niveau.\n\nEtant donné qu'aucune variable n'est utilisée, ce code ne fonctionne pas à ce niveau.\nEn utilisant la forme adéquate apprise dans ce niveau, modifiez les commandes `{ask}` et `{echo}` de votre code.\n\n**Défi supplémentaire** Pour corser votre histoire, ajoutez une commande sleep.\n"
+ story_text_2: "### Défi\nIl est maintenant temps d'ajouter des variables à l'histoire que tu as créée au niveau précédent.\nVa dans 'Mes programmes', recherche ton histoire créée au niveau 1 et copie le code. Colle le code dans l'écran de saisie de ce niveau.\n\nCe code ne fonctionne pas à ce niveau parce que tu n'as pas encore utilisé de variables.\nEn utilisant la forme adéquate apprise dans ce niveau, modifiez les commandes `{ask}` et `{echo}` de ton code.\n\n**Défi supplémentaire** Pour ajouter du suspens à ton histoire, ajoute une commande `{sleep}`.\n"
3:
story_text: |
- Dans le niveau 3, vous pouvez rendre votre histoire plus amusante. Vous pouvez utiliser un côté plus aléatoire pour les monstres, les animaux ou les obstacles. Pour ce faire :
+ Dans le niveau 3, tu peux rendre ton histoire plus amusante. Tu peux tirer au hasard un monstre, un animal ou un autre obstacle, comme ceci :
example_code: |
```
- animals {is} 🦔, 🐿, 🦉, 🦇
- {print} He now hears the sound of an animals {at} {random}
+ animaux {is} 🦔, 🐿, 🦉, 🦇
+ {print} Maintenant il entend le cri d'un animaux {at} {random}
```
story_text_2: |
- The command `{add}` can also come in handy in your story.
+ La commande `{add}` peut aussi être pratique pour ton histoire.
example_code_2: |
```
{print} Il entend un bruit
- animal {is} 🐿, 🦔, 🦇, 🦉
- animal {is} {ask} C'est quoi à ton avis ?
- {add} animal {to_list} d'animaux
- {print} C'était un {at} {random}
+ animaux {is} 🐿, 🦔, 🦇, 🦉
+ animal {is} {ask} C'est quoi à ton avis ?
+ {add} animal {to_list} animaux
+ {print} C'était un animaux {at} {random}
```
story_text_3: |
- Voici un exemple de commande `{remove}` dans votre histoire.
+ Ceci est un exemple de la commande `{remove}` dans ton histoire.
### Défi
- Copiez votre histoire des niveaux précédents dans celui-ci.
- Dans ce niveau, vous avez appris 3 nouvelles commandes `{at} {random}` , `{add} {to}` et `{remove} {from}`.
- Ajoutez de nouvelles lignes de code à votre histoires de manière à ce que ces nouvelles commandes apparaissent au moins une fois dans votre histoire.
+ Copie ton histoire des niveaux précédents dans celui-ci.
+ Dans ce niveau, tu as appris 3 nouvelles commandes `{at} {random}`, `{add} {to}` et `{remove} {from}`.
+ Ajoute de nouvelles lignes de code à ton histoire de manière à ce que ces nouvelles commandes apparaissent au moins une fois.
example_code_3: |
```
- {print} His backpack got way too heavy.
- {print} Inside were a bottle of water, a flashlight and a brick.
- bag {is} water, flashlight, brick
- dump {is} {ask} Which item should he dump?
- {remove} dump {from} bag
+ {print} Son sac à dos est beaucoup trop lourd.
+ {print} Il y a dedans une bouteille d'eau, une lampe torche et une brique.
+ sac {is} eau, torche, brique
+ jeté {is} {ask} Quel objet devrions-nous jeter ?
+ {remove} jeté {from} sac
```
- start_code: "{print} Votre histoire"
+ start_code: "{print} Ton histoire"
4:
story_text: |
- Vous avez sans doute remarqué que le problème des niveaux précédents persiste. Avez-vous essayé d'imprimer une phrase contenant le mot nom ? Par exemple : `{print}` mon nom est name.
- Vous pouvez résoudre ce problème dans ce niveau en mettant entre guillemets tout ce qui va être imprimé.
+ Tu as sans doute remarqué que le problème des niveaux précédents persiste. As-tu essayé d'afficher une phrase contenant le mot « nom » ? Par exemple : `{print}` mon nom est nom.
+ Tu peux résoudre ce problème dans ce niveau. Tu dois mettre entre guillemets tout ce que tu veux écrire.
### Défi
- Copiez le code d’exemple et ajoutez des guillemets aux lignes pour le faire fonctionner.
+ Copie le code d’exemple et ajoute des guillemets à la place des espaces blancs aux lignes 1 et 2 pour le faire fonctionner.
+ Les espaces blancs en ligne 3 et 4 ne devraient pas être remplacés par des guillemets, mais une commande `{sleep}`et une commande `{clear}`. Peux-tu faire marcher ça ?
### Défi 2
- Rendez-vous au niveau précédent et copiez le code de votre histoire. Dans ce niveau, votre code fonctionnera en ajoutant des guillemets aux bons endroits.
- Astuce : les variables de votre propre histoire ne doivent pas être entre guillemets, comme le montre la deuxième ligne dans le code d'exemple. Dans cette ligne, le nom de la variable n'est pas entre guillemets.
+ Rends-toi au niveau précédent et copie le code de ton histoire. Dans ce niveau, ton code fonctionnera en ajoutant des guillemets aux bons endroits.
+ Astuce : les variables de ta propre histoire ne doivent pas être entre guillemets, comme le montre la seconde ligne dans le code d'exemple. Dans cette ligne, le nom de la variable n'est pas entre guillemets.
example_code: |
```
- name {is} {ask} _ Comment t'appelles-tu ? _
- {print} _ Le personnage principal s'appelle called _ name
- {print} name _ se promène dans les bois _
- {print} name _ a un peu peur _
- animals {is} 🦔, 🐿, 🦉, 🦇
- {print} _ Il entend le bruit d'un animal _ animals {at} {random}
- {print} name _ craint que la forêt ne soit hantée_
+ nom {is} {ask} _ Comment t'appelles-tu ? _
+ {print} _ Le personnage principal s'appelle _ nom
+ _
+ _
+ {print} nom _ va se promener dans les bois _
+ {print} nom _ a un peu peur _
+ animaux {is} 🦔, 🐿, 🦉, 🦇
+ {print} _ Il entend le bruit d'un _ animaux {at} {random}
+ {print} nom _ craint que la forêt ne soit hantée _
```
- start_code: "{print} 'Votre histoire sera imprimée ici'"
+ start_code: "{print} \"ton histoire sera écrite ici !\""
5:
story_text: |
- Dans ce niveau, différentes fins peuvent être programmées afin de rendre votre histoire encore plus amusante.
- Ce code d'exemple vous présente comment réaliser deux fins différentes.
+ Dans ce niveau, différentes fins peuvent être programmées afin de rendre ton histoire encore plus amusante.
+ Le code d'exemple te montre comment réaliser deux fins différentes.
### Défi 1
- Ecrivez une nouvelle histoire courte du sujet de votre choix.
- En panne d'inspiration ? Choisissez l'un des sujets suivants : un super-héros, une journée d'école ennuyeuse, une île déserte.
+ Écrie une nouvelle histoire courte du sujet de ton choix.
+ En panne d'inspiration ? Choisie l'un des sujets suivants : un super-héros, une journée d'école ennuyeuse, une île déserte.
- Maintenant, donnez la possibilité au joueur de choisir une fin heureuse ou non, comme indiqué dans le code d'exemple.
- Programmez les deux fins.
+ Maintenant, donne la possibilité au joueur de choisir une fin heureuse ou non, comme indiqué dans le code d'exemple.
+ Programme les deux fins.
### Défi 2
- Copiez l'histoire créée aux niveaux précédents.
- Trouvez le moyen d'ajouter au moins deux commandes`{if}` et `{else}` à votre histoire.
- La fin peut être heureuse ou non. Vous pouvez également trouver d'autres moyens d'inclure ces commandes.
+ Copie l'histoire créée aux niveaux précédents.
+ Trouve le moyen d'ajouter au moins deux commandes `{if}` et `{else}` à ton histoire.
+ La fin peut être heureuse ou non. Tu peux également trouver d'autres moyens d'inclure ces commandes.
example_code: |
```
- name {is} {ask} 'Who is walking in the forest?'
- {print} name 'walks through the forest'
- {print} name 'encounter a monster'
- end {is} {ask} 'Would you like a good or a bad ending?'
- {if} end {is} good {print} name 'takes the sword and the monster quickly runs away'
- {else} {print} 'The monster eats' name
+ nom {is} {ask} "Qui se promène en forêt ?"
+ {print} nom " se promène en forêt"
+ {print} nom " rencontre un monstre"
+ fin {is} {ask} "Voudrais-tu une fin triste ou heureuse ?"
+ {if} fin {is} heureuse {print} nom " sort son épée et le monstre s'enfuie rapidement"
+ {else} {print} "Le monstre mange " nom
```
- start_code: "{print} 'Here your story will start!'"
+ start_code: "{print} \"C'est ici que commence ton histoire !\""
7:
story_text: |
- In a story, someone says words several times. For example, when someone calls for help or sings a song.
- You can put such repetitions in your story, in this level with `{repeat}`.
+ Dans une histoire, on se répète parfois. Par exemple, quand une personne appelle à l'aide ou chante une chanson.
+ À ce niveau, tu peux écrire ces répétitions dans ton histoire, avec `{repeat}`.
+
+ ### Exercice
+ Ajoute une répétition à ta propre histoire. Recherche dans tes programmes sauvegardés, choisi l'histoire que tu as programmé au niveau 6, trouve une ligne contenant `{print}` et répète là !
example_code: |
```
- {print} 'The prince kept calling for help'
- {repeat} 5 {times} {print} 'Help!'
- {print} 'Why is nobody helping me?'
+ {print} "Le prince appelait à l'aide sans arrêt"
+ {repeat} 5 {times} {print} "au secours !"
+ {print} "Pourquoi personne ne vient m'aider ?"
```
start_code: "{repeat} 5 {times} {print} 'Help!'"
8:
story_text: |
- In this level you can use multiple lines in your {if} commands, this way you can upgrade your happy or sad ending!
+ À ce niveau tu peux utiliser plusieurs lignes dans une commande `{if}`, ainsi tu peux améliorer ta fin heureuse ou triste !
+
+ ### Exercice 1
+ L'exemple de code montre deux fins différentes, une ou les personnages sautent dans une machine à voyager dans le temps et une où ce n'est pas le cas.
+ Complète les espaces blancs avec, au moins, une phrase pour chaque fin.
+ **Pour aller plus loin**, continue l'histoire. Que se passe-t-il dans l'histoire ? Tu peux aussi ajouter un second `{ask}` avec des options différentes.
+
+ ### Exercice 2
+ Recherche dans tes programmes sauvegardés et choisi une histoire du niveau 5. Maintenant écrit une fin triste et heureuse d'au moins trois lignes de long pour chacune !
example_code: |
```
- {print} 'OH NO! The T-rex is closing in!'
- end = {ask} 'Do you want a happy or a sad ending?'
- {if} end {is} happy
- {print} 'Just in time Richard jumps back into the time machine!'
- {print} 'Michael types in the code and...'
- {print} '💥ZAP!💥'
- {print} 'They are back in their garage'
+ {print} "Oh non ! Le T-rex se rapproche !
+ fin = {ask} "Voulez-vous une fin triste ou heureuse ?"
+ {if} fin {is} "heureuse"
+ {print} "Juste à temps, Richard retourne d'un saut dans la machine à voyager dans le temps !"
+ {print} _
{else}
- {print} 'Michael yells COME ON RICHARD! RUN FASTER!'
- {print} 'But Richard is too slow...'
- {print} 'The T-rex closes in and eats him in one big bite!🦖'
+ {print} "Oh non ! Richard est trop lent…"
+ {print} _
```
- start_code: "# place your code here"
+ start_code: "# met ton code ici"
9:
story_text: |
In this level you can use nesting to put {if}, {repeat} or {for} commands inside other {if}, {repeat} or {for} commands. This gives you many options and really helps you to make your story interactive.
@@ -310,29 +319,22 @@ adventures:
{print} 'Robin sees an interesting looking book'
book = {ask} 'Does Robin buy the book?'
{if} book {is} yes
- {print} 'Robin buys the book and goes home'
- {else}
- {print} 'Robin leaves the shop and goes home'
+ _ {print} 'Robin buys the book and goes home'
+ _ {else}
+ _ {print} 'Robin leaves the shop and goes home'
{else}
{print} 'Robin goes home'
```
- start_code: "# place your code here"
+ start_code: "# place ton code ici"
10:
story_text: |
In this level you can use the {for} command in your story. In this way you could easily program the children's book 'brown bear, brown bear, what do you see'.
example_code: |
```
- animals = red bird, black sheep, green frog, yellow duck, little child
- {print} 'brown bear'
- {print} 'brown bear'
- {print} 'What do you see?'
- {for} animal {in} animals
- {print} 'I see a ' animal ' looking at me'
- {print} animal
- {print} animal
- {print} 'What do you see?'
- {print} 'I see all the animals looking at me!'
+ animaux = _ , _ , _
+ {print} 'Ours brun, Ours brun'
+ {print} 'Que vois-tu?'
```
start_code: "# place your code here"
12:
@@ -343,37 +345,20 @@ adventures:
name = 'The Queen of England'
{print} name ' was eating a piece of cake, when suddenly...'
```
- start_code: "# place your code here"
+ start_code: "# place ton code ici"
13:
story_text: |
By using the `{and}` and `{or}` commands, you can shorten your stories. For example, check out the dragon story.
example_code: |
```
- sword = 'lost'
- game = 'on'
- {print} 'Our hero is walking through the forest'
- {print} 'The path splits two ways'
- {for} i {in} {range} 0 {to} 2
- {if} game {is} 'on'
- path = {ask} 'Which path should she choose?'
- {if} path {is} 'left' {and} sword {is} 'found'
- {print} 'Our hero comes across a dragon!'
- {print} 'Luckily our hero has a sword to defeat the beast!'
- game = 'over'
- {if} path {is} 'left' {and} sword {is} 'lost'
- {print} 'Our hero finds a dragon, but she doesnt have any weapons!'
- {print} 'Our hero is beaten by the dragon...'
- {print} 'Try again'
- game = 'over'
- {if} path {is} 'right' {and} sword {is} 'found'
- {print} 'You have already found the sword. There is nothing left here.'
- {print} 'She walks back'
- {if} path {is} 'right' {and} sword {is} 'lost'
- {print} 'Our hero finds a sword'
- {print} 'This could come in very handy'
- sword = 'found'
+ {print} "Notre hero se promène en forêt"
+ {print} "Le chemin se sépare en deux"
+ chemin = {ask} "Quel chemin doit-elle choisir ?"
+ arme = {ask} "Quelle arme doit-elle prendre ?"
+ {if} chemin {is} "gauche" {and} arme {is} "épée"
+ _
```
- start_code: "# place your code here"
+ start_code: "# place ton code ici"
15:
story_text: |
Using the `{while}` loop can make your stories more interesting. For example, you can use `{while} game {is} 'on'` so you can play until the game is over.
@@ -393,7 +378,7 @@ adventures:
{print} 'Nope they are not at the ' location
{print} 'Now you can enter the house!'
```
- start_code: "# place your code here"
+ start_code: "# place ton code ici"
18:
story_text: "We are going to print another story, but now we have to use brackets with `{print}`.\n\n### Exercice 1\nCreate a story of at least 5 sentences. You don't have to use 'name' just yet.\n"
example_code_2: "```\nnaam = {input}(\"What's your name?\")\n{print}('Welcome to this story!')\n```\n"
@@ -401,9 +386,9 @@ adventures:
story_text_2: "### Exercice 2\nWe have already prepared an `{input}` for you. First, use the `name` variable in your story.\nThen add a second `{ask}` and use that variable as well.\nTip: Remember the commas in a `{print}` between text and variables!\n"
example_code: "```\n{print}('Welcome to this story!')\n```\n"
parrot:
- name: "Parrot"
- description: "Create your own online pet parrot that will copy you!"
- default_save_name: "Parrot"
+ name: "Perroquet"
+ description: "Crée ton propre perroquet en ligne qui te copiera !"
+ default_save_name: "Perroquet"
levels:
1:
story_text: |
@@ -415,60 +400,63 @@ adventures:
{echo}
{echo}
```
- start_code: "{print} Im Hedy the parrot"
+ start_code: "{print} Je suis Hedy le perroquet\n{ask} Quel est ton nom ?\n{echo}\n{echo}\n"
story_text_2: "### Exercice\nCan you make the parrot ask a different question? Fill in the blanks in the example!\n"
- example_code_2: "```\n{print} Im Hedy the parrot\n{ask} _\n{echo}\n{echo}\n"
+ example_code_2: "```\n{print} Je suis Hedy le perroquet\n{ask} _\n{echo}\n{echo}\n"
2:
story_text: |
- Create your own online pet parrot that will copy you!
+ Au niveau précédent, tu as fait un perroquet qui te répétait. À ce niveau, nous allons faire un perroquet interactif, en utilisant une variable et la commande `{ask}`.
+ Nous allons aussi rendre le perroquet plus vivant en ajoutant des commandes `{sleep}` après les choses qu'il dit.
example_code: |
```
- {print} Im Hedy the parrot
- name {is} {ask} whats your name?
- {print} name
+ {print} Je suis Hedy le perroquet
+ nom _ _ Quel est ton nom ?
+ {print} nom
{sleep}
- {print} squawk
+ {print} craque
{sleep}
- {print} name
+ {print} nom
```
- start_code: "{print} Im Hedy the parrot!"
- story_text_2: "### Exercice\nYou can use variables to make the parrot say more than only your name. Can you complete this code?\n"
+ start_code: "{print} Je suis Hedy le perroquet !"
+ story_text_2: "### Exercice\nPour commencer, termine la ligne 2 avec une commande `{is}` et une commande `{ask}`.\nEnsuite, écrit une commande `{sleep}` aux lignes 4 et 6 pour que le perroquet se calme un petit peu.\n\n**En plus** Peux-tu faire que le perroquet demande plus que ton nom, en ajoutant des lignes de code ?\n"
3:
story_text: |
- Teach your parrot a new word with `{add}`.
+ Apprend à ton perroquet un nouveau mot avec `{add}`.
+ ### Exercice
+ Peux-tu ajouter la commande `{add} {to}` pour faire marcher le code ?
example_code: |
```
- words {is} squawk, Hedy
- {print} Train your parrot!
- new_word {is} {ask} Which word do you want to teach them?
- {add} new_word {to_list} words
- {print} 🧒 Say new_word , Hedy!
- {print} 🦜 words {at} {random}
+ mots {is} craque, Hedy
+ {print} Entraine ton perroquet !
+ nouveau_mot {is} {ask} Quel mot veux-tu lui apprendre ?
+ _ nouveau_mot _ mots
+ {print} 🧒 Dit nouveau_mot , Hedy !
+ {print} 🦜 mots {at} {random}
```
- start_code: "# place your code here"
+ start_code: "# place ton code ici"
5:
story_text: |
Récompense ton perroquet s'il dit le bon mots !
example_code: |
```
- words {is} squawk, Hedy
- {print} 'Train your parrot!'
- new_word {is} {ask} 'Which word do you want to teach them?'
- {add} new_word {to_list} words
- said_word {is} words {at} {random}
- {print} '🧒 Say ' new_word ', Hedy!'
- {print} '🦜 ' said_word
- {if} said_word {is} new_word {print} '🧒 Great job, Hedy! 🍪'
- {else} {print} '🧒 No, Hedy! Say ' new_word
+ mots {is} cri, Hedy
+ {print} 'Entraîne ton perroquet !'
+ nouveau_mot {is} {ask} 'Quel mot veux-tu lui apprendre ?'
+ {add} nouveau_mot {to_list} mots
+ mot_dit {is} mots {at} {random}
+ {print} '🧒 Dis ' nouveau_mot ', Hedy !'
+ {print} '🦜 ' mot_dit
+ {if} mot_dit {is} nouveau_mot {print} '🧒 Bien joué, Hedy ! 🍪'
+ {else} {print} '🧒 Non, Hedy ! Dis ' nouveau_mot
```
- start_code: "# place your code here"
+ start_code: "# place ton code ici"
4:
story_text: "Dans ce niveau nous devons utiliser les guillemets avec les commandes `{ask}` et `{print}`.\n### Exercice\nComplète le code en remplissant les blancs par des guillemets.\n"
example_code: "```\nmots {is} coco, Hedy\n{print} _ Entraîne ton perroquet ! _\nnouveau_mot {is} {ask} _ Quel mot souhaites-tu apprendre au perroquet ? _\n{add} nouveau_mot {to_list} mots\n{print} _ 🧒 Dis _ nouveau_mot _, Hedy!_\n{print} _ 🦜 _ mots {at} {random}\n```\n"
- start_code: '# Inscris ton code ici'
+ start_code: '# Écrit ton code ici'
songs:
name: "Sing a song!"
- description: "Print a song"
+ description: "Écrit une chanson"
default_save_name: "Song"
levels:
6:
@@ -477,15 +465,13 @@ adventures:
For example, in the well-known song 'Bottles of beer'. You can program that song with a little math.
example_code: |
```
- verse = 99
- {print} verse ' bottles of beer on the wall'
- {print} verse ' bottles of beer'
- {print} 'Take one down, pass it around'
- verse = verse - 1
- {print} verse ' bottles of beer on the wall'
+ verset = 99
+ {print} verset " bouteilles de bierre sur le mur"
+ {print} verset " bouteilles de bierre"
+ {print} "Attrapes en une, fait la passer"
+ verset = verset - 1
+ {print} verset " bouteilles de bierre sur le mur"
```
-
- You can now repeat lines 2 to 9 as many times as you want by copying the lines.
start_code: "{print} 'Baby shark'"
story_text_2: "This children's song counts down from 5 little monkeys to 1 monkey.\nIf you copy line 2 - 7 and paste it under the the code, you can sing the whole song!\n"
example_code_2: "```\nnumber = 6\nnumber = number - 1\nprint number ' little monkeys jumping on the bed'\nprint 'One fell off and bumped his head'\nprint 'Mama called the doctor and the doctor said'\nprint 'NO MORE MONKEYS JUMPING ON THE BED!'\nsleep\n```\n"
@@ -512,13 +498,13 @@ adventures:
In a previous level you've programmed the song 'Bottles of beer'. You made one verse and then had to copy the verses 99 times. In level 7 you can repeat the song 99 times, just by adding one simple line!
example_code: |
```
- verse = 99
+ couplet = 99
{repeat} 99 {times}
- {print} verse ' bottles of beer on the wall'
- {print} verse ' bottles of beer'
- {print} 'Take one down, pass it around'
- verse = verse - 1
- {print} verse ' bottles of beer on the wall'
+ {print} couplet ' bouteilles de bière sur le mur'
+ {print} couplet ' bouteilles de bière'
+ {print} 'Prends en une et fais la circuler'
+ couplet = couplet - 1
+ {print} couplet ' bouteilles de bière sur le mur'
```
start_code: "# place your code here"
10:
@@ -528,40 +514,9 @@ adventures:
Or you can make Old McDonald with all the different animals.
example_code: |
```
- monkeys = 5, 4, 3, 2
- {for} monkey {in} monkeys
- {print} monkey ' little monkeys jumping on the bed'
- {print} 'One fell off and bumped his head'
- {print} 'Mama called the doctor and the doctor said'
- {print} 'NO MORE MONKEYS JUMPING ON THE BED!'
- ```
-
- ```
- sharks = baby, mommy, daddy, grandma, grandpa
- {for} shark {in} sharks
- {print} shark 'tututututudu'
- {print} shark 'tututututudu'
- {print} shark 'tututututudu'
- {print} shark
- ```
- ```
- animals = pig, dog, cow
- {for} animal {in} animals
- {if} animal {is} pig
- sound = oink
- {if} animal {is} dog
- sound = woof
- {if} animal {is} cow
- sound = moo
- {print} 'Old McDonald had a farm'
- {print} 'E I E I O!'
- {print} 'and on that farm he had a ' animal
- {print} 'E I E I O!'
- {print} 'with a ' sound sound ' here'
- {print} 'and a ' sound sound ' there'
- {print} 'here a ' sound
- {print} 'there a ' sound
- {print} 'everywhere a ' sound sound
+ famille = bébé, maman, papa, mamie, papi
+ _ _ _ _
+ {print} _
```
start_code: "# place your code here"
example_code_2: "```\nmonkeys = 5, 4, 3, 2, 1\n```\n"
@@ -686,8 +641,10 @@ adventures:
{forward} 25
3:
story_text: |
- In this level you can use use `{at} {random}` with the drawing turtle. A random choice makes the turtle walk a different path each time.
- Use `{at} {random}` to choose a value from a list. You can copy and paste lines 2 and 3 to create a longer random path.
+ Dans ce niveau, vous pouvez utiliser `{at} {random}` avec la tortue dessinatrice. Un choix aléatoire permet à la tortue de suivre un chemin différent à chaque fois.
+ Utilisez `{at} {random}` pour choisir une valeur dans une liste.
+ ### Exercice
+ Peux-tu copier-coller les lignes 2 et 3 pour créer un chemin aléatoire plus long ?
example_code: |
```
angles {is} 10, 50, 90, 150, 250
@@ -923,11 +880,11 @@ adventures:
story_text_2: "### Exercice\nThe dice in the example above are dice for a specific game. Can you make normal dice?\nOr other special dice from a different game?\n"
4:
story_text: |
- Dans ce niveau, tu peux aussi créer un dé. Mais cette fois, tu peux essayer par toi-même sans un exemple de code !
+ Dans ce niveau, tu peux aussi créer un dé. Mais cette fois, tu peux essayer par toi-même sans un exemple de code !
### Exercice
Fais ton propre dé dans ce niveau.
- Astuce : si tu n'a pas d'idée sur comment faire un dé. Jette un œil au dé que tu as fais au niveau d'avant, mais n'oublie pas d'ajouter les guillemets.
+ Astuce : si tu manques d'idée sur comment faire un dé. Jette un œil au dé que tu as fait au niveau d'avant, mais n'oublie pas d'ajouter les guillemets.
start_code: "{print} \"Quelle est la valeur du dé cette fois ?\""
5:
story_text: |
@@ -958,8 +915,7 @@ adventures:
{print} 'those are' points ' point'
```
Can you make the code so that you get the total score for 8 dice? To do that, you have to cut and paste some lines of the code.
- example_code_2: |2
-
+ example_code_2: |
Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7!
start_code: "{print} 'What will the die indicate this time?'"
7:
@@ -1019,7 +975,7 @@ adventures:
{echo} so your choice was:
```
Instead of using words, you could also use emojis of course: ✊✋✌
- start_code: "{print} Welcome to your own rock scissors paper!"
+ start_code: "{print} Bienvenue à ton propre feuille-caillou-ciseaux !\n{ask} Que choisis-tu ?\n"
story_text_2: "### Exercice\nInstead of using words, you could also use emojis: ✊✋✌\nCan you create a code using emojis?\n"
example_code_2: "```\n{print} what do you choose?\n{ask} choose from _\n{echo} so your choice was:\n```\n"
2:
@@ -1178,7 +1134,7 @@ adventures:
```
start_code: "{print} 'Welcome to this calculator!'"
- story_text_3: "You can also let the computer do random sums on its own using random.\nThis is how you choose a number of tables to practice, and from that you always get a different sum:\n"
+ story_text_3: "\n**Extra** Vous pouvez également laisser l'ordinateur faire des additions aléatoires de lui-même en utilisant random.\n\nC'est ainsi que vous choisissez un certain nombre de tables pour vous entraîner, et que vous obtenez toujours une somme différente :\n"
9:
story_text: |
In previous levels you've learned how to make a calculator, in this level you can expand that code and make it into a little maths game. Like this...
@@ -1186,16 +1142,16 @@ adventures:
```
score = 0
{repeat} 10 {times}
- numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- number1 = numbers {at} {random}
- number2 = numbers {at} {random}
- correct_answer = number1 * number2
- {print} 'What is ' number1 ' times ' number2 '?'
- answer = {ask} 'Type your answer here...'
- {print} 'Your answer is' answer
- {if} answer {is} correct_answer
+ numéros = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
+ numéro1 = numéros {at} {random}
+ numéro2 = numéros {at} {random}
+ bonne_réponse = numéro1 * numéro2
+ {print} 'Combien vaut ' numéro1 ' fois ' numéro2 ' ?'
+ tentative = {ask} 'Entre ta réponse ici...'
+ {print} 'Ta réponse est' tentative
+ {if} tentative {is} bonne_réponse
score = score + 1
- {print} 'Great job! Your score is... ' score ' out of 10!'
+ {print} 'Bien joué ! Ton score est... ' score ' sur 10 !'
```
start_code: "{print} 'Welcome to this calculator!'"
10:
@@ -1349,25 +1305,25 @@ adventures:
start_code: "# place your code here"
4:
story_text: |
- Dans ce niveau tu dois utiliser les guillemets lorsque tu utilises les commandes `{print}` ou `{ask}`.
+ Dans ce niveau, tu dois utiliser les guillemets lorsque tu utilises les commandes `{print}` ou `{ask}`.
### Exercice
- Ajoute les guillemets à ce code pour le faire fonctionner ! Attention : les variables ne doivent pas être entourée de guillemets.
+ Ajoute les guillemets à ce code pour le faire fonctionner ! Attention : les variables ne doivent pas être entourées de guillemets.
### Exercice 2
Retourne au niveau précédent et copie ton code du restaurant. Fais fonctionner ce code en utilisant les guillemets aux bons endroits.
example_code: |
```
_ Ajoute les guillemets à ce code _
- {print} Bienvenue au Restaurant Chez Hedy!
+ {print} Bienvenue au Restaurant Chez Hedy !
{print} Aujourd'hui nous servons pizza ou lasagne.
- plat {is} {ask} Que voudrais-tu manger ?
- {print} Très bon choix ! plat est ce que je préfère !
- accompagnement {is} {ask} Voudrais-tu de la viande ou des légumes en garniture ?
- {print} plat avec accompagnement . C'est parti !
- boisson {is} {ask} Que voudrais-tu boire avec ça ?
+ plat {is} {ask} Que voudrais-tu manger ?
+ {print} Très bon choix ! plat est ce que je préfère !
+ accompagnement {is} {ask} Voudrais-tu de la viande ou des légumes en garniture ?
+ {print} plat avec accompagnement . C'est parti !
+ boisson {is} {ask} Que voudrais-tu boire avec ça ?
{print} Merci pour ta commande.
- {print} Tes plat et boisson vont être servis!
+ {print} Tes plat et boisson vont être servis !
```
start_code: "# inscris ton code ici"
5:
@@ -1396,21 +1352,20 @@ adventures:
story_text: |
In this level you can use maths to calculate the total price of your customer's order, which can make your virtual restaurant more realistic.
- example_code: |2
-
- You can make a simple restaurant code, like this:
+ example_code: |
+ Vous pouvez créer un code de restaurant simple, comme celui-ci :
```
- {print} 'Welcome to Restaurant Chez Hedy'
- {print} 'Here is our menu:'
- {print} 'Our main courses are pizza, lasagne, or spaghetti'
- main = {ask} 'Which main course would you like?'
- price = 0
- {if} main {is} pizza price = 10
- {if} main {is} lasagne price = 12
- {if} main {is} spaghetti price = 8
- {print} 'You have ordered ' main
- {print} 'That will be ' price ' dollars, please'
- {print} 'Thank you, enjoy your meal!'
+ {print} "Bienvenue au restaurant Chez Hedy"
+ {print} "Voici notre menu :"
+ {print} "Nos plats principaux sont : pizza, lasagnes ou spaghettis"
+ plat_principal = {ask} "Quel plat principal souhaitez-vous ?"
+ prix = 0
+ {if} plat_principal {is} pizza prix = 10
+ {if} plat_principal {is} lasagnes prix = 12
+ {if} plat_principal {is} spaghettis prix = 8
+ {print} "Vous avez commandé " plat_principal
+ {print} "Ce sera " prix " euros, s'il vous plaît"
+ {print} "Merci, bon appétit !"
```
start_code: "# place your code here"
7:
@@ -1449,25 +1404,25 @@ adventures:
Check out the example, and try this at your own virtual restaurant!
example_code: |
```
- {print} 'Welcome to Hedys restaurant!'
- people = {ask} 'How many people will be joining us today?'
- {print} 'Great!'
- price = 0
- {repeat} people {times}
- food = {ask} 'What would you like to order?'
- {print} food
- {if} food {is} fries
- price = price + 3
- sauce = {ask} 'What kind of sauce would you like with your fries?'
- {if} sauce {is} no
- {print} 'no sauce'
+ {print} "Bienvenue au restaurant chez Hedy !"
+ nombre_personnes = {ask} "Combien de personnes se joindront à nous aujourd'hui ?"
+ {print} "Génial !"
+ prix = 0
+ {repeat} nombre_personnes {times}
+ nourriture = {ask} "Que voulez-vous commander ?"
+ {print} nourriture
+ {if} nourriture {is} frites
+ prix = prix + 3
+ sauce = {ask} "Quelle sauce voulez-vous avec vos frites ?"
+ {if} sauce {is} aucune
+ {print} "pas de sauce"
{else}
- price = price + 1
- {print} 'with ' sauce
- {if} food {is} pizza
- price = price + 4
- {print} 'That will be ' price ' dollar'
- {print} 'Enjoy your meal!'
+ prix = prix + 1
+ {print} "avec " sauce
+ {if} nourriture {is} pizza
+ prix = prix + 4
+ {print} "Cela fera " prix " euros"
+ {print} "Bon appétit !"
```
start_code: "# place your code here"
10:
@@ -1480,9 +1435,11 @@ adventures:
food = {ask} 'What would you like to eat as your ' course '?'
{print} food ' will be your ' course
```
- story_text_2: |2
-
- Of course, you could also order for multiple people!
+ story_text_2: |
+ ### Exercice
+ Bien sûr, vous pouvez aussi commander pour plusieurs personnes !
+ Pouvez-vous ajouter la bonne quantité d'indentation avant chaque ligne pour que le code fonctionne correctement ?
+ Conseil : certaines lignes n'ont pas besoin d'être indentées.
example_code_2: |
```
courses = appetizer, main course, dessert
@@ -1498,19 +1455,10 @@ adventures:
We can use the `{for} i {in} {range} 1 {to} 5` to {print} the orders from multiple customers in an orderly manner.
example_code: |
```
- {print} 'Welcome to Restaurant Hedy!'
- people = {ask} 'For how many people would you like to order?'
- {for} i {in} {range} 1 {to} people
- {print} 'Order number ' i
- food = {ask} 'What would you like to eat?'
- {print} food
- {if} food {is} fries
- sauce = {ask} 'What kind of sauce would you like with that?'
- {print} sauce
- drinks = {ask} 'What would you like to drink?'
- {print} drinks
- price = 4 * people
- {print} 'That will be ' price ' dollars, please!'
+ {print} 'Bienvenue au restaurant Hedy!'
+ nombre_personnes = {ask} 'Pour combien de personnes souhaitez-vous commander?'
+ {print} 'Vous voulez donc commander pour ' nombre_personnes ' personnes.'
+ {print} "Allons-y !"
```
start_code: "# place your code here"
12:
@@ -1722,8 +1670,11 @@ adventures:
```
start_code: "# place your code here"
12:
- story_text: |
- In this level you can make your fortunes multiple words. Like in this example below:
+ story_text: |-
+ A partir du niveau 12, vous devrez également utiliser les guillemets dans les listes, avant et après chaque élément.
+
+ ### Exercice
+ Ajoutez deux prédictions à la liste
example_code: |
```
fortunes = 'you will be rich', 'you will fall in love', 'you will slip on a banana peel'
@@ -1741,7 +1692,7 @@ adventures:
1:
story_text: |
Dans cette aventure, tu vas essayer de faire un jeu dans lequel tu dois t'échapper d'une maison hantée en choisissant la bonne porte.
- Si tu choisi la bonne porte tu survis, sinon un terrible monstre pourrait...
+ Si tu choisis la bonne porte, tu survis, sinon un terrible monstre pourrait...
Au premier niveau, on commence notre jeu de la maison hantée en créant une histoire d'épouvante et en demandant au joueur quel monstre il imagine dans une maison hantée.
example_code: |
@@ -1965,7 +1916,7 @@ adventures:
start_code: "# place your code here"
14:
story_text: |
- In this level you can let Hedy tell you {if} you have saved up enough money!
+ Dans ce niveau, tu peux laisser Hedy te dire {if} tu as économisé assez d'argent !
example_code: |
```
money = {ask} 'How much money have you saved?'
@@ -2477,7 +2428,7 @@ adventures:
11:
story_text: "In this level you can use the `{for} i {in} {range}` command to countdown to the New Year.\n\n### Exercice\nFill in the blanks and make the code work!\n"
example_code: "```\nfor _ in _ 10 to 1\n {print} i\n{print} 'Happy New Year!'\n```\n"
- start_code: '# place your code here'
+ start_code: '# place to code ici'
pressit:
levels:
5:
@@ -2498,8 +2449,8 @@ adventures:
name: Key presses
description: Try linking a keyboard key to a command!
print_command:
- name: affiche
- description: Introduction à la commande print
+ name: "{print}"
+ description: Introduction à la commande affiche
default_save_name: affiche
levels:
1:
@@ -2509,146 +2460,146 @@ adventures:
example_code_2: "```\n_ Salut !\n```\n"
start_code: "{print} Bienvenue chez Hedy !\n"
18:
- example_code: "```\n{print}('Salut !')\n{for} i {in} {range}(1, 10):\n {print}('Ceci est la ligne ', i)\n```\n"
+ example_code: "```\n{print}('Salut !')\n{for} i {in} {range}(1, 10):\n {print}('Ceci est la ligne ', i)\n```\n"
story_text_2: Si tu veux afficher plus d'un élément, tu dois les séparer par une virgule.
- example_code_2: "```\ntemperature = 25\n{print}('Il fait ', temperature, ' degrés dehors')\n```\n"
+ example_code_2: "```\ntemperature = 25\n{print}(\"Il fait \", temperature, \" degrés dehors\")\n```\n"
story_text_3: Le changement final que nous devons faire pour avoir du code Python c'est de remplacer `{ask}` par `{input}`.
- example_code_3: "```\n{print}('Mon nom est hedy !')\nnom = {input}('quel est ton nom ?')\n{print}('Ainsi ton nom est ', nom)\n```\n"
- start_code: "nom = 'Hedy'\n{print}('mon nom est ', nom)"
+ example_code_3: "```\n{print}(\"Mon nom est hedy !\")\nnom = {input}(\"quel est ton nom ?\")\n{print}(\"Ainsi ton nom est \", nom)\n```\n"
+ start_code: "nom = \"Hedy\"\n{print}(\"mon nom est \", nom)"
story_text: "Nous sommes arrivés à du code Python réel ! Cela signifie qu'à partir de maintenant, nous devons utiliser les parenthèses avec `{print}` et `{range}`\nCela signifie aussi que tu peux utiliser le code Hedy de ce niveau dans n'importe quel environnement Python du moment que tu utilises les commandes en anglais. Si tu ne l'as pas encore fait, tu peux basculer en anglais dans le menu des commandes."
17:
- start_code: "{for} i {in} {range} 1 {to} 10 :\n {print} i\n{print} \"Caché ou pas, j'arrive !\""
+ start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} \"Caché ou pas, j'arrive !\""
story_text: "Maintenant, nous allons un petit peu changer l'indentation. Chaque fois que nous avons une nouvelle indentation, nous devons ajouter `:` au début de la ligne précédente.\n"
- example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} \"Caché ou pas, j'arrive !\"\n```\n"
+ example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} \"Caché ou pas, j'arrive !\"\n```\n"
ask_command:
- name: demande
+ name: "{ask}"
description: Introduction à la commande demande
levels:
2:
- story_text_2: "### Exercice\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n"
- example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
- story_text: "## La commande ask\nMaintenant que l'on peut utiliser les **variables** dans nos codes, la commande`{echo}` n'est plus utile.\nOn peut utiliser les variables pour stocker les réponses à nos questions et ainsi utiliser la réponse à plusieurs question dans nos codes\nRegarde ça:\n\nComme ça notre code devient interactif!\n"
- example_code: "```\nnom {is} {ask} Quel est ton nom?\n{print} Bonjour nom\nâge {is} {ask} Quel âge as-tu?\n{print} nom a âge ans.\n```\n"
- start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
+ story_text_2: "### Exercice\nDans l'onglet précédent tu t'es entraîné à attribuer des valeurs aux variables avec la commande `{is}`.\nTu as créé au moins 3 variables et les a utilisées avec la commande `{print}`.\nMaintenant, au lieu de simplement attribuer une valeur fixe aux variables, nous voulons les rendre interactives, comme dans l'exemple.\n\nCopie le code de l'onglet précédent et rend les variables interactives en utilisant la commande `{ask}`.\n"
+ example_code_2: "```\nanimal_favori {is} {ask} Quel est ton animal favori ?\n{print} J'aime les animal_favori\n```\n"
+ story_text: "## La commande `{ask}`\nMaintenant que l'on peut utiliser les **variables** dans nos codes, la commande `{echo}` n'est plus utile.\nOn peut utiliser les variables pour stocker les réponses à nos questions et ainsi utiliser la réponse à plusieurs questions dans nos codes\nRegarde ça :\n\nComme ça notre code devient interactif !\n"
+ example_code: "```\nnom {is} {ask} Quel est ton nom ?\n{print} Bonjour nom\nâge {is} {ask} Quel âge as-tu ?\n{print} nom a âge ans.\n```\n"
+ start_code: "nom {is} {ask} Quel est ton nom ?\n{print} Bonjour nom\nage {is} {ask} Quel âge as-tu ?\n{print} nom a âge ans."
1:
- story_text: "## La commande demande\nMaintenant que tu sais utiliser la commande `{print}`, tu es prêt pour apprendre la commande suivante : `{ask}`. Avec la commande `{ask}`, tu peux poser une question. Fait un essai :\n"
+ story_text: "## La commande demande\nMaintenant que tu sais utiliser la commande `{print}`, tu es prêt pour apprendre la commande suivante : `{ask}`. Avec la commande `{ask}`, tu peux poser une question. Fais un essai :\n"
example_code: "```\n{print} Salut !\n{ask} quel est ton nom ?\n```\n"
- story_text_2: "## La commande écho\nSi tu veux que l'ordinateur te redise ta réponse, tu peux utiliser la commande `{echo}`. Attention, car la réponse est ajoutée à la fin de la phrase, soit, dans cet exemple, après salut.\n"
- story_text_3: "### Exercice\nEssayer les commandes `{ask}` and `{echo}` . Premièrement ,complète les blancs pour faire fonctionner ce programme .\nEnsuite pose 2 autres questions avec la commande `{ask}` ,après chaque `{ask}` utilise `{echo}` pour afficher la réponse à l'écran.\n"
+ story_text_2: "## La commande `{echo}`\nSi tu veux que l'ordinateur te répète ta réponse, tu peux utiliser la commande `{echo}`. Attention, car la réponse est ajoutée à la fin de la phrase, soit, dans cet exemple, après salut.\n"
+ story_text_3: "### Exercice\nEssayer les commandes `{ask}` et `{echo}`. Tout d'abord, complète les blancs pour faire fonctionner ce programme.\nEnsuite pose 2 autres questions avec la commande `{ask}`, après chaque `{ask}` utilise `{echo}` pour afficher la réponse à l'écran.\n"
example_code_2: "```\n{print} Salut !\n{ask} Quel est ton nom ?\n{echo} Salut\n```\n"
example_code_3: "```\n_ Comment vas-tu ?\n_\n```\n"
start_code: "{print} Salut !\n{ask} Quel est ton nom ?\n{echo} salut\n"
default_save_name: command_demande
is_command:
- name: is
- description: introducing is command
- default_save_name: is_command
+ name: "{is}"
+ description: Introduction de la commande {is}
+ default_save_name: command_est
levels:
2:
- story_text: "## Variables\nYou can name a word with `{is}`. This is called a **variable**. In this example we made a variable called name and a variable called age. You can use the word name anywhere in your code and it will be replaced by Hedy, like this:\n"
- example_code: "```\nname {is} Hedy\nage {is} 15\n{print} name is age years old\n```\n"
- story_text_2: "### Exercice\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animals`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command.\nFirstly, finish our example by filling in your favorite animal in the blanks. Then make at least 3 of these codes yourself. Pick a variable, and set the variable with the {is} command. Then use it with a {print} command, just like we did.\n"
- example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n"
- start_code: "name {is} Hedy\nage {is} 15\n{print} name is age years old"
+ story_text: "## Les variables\nTu peux donner une valeur à un mot avec `{is}`. C'est ce que l'on appelle une **variable**. Dans cet exemple, nous avons défini une variable qui s'appelle « nom » et une variable qui s'appelle « age ». Tu peux utiliser le mot « nom » n'importe où dans ton code et il sera remplacé par sa valeur, comme ceci :\n"
+ example_code: "```\nnom {is} Hedy\nâge {is} 15\n{print} nom a âge ans\n```\n"
+ story_text_2: "### Exercice\nIl est temps de faire tes propres variables !\nDans le code d'exemple, nous avons défini la variable `animaux_favoris`. En ligne 1, la variable reçoit une valeur, et en ligne 2 nous avons utilisé la variable dans une commande `{print}`.\nPour commencer, termine notre exemple en remplissant l'espace blanc avec le nom de ton animal favori. Ensuite, essaye d'écrire 3 autres codes toi-même. Choisi un mot, donne-lui une valeur avec la commande `{is}`. Ensuite, utilise ta nouvelle variable dans une commande `{print}`, comme nous venons de le faire.\n"
+ example_code_2: "```\nanimaux_favoris is _\n{print} J'aime les animaux_favoris\n```\n"
+ start_code: "nom {is} Hedy\nâge {is} 15\n{print} nom a âge ans"
14:
- start_code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'\n{else}\n {print} 'You are older than me!'"
- story_text: "We are going to learn more new items. You might know them already from mathematics, the `<` and `>`.\nThe `<` checks if the first number is smaller than the second, for example age `<` 12 checks if age is smaller than 12.\nIf you want to check if the first number is smaller or equal to the second, you can use `<=`, for example age `<=` 11.\nThe `>` checks if the first number is bigger than the second, for example points `>` 10 checks if points is larger than 10.\nIf you want to check if the first number is bigger or equal to the second, you can use `>=`, for example points `>=` 11.\nYou use these comparisons in an `{if}`, like this:\n"
- example_code: "```\nage = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'\n```\n"
- story_text_2: "From this level on, if you want to compare exactly, you can use two equal signs. This is what most programming languages do:\n"
- example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
- story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
- example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
+ start_code: "âge = {ask} \"Quel âge as-tu ?\"\n{if} âge < 13\n {print} \"Tu es plus jeune que moi !\"\n{else}\n {print} \"Tu es plus âgé que moi !\""
+ story_text: "Nous allons apprendre d'autres nouveaux éléments. Tu les connais peut-être déjà grâce aux mathématiques, le `<` et `>`.\nLe `<` vérifie si le premier nombre est plus petit que le second, par exemple, âge `<` 1` vérifie si âge est plus petit que 12.\nSi tu veux vérifier que le premier nombre est plus petit ou égal au second, tu peux utiliser `<=`. Par exemple âge `<=` 11.\nLe `>` vérifie si le premier nombre est plus grand que le second, par exemple, points `>` 10 vérifie si points est plus grand que 10.\nSi tu veux vérifier si le premier nombre est plus grand ou égal au second, tu peux utiliser `>=`. Par exemple points `>=` 11.\nCes comparaisons s'utilisent avec `{if}`, comme ceci :\n"
+ example_code: "```\nâge = {ask} \"Quel âge as-tu ?\"\n{if} âge > 12\n {print} \"Tu es plus agé que moi !\"\n```\n"
+ story_text_2: "A parti de ce niveau et pour les suivants, si tu veux comparer l'égalité, tu dois utiliser deux fois le signe égale. C'est ainsi que font la plupart des langages de programmation.\n"
+ example_code_2: "```\nnom = {ask} \"Quel est ton nom ?\"\n{if} nom == \"Hedy\"\n {print} \"Tu es cool !\"\n```\n"
+ story_text_3: "Tu peux aussi comparer si une chose n'est *pas* égale à une autre chose en utilisant `!=` comme ceci :\n"
+ example_code_3: "```\nnom = {ask} \"Quel est ton nom ?\"\n{if} nom != \"Hedy\"\n {print} \"Tu n'es pas Hedy\"\n```\n"
random_command:
- name: random
- description: introducing at random command
+ name: "{random}"
+ description: Introduction de la commande `{at} {random}`
default_save_name: random_command
levels:
3:
- story_text: "## At random\nIn this level you can make a list using the `{is}` command. You can let the computer choose a random item from that list. You do that with `{at} {random}`.\n"
- example_code: "```\nanimals {is} dogs, cats, kangaroos\n{print} animals {at} {random}\n```\n"
- story_text_2: "You can use the `{at} {random}` command in a sentence as well.\n"
- example_code_2: "```\nfood {is} sandwich, slice of pizza, salad, burrito\n{print} I am going to have a food {at} {random} for lunch.\n```\n"
- start_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}\n"
- story_text_3: "### Exercice\nTry out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price!\nCan you do it? We have already put the first lines into the example code.\n"
- example_code_3: "```\n{print} The big gameshow!\n{print} There are 3 suitcases in front of you...\nchosen {is} {ask} Which suitcase do you choose?\nprices {is} _\n_\n```\n"
+ story_text: "## Au hasard\nÀ ce niveau, tu peux créer une liste avec la commande `{is}`. Tu peux laisser l'ordinateur choisir un élément au hasard dans cette liste. Tu fais ça avec `{at} {random}`\n"
+ example_code: "```\nanimaux {is} chien, chat, kangourou\n{print} animaux {at} {random}\n```\n"
+ story_text_2: "Tu peux aussi utiliser la commande `{at} {random}` dans une phrase.\n"
+ example_code_2: "```\nnouriture {is} part de tarte, part de pizza, salade, crêpe\n{print} Je vais prendre une nouriture {at} {random} pour le déjeuner.\n```\n"
+ start_code: "animaux {is} chien, chat, kangourou\n{print} animaux {at} {random}\n"
+ story_text_3: "### Exercice\nEssaie la commande `{at} {random}` en faisant ton propre jeu concours (comme à la télé) où tu choisis une porte ou une valise qui peut contenir le gros lot !\nSauras-tu le faire ? Nous avons déjà écrit les premières lignes dans le code d'exemple.\n"
+ example_code_3: "```\n{print} Le grand jeu concours !\n{print} Voyez ces 3 valises devant vous…\nchoix {is} {ask} Quelle valise choisissez-vous ?\nles_prix {is} _\n_\n```\n"
16:
- start_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]"
- story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
- example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
+ start_code: "fruit = [\"pomme\", \"banane\", \"cerise\"]\n{print} fruit[random]"
+ story_text: "Nous allons créer des listes comme en Python, avec des crochets autour des listes ! Nous gardons aussi les guillemets autour de chaque élément comme nous l'avons appris au niveau précédent.\nNous utilisons les crochets pour désigner une position dans une liste. La commande {at} {random} ne peut plus être utilisée."
+ example_code: "```\namis = [\"Ahmed\", \"Ben\", \"Cayden\"]\nnuméros_porte_bonheur = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} \"Le numéro porte-bonheur de \" amis[i]\n {print} \"est \" numéros_porte_bonheur[i]\n```\n"
if_command:
levels:
5:
- story_text_3: "### Exercice\nTry to create your own code with `{if}` and `{else}`. You can use the example code if you want.\n"
- example_code_3: "```\nanswer {is} {ask} '2 + 2 = ?'\n_ _ _ 4 _ 'Great job!'\n_ _ 'No 2 + 2 = 4'\n```\n"
- start_code: "name {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'"
- story_text: "## If... else....\nIn level 5 there is something new, the `{if}`! With the `{if}` you can choose between two different options.\nThis code prints nice if you enter Hedy as a name, and boo! if you enter something else.\n`{ask}` and `{print}` still work like they did in level 4.\n"
- example_code: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'\n```\n"
- story_text_2: "Sometimes code with an `{if}` gets really long and does not fit on the line well. You may also divide the code over two lines, starting the second line at the `{else}` like this:\n"
- example_code_2: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'\n```\n"
+ story_text_3: "### Exercice\nEssaye de créer ton propre code avec `{if}`et `{else}`. Tu peux utiliser l'exemple de code si tu veux.\n"
+ example_code_3: "```\nréponse {is} {ask} \"2 + 2 = ?\"\n_ _ _ 4 _ \"Bon travail !\"\n_ _ \"Non 2 + 2 = 4\"\n```\n"
+ start_code: "nom {is} {ask} \"Quel est ton nom ?\"\n{if} nom {is} Hedy {print} \"bien\"\n{else} {print} \"bouu !\""
+ story_text: "## Si… sinon…\nAu niveau 5 il y a quelque chose de nouveau, le `{if}` ! Avec le `{if}` tu peux choisir entre deux options différentes.\nCe code écrit « bien » si tu réponds « Hedy » comme nom, et « bouuu ! » si tu réponds quelque chose d'autre.\n`{ask}` et `{print}` continuent de fonctionner de la même manière qu'au niveau 4.\n"
+ example_code: "```\nnom {is} {ask} \"Quel est ton nom ?\"\n{if} nom {is} Hedy {print} \"bien\" {else} {print} \"bouu !\"\n```\n"
+ story_text_2: "Parfois, le code avec un `{if}`devient vraiment long et ne tient plus très bien sur la ligne. \nTu peux diviser le code sur deux lignes en commençant la seconde ligne avec le `{else}` comme ceci :\n"
+ example_code_2: "```\nnom {is} {ask} \"Quel est ton nom ?\"\n{if} nom {is} Hedy {print} \"bien\"\n{else} {print} \"bouuu !\"\n```\n"
8:
- start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
- example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
- story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercice\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
- name: if else
- description: Introducing the if command
+ start_code: "nom {is} {ask} \"Quel est ton nom ?\"\n{if} nom {is} Hedy\n {print} \"Bienvenue Hedy\"\n {print} \"Tu peux jouer sur ton ordinateur !\"\n"
+ example_code: "```\nnom {is} {ask} \"Quel est ton nom ?\"\n{if} nom {is} Hedy\n {print} \"Bienvenue Hedy\"\n {print} \"Tu peux jouer sur ton ordinateur !\"\n```\n"
+ story_text: "## Si… Sinon…\nTu as appris à répéter un bloc de ligne de code après une commande `{repeat}`.\nMaintenant, tu peux aussi utiliser l'indentation pour faire un bloc après une commande `{if}` ou `{else}`.\nRegarde l'exemple de code.\n\n### Exercice\nAjoute une commande `{else}` à l'exemple de code. Fait un bloc de lignes en utilisant l'indentation. Tu le fais en commençant chaque ligne avec 4 espaces.\n"
+ name: "{if} & {else}"
+ description: Introduction à la commande `{if}`
default_save_name: if_command
in_command:
- name: in
- description: Introducing the in command
+ name: "{in}"
+ description: Introduction de la commande `{in}`
default_save_name: in_command
levels:
5:
- story_text: "## Lists\nWhen we want to check if something is in a list, we can now use the `{in}` command.\nThis code prints pretty! if you choose green or yellow, and meh otherwise.\n"
- example_code: "```\npretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'\n```\n"
- story_text_2: "### Exercice\nFinish the example code by filling in the blanks with commands that you've learned.\nWhen you've finished the code, try to create a code of your own and use a question that you've thought of yourself.\n"
- example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
- start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
+ story_text: "## Listes\nQuand nous voulons vérifier si quelque chose est dans une liste, nous pouvons maintenant utiliser la commande `{in}`.\nCe code écrit « joli ! » si tu choisis vert ou jaune, et « bof » sinon.\n"
+ example_code: "```\njolies_couleurs {is} vert, jaune\ncouleur_favori {is} {ask} \"Quelle est ta couleur préférée ?\"\n{if} couleur_favori {in} jolies_couleurs {print} \"jolie !\"\n{else} {print} \"bof\"\n```\n"
+ story_text_2: "### Exercice\nTermine l'exemple de code en remplissant les blancs avec les commandes que tu as apprises.\nQuand tu auras fini, essaye de créer ton propre code et utilise une question que tu auras trouvée toi-même.\n"
+ example_code_2: "```\nanimaux {is} chien, vache, mouton\nréponse {is} {ask} \"Quel est ton animal préféré ?\"\n_ réponse _ animaux _ \"c'est aussi le mien !\"\n_ _ \"mes animaux préférés sont le chien, la vache et le mouton\"\n```\n"
+ start_code: "jolies_couleurs {is} vert, jaune\ncouleur_favori {is} {ask} \"Quelle est ta couleur préférée ?\"\n{if} couleur_favori {in} jolies_couleurs {print} \"jolie !\"\n{else} {print} \"bof\""
repeat_command_2:
levels:
8:
- story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n## Exercice\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n"
- example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
- start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
+ story_text: "### C'est dans le bloc ou pas ?\nÀ ce niveau, tu dois faire attention à quelles lignes de code doivent être dans le bloc et lesquelles ne doivent pas y être.\nPar exemple : si tu veux chanter la chanson *Vive le vent*. Tu veux que seule la ligne avec \"Vive le vent\" soit répétée deux fois.\nCela veut dire que les lignes suivantes ne devrait pas démarrer avec une indentation car elles n'appartiennent pas au bloc.\nSi tu démarres les autres lignes avec une indentation, la chanson ne sera plus correcte.\n\n## Exercice\nChaque ligne de l'exemple de code démarre avec un espace blanc. Retire le blanc et essaye de trouver quelle ligne a besoin d'une indentation et quelle ligne n'en a pas besoin pour faire la chanson de vive le vent.\n"
+ example_code: "```\n_ {repeat} 2 {times}\n_ {print} \"Vive le vent\"\n_ {print} \"Vive le vent d'hiver\"\n_ {print} \"Qui s'en va sifflant, soufflant\"\n_ {print} \"Dans les grands sapins verts, oh !\"\n```\n"
+ start_code: "{repeat} 3 {times}\n {print} \"Cette ligne sera répétée…\"\n {print} \"Cette ligne aussi…\"\n{print} \"mais celle-ci ne le sera pas !\""
7:
- story_text_2: "Another interesting thing you can so with the `{repeat}` command is using variables to set the amount of times something should be repeated. In the example code you can see that we first ask the person how old they are.\nThen, in line 3, the question is repeated 'age' times. So we have used the variable 'age' with the `{repeat}` command.\n"
- example_code: "```\n{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'\n```\n"
- story_text: "## Repeat with other commands and with variables\nYou have practiced the `{repeat}` command in combination with the `{print}` command now, but did you know you could also use other commands with `{repeat}` ?\nIn this example code you can see that `{repeat}` can also be used with an `{ask}`, `{if}` or `{else}` command.\n"
- example_code_2: "```\n{print} 'Yay! It is your birthday!'\nage = {ask} 'How old are you now?'\n{repeat} age {times} {print} 'Hip Hip Hurray!'\n```\n"
- start_code: "{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'"
- name: Repeat 2
+ story_text_2: "Une autre chose intéressante que tu peux faire avec la commande `{repeat}`, c'est d'utiliser une variable pour indiquer le nombre de fois que quelque chose doit être répété. Dans l'exemple de code, tu peux voir que nous demandons en premier quel âge a la personne.\nEnsuite, en ligne 3, le message est répété `âge` fois. Donc nous avons utilisé la variable `âge` avec la commande `{repeat}`.\n"
+ example_code: "```\n{repeat} 2 {times} réponse = {ask} \"Savais-tu que tu pouvais poser une question plusieurs fois ?\"\n{if} réponse {is} oui {repeat} 2 {times} {print} \"Tu le savais déjà !\"\n{else} {repeat} 3 {times} {print} \"Tu as appris quelque chose de nouveau !\"\n```\n"
+ story_text: "## Répète avec d'autres commandes et avec des variables\nTu t'es entrainé avec la commande `{repeat}` combinée avec la commande `{print}`, mais savais-tu que tu pouvais aussi utiliser d'autres commandes avec `{repeat}` ?\nDans cet exemple de code, tu peux voir que `{repeat}` peut aussi être utilisée avec une commande `{ask}`, `{if}` ou `{else}`.\n"
+ example_code_2: "```\n{print} \"Youpi ! C'est ton anniversaire\"\nâge = {ask} \"Quel âge as-tu ?\"\n{repeat} âge {times} {print} \"Hip Hip Hip Hourra !\"\n```\n"
+ start_code: "{repeat} 2 {times} réponse = {ask} \"Savais-tu que tu pouvais poser une question plusieurs fois ?\"\n{if} réponse {is} oui {repeat} 2 {times} {print} \"Tu le savais déjà !\"\n{else} {repeat} 3 {times} {print} \"Tu as appris quelque chose de nouveau !\""
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
for_command:
- name: for
- description: for command
- default_save_name: for
+ name: "{for}"
+ description: La commande {for}
+ default_save_name: pour
levels:
10:
- start_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal"
- example_code: "```\nanimals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal\n```\n"
- story_text: "## For\nIn this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements.\n`{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces."
+ start_code: "animaux {is} chiens, chats, méduses\n{for} animal {in} animaux\n {print} \"J'aime les \" animal"
+ example_code: "```\nanimaux {is} chiens, chats, méduses\n{for} animal {in} animaux\n {print} \"J'aime les \" animal\n```\n"
+ story_text: "## Pour\nÀ ce niveau nous apprenons une nouvelle commande appelée `{for}`. Avec `{for}` tu peux répéter quelque chose pour tous les éléments d'une liste\n`{for}` crée un bloc, comme `{repeat}` et `{if}`. Il faut donc ajouter 4 espaces devant toutes les lignes du bloc."
11:
- start_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter"
- story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
- example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
+ start_code: "{for} compteur {in} {range} 1 {to} 5\n {print} compteur"
+ story_text: "À ce niveau, nous ajoutons une nouvelle forme pour le `{for}`. Aux niveaux précédents, nous avons utilisé `{for}`avec une liste, mais nous pouvons aussi utiliser `{for}` avec des nombres.\nNous le faisons en ajoutant un nom de variable, suivi par `{in}``{range}`. Nous écrivons ensuite le nombre de départ, puis `{to}`, et enfin le nombre d'arrivé.\n\nEssaye l'exemple pour voir ce qui se passe ! À ce niveau aussi, tu devras utilise les indentations pour les lignes en dessous de l'instruction `{for}`."
+ example_code: "```\n{for} compteur {in} {range} 1 {to} 5\n {print} compteur\n```\n"
maths:
name: maths
levels:
6:
- start_code: "{print} '5 times 5 is ' 5 * 5"
- story_text: "## 1 + 1\nIn this level you learn something new: you can now also calculate.\n\nThe plus is easy, you write it like with math: `5 + 5` for example. The minus also works fine, it is `5 - 5`.\n\nThe times is a bit different, because there is no times symbol on your keyboard. Just search, there really isn't!\nThat is why we multiply with the asterisk above 8: `5 * 5`. Read that as \"5 times 5\" that helps you remember it best.\n"
- example_code: "```\n{print} '5 plus 5 is ' 5 + 5\n{print} '5 minus 5 is ' 5 - 5\n{print} '5 times 5 is ' 5 * 5\n```\n"
- story_text_2: "We also make a change in storing a word in a variable! You may now use `=` instead of `{is}` when we store a name or a number in a variable, like this:\n"
- example_code_2: "```\nname = Hedy\nanswer = 20 + 4\n```\n"
+ start_code: "{print} \"5 fois 5 est \" 5 * 5"
+ story_text: "## 1 + 1\nDans ce niveau tu apprends quelque chose de nouveau : tu peux maintenant faire des calculs.\n\nL'addition est facile, tu écris comme en math : `5 + 5` par exemple. Le moins aussi fonctionne bien, c'est `5 - 5`.\n\nLa multiplication est un peu différente parce qu'il n'y a pas la croix de la multiplication sur ton clavier. Cherche là, elle n'y est pas !\nVoilà pourquoi on multiplie avec l'étoile : `5 * 5`. Lit le « 5 fois 5 » pour t'aider à t'en souvenir plus facilement.\n"
+ example_code: "```\n{print} \"5 plus 5 fait \" 5 + 5\n{print} \"5 moins 5 fait \" 5 - 5\n{print} \"5 fois 5 fait \" 5 * 5\n```\n"
+ story_text_2: "Nous faisons aussi un changement pour enregistrer un mot dans une variable ! Tu peux maintenant utiliser `=` à la place de `{is}` quand tu enregistres un nom ou un nombre dans une variable, comme ceci :\n"
+ example_code_2: "```\nnom = Hedy\nréponse = 20 + 4\n```\n"
12:
- start_code: "{print} 'decimal numbers now need to use a dot'\n{print} 2.5 + 2.5"
- story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
- example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
- description: Introducing maths
+ start_code: "{print} \"Les nombres décimaux ont maintenant besoin d'utiliser un point\"\n{print} 2.5 + 2.5"
+ story_text: "**Nombres décimaux**\nJusqu'à présent, Hedy ne te permettait pas d'utiliser les nombres décimaux comme 1.5, mais maintenant nous les autorisons. Attention, les langages de programmation utilisent le point pour les nombres décimaux et non la virgule."
+ example_code: "```\n{print} \"Deux et demi plus deux et demi fait…\"\n{print} 2.5 + 2.5\n```\n"
+ description: Introduction des maths
default_save_name: maths
elif_command:
default_save_name: elif
- name: elif
+ name: "{elif}"
description: elif
levels:
17:
@@ -2674,80 +2625,89 @@ adventures:
start_code: '# place your code here'
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
add_remove_command:
- name: add and remove
- description: introducing add to and remove from
+ name: "{add} {to} & {remove} {from}"
+ description: Introduction de ajoute et supprime de
default_save_name: add_remove_command
levels:
3:
- story_text: "## Add to\nYou can add items to the list with the `{add} {to}` command. To add an item to a list you can simply type: `{add} penguin {to} animals` or you can use the `{ask}` command like in the example code.\n"
- example_code: "```\nanimals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\n{print} I choose animals {at} {random}\n```\n"
- story_text_2: "## Remove from\nIf you can add items to a list, of course you can also take them off. This is done with the `{remove} {from}` command.\n"
- example_code_2: "```\nanimals {is} dog, cat, kangaroo\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}\n```\n"
- story_text_3: "### Exercice\nTry out the new commands in this virtual restaurant. Add the flavor the player is hpoing for to the list and remove the flavors they are allergic to.\n"
- example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
- start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
+ story_text: "## Ajouter à\nTu peux ajouter des éléments à une liste avec la commande `{add} {to}`. Pour ajouter un élément à une liste, tu peux simplement écrire : `{add} pingouin {to} animaux` ou tu peux utiliser la commande `{ask}` comme dans le code d'exemple.\n"
+ example_code: "```\nanimaux {is} chien, chat, kangourou\nfavori {is} {ask} Quel est ton animal préféré ?\n{add} favori {to_list} animaux\n{print} Je choisis animaux {at} {random}\n```\n"
+ story_text_2: "## Supprimer d'une liste\nSi tu peux ajouter des éléments à une liste, tu peux aussi en retirer bien sûr. Cela se fait avec la commande `{remove} {from}`\n"
+ example_code_2: "```\nanimaux {is} chien, chat, kangourou\nmal_aimé {is} {ask} Quel animal n'aimes-tu pas ?\n{remove} mal_aimé {from} animaux\n{print} Je choisis animaux {at} {random}\n```\n"
+ story_text_3: "### Exercice\nEssaye les nouvelles commandes dans ce restaurant virtuel. Ajoute les parfums que les joueurs désirent à la liste et supprime les parfums auxquels ils sont allergiques.\n"
+ example_code_3: "```\n{print} Le milkshake mystérieux\nparfums {is} fraise, chololat, vanille\ndésire {is} {ask} Quelle parfum désires-tu ?\n_\nallergie {is} {ask} Est-tu allergique à un parfum ?\n_\n{print} Voici un milkshake parfums {at} {random}\n```\n"
+ start_code: "animaux {is} chien, chat, kangourou\nfavori {is} {ask} Quel est ton animal préféré ?\n{add} favori {to_list} animaux\nmal_aimé {is} {ask} Quel animal n'aimes-tu pas ?\n{remove} mal_aimé {from} animaux\n{print} Je choisis animaux {at} {random}"
sleep_command:
- name: sleep
- description: introducing sleep command
+ name: "{sleep}"
+ description: Introduction à la commande pour endormir
default_save_name: sleep_command
levels:
2:
- story_text: "## The sleep command\nAnother new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds.\n"
- example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
- start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
+ story_text: "Une autre nouvelle commande de ce niveau est `{sleep}`. Elle endort le programme pendant une seconde. Si tu écris un nombre après la commande `{sleep}`, le programme s'endort durant le nombre de secondes correspondantes.\n\n### Exercice\nEntraine-toi avec cette nouvelle commande en écrivant ton propre code dans lequel tu utiliseras la commande `{sleep}` au moins 3 fois. Pour chaque commande `{sleep}`, utilise un temps de sommeil différent.\n"
+ example_code: "```\n{print} Ma couleur favorite est…\n{sleep} 2\n{print} vert !\n```\n"
+ start_code: "{print} Ma couleur favorite est…\n{sleep} 2\n{print} vert !"
quotation_marks:
- name: "'quotation marks'"
- description: Introduction quotation marks
+ name: "\"Les guillemets\""
+ description: Introduction des guillemets
default_save_name: quotation_marks
levels:
4:
- story_text: "## 'Guillemets'\nAu niveau 4 `{ask}` et `{print}` ont changé.\nTu dois mettre le texte que tu veux afficher entre des guillemets.\nC'est utile, parce-que tu peux maintenant afficher tous les mots que tu veux. Même les mots que tu as utilisé pour mémoriser des choses avec `{is}`.\nLa plupart des langages de programmation utilisent aussi des guillemets pour afficher, donc on s'approche un peu plus de la vraie programmation !\n"
- story_text_2: "## Apostrophes\nImportant! Garde à l'esprit que maintenant que nous utilisons des guillemets, Hedy va être perdue quand tu utilise l'apostrophe pour des mots comme aujourd'hui ou s'il vous plait.\nAstuce : Tu peux utiliser différentes formes de guillemets pour entourer ton texte. Nous te recommandons d'utiliser \"les guillemets doubles\" qui fonctionnent bien dans la plupart de situations.\nL'exemple montre la mauvaise façon d'utiliser les apostrophes.\n"
- example_code: "```\n{print} 'You need to use quotation marks from now on!'\nanswer {is} {ask} 'What do we need to use from now on?'\n{print} 'We need to use ' answer\n```\n"
- example_code_2: "```\n_ This is the wrong way of using apostrophes _\n{print} 'I'm babysitting my sister's kids'\n{print} 'What's more fun than that?'\n```\n"
- start_code: "{print} 'You need to use quotation marks from now on!'\nanswer {is} {ask} 'What do we need to use from now on?'\n{print} 'We need to use ' answer"
+ story_text: "## \"Les guillemets\"\nAu niveau 4 `{ask}` et `{print}` ont changé.\nTu dois mettre le texte que tu veux afficher entre des guillemets.\nC'est utile, parce que tu peux maintenant afficher tous les mots que tu veux. Même les mots que tu as utilisés pour mémoriser des choses avec `{is}`.\nLa plupart des langages de programmation utilisent aussi des guillemets pour afficher, donc on s'approche un peu plus de la vraie programmation !\n"
+ story_text_2: "## Apostrophes\nImportant ! Hedy accepte que tu utilises les guillemets ou les apostrophes pour entourer tes textes. En anglais, on utilise généralement les apostrophes car cela ne pose pas trop de problème, mais en français, cela pose un problème avec, par exemple, « aujourd'hui » ou « s'il vous plait »\nAstuce : Nous te recommandons d'utiliser les guillemets qui fonctionnent bien dans la plupart de situations.\nL'exemple montre la mauvaise façon d'utiliser les apostrophes.\n"
+ example_code: "```\n{print} \"Tu as besoins d'utiliser les guillemets à partir de maintenant !\"\nréponse {is} {ask} \"Qu'avons nous besoins d'utiliser à partir de maintenant ?\"\n{print} \"Nous avons besoins d'utiliser \" réponse\n```\n"
+ example_code_2: "```\n_ Voici comment ça ne marche pas avec les apostrophes_\n{print} 'aujourd'hui je fais du babysitting avec les enfants de ma sœur'\n{print} 'qu'y a-t-il de plus amusant que ça ?'\n```\n"
+ start_code: "{print}\"Tu as besoins d'utiliser les guillemets à partir de maintenant !\"\nréponse {is} {ask} \"Qu'avons-nous besoins d'utiliser à partir de maintenant ?\"\n{print} \"Nous avons besoins d'utiliser \" réponse"
12:
- story_text: "**All texts need to be in quotation marks**\nFor this level on you will also have to use quotation marks when storing a text with `=`:\n"
- example_code: "```\nname = 'Hedy the Robot'\n{print} 'Hello ' name\n```\n"
- story_text_2: "**All items in lists need quotation marks too**\nLists are texts, so they need quotation marks too. Mind that each single item on the list has quotation marks.\nThis allows you to save two words as 1 item on the list, for example 'Iron Man'.\n"
- example_code_2: "```\nsuperheroes = 'Spiderman', 'Batman', 'Iron Man'\n{print} superheroes {at} {random}\n```\n"
- story_text_3: "**All text after `{if}` comparisons need quotation marks too**\n"
- example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'\n```\n"
- story_text_4: "**Numbers don't need quotation marks**\nFor numbers, you do not use quotation marks in the `=`:\n"
- example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
- start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
+ story_text: "**Tous les textes doivent être entre guillemets**\nÀ partir de ce niveau, tu devras utiliser les guillemets quand tu enregistres un texte avec `=` :\n"
+ example_code: "```\nnom = \"Hedy le robot\"\n{print} \"Bonjour \" nom\n```\n"
+ story_text_2: "**Tous les éléments des listes ont aussi besoins des guillemets**\nLes listes, c'est du texte ! Donc, elles ont aussi besoins des guillemets. Attention que chaque élément de la liste à besoins de ses guillemets individuellement.\nCela te permet d'avoir un élément de deux mots dans une liste. Par exemple \"Iron Man\".\n"
+ example_code_2: "```\nsuperhéros = \"Spiderman\", \"Batman\", \"Iron Man\"\n{print} superhéros {at} {random}\n```\n"
+ story_text_3: "**Tout texte dans la comparaison d'un `{if}` a besoins de guillemets**\n"
+ example_code_3: "```\nnom = {ask} \"Quel est ton nom ?\"\n{if} nom = \"Hedy le robot\"\n {print} \"Salut !\"\n```\n"
+ story_text_4: "**Les nombres n'ont pas besoins de guillemets**\nPour les nombres, tu ne dois pas utiliser les guillemets avec `=` :\n"
+ example_code_4: "```\nscore = 25\n{print} \"Tu as \" score\n```\n"
+ start_code: "nom = {ask} \"Quel est ton nom ?\"\n{if} nom = 'Hedy le robot'\n {print} \"Salut !\""
repeat_command:
- name: Repeat
- description: repeat command
+ name: "{repeat}"
+ description: la commande répète
default_save_name: repeat_command
levels:
7:
- story_text: "## Repeat! Repeat! Repeat!\nLevel 7 adds the `{repeat}` command. `{repeat}` can be used to execute one line of code multiple times. Like this:\n\n### Exercice\nPlay around with the repeat command. Can you make the happy birthday song in only 3 lines of code instead of 4 now?\n"
- example_code: "```\n{repeat} 3 {times} {print} 'Hedy is fun!'\n```\n"
- start_code: "{print} 'happy birthday to you'\n{print} 'happy birthday to you'\n{print} 'happy birthday dear Hedy'\n{print} 'happy birthday to you'\n"
+ story_text: "## Répète ! Répète ! Répète !\nLe niveau 7 ajoute la commande `{repeat}`. `{repeat}` peut être utilisée pour exécuter une ligne de code plusieurs fois. Comme ceci :\n\n### Exercice\nJoue avec la commande `{repeat}`. Peux-tu faire la chanson d'anniversaire avec seulement 3 lignes de code à la place de 4 maintenant ?\n"
+ example_code: "```\n{repeat} 3 {times} {print} \"Hedy est marrant !\"\n```\n"
+ start_code: "{print} \"Joyeux anniversaire\"\n{print} \"Joyeux anniversaire\"\n{print} \"Joyeux anniversaire, Hedy\"\n{print} \"Joyeux anniversaire\"\n"
8:
- start_code: "{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This will be printed 5 times'"
- story_text: "### Repeat commands and indentation\nIn this level you can repeat multiple lines of code with only 1 repeat command.\nYou do this by making a block of lines that you want to repeat.\nThe lines in this block will need **indentation** .\nThat means putting four spaces at the beginning of each line. You will also have to indent when you just want to create a block of one line.\n"
- example_code: "```\n{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This is all repeated 5 times'\n```\n"
+ start_code: "{repeat} 5 {times}\n {print} \"Bonjour tout le monde\"\n {print} \"Ceci sera écrit 5 fois\""
+ story_text: "### La commande `{repeat}` et l'indentation\nDans ce niveau, tu peux répéter plusieurs lignes de code avec une seule commande `{repeat}`.\nTu le fais en faisant un bloc avec les lignes que tu veux répéter.\nLes lignes de ce bloc vont avoir besoin d'une **indentation**.\nCela veut dire mettre quatre espaces au début de chaque ligne. Tu devras indenter même si tu veux créer un bloc d'une seule ligne.\n"
+ example_code: "```\n{repeat} 5 {times}\n {print} \"Salut tout le monde\"\n {print}\"Tout ceci sera répété 5 fois\"\n```\n"
9:
- story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
- example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
+ story_text: "Dans ce niveau, tu peux non seulement utiliser plusieurs lignes avec `{if}` et `{repeat}`, mais tu peux aussi mettre ces commandes ensemble !\nDans l'exemple, tu vois une commande `{if}` dans une commande `{repeat}`. Ça marche aussi à l'inverse, et un `{if}` peut aussi se trouver dans un autre `{if}` et un `{repeat}` dans un autre `{repeat}`.\nEssaye !\n"
+ example_code: "```\n{repeat} 3 {times}\n nourriture = {ask} \"Que veux-tu ?\"\n {if} nourriture {is} pizza\n {print} \"bien !\"\n {else}\n {print} \"la pizza c'est meilleur\"\n```\n"
+ start_code: "{repeat} 3 {times}\n nourriture = {ask} \"Que veux-tu ?\"\n {if} nourriture {is} pizza\n {print} \"parfait !\"\n {else}\n {print} \"pizza c'est meilleur\""
and_or_command:
- name: and or
- description: introducing and or
- default_save_name: and or
+ name: "{and} & {or}"
+ description: Introduction de {and} et {or}
+ default_save_name: et ou
levels:
13:
- start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
- story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
- example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
+ start_code: "nom = {ask} \"quel est ton nom ?\"\nâge = {ask} \"quel est ton âge ?\"\n{if} nom {is} \"Hedy\" {and} âge {is} 2\n {print} \"Tu es le vrai Hedy !\""
+ story_text: "Nous allons maintenant apprendre `{and}' et `{or}` ! Si tu veux vérifier deux éléments, tu n'es plus obligé d'utiliser deux `{if}` mais tu peux utiliser `{and}` et `{or}`\n\nSi tu utilises `{and}`, les deux éléments, à gauche et à droite du `{and}` doivent être vrai. Nous pouvons aussi utiliser `{or}`. Dans ce cas, seulement un des éléments doit être correct."
+ example_code: "```\nnom = {ask} \"Quel est ton nom ?\"\nâge = {ask} \"Quel est ton âge ?\"\n{if} nom {is} 'Hedy' {and} âge {is} 2\n {print} \"Tu es le vrais Hedy !\"\n```\n"
while_command:
- name: while
- description: while
+ name: "{while}"
+ description: tant que
default_save_name: while_command
levels:
15:
- start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
- story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
- example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
+ start_code: "réponse = 0\n{while} réponse != 25\n réponse = {ask} \"Combien font 5 fois 5 ?\"\n{print} \"Une réponse correcte a été donnée\""
+ story_text: "Nous allons apprendre une nouvelle boucle, la boucle `{while}` ! La boucle continue tant que la condition est vraie.\nAlors n'oublie pas de changer la valeur dans la boucle.\n\nDans l'exemple de code, on continue jusqu'à obtenir une réponse correcte.\nSi la réponse correcte n'est jamais donnée, la boucle ne se termine pas !"
+ example_code: "```\nréponse = 0\n{while} réponse != 25\n réponse = {ask} \"Combien font 5 fois 5 ?\"\n{print} \"Une réponse correcte a été donnée\"\n```\n"
+ clear_command:
+ name: '{clear}'
+ description: La commande {clear}
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "{print} \"3\"\n{sleep}\n{clear}\n{print} \"2\"\n{sleep}\n{clear}\n{print} \"1\"\n{sleep}\n{clear}\n{print} \"SURPRISE !\"\n"
+ story_text: "C'est le moment d'apprendre une nouvelle commande ! Avec `{clear}`tu peux effacer tout le texte de l'écran d'affichage. De cette manière, tu peux éviter que ton écran ne soit trop rempli de texte.\nAttention ! Quand tu utilises une commande `{clear}`, rappelle-toi d'utiliser un `{sleep}` juste avant. Sinon Hedy effacera ton écran sans te laisser le temps de le lire !\n"
+ example_code: "```\n{print} \"3\"\n{sleep}\n{clear}\n{print} \"2\"\n{sleep}\n{clear}\n{print} \"1\"\n{sleep}\n{clear}\n{print} \"SURPRISE !\"\n```\n"
diff --git a/content/adventures/fy.yaml b/content/adventures/fy.yaml
index a0be1ce54fe..b9c4ea5dfbf 100644
--- a/content/adventures/fy.yaml
+++ b/content/adventures/fy.yaml
@@ -346,7 +346,7 @@ adventures:
story_text_2: |
The command `{add}` can also come in handy in your story. For example
- example_code_2: |
+ example_code_2: |2
{print} He hears a sound
animals {is} 🐿, 🦔, 🦇, 🦉
@@ -958,7 +958,7 @@ adventures:
example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n"
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
ask_command:
@@ -977,11 +977,11 @@ adventures:
story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n"
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -1000,7 +1000,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
levels:
3:
start_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}\n"
@@ -1017,7 +1017,7 @@ adventures:
description: introducing at random command
default_save_name: random_command
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -1030,7 +1030,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1052,11 +1052,11 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -1088,7 +1088,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
levels:
8:
example_code: "```\n{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This is all repeated 5 times'\n```\n"
@@ -1105,7 +1105,7 @@ adventures:
description: repeat command
default_save_name: repeat_command
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -1144,7 +1144,7 @@ adventures:
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -1166,7 +1166,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
levels:
13:
@@ -1175,7 +1175,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
default_save_name: and or
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1184,7 +1184,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1192,3 +1192,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
+ clear_command:
+ default_save_name: clear_command
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ name: '{clear}'
+ description: clear command
diff --git a/content/adventures/he.yaml b/content/adventures/he.yaml
index 9eb5703db2a..566eba6fdad 100644
--- a/content/adventures/he.yaml
+++ b/content/adventures/he.yaml
@@ -685,11 +685,11 @@ adventures:
example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
random_command:
- name: random
+ name: "{random}"
levels:
16:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
@@ -706,7 +706,7 @@ adventures:
description: introducing at random command
default_save_name: random_command
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -719,7 +719,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -750,7 +750,7 @@ adventures:
description: Harry Potter adventures
default_save_name: Harry Potter
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -773,7 +773,7 @@ adventures:
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
story_text_2: If you want to print more than one item, you need to separate them by commas.
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -792,7 +792,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -801,7 +801,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -818,7 +818,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -850,7 +850,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -867,7 +867,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -904,9 +904,9 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
- name: and or
+ name: "{and} & {or}"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -915,7 +915,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -923,3 +923,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/hi.yaml b/content/adventures/hi.yaml
index 84684e3787e..ec1aa178f69 100644
--- a/content/adventures/hi.yaml
+++ b/content/adventures/hi.yaml
@@ -825,7 +825,7 @@ adventures:
{print} 'those are' points ' point'
```
Can you make the code so that you get the total score for 8 dice? To do that, you have to cut and paste some lines of the code.
- example_code_2: |
+ example_code_2: |2
Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7!
start_code: "{print} 'What will the die indicate this time?'"
@@ -922,7 +922,7 @@ adventures:
Do you complete the code by entering the correct commands or characters on the underscores?
start_code: "{print} 'Welcome to your own rock scissors paper!'"
3:
- story_text: |
+ story_text: |2
In this level we can enter lists and choose things from them.
You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`.
@@ -1227,7 +1227,7 @@ adventures:
story_text: |
In this level you can use maths to calculate the total price of your customer's order, which can make your virtual restaurant more realistic.
- example_code: |
+ example_code: |2
You can make a simple restaurant code, like this:
```
@@ -1311,7 +1311,7 @@ adventures:
food = {ask} 'What would you like to eat as your ' course '?'
{print} food ' will be your ' course
```
- story_text_2: |
+ story_text_2: |2
Of course, you could also order for multiple people!
example_code_2: |
@@ -2208,10 +2208,10 @@ adventures:
story_text: "We arrived at real Python code! That means we need to use parentheses with `{print}` and `{range}` from now on.\nIt also means you can use Hedy code from this level in any Python environment as long as you use the English commands. If you haven't until now, you can switch the toggle in the commands menu to do so।"
example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n"
default_save_name: print
- name: print
+ name: "{print}"
description: Introduction print command
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -2230,7 +2230,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old।"
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -2264,9 +2264,9 @@ adventures:
start_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]"
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore।"
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
- name: random
+ name: "{random}"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -2286,9 +2286,9 @@ adventures:
story_text: "## The sleep command\nAnother new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds.\n"
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
- name: sleep
+ name: "{sleep}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -2305,7 +2305,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
levels:
5:
@@ -2337,7 +2337,7 @@ adventures:
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
example_code: "```\nname = 'Hedy the Robot'\n{print} 'Hello ' name\n```\n"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -2354,7 +2354,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -2379,7 +2379,7 @@ adventures:
start_code: "{for} counter {in} {range} 1 {to} 5\n {print} counter"
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements।"
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
- name: for
+ name: "{for}"
description: for command
maths:
description: Introducing maths
@@ -2397,7 +2397,7 @@ adventures:
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
name: maths
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -2406,7 +2406,7 @@ adventures:
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -2415,7 +2415,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct।"
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -2441,3 +2441,12 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
+ clear_command:
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/hu.yaml b/content/adventures/hu.yaml
index 242fe638ea6..ff0f931b59b 100644
--- a/content/adventures/hu.yaml
+++ b/content/adventures/hu.yaml
@@ -267,7 +267,7 @@ adventures:
```
3:
start_code: print A te történeted
- story_text: |
+ story_text: |2
Hozzáadhatsz valami véletlenszerűt is a történetéhez. Bármilyen szörnyet, állatot vagy
más akadályt.
@@ -280,7 +280,7 @@ adventures:
story_text_2: |
The command `{add}` can also come in handy in your story. For example
- example_code_2: |
+ example_code_2: |2
{print} He hears a sound
animals {is} 🐿, 🦔, 🦇, 🦉
@@ -495,7 +495,7 @@ adventures:
```
4:
start_code: print 'Ki mosogat?'
- story_text: |-
+ story_text: |2-
Az idézőjelek segítségével szebbé teheted a mosogatás tervezését.
Ezúttal a minta kód nem egészen teljes.
@@ -981,7 +981,7 @@ adventures:
Szórakozhatsz egy kicsit, ha hagyod, hogy Hedy megválassza a vacsora árát is! Mit fogsz kapni?
- example_code: |-
+ example_code: |2-
```
print Üdvözöljük a Hedy's Random étteremben!
@@ -1225,7 +1225,7 @@ adventures:
A 7. szinten ez a probléma megoldódott az ismétlés parancs új módjának köszönhetően.
A következő példában a jósnő 3 kérdést tehet fel, és kiírathatja őket!
- example_code: |-
+ example_code: |2-
```
print 'Hedy a jósnő vagyok!'
@@ -1252,7 +1252,7 @@ adventures:
start_code: |-
print 'Hedy, a jósnő vagyok!'
print 'Feltehetsz 3 kérdést!'
- example_code: |-
+ example_code: |2-
```
print 'Hedy, a jósnő vagyok!'
@@ -1269,7 +1269,7 @@ adventures:
start_code: |-
print 'Hedy, a jósnő vagyok!'
print 'Meg tudom jósolni, hány gyermeked lesz, ha felnősz!'
- example_code: |-
+ example_code: |2-
```
print 'Hedy, a jósnő vagyok!'
@@ -1310,7 +1310,7 @@ adventures:
Vagy elkészítheted Hófehérke varázslatos tükrét a falon, hogy elmondd mindenkinek, hogy te vagy a legbecsületesebb!
Hagyd, hogy a fantáziád végezze a munkádat!
start_code: print 'Szia, Hedy, a jósnő vagyok!'
- example_code: |-
+ example_code: |2-
```
print 'Szia, Hedy, a jósnő vagyok'
@@ -1329,7 +1329,7 @@ adventures:
Fontos! Ne feledd, hogy most, amikor idézőjeleket használunk, Hedy összezavarodik, amikor az aposztrófot más szövegösszefüggésben használod.
- example_code: |-
+ example_code: |2-
```
print 'Szia, Hedy, a jósnő vagyok!'
@@ -1399,7 +1399,7 @@ adventures:
start_code: print 'Szabadulj ki a kísértetházból'
- example_code: |-
+ example_code: |2-
```
print 'Szabadulj ki a kísértetházból'
@@ -1650,7 +1650,7 @@ adventures:
description: Try linking a keyboard key to a command!
default_save_name: Pressed
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -1686,11 +1686,11 @@ adventures:
start_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}\n"
story_text_3: "### Exercise\nTry out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price!\nCan you do it? We have already put the first lines into the example code.\n"
example_code_3: "```\n{print} The big gameshow!\n{print} There are 3 suitcases in front of you...\nchosen {is} {ask} Which suitcase do you choose?\nprices {is} _\n_\n```\n"
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1713,7 +1713,7 @@ adventures:
example_code: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'\n```\n"
start_code: "name {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice'\n{else} {print} 'boo!'"
default_save_name: if_command
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
quotation_marks:
levels:
@@ -1737,7 +1737,7 @@ adventures:
description: Introduction quotation marks
default_save_name: quotation_marks
repeat_command:
- name: Repeat
+ name: "{repeat}"
default_save_name: repeat_command
description: repeat command
levels:
@@ -1754,7 +1754,7 @@ adventures:
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
levels:
8:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
@@ -1769,7 +1769,7 @@ adventures:
description: repeat command 2
default_save_name: repeat_command_2
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -1802,7 +1802,7 @@ adventures:
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
rock_2:
@@ -1824,7 +1824,7 @@ adventures:
description: Harry Potter adventures
default_save_name: Harry Potter
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -1843,7 +1843,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -1862,7 +1862,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -1882,20 +1882,20 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
story_text_2: "### Exercise\nFinish the example code by filling in the blanks with commands that you've learned.\nWhen you've finished the code, try to create a code of your own and use a question that you've thought of yourself.\n"
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
while_command:
description: while
default_save_name: while_command
- name: while
+ name: "{while}"
levels:
15:
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1903,3 +1903,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/id.yaml b/content/adventures/id.yaml
index a0ce6a227f4..0dce5e3fac3 100644
--- a/content/adventures/id.yaml
+++ b/content/adventures/id.yaml
@@ -843,7 +843,7 @@ adventures:
start_code: print 'Selamat datang di permainan batu guning kertas mu sendiri!'
3:
- story_text: |-
+ story_text: |2-
Pada level 2 kamu bisa memasukkan daftar pilihan dan memilih dari sana.
@@ -1605,7 +1605,7 @@ adventures:
start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'"
story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n"
example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'\n```\n"
- name: print
+ name: "{print}"
ask_command:
default_save_name: ask_command
levels:
@@ -1623,10 +1623,10 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
story_text: "## The ask command\nNow that we can use **variables** in our codes, we no longer need the `{echo}` command.\nWe can use variables to store the answers to our questions and this way we can use the answer to multiple questions in our codes.\nCheck it out:\n\nThis way your code is becoming interactive!\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
- name: ask
+ name: "{ask}"
description: Introduction ask command
random_command:
- name: random
+ name: "{random}"
default_save_name: random_command
levels:
3:
@@ -1653,10 +1653,10 @@ adventures:
story_text_3: "### Exercise\nTry out the new commands in this virtual restaurant. Add the flavor the player is hpoing for to the list and remove the flavors they are allergic to.\n"
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
default_save_name: add_remove_command
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1665,7 +1665,7 @@ adventures:
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
story_text: "## The sleep command\nAnother new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds.\n"
if_command:
- name: if else
+ name: "{if} & {else}"
default_save_name: if_command
levels:
5:
@@ -1716,11 +1716,11 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
levels:
7:
story_text_2: "Another interesting thing you can so with the `{repeat}` command is using variables to set the amount of times something should be repeated. In the example code you can see that we first ask the person how old they are.\nThen, in line 3, the question is repeated 'age' times. So we have used the variable 'age' with the `{repeat}` command.\n"
@@ -1735,7 +1735,7 @@ adventures:
default_save_name: repeat_command_2
description: repeat command 2
for_command:
- name: for
+ name: "{for}"
description: for command
levels:
10:
@@ -1754,10 +1754,10 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
- name: and or
+ name: "{and} & {or}"
description: introducing and or
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1790,11 +1790,11 @@ adventures:
story_text_2: "From this level on, if you want to compare exactly, you can use two equal signs. This is what most programming languages do:\n"
example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -1820,7 +1820,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1837,3 +1837,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ default_save_name: clear_command
diff --git a/content/adventures/it.yaml b/content/adventures/it.yaml
index a5a0ffc1961..9437ac6fdc3 100644
--- a/content/adventures/it.yaml
+++ b/content/adventures/it.yaml
@@ -1062,7 +1062,7 @@ adventures:
{print} 'those are' points ' point'
```
Can you make the code so that you get the total score for 8 dice? To do that, you have to cut and paste some lines of the code.
- example_code_2: |
+ example_code_2: |2
Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7!
start_code: "{print} 'What will the die indicate this time?'"
@@ -1137,7 +1137,7 @@ adventures:
```
start_code: "# place your code here"
3:
- story_text: |
+ story_text: |2
In this level we can enter lists and choose things from them.
You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`.
@@ -1496,7 +1496,7 @@ adventures:
story_text: |
In this level you can use maths to calculate the total price of your customer's order, which can make your virtual restaurant more realistic.
- example_code: |
+ example_code: |2
You can make a simple restaurant code, like this:
```
@@ -1580,7 +1580,7 @@ adventures:
food = {ask} 'What would you like to eat as your ' course '?'
{print} food ' will be your ' course
```
- story_text_2: |
+ story_text_2: |2
Of course, you could also order for multiple people!
example_code_2: |
@@ -1693,7 +1693,7 @@ adventures:
story_text: |
In the previous levels you've created your first fortune telling machine, but Hedy couldn't really predict anything, only {echo}.
In this level you can use a variable and the `{at} {random}` command to really let Hedy choose an answer for you. Check out this code for instance:
- example_code: |
+ example_code: |2
In this example the player can {ask} Hedy a yes-no question and Hedy will pick a random answer for you.
```
@@ -2590,7 +2590,7 @@ adventures:
name: Key presses
description: Try linking a keyboard key to a command!
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -2628,11 +2628,11 @@ adventures:
story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n"
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -2649,7 +2649,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -2666,7 +2666,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -2677,7 +2677,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
levels:
7:
start_code: "{print} 'happy birthday to you'\n{print} 'happy birthday to you'\n{print} 'happy birthday dear Hedy'\n{print} 'happy birthday to you'\n"
@@ -2706,10 +2706,10 @@ adventures:
example_code: "```\n{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'\n```\n"
example_code_2: "```\n{print} 'Yay! It is your birthday!'\nage = {ask} 'How old are you now?'\n{repeat} age {times} {print} 'Hip Hip Hurray!'\n```\n"
start_code: "{repeat} 2 {times} answer = {ask} 'Did you know you could ask a question multiple times?'\n{if} answer {is} yes {repeat} 2 {times} {print} 'You knew that already!'\n{else} {repeat} 3 {times} {print} 'You have learned something new!'"
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -2723,7 +2723,7 @@ adventures:
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
while_command:
default_save_name: while_command
- name: while
+ name: "{while}"
description: while
levels:
15:
@@ -2764,11 +2764,11 @@ adventures:
story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animals`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command.\nFirstly, finish our example by filling in your favorite animal in the blanks. Then make at least 3 of these codes yourself. Pick a variable, and set the variable with the {is} command. Then use it with a {print} command, just like we did.\n"
example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n"
start_code: "name {is} Hedy\nage {is} 15\n{print} name is age years old"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -2781,7 +2781,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -2816,7 +2816,7 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
maths:
@@ -2835,7 +2835,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -2843,3 +2843,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
diff --git a/content/adventures/ja.yaml b/content/adventures/ja.yaml
index 561a3388e6c..429bbbc2aa0 100644
--- a/content/adventures/ja.yaml
+++ b/content/adventures/ja.yaml
@@ -684,7 +684,7 @@ adventures:
example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n"
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
is_command:
@@ -703,11 +703,11 @@ adventures:
example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -724,7 +724,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -757,7 +757,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
default_save_name: Harry Potter
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -776,7 +776,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -789,7 +789,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -806,7 +806,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -838,7 +838,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -855,7 +855,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -870,7 +870,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -883,7 +883,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ description: clear command
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ name: '{clear}'
+ default_save_name: clear_command
diff --git a/content/adventures/kmr.yaml b/content/adventures/kmr.yaml
index dfee6a54a09..c6fdf7e3416 100644
--- a/content/adventures/kmr.yaml
+++ b/content/adventures/kmr.yaml
@@ -1,37 +1,37 @@
adventures:
default:
- name: Introduction
+ name: Pêşkêş
levels:
4:
- start_code: "{print} 'Hello world'"
+ start_code: "{print} 'Silav dinya'"
story_text: "In level 4 `{ask}` and `{print}` have changed.\nYou must put text that you want to print between quotation marks.\nThis is useful, because now you can print all the words you want. Also the words you used to store something with `{is}`.\nMost programming languages also use quotation marks when printing, so we are also getting a step closer to real programming!\n"
- example_code: "```\n{print} 'You need to use quotation marks from now on!'\nanswer {is} {ask} 'What do we need to use from now on?'\n{print} 'We need to use ' answer\n```\n"
+ example_code: "```\n{print} 'Pêwîste ku hûn ji nuha û pê ve nîşanan bikar bînin!'\nbersiv {is} {ask} 'Ji niha û pê ve divê em çi bikar bînin?'\n{print} 'Divê em navê Sophie bikar bînin'\n{print} 'Navê min navê min'\n"
5:
- start_code: "name {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'cool!' {else} {print} 'meh'"
+ start_code: "nav {is} {ask} 'navê te çi ye?'\n{if} nav {is} Hedy {print} 'xweş!' {else} {print} 'meh'"
story_text: "In level 5 there is something new, the `{if}`! With the `{if}` you can choose between two different options.\nThis code prints nice if you enter Hedy as a name, and boo! if you enter something else.\n`{ask}` and `{print}` still work like they did in level 4.\n"
- example_code: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'\n```\n"
+ example_code: "```\nnav {is} {ask} 'Navê te çi ye?'\n{if} nav {is} Hedy {print} 'xweşik' {else} {print} 'boo!'\n```\n"
18:
start_code: "name = 'Hedy'\n{print}('My name is ', name)"
story_text: "We arrived at real Python code! That means we need to use parentheses with {print} and {range} from now on.\nIt also means you can use Hedy code from this level in any Python environment as long as you use the English commands. If you haven't until now, you can switch the toggle in the commands menu to do so."
1:
- story_text: "In Level 1 you can use the commands `{print}`, `{ask}` and `{echo}`.\nType your code in the programming field. Or press the green button in the example code block, and the code will be typed for you!\nTry the code yourself with the green 'Run code' button under the programming field.\n\nYou can print text to the screen using the `{print}` command. \n"
- start_code: '{print} hello world!'
+ story_text: "Bi xêr hatî Hedy! Di Asta 1 de hûn dikarin fermanên `{print}`, `{ask}` û `{echo}` bikar bînin.\nKoda xwe di qada bernamekirinê de binivîsin. An jî bişkoka kesk a di bloka kodê ya nimûneyê de bikirtînin, û kod dê ji we re were nivîsandin! Bi çapkirina çîrokek dest pê bikin.\n\nBi bişkoja kesk 'Run code' di binê qada bernamekirinê de kodê biceribînin.\n\nHûn dikarin nivîsê li ser ekranê bi karanîna `{print}` çap bikin Amade ne? Ew cax biçin tabloya din da ku emrê xweya yekem fêr bibin . !\n"
+ start_code: '{print} silav dinya!'
2:
story_text: "In level 2 we learn two new commands: `{is}` and `{sleep}`.\nYou can name a word with `{is}`. This is called a variable. In this example we made a variable called name and a variable called age. You can use the word name anywhere in your code and it will be replaced by Hedy, like this:\n\nThis way you no longer need the `{echo}` command!\n"
- example_code: "```\nname {is} Hedy\nage {is} 15\n{print} name is age years old\n```\n"
+ example_code: "{print} Hûn bi xêr hatin Hedy's\n{ask} Tu dixwazî çi bixwî?\n{echo} Ji ber vê yekê hûn dixwazin\n{ask} dixwazin çi vexwin?\n{echo} Ji ber vê yekê hûn dixwazin\n"
story_text_2: "`{print}` still works the same, but the `{ask}` command has changed. You need to use a variable in the `{ask}` command as well. It looks like this:\n"
- start_code: '{print} hello world!'
+ start_code: '{print} silav dinya!'
3:
story_text: "In level 3 you can make a list. You can let the computer choose something random from the list. You do that with `{at} {random}`.\n"
- start_code: '{print} hello world!'
+ start_code: '{print} silav dinya!'
6:
- start_code: "{print} '5 times 5 is ' 5 * 5"
+ start_code: "{print} '5 caran 5 ' 5 * 5"
story_text: " In this level you learn something new: you can now also calculate.\n\n The plus is easy, you write it like with math: `5 + 5` for example. The minus also works fine, it is `5 - 5`.\n\n The times is a bit different, because there is no times symbol on your keyboard. Just search, there really isn't!\n That is why we multiply with the asterisk above 8: `5 * 5`. Read that as \"5 times 5\" that helps you remember it best.\n"
- example_code: "```\n{print} '5 plus 5 is ' 5 + 5\n{print} '5 minus 5 is ' 5 - 5\n{print} '5 times 5 is ' 5 * 5\n```\n"
+ example_code: "```\n{print} '5 biserve 5 {is} ' 5 + 5\n{print} '5 kêmkir 5 {is} ' 5 - 5\n{print} '5 caran 5 {is} ' 5 * 5\n```\n"
7:
- start_code: "{repeat} 3 {times} {print} 'Hedy is fun!'"
- story_text: "Level 7 adds the `{repeat}` command. `{repeat}` can be used to execute one line of code multiple times.\n"
- example_code: "```\n{repeat} 3 {times} {print} 'Hedy is fun!'\n```\n"
+ start_code: "{repeat} 3 {times} {print} 'Hedy xweş e!'\n"
+ story_text: "Asta 7 fermana `{repeat}` zêde dike. `{repeat}` dikare ji bo pêkanîna yekê were bikar anîn\n"
+ example_code: "{repeat} 3 {times} {print} 'Hedy kêfxweş e! {print} 'rojbûna te pîroz be'\n{repeat} 3 {times} {print} 'Hedy kêfxweş e!print!'\n```\n"
8:
start_code: "{repeat} 5 {times}\n {print} 'Hello folks'\n {print} 'This will be printed 5 times'"
story_text: "`{ask}` and `{print}` still work as you know them. But `{if}`, `{else}`, {pressed} and `{repeat}` have changed!\nYou can now group several lines together, but you will have to *indent* the code.\nThat means putting four spaces at the beginning of the line. You will also have to indent when you just want to create a block of one line.\n"
@@ -70,7 +70,7 @@ adventures:
17:
start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'"
story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n\nIn this level you can also use a new command: `{elif}`. `{elif}` is short for {else} {if} and you need it when you want to make 3 (or more!) options.\nCheck it out!"
- description: Level explanation
+ description: Ravekirina astê
default_save_name: intro
story:
levels:
@@ -684,7 +684,7 @@ adventures:
start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'"
story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n"
example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'\n```\n"
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
is_command:
@@ -703,7 +703,7 @@ adventures:
example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
random_command:
@@ -720,7 +720,7 @@ adventures:
start_code: "animals {is} dog, cat, kangaroo\n{print} animals {at} {random}\n"
story_text_3: "### Exercise\nTry out the `{at} {random}` command by making your own gameshow (like the ones on tv) where you choose a door or suitcase and it contains a big price!\nCan you do it? We have already put the first lines into the example code.\n"
example_code_3: "```\n{print} The big gameshow!\n{print} There are 3 suitcases in front of you...\nchosen {is} {ask} Which suitcase do you choose?\nprices {is} _\n_\n```\n"
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
quotation_marks:
@@ -756,13 +756,13 @@ adventures:
story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n## Exercise\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n"
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
elif_command:
description: elif
default_save_name: elif
- name: elif
+ name: "{elif}"
levels:
17:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
@@ -787,7 +787,7 @@ adventures:
start_code: '# place your code here'
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -806,7 +806,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -819,7 +819,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -828,7 +828,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -845,7 +845,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -856,7 +856,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -873,7 +873,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -910,7 +910,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -918,3 +918,12 @@ adventures:
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
+ clear_command:
+ name: '{clear}'
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/ko.yaml b/content/adventures/ko.yaml
index d420918c2d1..e5fe176b3c5 100644
--- a/content/adventures/ko.yaml
+++ b/content/adventures/ko.yaml
@@ -665,7 +665,7 @@ adventures:
description: Try linking a keyboard key to a command!
default_save_name: Pressed
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -688,7 +688,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
levels:
1:
story_text_3: "### Exercise\nTry out the `{ask}` and `{echo}` commands. Firstly, fill in the blanks to make this program work.\nThen ask 2 more questions using the `{ask}` command, after each `{ask}` use an `{echo}` to print the answer on the screen.\n"
@@ -707,7 +707,7 @@ adventures:
description: Introduction ask command
default_save_name: ask_command
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -739,11 +739,11 @@ adventures:
start_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]"
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -756,7 +756,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -765,7 +765,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -789,7 +789,7 @@ adventures:
example_code: "```\npretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'\n```\n"
story_text_2: "### Exercise\nFinish the example code by filling in the blanks with commands that you've learned.\nWhen you've finished the code, try to create a code of your own and use a question that you've thought of yourself.\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
quotation_marks:
@@ -814,7 +814,7 @@ adventures:
description: Introduction quotation marks
default_save_name: quotation_marks
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -832,11 +832,11 @@ adventures:
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -850,7 +850,7 @@ adventures:
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
rock_2:
@@ -872,7 +872,7 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -889,7 +889,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -918,3 +918,12 @@ adventures:
start_code: "{print} 'decimal numbers now need to use a dot'\n{print} 2.5 + 2.5"
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
+ clear_command:
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/nb_NO.yaml b/content/adventures/nb_NO.yaml
index ffe9e9e04a5..01aa50c5f87 100644
--- a/content/adventures/nb_NO.yaml
+++ b/content/adventures/nb_NO.yaml
@@ -686,7 +686,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
example_code: "```\n{print}('Hello!')\n{for} i {in} {range}(1, 10):\n {print}('This is line ', i)\n```\n"
- name: print
+ name: "{print}"
ask_command:
description: Introduction ask command
default_save_name: ask_command
@@ -705,9 +705,9 @@ adventures:
story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n"
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
- name: ask
+ name: "{ask}"
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -741,9 +741,9 @@ adventures:
start_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]"
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
- name: random
+ name: "{random}"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -756,7 +756,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -765,7 +765,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -782,7 +782,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -814,7 +814,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -831,7 +831,7 @@ adventures:
story_text: "### Repeat commands and indentation\nIn this level you can repeat multiple lines of code with only 1 repeat command.\nYou do this by making a block of lines that you want to repeat.\nThe lines in this block will need **indentation** .\nThat means putting four spaces at the beginning of each line. You will also have to indent when you just want to create a block of one line.\n"
example_code: "```\n{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This is all repeated 5 times'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -846,7 +846,7 @@ adventures:
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -881,9 +881,9 @@ adventures:
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
- name: and or
+ name: "{and} & {or}"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -892,7 +892,7 @@ adventures:
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
name: Harry Potter
description: Harry Potter adventures
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/nl.yaml b/content/adventures/nl.yaml
index 0c0c6f3fd04..979369d52ec 100644
--- a/content/adventures/nl.yaml
+++ b/content/adventures/nl.yaml
@@ -8,7 +8,7 @@ adventures:
story_text: |
Welkom bij Hedy! In Level 1 ga je je eerste codes leren maken.
- Als je een code het getypt in het invoerscherm kun je op de knop 'Voer de code uit' klikken. Je programma wordt dan uitgevoerd in het uitvoerscherm.
+ Als je een code hebt getypt in het invoerscherm kun je op de knop 'Voer de code uit' klikken. Je programma wordt dan uitgevoerd in het uitvoerscherm.
Klaar om te leren programmeren? Ga dan snel naar het eerste avontuur in het volgende tabje!
start_code: "{print} hallo wereld!"
@@ -18,6 +18,8 @@ adventures:
In het eerste level heb je misschien gemerkt dat het `{echo}` commando maar voor één antwoord tegelijk gebruikt kan worden.
Bijvoorbeeld in het restaurantavontuur kun je echoën wat de klanten willen eten, of wat ze willen drinken, maar niet allebei in één zin.
example_code: |
+ **Let op! Deze code werkt niet!**
+ In Hedy veranderen commando's wel eens. Zo werkt `echo` alleen in level 1. In dit level leer je een betere manier om antwoord te echoën!
```
{print} Welcome bij restaurant Hedy
{ask} Wat wil je eten?
@@ -40,17 +42,18 @@ adventures:
Ga maar snel naar het volgende avontuur!
start_code: "{print} hello world!"
4:
- start_code: |
- naam {is} Sophie
- {print} Mijn naam is naam
+ start_code: |-
+ {print} 'Hallo wereld'
story_text: |
In de vorige levels heb je geoefend met variabelen, maar misschien ben je dit probleem tegengekomen.
Als je deze code wil programmeren:
Je wilde natuurlijk printen:
+
`Mijn naam is Sophie`
maar Hedy print:
+
`Mijn Sophie is Sophie`.
In dit level leer je dit probleem aan te pakken door middel van aanhalingstekens.
@@ -102,7 +105,8 @@ adventures:
story_text: |
Goed gedaan! Je bent bij het volgende level, wat betekent dat je goed geoefend hebt met `{if}` en `{else}`. Waarschijnlijk heb je al gemerkt dat je codes steeds langer worden.
Hier zie je de code van het verjaardagsliedje 'Happy Birthday'.
- Dat is een hoop code voor steeds hetzelfde zinnetje.... Gelukkig leer je in het volgende avontuur een oplossing!
+
+ Dat is een hoop code voor steeds hetzelfde zinnetje.... Gelukkig leer je in het volgende avontuur een oplossing met het `{repeat}` commando. Hiermee kun je een regel code meerdere keren herhalen.
example_code: |
```
{print} 'happy birthday to you'
@@ -145,7 +149,7 @@ adventures:
Bijvoorbeeld in het Engelse liedje 'if you're happy and you know it'. Dat zou er dan ongeveer zo uitzien:
Als je in het volgende couplet niet 'clap your hands' maar 'stomp your feet' wil gebruiken, dan moet je de code volledig aanpassen.
- Superonhandig! In dit level leer je het `{for}` commando, dat dat probleem voor je oplost!
+ Superonhandig! In dit level leer je het `{for}` commando, dat dit probleem voor je oplost!
Ga maar snel door!
example_code: |
```
@@ -169,12 +173,14 @@ adventures:
burger = 5
drinken = 2
totaal = burger + drinken
+ print 'Je hebt een burger en drinken besteld'
print 'Dat kost ' totaal ' euro alstublieft'
```
start_code: "{print} 'Lets go to the next tab!'"
13:
story_text: |
In vorige levels heb je geleerd hoe je twee `{if}`commando's in elkaar kan stoppen. Dit werk prima, maar het kan wel resulteren in lange onhandige codes zoals deze:
+
In dit systeem moet je zowel de goede gebruikersnaam als het goede wachtwoord opgeven.
In dit level leer je het `{and}` commando, waarmee je codes zoals deze een stuk korter en makkelijker kunt maken!
Kijk maar!
@@ -207,12 +213,8 @@ adventures:
{else}
{print} 'Hoera! Je haalt het vak!'
```
- start_code: |
- antwoord = {ask} 'Wil je nog meer leren?'
- {if} antwoord == 'ja'
- {print} 'Ga naar het volgende avontuur!'
- {if} antwoord != 'ja'
- {print} 'Wat jammer!'
+ start_code: |-
+ {print} 'Ga naar het volgende avontuur'
15:
story_text: |
In het spelletje hiernaast kan de speler erg lang blijven spelen...
@@ -258,7 +260,7 @@ adventures:
start_code: "{print} 'Lets go to the next level!'"
18:
story_text: |
- Hoera! Je hebt het einde van van Hedy bereikt! De codes die je hier in het laaste level maakt kun je kopiëren naar andere Python omgevingen, zoals replit or PyCharm. Daar kun je verder Python leren!
+ Hoera! Je hebt het einde van Hedy bereikt! De codes die je hier in het laaste level maakt kun je kopiëren naar andere Python omgevingen, zoals replit or PyCharm. Daar kun je verder Python leren!
Let wel op! Python kan alleen Engelse commando's lezen. Dus heb je de commando's geprogrammeerd in een andere taal, zet ze dan nu om naar het Engels.
start_code: "{print} ('Great job!!!')"
story:
@@ -358,6 +360,7 @@ adventures:
### Opdracht
Kopieer de voorbeeldcode en maak hem kloppend door aanhalingstekens in te vullen op de lijntjes.
+ Op de lijntjes van regel 3 en 4 moeten geen aanhalingstekens komen, maar een `{slaap}` en een `{clear}` commando. Lukt het jou om het programma te laten werken?
### Opdracht 2
Ga terug naar het vorige level en kopieer je eigen verhaalcode. Maak de code nu kloppend voor dit level door er aanhalingstekens aan toe te voegen op de goede plekken.
@@ -366,6 +369,8 @@ adventures:
```
naam {is} {ask} _Hoe heet de hoofdpersoon_
{print} _De hoofdpersoon heet _ naam
+ _
+ _
{print} naam _ gaat nu in het bos lopen_
{print} naam _ is wel een beetje bang_
dieren {is} 🦔, 🦉, 🐿, 🦇
@@ -483,13 +488,13 @@ adventures:
```
start_code: "# Schrijf jouw code hier"
12:
- story_text: |-
+ story_text: |2-
- Aanhalingstekens zijn nu nodig om woorden op te slaan in een variabele, voor en achter ieder element in de lijst.
+ Aanhalingstekens zijn nu nodig om woorden op te slaan in een variabele, voor en achter ieder element in de lijst.
- ### Opdracht
- Zoek een verhaal op uit een eerder level, je mag zelf kiezen welk level.
- Zorg dan dat alles weer in orde is door op de juiste plekken aanhalingstekens toe te voegen.
+ ### Opdracht
+ Zoek een verhaal op uit een eerder level, je mag zelf kiezen welk level.
+ Zorg dan dat alles weer in orde is door op de juiste plekken aanhalingstekens toe te voegen.
example_code: |
```
naam = 'De Koningin van Engeland'
@@ -1355,11 +1360,11 @@ adventures:
```
start_code: "# Schrijf jouw code hier"
3:
- story_text: |
+ story_text: |2
- In dit level kunnen we lijstjes invoeren en daar dingen uit kiezen.
- Je maakt eerst een lijstje met `{is}`. Daarna kan je de computer met `{at} {random}` iets uit de lijst laten kiezen.
- Zo kun je de computer laten kiezen uit steen, papier en schaar.
+ In dit level kunnen we lijstjes invoeren en daar dingen uit kiezen.
+ Je maakt eerst een lijstje met `{is}`. Daarna kan je de computer met `{at} {random}` iets uit de lijst laten kiezen.
+ Zo kun je de computer laten kiezen uit steen, papier en schaar.
example_code: |
```
keuzes {is} steen, papier, schaar
@@ -1619,15 +1624,15 @@ adventures:
```
start_code: "# Schrijf jouw code hier"
13:
- story_text: |
+ story_text: |2
- ### Opdracht 1
- Maak het sommenoefenprogramma nu extra moeilijk. De speler moet twee sommen achter elkaar goed hebben. Maak de codes op de streepjes af.
+ ### Opdracht 1
+ Maak het sommenoefenprogramma nu extra moeilijk. De speler moet twee sommen achter elkaar goed hebben. Maak de codes op de streepjes af.
- ### Opdracht 2 (extra)
- Sommen hebben soms meerdere goede antwoorden. Je kan 10 bijvoorbeeld delen door 5, maar ook door 2. Dus de som 'Door welk getal kan je 10 delen?' heeft twee goede antwoorden.
- Verzin zelf een som met meerdere antwoorden, vraag de speler om een antwoord en reken ze beide goed met `{or}`.
- Begin opnieuw met een leeg programmeerveld en programmeer het helemaal zelf.
+ ### Opdracht 2 (extra)
+ Sommen hebben soms meerdere goede antwoorden. Je kan 10 bijvoorbeeld delen door 5, maar ook door 2. Dus de som 'Door welk getal kan je 10 delen?' heeft twee goede antwoorden.
+ Verzin zelf een som met meerdere antwoorden, vraag de speler om een antwoord en reken ze beide goed met `{or}`.
+ Begin opnieuw met een leeg programmeerveld en programmeer het helemaal zelf.
example_code: |
```
@@ -1708,18 +1713,18 @@ adventures:
In het vorige level heb je een begin gemaakt aan de waarzegger, maar echt voorspellingen waren er nog niet.
In dit level kun je een variabele gebruiken en het `{at} {random}` commando om Hedy antwoorden te laten kiezen op je vraag.
Kijk maar naar dit voorbeeld:
- example_code: |
+ example_code: |2
- In dit voorbeeld kan de speler een ja/nee-vraag stellen aan Hedy, en Hedy kiest een willekeurig antwoord.
- ```
- {print} Hoi Ik ben Hedy de Waarzegger
- vraag {is} {ask} Wat wil je weten?
- {print} vraag
- antwoorden {is} ja, nee, misschien
- {print} Mijn glazen bol zegt...
- {sleep} 2
- {print} antwoorden {at} {random}
- ```
+ In dit voorbeeld kan de speler een ja/nee-vraag stellen aan Hedy, en Hedy kiest een willekeurig antwoord.
+ ```
+ {print} Hoi Ik ben Hedy de Waarzegger
+ vraag {is} {ask} Wat wil je weten?
+ {print} vraag
+ antwoorden {is} ja, nee, misschien
+ {print} Mijn glazen bol zegt...
+ {sleep} 2
+ {print} antwoorden {at} {random}
+ ```
story_text_2: |
### Opdracht
Er zijn nu maar 3 antwoordopties waar Hedy uit kan kiezen, kun jij er meer toevoegen? Bijvoorbeeld: zeker weten, geen idee of probeer het nog eens!
@@ -1892,7 +1897,7 @@ adventures:
{print} Vandaag serveren we pizza of lasagne.
eten {is} {ask} Wat wilt u eten?
{print} Heerlijk! eten is ook mijn favoriet!
- topping {is} {ask} Wilt u eten met groente of vlees?
+ topping {is} {ask} Met groente of vlees?
{print} eten met topping komt eraan!
```
start_code: "# Schrijf jouw code hier"
@@ -1937,10 +1942,11 @@ adventures:
4:
story_text: |
### Opdracht
- Kun jij de voorbeeldcode aan de praat krijgen?
+ Kun jij de voorbeeldcode aan de praat krijgen door aanhalingstekens toe te voegen?
+ Voeg daarna `{clear}` commando's toe om steeds maar 1 regel tekst in je uitvoerscherm te hebben.
### Opdracht 2
- Kopieer je eigen restaurantcode van het vorige level en voeg aanhalingstekens toe om de code ook in dit level te laten werken.
+ Kopieer je eigen restaurantcode van het vorige level en voeg aanhalingstekens en {clear} commando's toe om de code ook in dit level te laten werken.
start_code: "# Schrijf jouw code hier"
example_code: |
```
@@ -1971,23 +1977,23 @@ adventures:
6:
story_text: |
In dit level kun je in je restaurant prijzen toevoegen en berekenen!
- example_code: |
-
- Je kunt een simpel restaurant maken:
- ```
- {print} 'Welkom bij McHedy'
- {print} 'U kunt kiezen uit een hamburger, een kroket of een kaassouffle'
- {print} 'U krijgt frietjes en drinken bij uw bestelling. '
- eten = {ask} 'Wat wilt u bestellen?'
- prijs = 0
- {if} eten {is} hamburger prijs = 8
- {if} eten {is} kroket prijs = 6
- {if} eten {is} kaassoufle prijs = 5
- {print} 'U heeft een ' eten ' besteld'
- {print} 'Dat is dan ' prijs ' euro, alstublieft!'
- {print} 'Bedankt en eet smakelijk!'
- ```
- In de hierboven kan je maar één gerecht bestellen en dat wordt de prijs die afgerekend moet worden.
+ example_code: |2
+
+ Je kunt een simpel restaurant maken:
+ ```
+ {print} 'Welkom bij McHedy'
+ {print} 'U kunt kiezen uit een hamburger, een kroket of een kaassouffle'
+ {print} 'U krijgt frietjes en drinken bij uw bestelling. '
+ eten = {ask} 'Wat wilt u bestellen?'
+ prijs = 0
+ {if} eten {is} hamburger prijs = 8
+ {if} eten {is} kroket prijs = 6
+ {if} eten {is} kaassoufle prijs = 5
+ {print} 'U heeft een ' eten ' besteld'
+ {print} 'Dat is dan ' prijs ' euro, alstublieft!'
+ {print} 'Bedankt en eet smakelijk!'
+ ```
+ In de hierboven kan je maar één gerecht bestellen en dat wordt de prijs die afgerekend moet worden.
start_code: "{print} 'Welkom'"
7:
story_text: |
@@ -2210,7 +2216,7 @@ adventures:
{print} Je stapt het oude verlaten spookhuis binnen
{print} Meteen hoor je het geluid van een monster1
{print} Dus snel ren je naar de volgende kamer.
- {print} Maar daar wordt je opgewacht door een monster2
+ {print} Maar daar word je opgewacht door een monster2
{print} HELP!
{print} Je rent naar de keuken, maar wordt daar aangevallen door een monster3
```
@@ -2227,7 +2233,7 @@ adventures:
{print} Je stapt het oude verlaten spookhuis binnen
{print} Meteen hoor je het geluid van een monster1
{print} Dus snel ren je naar de volgende kamer.
- {print} Maar daar wordt je opgewacht door een monster2
+ {print} Maar daar word je opgewacht door een monster2
{print} HELP!
{print} Je rent naar de keuken, maar wordt daar aangevallen door een monster3
```
@@ -2235,7 +2241,7 @@ adventures:
3:
story_text: |
In het vorige level heb je een spannende intro bedacht voor je spookhuis, maar een echt spel is het nog niet: Het loopt namelijk altijd hetzelfde af.
- In level twee kun je je verhaal interactiever maken door verschillende eindes te bedenken: soms wordt je opgepeuzeld door een verschrikkelijk monster en soms ontsnap je!
+ In level twee kun je je verhaal interactiever maken door verschillende eindes te bedenken: soms word je opgepeuzeld door een verschrikkelijk monster en soms ontsnap je!
Hedy kiest willekeurig of je overleeft of niet...
start_code: "{print} Ontsnap uit het spookhuis!"
example_code: "```\n_ Escape from the haunted house!\n_ There are 3 doors in front of you...\n_ _ _ Which door do you choose?\n_ You picked door ... choice\nmonsters _ a zombie, a vampire, NOTHING YOUVE ESCAPED\n_ You see...\n{sleep}\n_ _ _ _\n```\n"
@@ -2640,25 +2646,25 @@ adventures:
```
start_code: "# Jouw code komt hier"
print_command:
- name: print
- description: Introduction print command
+ name: "{print}"
+ description: Introductie print commando
default_save_name: print
levels:
1:
- story_text: "Je kunt tekst laten verschijnen in je scherm met het `{print}` commando.\n"
+ story_text: "## Het print commando\nJe kunt tekst laten verschijnen in je scherm met het `{print}` commando.\n"
story_text_2: "### Opdracht\nIn Hedy vind je bij elk avontuur opdrachten. In de opdrachten oefen je de nieuwe commando's en concepten, en je kunt de voorbeeldcodes omtoveren tot je eigen programma.\nIn deze opdracht zie je een roze streepje. Op dit streepje moet jij zelf een regel code invullen voordat je de code kunt uitvoeren.\n\nVul in dit geval het `{print}` commando in op de plek van het streepje en voeg daarna nog 5 regels code toe. Elk van die regels moet starten met een `{print}` commando.\nVeel plezier!\n"
example_code: "```\n{print} Hey, programmeur!\n{print} Welkom bij Hedy!\n```\n"
example_code_2: "```\n_ Hallo!\n```\n"
start_code: "{print} Welkom bij Hedy!\n"
17:
start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Wie niet weg is, is gezien! Ik kom!'"
- story_text: "Er komt nu een kleine verandering in het inspringen. Elke keer als er moet worden ingesprongen, moet je een ':' typen in de regel daarvoor.\n"
+ story_text: "Er komt nu een kleine verandering in het inspringen. Elke keer als er moet worden ingesprongen, moet je een `:` typen in de regel daarvoor.\n"
example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Wie niet weg is, is gezien! Ik kom!'\n```\n"
18:
start_code: "naam = 'Hedy'\n{print}('Mijn naam is ', naam)"
story_text: "We gaan nu echte Python code programmeren! Dat betekent dat we vanaf nu haakjes moeten gebruiken bij `{print}` en `{range}`.\n Het betekent ook dat je nu in andere Python omgevingen kunt gaan programmeren met Hedy code. Je moet hierbij dan wel de Engelse commando's gebruiken. Als je de Engelse commando's nog niet gebruikte, dan kun je nu de schakelaar omzetten in het commandomenu."
example_code: "```\n{print}('Hallo!')\n{for} i {in} {range}(1, 10):\n {print}('Dit is regel ', i)\n```\n"
- story_text_2: "Als je meer dan een regel wilt printen, dan moet je die scheiden met een komma"
+ story_text_2: "Als je meer dan één regel wilt printen, dan moet je die scheiden met een komma."
example_code_2: "```\ntemperatuur = 25\n{print}('Het is ', temperatuur, ' graden buiten')\n```\n"
story_text_3: "Als laatste veranderen we het woord dat je moet gebruiken voor `{ask}`. Vanaf nu noemen we ask`{input}`."
example_code_3: "```\n{print}('Mijn naam is Hedy!')\nnaam = {input}('Hoe heet je?')\n{print}('Dus jouw naam is ', naam)\n```\n"
@@ -2667,20 +2673,20 @@ adventures:
1:
example_code_2: "```\n{print} Hallo!\n{ask} Hoe heet je? \n{echo} hello\n```\n"
example_code_3: "```\n_ Hoe gaat het?\n_\n```\n"
- story_text: "Nu je het`{print}` commando onder de knie hebt, is het tijd voor een nieuw commando: `{ask}`. Met het`{ask}` commando, kun je een vraag stellen. Kijk maar:\n"
+ story_text: "## Het vraag commando\nNu je het`{print}` commando onder de knie hebt, is het tijd voor een nieuw commando: `{ask}`. Met het`{ask}` commando, kun je een vraag stellen. Kijk maar:\n"
example_code: "```\n{print} Hallo!\n{ask} Wat is jouw naam?\n```\n"
- story_text_2: "Als je wil dat de computer jouw antwoord ook herhaalt, kun je het `{echo}` commando gebruiken. Let op: Je antwoord wordt herhaald aan het einde van de zin. In het voorbeeld komt jouw antwoord dus na Hoi.\n"
+ story_text_2: "## Het echo commando\nAls je wil dat de computer jouw antwoord ook herhaalt, kun je het `{echo}` commando gebruiken. Let op: Je antwoord wordt herhaald aan het einde van de zin. In het voorbeeld komt jouw antwoord dus na Hoi.\n"
story_text_3: "### Opdracht \nProbeer het`{ask}`commando en het`{echo}` commando uit. Vul eerst een goede code in op de plek van het streepje om het programma aan de praat te krijgen.\nStel daarna nog twee vragen door het `{ask}` commando te gebruiken. Gebruik na elke `{ask}` ook een `{echo}` om het antwoord op het scherm te tonen\n"
start_code: "{print} Hallo!\n{ask} Wat is jouw naam?\n{echo} Hoi\n"
2:
- story_text: "## Nu we **variabelen** in onze codes kunnen gebruiken, hebben we het `{echo}` commando niet langer nodig.\nWe kunnen variabelen gebruiken om antwoorden in op te slaan. Hierdoor kunnen we antwoorden op meerdere vragen gebruiken in onze codes.\nKijk maar eens naar het voorbeeld:\n\nOp deze manier worden je programma's steeds interactiever!\n"
- example_code: "```\nnaam {is} {ask} Wat je je naam?\n{print} Hoi naam\nleeftijd {is} {ask} Hoe oud ben je?\n{print} naam is leeftijd jaar oud\n```\n"
- story_text_2: "### Opdracht\nJe hebt in het vorige avontuur al geleerd hoe je variabelen kunt instellen met het`{is}` commando.\nDaar heb je minstens 3 variabelen gemaakt en ze gebruikt met een print commando.\nNu gaan we de variabelen intercatief maken in plaats van ze in te stellen met het `{is}` commando. \n\nKopieer je code van het vorige avontuur en maak de variabelen interactief door `{ask}` commando's te gebruiken.\n"
- example_code_2: "```\nlievelingsdier {is} {ask} Wat is je lievelingsdier?\n{print} Ik hou van lievelingsdier\n```\n"
+ story_text: "## Het vraag commando\nNu we **variabelen** in onze codes kunnen gebruiken, hebben we het `{echo}` commando niet langer nodig.\nWe kunnen variabelen gebruiken om antwoorden in op te slaan. Hierdoor kunnen we antwoorden op meerdere vragen gebruiken in onze codes.\nKijk maar eens naar het voorbeeld:\n\nOp deze manier worden je programma's steeds interactiever!\n"
+ example_code: "```\nnaam {is} {ask} Wat is je naam?\n{print} Hoi naam\nleeftijd {is} {ask} Hoe oud ben je?\n{print} naam is leeftijd jaar oud\n```\n"
+ story_text_2: "### Opdracht\nJe hebt in het vorige avontuur al geleerd hoe je variabelen kunt instellen met het`{is}` commando.\nDaar heb je minstens 3 variabelen gemaakt en ze gebruikt met een print commando.\nNu gaan we de variabelen interactief maken in plaats van ze in te stellen, zoals we deden in ons voorbeeld. \n\nKopieer je code van het vorige avontuur en maak de variabelen interactief door `{ask}` commando's te gebruiken.\n"
+ example_code_2: "```\nlievelingsdier is ask Wat is je lievelingsdier?\nprint Ik hou van lievelingsdier\n```\n"
start_code: "naam {is} {ask} Hoe heet je?\n{print} Hoi naam\nleeftijd {is} {ask} Hoe oud ben je?\n{print} naam is leeftijd jaar oud."
- name: "vraag"
+ name: "{ask}"
description: Introduction ask command
- default_save_name: ask_command
+ default_save_name: vraag_commando
quotation_marks:
description: Introduction quotation marks
levels:
@@ -2799,11 +2805,11 @@ adventures:
{print} 'INDRINGER!'
{print} 'Je kunt deze computer niet gebruiken!'
```
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
repeat_command_2:
- name: Herhaal 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -2859,7 +2865,7 @@ adventures:
description: Introducing maths
default_save_name: maths
elif_command:
- name: Elif
+ name: "{elif}"
description: elif
levels:
17:
@@ -2876,18 +2882,18 @@ adventures:
levels:
2:
story_text: "Nu je `{ask} hebt geleerd te gebruiken, kun je de steen, papier, schaar code ook interactief maken!\n\n### Opdracht\nMaak de steen, papier, schaarcode interactief door met `{ask}` commando.\n"
- example_code: "```\nckeuze is _\n{print} Ik kies keuze\n```\n"
+ example_code: "```\nkeuze is _\n{print} Ik kies keuze\n```\n"
start_code: "# place your code here"
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
2:
- story_text: "**Variabelen**\nJe kunt een waarde in een woord opslaan met het commando `{is}`. Dit noemen we een **variabele**. In dit voorbeeld hebben we een variabele gemaakt die 'naam' heet en een variabele 'leeftijd'. Je kunt een variabele overal in de zin plaatsen waar je wil en Hedy verplaatst de variabele dan met de waarde. Kijk maar:\n"
+ story_text: "## Variabelen\nJe kunt een waarde in een woord opslaan met het commando `{is}`. Dit noemen we een **variabele**. In dit voorbeeld hebben we een variabele gemaakt die 'naam' heet en een variabele 'leeftijd'. Je kunt een variabele overal in de zin plaatsen waar je wil en Hedy vervangt de variabele dan voor de waarde. Kijk maar:\n"
example_code: "```\nnaam {is} Hedy\nleeftijd {is} 15\n{print} naam is leeftijd jaar oud\n```\n"
story_text_2: "### Opdracht\nTijd om je eigen variabelen te maken!\nIn het voorbeeld hebben we de variabele 'lievelingsdier' gemaakt. In regel 1 wordt de variabele 'ingesteld', en in regel 2 gebruiken we de variabele met een `{print}`.\nMaak eerst ons voorbeeld af door jouw lievelingsdier in te vullen op de plek van het streepje. Bedenk daarna zelf minstens 3 van zulk soort codes. Kies daarbij een variabele en stel hem in met het `{is}` commando. Gebruik daarna de variabele in een zin met een `{print}` commando, zoals wij in het voorbeeld hebben gedaan.\n"
- example_code_2: "```\nlievelingsdier is _\n{print} Ik hou van favorite_animals\n```\n"
+ example_code_2: "```\nlievelingsdier is _\n{print} Ik hou van lievelingsdier\n```\n"
start_code: "naam {is} Hedy\nleeftijd {is} 15\n{print} naam is leeftijd jaar oud."
14:
start_code: |-
@@ -2926,7 +2932,7 @@ adventures:
{print} 'Jij bent Hedy niet'
```
random_command:
- name: willekeurig
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -2940,16 +2946,12 @@ adventures:
dieren {is} hond, kat, kangoeroe
{print} dieren {at} {random}
```
-
- story_text_2: |-
- Je kunt in dit level ook dingen aan een lijstje toevoegen met het commando `{add}`. Daarnaast kun je dingen van het lijstje verwijderen. Dat doe je met `{remove}`.
-
+ story_text_2: |
+ Je kunt {at} {random} ook in een zin gebruiken.
example_code_2: |
```
- taarten {is} aardbei, chocolade
- {add} appel {to_list} taarten
- {remove} chocolade {from} taarten
- {print} taarten {at} {random}
+ eten {is} broodje, pizza, salade, burrito
+ {print} Ik ga een eten {at} {random} lunchen.
```
start_code: "dieren {is} hond, kat, kangoeroe\n{print} dieren {at} {random}\n"
story_text_3: "### Opdracht\nProbeer het `{at} {random}` commando uit door je eigen gameshow te maken (zoals Miljoenenjacht op tv). De kandidaat kiest een koffer of een deur waarachter een grote prijs verstopt kan zitten!\nLukt het jou om zo'n programma te maken? De eerste regels zijn alvast te vinden in het voorbeeld\n"
@@ -2975,7 +2977,7 @@ adventures:
{print} 'is ' geluksgetallen[i]
```
add_remove_command:
- name: voeg toe en verwijder uit
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -2988,7 +2990,7 @@ adventures:
example_code_3: "```\n{print} Verrassingsmilkshake\nsmaken {is} aardbei, chocolade, vanille\nhoop {is} {ask} Welke smaak hoop je dat het wordt?\n_\nallergie {is} {ask} Voor welke smaak ben je allergsich?\n_\n{print} Je krijgt een {at} {random} milkshake\n```\n"
start_code: "dieren {is} hond, kat, kangoeroe\nleuk {is} {ask} Welk dier vind jij leuk?\n{add} leuk {to_list} dieren\nniet_leuk {is} {ask} Welk dier vind jij niet leuk?\n{remove} niet_leuk {from} dieren\n{print} Ik kies dieren {at} {random}\n"
sleep_command:
- name: slaap
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -3006,7 +3008,7 @@ adventures:
{sleep} 2
{print} groen!
if_command:
- name: als anders
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -3037,7 +3039,7 @@ adventures:
example_code: "```\nnaam {is} {ask} 'Hoe heet je?'\n{if} naam {is} Hedy\n {print} 'Welkom Hedy'\n {print} 'Jij mag computeren!'\n```\n"
story_text: "Je hebt al geleerd hoe je een blok aan regels code kunt herhalen met`{repeat}`.\nJe kunt nu ook inspringen na het {if} of {else} commando om zo'n blok te vormen.\nKijk maar naar het voorbeeld.\n\n### Opdracht\nVoeg een {else} commando toe aan de voorbeeldcode. Maak een blok van de regels code door in te springen. Inspirngen doe je door de regel te starten met 4 spaties.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -3061,7 +3063,7 @@ adventures:
{if} lievelingskleur {in} mooie_kleuren {print} 'mooi!'
{else} {print} 'mwah'
for_command:
- name: voor
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -3097,7 +3099,7 @@ adventures:
{print} 'Wie niet weg is, is gezien'
```
and_or_command:
- name: en of
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -3117,7 +3119,7 @@ adventures:
{print} 'Jij bent de echte Hedy!'
```
while_command:
- name: zolang
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -3135,6 +3137,39 @@ adventures:
Dus bij de voorbeeldcode gaan we door totdat er een goed antwoord is gegeven.
Als er nooit een goed antwoord wordt gegeven, dan stopt de loop nooit!
example_code: "```\nantwoord = 0\n{while} antwoord != 25\n antwoord = {ask} 'What is 5 times 5?'\n{print} 'Je hebt een correct antwoord gegeven'\n```\n"
+ clear_command:
+ name: "{clear}"
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: |
+ print '3'
+ sleep
+ clear
+ print '2'
+ sleep
+ clear
+ print '1'
+ sleep
+ clear
+ print 'VERRASSING!'
+ story_text: |
+ Tijd voor nog een nieuw commando! Met de code `{clear}` wis je alle tekst van je scherm. Zo kun je voorkomen dat je uitvoerscherm te vol raakt.
+ Let op! Gebruik bij het `{clear}` commando ook altijd een `{sleep}` anders wist Hedy je scherm zo vlug dat je de tekst niet eens gezien hebt!
+ example_code: |
+ ```
+ print '3'
+ sleep
+ clear
+ print '2'
+ sleep
+ clear
+ print '1'
+ sleep
+ clear
+ print 'VERRASSING!'
+ ```
harry_potter:
name: Harry Potter
description: Harry Potter adventures
diff --git a/content/adventures/pa_PK.yaml b/content/adventures/pa_PK.yaml
index 01095762399..34f3a1378d8 100644
--- a/content/adventures/pa_PK.yaml
+++ b/content/adventures/pa_PK.yaml
@@ -665,7 +665,7 @@ adventures:
description: Try linking a keyboard key to a command!
default_save_name: Pressed
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -684,7 +684,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -703,7 +703,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -720,7 +720,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -744,7 +744,7 @@ adventures:
start_code: "{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'"
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
rock_2:
@@ -766,7 +766,7 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -789,7 +789,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -802,7 +802,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -811,7 +811,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -849,7 +849,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -864,7 +864,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -910,7 +910,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/pl.yaml b/content/adventures/pl.yaml
index f67fa97363e..77fd6781155 100644
--- a/content/adventures/pl.yaml
+++ b/content/adventures/pl.yaml
@@ -6,10 +6,10 @@ adventures:
levels:
1:
start_code: '{print} witaj świecie!'
- story_text: "Na Poziomie 1 nauczysz się używać komend `{print}`, `{ask}` i `{echo}`.\nWpisz swój kod w polu programowania. Lub naciśnij zielony przycisk w przykładowym bloku kodu, a kod zostanie wpisany za Ciebie!\nWypróbuj kod samodzielnie za pomocą zielonego przycisku „Uruchom kod” pod polem programowania.\n\nMożesz wypisać tekst na ekran przy użyciu komendy `{print}`. \n"
+ story_text: "Witaj w Hedy! Na Poziomie 1 nauczysz się pisać historię.\nWypróbuj kod, naciskając zielony przycisk pod polem programowania.\nGotowe? Świetnie, możesz udać się do następnej zakładki i nauczyć pierwszej komendy!\n"
2:
- story_text: "W poziomie 2 nauczymy się 2 nowych komend: `{is}` oraz `{sleep}`.\nMożesz nazwać słowo za pomocą `{is}`. Takie słowo nazywamy zmienną. W tym przykładzie stworzyliśmy zmienną nazwaną imię oraz zmienną nazwaną wiek. Możesz użyć słowa imię w dowolnym miejscu w swoim kodzie i zostanie ono zamienione przez Hedy w taki sposób:\n\nDzięki temu nie potrzebujesz już więcej komendy `{echo}`!\n"
- example_code: "```\nimię {is} Hedy\nwiek {is} 15\n{print} imię ma wiek lat\n```\n"
+ story_text: "Gratulację! Witamy na poziomie 2. Już stworzyliśmy trochę kodu za ciebie ;).\n\nW pierwszym poziomie mogłeś zauważyć, że komenda `{echo}` potrafi zapisywać tylko 1 bit informacji na raz.\n\nNa przykład, w przygodzie \"restauracja\", możesz użyć echo, kiedy klient chce coś pić, lub zjeść, ale nie dwie rzeczy równocześnie.\n"
+ example_code: "```\n{print} Witamy w Hedy's\n{ask} Co chciałbyś/chciałabyś zjeść?\n{echo} Czyli chcesz\n{ask} Czego chciałbyś/chciałabyś się napić?\n{echo} Czyli chcesz\n```\n"
story_text_2: "`{print}` wciąż działa tak samo, ale komenda `{ask}` zmieniła się. Musisz użyć zmiennej również w komendzie `{ask}`. Wygląda to tak:\n"
start_code: '{print} witaj świecie!'
3:
@@ -755,12 +755,12 @@ adventures:
example_code: "```\n{for} liczba {in} {range} _ {to} _\n {print} liczba\n{print} 'Szczęśliwego Nowego Roku!'\n```\n"
start_code: '# tutaj umieść swój kod'
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
1:
- story_text: "## The print command\nYou can print text to the screen using the `{print}` command.\n"
+ story_text: "## Komenda print\nMożesz wypisać tekst na ekran używając komendy `{print}`.\n"
story_text_2: "### Exercise\nIn Hedy you will find exercises in every adventure. An exercise allows you to practise the new commands and concepts, and lets you give your own twist to the example codes.\nIn this exercise you will see a pink blank space. You have to fill something in the place of the blank space before the code can be ran.\n\nFill in the `{print}` command in the blank space and then add five more lines of code. Each line has to start with a `{print}` command.\nHave fun!\n"
example_code: "```\n{print} Hi there, programmer!\n{print} Welcome to Hedy!\n```\n"
example_code_2: "```\n_ Hello!\n```\n"
@@ -778,7 +778,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -797,7 +797,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -813,11 +813,11 @@ adventures:
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -844,7 +844,7 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -863,7 +863,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -880,7 +880,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -893,7 +893,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -902,7 +902,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -940,7 +940,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -957,7 +957,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -972,7 +972,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -1000,7 +1000,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1008,3 +1008,12 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
+ clear_command:
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/pt_BR.yaml b/content/adventures/pt_BR.yaml
index 01ef9326895..f3365304aa8 100644
--- a/content/adventures/pt_BR.yaml
+++ b/content/adventures/pt_BR.yaml
@@ -6,24 +6,26 @@ adventures:
levels:
1:
story_text: |
- No Nível 1 você pode usar os comandos `{print}`, `{ask}` e `{echo}`.
- Digite seu código no campo de programação. Ou pressione o botão verde no bloco de código de exemplo, e o código será digitado para você!
- Experimente o código você mesmo com o botão verde 'Executar código' abaixo do campo de programação.
+ Bem-vindo(a) a Hedy! No Nível 1 você pode começar escrevendo uma história.
- Você pode imprimir texto na tela usando o comando `{print}`.
+ Experimente o código você mesmo com o botão 'Executar código' verde debaixo do campo de programação.
+
+ Preparado? Então vá para a próxima aba para aprender o seu primeiro comando!
start_code: "{print} olá mundo!"
2:
story_text: |
- No nível 2 aprendemos dois novos comandos: `{is}` e `{sleep}`.
- Você pode nomear uma palavra com `{is}`. Isso é chamado de variável. Neste exemplo, criamos uma variável chamada nome e uma variável chamada idade. Você pode usar a palavra nome em qualquer lugar do seu código e ela será substituída pela Hedy, assim:
-
- Desta forma você não precisa mais do comando `{echo}`!
+ Parabéns! Você chegou ao nível 2.Você provavelmente já fez alguns códigos incríveis!
+ No primeiro nível você pode ter notado que o comando `{echo}` só pode salvar um pouco de informação de cada vez.
+ Por exemplo, na aventura no restaurante, você podia ecoar o que o cliente queria comer, ou o que ele queria beber, mas não os dois em uma mesma frase.
start_code: "{print} olá mundo!"
- example_code: "```\nnome {is} Hedy\nidade {is} 15\n{print} nome tem idade anos\n```\n"
- story_text_2: "`{print}` ainda funciona da mesma forma, mas o comando `{ask}` mudou. Você precisa usar uma variável no comando `{ask}` também. Se parece com isso:\n"
+ example_code: "```\n{print} Bem vindo ao Hedy's\n{ask} O que gostaria de comer?\n{echo} Então você quer\n{ask} O que gostaria de beber?\n{echo} Então você quer\n```\n"
+ story_text_2: "Se o jogador digitar um hambúrguer e um refrigerante, você não pode dizer \"então você quer um hambúrguer e um refrigerante\", mas sim tem que fazer duas linhas separadas.\nAlém disso, o comando `{echo}` somente ecoa a palavra no final da frase. Então você não pode dizer \"o seu hambúrguer vai estar pronto daqui a pouco!\".\n\nIsso muda no nível 2. No nível 2 você vai aprender a trabalhar com variáveis, que lhe permitem salvar múltiplos pedaços de informações e imprimi-los onde você quiser.\nEntão vamos para a próxima aba!\n"
3:
story_text: |
- No nível 3 você pode fazer uma lista. Você pode deixar o computador escolher algo aleatório da lista. Você faz isso com `{at} {random}`.
+ No último nível você aprendeu o que é uma variável e como usá-las para fazer sua aventura mais interativa.
+ Mas... isso não é a única coisa que você pode fazer com variáveis! Você também pode usar variáveis para fazer listas.
+ E você pode até deixar a Hedy escolher uma palavra aleatória da lista, o que lhe permite criar jogos de verdade!
+ Dê uma olhada na próxima aba!
start_code: "{print} olá mundo!"
4:
start_code: "{print} 'Olá mundo'"
@@ -828,7 +830,7 @@ adventures:
name: Key presses
description: Try linking a keyboard key to a command!
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -861,7 +863,7 @@ adventures:
description: Harry Potter adventures
default_save_name: Harry Potter
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -884,7 +886,7 @@ adventures:
example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n"
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -903,7 +905,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -922,7 +924,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -939,7 +941,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -952,7 +954,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -961,7 +963,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -978,7 +980,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -1010,7 +1012,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -1027,7 +1029,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -1055,7 +1057,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1064,7 +1066,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1073,7 +1075,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1081,3 +1083,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/pt_PT.yaml b/content/adventures/pt_PT.yaml
index a4c6501be74..649069f022d 100644
--- a/content/adventures/pt_PT.yaml
+++ b/content/adventures/pt_PT.yaml
@@ -269,7 +269,7 @@ adventures:
Podemos fazê-lo da seguinte maneira.
- example_code: |
+ example_code: |2
```
animais is coruja, cobra, raposa
@@ -278,7 +278,7 @@ adventures:
story_text_2: |
The command `{add}` can also come in handy in your story. For example
- example_code_2: |
+ example_code_2: |2
{print} He hears a sound
animals {is} 🐿, 🦔, 🦇, 🦉
@@ -288,7 +288,7 @@ adventures:
```
story_text_3: |
This is an example of the `{remove}` command in your story
- example_code_3: |
+ example_code_3: |2
```
{print} His backpack got way too heavy.
@@ -748,7 +748,7 @@ adventures:
story_text: |
In this level you can use maths to calculate the total price of your customer's order, which can make your virtual restaurant more realistic.
- example_code: |
+ example_code: |2
You can make a simple restaurant code, like this:
```
@@ -832,7 +832,7 @@ adventures:
food = {ask} 'What would you like to eat as your ' course '?'
{print} food ' will be your ' course
```
- story_text_2: |
+ story_text_2: |2
Of course, you could also order for multiple people!
example_code_2: |
@@ -1314,11 +1314,11 @@ adventures:
start_code: "{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'"
story_text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need `:` at the line before the indentation.\n"
example_code: "```\n{for} i {in} {range} 1 {to} 10:\n {print} i\n{print} 'Ready or not, here I come!'\n```\n"
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -1337,7 +1337,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -1386,7 +1386,7 @@ adventures:
start_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal"
story_text: "## For\nIn this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements.\n`{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces."
example_code: "```\nanimals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal\n```\n"
- name: for
+ name: "{for}"
description: for command
default_save_name: for
while_command:
@@ -1395,11 +1395,11 @@ adventures:
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
start_code: "answer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'"
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1440,11 +1440,11 @@ adventures:
start_code: "fruit = ['apple', 'banana', 'cherry']\n{print} fruit[random]"
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
- name: random
+ name: "{random}"
description: introducing at random command
add_remove_command:
default_save_name: add_remove_command
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
levels:
3:
@@ -1456,7 +1456,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1479,10 +1479,10 @@ adventures:
start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -1493,7 +1493,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -1510,7 +1510,7 @@ adventures:
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -1540,7 +1540,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1548,3 +1548,12 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
diff --git a/content/adventures/ro.yaml b/content/adventures/ro.yaml
index 54f84086149..cc1a1228cdf 100644
--- a/content/adventures/ro.yaml
+++ b/content/adventures/ro.yaml
@@ -741,7 +741,7 @@ adventures:
default_save_name: Pressed
name: Key presses
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -764,7 +764,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -773,7 +773,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -792,7 +792,7 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
- name: elif
+ name: "{elif}"
description: elif
rock_2:
name: Rock, paper, scissors 2
@@ -804,7 +804,7 @@ adventures:
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -823,7 +823,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -842,7 +842,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -859,7 +859,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -872,7 +872,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -889,7 +889,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -921,7 +921,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -938,7 +938,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -968,7 +968,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -977,7 +977,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -994,3 +994,12 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
diff --git a/content/adventures/ru.yaml b/content/adventures/ru.yaml
index f829457732c..48fedb6eb3c 100644
--- a/content/adventures/ru.yaml
+++ b/content/adventures/ru.yaml
@@ -789,10 +789,10 @@ adventures:
default_save_name: Pressed
name: Key presses
print_command:
- name: print
+ name: "{print}"
levels:
1:
- story_text: "## The print command\nYou can print text to the screen using the `{print}` command.\n"
+ story_text: "## Команда печати\nТы можешь напечатать текст на экране с помощью команды `{print}`.\n"
story_text_2: "### Exercise\nIn Hedy you will find exercises in every adventure. An exercise allows you to practise the new commands and concepts, and lets you give your own twist to the example codes.\nIn this exercise you will see a pink blank space. You have to fill something in the place of the blank space before the code can be ran.\n\nFill in the `{print}` command in the blank space and then add five more lines of code. Each line has to start with a `{print}` command.\nHave fun!\n"
example_code: "```\n{print} Hi there, programmer!\n{print} Welcome to Hedy!\n```\n"
example_code_2: "```\n_ Hello!\n```\n"
@@ -812,7 +812,7 @@ adventures:
description: Introduction print command
default_save_name: print
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -831,7 +831,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -844,7 +844,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -900,7 +900,7 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -919,7 +919,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -936,7 +936,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -945,7 +945,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -962,7 +962,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -979,7 +979,7 @@ adventures:
story_text: "### Repeat commands and indentation\nIn this level you can repeat multiple lines of code with only 1 repeat command.\nYou do this by making a block of lines that you want to repeat.\nThe lines in this block will need **indentation** .\nThat means putting four spaces at the beginning of each line. You will also have to indent when you just want to create a block of one line.\n"
example_code: "```\n{repeat} 5 {times}\n {print} 'Hello everyone'\n {print} 'This is all repeated 5 times'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -994,7 +994,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -1007,7 +1007,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1016,7 +1016,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1025,7 +1025,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1042,3 +1042,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/sq.yaml b/content/adventures/sq.yaml
index 897b70eac15..67ea884d7d0 100644
--- a/content/adventures/sq.yaml
+++ b/content/adventures/sq.yaml
@@ -686,7 +686,7 @@ adventures:
name: Key presses
description: Try linking a keyboard key to a command!
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -709,7 +709,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -718,7 +718,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -737,7 +737,7 @@ adventures:
and_or_command:
description: introducing and or
default_save_name: and or
- name: and or
+ name: "{and} & {or}"
levels:
13:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
@@ -762,7 +762,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -781,7 +781,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -800,7 +800,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -817,7 +817,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -830,7 +830,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -847,7 +847,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -879,7 +879,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -894,7 +894,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -922,7 +922,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -931,7 +931,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -939,3 +939,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/sr.yaml b/content/adventures/sr.yaml
index 003a88af80a..4c281499509 100644
--- a/content/adventures/sr.yaml
+++ b/content/adventures/sr.yaml
@@ -665,7 +665,7 @@ adventures:
description: Try linking a keyboard key to a command!
default_save_name: Pressed
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -682,7 +682,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -691,7 +691,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -708,7 +708,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -739,7 +739,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -762,7 +762,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -781,7 +781,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -800,7 +800,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -813,7 +813,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -845,7 +845,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -862,7 +862,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -910,7 +910,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/sv.yaml b/content/adventures/sv.yaml
index 8d995a9f8c5..d75dc1150c9 100644
--- a/content/adventures/sv.yaml
+++ b/content/adventures/sv.yaml
@@ -109,9 +109,9 @@ adventures:
story_text: "Med kommandona `{and}` och `{or}` kan du göra dina berättelser mer flexibla. Du kan ställa två frågor och svara baserat på båda svaren.\n\n### Övning 1\nTitta på exempelkoden och gör den klar. Lägg sedan till minst två ytterligare `{if}` -satser med `{and}` eller `{or}`.\n\n### Övning 2\nHitta en berättelse från en tidigare nivå och lägg till ett `{and}` eller `{or}`.\n"
example_code: "```\n{print} 'Vår hjälte går genom skogen'\n{print} 'Vägen delar sig på två håll'\nväg = {ask} 'Vilken väg ska hon välja?'\nvapen = {ask} 'Vilket vapen drar hon?'\n{if} väg {is} 'vänster' {and} vapen {is} 'svärd'\n _\n```\n"
4:
- example_code: "```\nname {is} {ask} _ Vad heter du? _\n{print} Huvudpersonen heter _ namn\n{print} namn _ ska nu vandra i skogen _\n{print} namn _ är lite rädd _\ndjur {is} 🦔, 🐿, 🦉, 🦇\n{print} _ Han hör ljudet av _ djur {at} {random}\n{print} namn _ är rädd för att detta är en trollskog _\n```\n"
+ example_code: "```\nname {is} {ask} _ Vad heter du? _\n{print} Huvudpersonen heter _ namn\n_\n_\n{print} namn _ ska nu vandra i skogen _\n{print} namn _ är lite rädd _\ndjur {is} 🦔, 🐿, 🦉, 🦇\n{print} _ Han hör ljudet av _ djur {at} {random}\n{print} namn _ är rädd för att detta är en trollskog _\n```\n"
start_code: "{print} 'Din berättelse skrivs ut här!'"
- story_text: "Du kanske har märkt att det fortfarande finns ett problem på de tidigare nivåerna. Försökte du skriva ut en mening som innehöll ordet namn? T.ex. `{print}` mitt namn är namn.\nDu kan lösa det på den här nivån. Du måste använda citattecken runt allt du ska skriva ut.\n\n### Övning\nKopiera exempelkoden och få den att funka genom att lägga till citattecken på raderna.\n\n### Övning 2\nGå tillbaka till föregående nivå och kopiera koden för din berättelse. Få koden att fungera på den här nivån genom att lägga till citattecken på rätt ställen.\nTänk efter: variablerna i din egen berättelse ska stå utanför citattecknen. Precis som den andra raden i exempelkoden. På den raden är variabelns namn placerat utanför citattecken.\n"
+ story_text: "Du kanske har märkt att det fortfarande finns ett problem i de tidigare nivåerna. Försökte du skriva ut en mening som innehöll ordet namn? Dvs. `{print}` mitt namn är namn.\nDu kan lösa det på den här nivån. Du måste använda citattecken runt allt du ska skriva ut.\n\n### Övning\nKopiera exempelkoden och avsluta den genom att lägga till citattecken på de tomma fälten på rad 1 och 2.\nDe tomma fälten på rad 3 och 4 ska inte ersättas med citattecken, utan ett `{sleep}`- och ett `{clear}`-kommando. Kan du få det att fungera?\n\n### Övning 2\nGå tillbaka till föregående nivå och kopiera din berättelsekod. Få koden att fungera på den här nivån genom att lägga till citattecken på rätt ställen.\nTänk på: Variablerna i din egen berättelse ska vara utanför citattecknen. Precis som den andra raden i exempelkoden. På den raden placeras variabelnamnet utanför citattecken.\n"
8:
story_text: "På den här nivån kan du använda flera rader i dina `{if}` -kommandon; på så sätt kan du uppgradera ditt glada eller sorgliga slut!\n\n### Övning 1\nExempelkoden visar två olika slut; ett där karaktärerna hoppar i en tidsmaskin och ett där de inte gör det.\nFyll i tomrummen med minst en mening per slut.\n**Extra** Gör berättelsen längre. Vad händer i berättelsen? Du kan också lägga till ett andra `{ask}`-kommando med olika alternativ.\n\n### Övning 2\nGå tillbaka till dina sparade program och välj ditt berättelseprogram från nivå 5. Skriv nu ett bra och ett dåligt slut på minst tre rader vardera!\n"
example_code: "```\n{print} 'ÅH NEJ! T-rex närmar sig!\"\nend = {ask} 'Vill du ha ett lyckligt eller sorgligt slut?'\n{if} slut {is} lyckligt\n {print} 'I sista ögonblicket hoppar Richard tillbaka in i tidsmaskinen!'\n {print} _\n{else}\n {print} 'Åh nej! Richard är för långsam ...\"\n {print} _\n```\n"
@@ -419,7 +419,7 @@ adventures:
levels:
4:
start_code: '# skriv din kod här'
- story_text: "På den här nivån måste du använda citattecken när du använder kommandona `{print}` eller `{ask}`.\n\n### Övning\nLägg till citattecken i den här koden för att få det att fungera! Var försiktig: variabler ska inte stå inom citattecken.\n\n### Övning 2\nGå tillbaka till förra nivån och kopiera din restaurangkod. Få koden att fungera på den här nivån genom att lägga till citattecken på rätt ställen.\n"
+ story_text: "På den här nivån måste du använda citattecken när du använder kommandona `{print}` eller `{ask}`.\n\n### Övning\nLägg till citattecken till den här koden för att få det att fungera! Var försiktig: variabler ska inte vara inom citattecken.\nAnvänd sedan kommandot `{clear}` för att bara visa en rad i taget på utdataskärmen.\n\n### Övning 2\nGå tillbaka till föregående nivå och kopiera din restaurangkod. Få koden att fungera på den här nivån genom att lägga till citattecken på rätt ställen och lägga till några `{clear}`-kommandon.\n"
example_code: "```\n_ Lägg till citattecken i den här koden _\n{print} Välkommen till Restaurang Chez Hedy!\n{print} Idag serverar vi pizza eller lasagne.\nmat {is} {ask} Vad vill du äta?\n{print} Bra val! Det är min älsklingsrätt!\ntopping {is} {ask} Vill du ha kött eller grönsaker till det?\n{print} mat med topping är på väg!\ndryck {is} {ask} Vad vill du dricka till?\n{print} Tack för din beställning.\n{print} Din mat och dryck kommer strax!\n```\n"
5:
story_text: "### Övning\nExempelkoden visar hur du kan programmera att du har slut på ett menyalternativ i din restaurang.\nKopiera din egen restaurangkod från de tidigare nivåerna. Skapa ett problem i din restaurang och koda det, som i exempelkoden.\nDu kan till exempel också få slut på ett menyalternativ, eller så tar du inte kreditkort eller så är glassmaskinen trasig.\n\n**Extrauppgift** Har du programmerat problemet och lämpliga svar? Försök sedan att lägga till fler `{if}`- och `{else}`-kommandon i din kod.\nFörsök att lägga till en `{if}` efter varje `{ask}`-kommando i din kod för att göra den så interaktiv som möjligt!\n"
@@ -677,7 +677,7 @@ adventures:
default_save_name: Tryckt
name: Knapptryckningar
ask_command:
- name: fråga
+ name: "{ask}"
levels:
1:
example_code_2: "```\n{print} Hej!\n{ask} Vad heter du?\n{echo} hej\n```\n"
@@ -709,7 +709,7 @@ adventures:
start_code: "djur {is} hund, katt, känguru\n{print} djur {at} {random}\n"
story_text_3: "### Övning\nProva kommandot `{at} {random}` genom att göra din egen spelshow (som de på tv) där du väljer en dörr eller resväska och den innehåller ett stort pris!\nKan du göra det? Vi har redan lagt in de första raderna i exempelkoden.\n"
example_code_3: "```\n{print} Den stora spelshowen!\n{print} Det står tre resväskor framför dig …\nvalt {is} {ask} Vilken resväska väljer du?\npriser {is} _\n_\n```\n"
- name: slump
+ name: "random"
description: introduktion av kommandot random
default_save_name: kommandot_random
sleep_command:
@@ -718,11 +718,11 @@ adventures:
start_code: "{print} Min favoritfärg är …\n{sleep} 2\n{print} grön!"
story_text: "Ett annat nytt kommando på denna nivå är `{sleep}`, som pausar ditt program i en sekund. Om du skriver ett tal efter kommandot {sleep}, pausas programmet i det antalet sekunder.\n\n### Övning\nÖva på det nya kommandot genom att göra egen kod där du använder kommandot {sleep} minst 3 gånger. För varje {sleep}-kommando ska paustiden variera.\n"
example_code: "```\n{print} Min favoritfärg är …\n{sleep} 2\n{print} grön!\n```\n"
- name: sov
+ name: "{sleep}"
description: introduktion till kommandot sov
default_save_name: kommandot_sov
if_command:
- name: om annars
+ name: "{if} & {else}"
description: Introduktion till kommandot if
default_save_name: kommandot_if
levels:
@@ -760,7 +760,7 @@ adventures:
description: Introduktion till citattecken
default_save_name: citattecken
repeat_command_2:
- name: Upprepa 2
+ name: "{repeat} 2"
description: kommandot upprepa 2
default_save_name: kommandot_upprepa_2
levels:
@@ -790,7 +790,7 @@ adventures:
story_text: "**Decimaltal**\nHittills har Hedy inte tillåtit decimaltal som 1.5, men nu tillåter vi det. Tänk på att datorer använder `.` för decimaltal."
example_code: "```\n{print} 'Två och en halv plus två och en halv är …'\n{print} 2.5 + 2.5\n```\n"
while_command:
- name: så länge
+ name: "{while}"
description: så länge
default_save_name: kommandot_så_länge
levels:
@@ -808,7 +808,7 @@ adventures:
example_code: "```\nhus = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nämnen = drycker, försvar mot svartkonst, förtrollningar, förvandling\nrädslor = Voldemort, spindlar, att misslyckas med sitt OWL-test\nnamn = Harry, Ron, Hermione\n_\n_ {print} namn ' är placerad i ' hus {at} {random}\n_ {print} namn ' är bra på ' ämnen {at} {random}\n_ {print} namn 's största rädsla är ' rädslor {at} {random}\n```\n"
start_code: '# skriv din kod här'
print_command:
- name: skriv
+ name: "{print}"
description: Introduktion till kommandot print
default_save_name: skriv
levels:
@@ -831,7 +831,7 @@ adventures:
story_text_3: Den sista ändringen vi behöver göra för att få Python-kod är att ändra `{ask}` till `{input}`.
example_code_3: "```\n{print}('Jag heter Hedy!')\nnamn = {input}('Vad heter du?')\n{print}('Du heter alltså ', namn)\n```\n"
is_command:
- name: är
+ name: "{is}"
description: introduktion till kommandot är
default_save_name: kommandot_är
levels:
@@ -850,7 +850,7 @@ adventures:
story_text_3: "Du kan också jämföra om något *inte* är lika med något annat med hjälp av `!=` så här:\n"
example_code_3: "```\nnamn = {ask} 'Vad heter du?'\n{if} namn != 'Hedy'\n {print} 'Du är inte Hedy'\n```\n"
add_remove_command:
- name: lägg till och ta bort
+ name: "{add} {to} & {remove} {from}"
description: introduktion till lägg till och ta bort
default_save_name: kommandot_lägg_till_ta_bort
levels:
@@ -863,7 +863,7 @@ adventures:
example_code_3: "```\n{print} Hemlig milkshake\nsmaker {is} jordgubb, choklad, vanilj\nhoppas {is} {ask} Vilken smak hoppas du på?\n_\nallergier {is} {ask} Är du allergisk mot några smaker?\n_\n{print} Du får en milkshake med smaker {at} {random}\n```\n"
start_code: "djur {is} hund, katt, känguru\ngillar {is} {ask} Vilket är ditt favoritdjur?\n{add} gillar {to_list} djur\nogillar {is} {ask} Vilket djur gillar du inte?\n{remove} ogillar {from} djur\n{print} Jag väljer djur {at} {random}"
in_command:
- name: i
+ name: "{in}"
description: Introduktion till kommandot i
default_save_name: kommandot_i
levels:
@@ -891,7 +891,7 @@ adventures:
story_text: "På den här nivån kan du inte bara använda flera rader med `{if}` och `{repeat}`, utan du kan också sätta ihop dem!\nI exemplet ser du ett `{if}`-kommando inuti ett `{repeat}`-kommando. Det är också tillåtet tvärtom, och en `{if}` är också tillåten i en `{if}` och en `{repeat}` i en `{repeat}`.\nTesta det!\n"
example_code: "```\n{repeat} 3 {times}\n mat = {ask} 'Vad vill du äta?'\n {if} mat {is} pizza\n {print} 'najs!'\n {else}\n {print} 'pizza är bättre'\n```\n"
for_command:
- name: för
+ name: "{for}"
description: kommandot för
default_save_name: för
levels:
@@ -904,7 +904,7 @@ adventures:
story_text: "På den här nivån lägger vi till en ny form av `{for}`. På tidigare nivåer använde vi `{for}` med en lista, men vi kan också använda `{for}` med tal.\nDet gör vi genom att lägga till ett variabelnamn, följt av `{in}` `{range}`. Vi skriver sedan talet vi vill börja på, `{to}` och talet vi vill sluta på.\n\nProva exemplet för att se vad som händer! På den här nivån måste alltid använda indrag på raderna under `{for}`-satserna."
example_code: "```\n{for} räknare {in} {range} 1 {to} 5\n {print} räknare\n```\n"
and_or_command:
- name: och eller
+ name: "{and} & {or}"
description: introduktion och eller
default_save_name: och eller
levels:
@@ -913,7 +913,7 @@ adventures:
story_text: "Vi ska nu lära oss `{and}` och `{or}`! Om du vill kontrollera två påståenden behöver du inte använda två `{if}` utan kan använda `{and}` och `{or}`.\n\nOm du använder `{and}` måste båda påståendena, vänster och höger om `{and}` vara sanna. Vi kan också använda `{or}`. Då behöver bara ett påstående vara korrekt."
example_code: "```\nnamn = {ask} 'vad heter du?'\nålder = {ask} 'hur gammal är du?'\n{if} namn {is} 'Hedy' {and} ålder {is} 2\n {print} 'Du är den riktiga Hedy!'\n```\n"
elif_command:
- name: annarsom
+ name: "{elif}"
description: annarsom
default_save_name: annarsom
levels:
@@ -930,3 +930,12 @@ adventures:
story_text: "Nu när du har lärt dig använda kommandot `{ask} kan du göra din sten, sax, påse-kod interaktiv också!\n\n### Övning\nGör sten, sax, påse-koden interaktiv genom att lägga till kommandot `{ask}` och en fråga.\n"
example_code: "```\nval är _\n{print} Jag väljer val\n```\n"
start_code: "# skriv din kod här"
+ clear_command:
+ levels:
+ 4:
+ example_code: "```\n{print} '3'\nsov\n{clear}\n{print} '2'\n{sleep}\n{clear}\n{print} '1'\n{sleep}\n{clear}\n{print} 'SURPRISE!'\n```\n"
+ start_code: "{print} '3'\n{sleep}\n{clear}\n{print} '2'\n{sleep}\n{clear}\n{print} '1'\n{sleep}\n{clear}\n{print} 'SURPRISE!'\n"
+ story_text: "Dags för ett nytt kommando! Med `{clear}` kan du sudda all text från utdataskärmen. På så sätt kan du hindra att skärmen blir för full med text.\nSe upp! Om du använder ett `{clear}`-kommando, så kom ihåg att använda ett `{sleep}` ovanför det. Annars kommer Hedy att sudda skärmen utan att ge dig tid att läsa!\n"
+ name: '{clear}'
+ description: kommandot sudda
+ default_save_name: kommandot_sudda
diff --git a/content/adventures/sw.yaml b/content/adventures/sw.yaml
index 2a107f9bbeb..1d8d0ade9cd 100644
--- a/content/adventures/sw.yaml
+++ b/content/adventures/sw.yaml
@@ -163,7 +163,7 @@ adventures:
story_text_2: |
The command `{add}` can also come in handy in your story. For example
- example_code_2: |
+ example_code_2: |2
{print} He hears a sound
animals {is} 🐿, 🦔, 🦇, 🦉
@@ -729,7 +729,7 @@ adventures:
name: Key presses
default_save_name: Pressed
print_command:
- name: print
+ name: "{print}"
levels:
1:
example_code: "```\n{print} Hi there, programmer!\n{print} Welcome to Hedy!\n```\n"
@@ -767,11 +767,11 @@ adventures:
story_text_2: "### Exercise\nIn the previous tab you have practised with setting variables with the `{is}` command.\nYou have created at least 3 variables and used them with a print command.\nNow, instead of setting the variables we want you to make the variables interactive, like we did in our example.\n\nCopy your code from the previous tab and make the variables interactive by using `{ask}` commands.\n"
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
is_command:
- name: is
+ name: "{is}"
levels:
14:
example_code: "```\nage = {ask} 'How old are you?'\n{if} age > 12\n {print} 'You are older than I am!'\n```\n"
@@ -790,7 +790,7 @@ adventures:
description: introducing is command
default_save_name: is_command
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -844,7 +844,7 @@ adventures:
name: Rock, paper, scissors 2
description: Part 2 of rock, paper, scissors
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -861,7 +861,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -874,7 +874,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -891,7 +891,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -902,7 +902,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -919,7 +919,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -934,7 +934,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -947,7 +947,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -956,7 +956,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -965,7 +965,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -982,3 +982,12 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/te.yaml b/content/adventures/te.yaml
index 56b400eebfc..feb410f0c50 100644
--- a/content/adventures/te.yaml
+++ b/content/adventures/te.yaml
@@ -665,7 +665,7 @@ adventures:
description: Try linking a keyboard key to a command!
default_save_name: Pressed
ask_command:
- name: ask
+ name: "{ask}"
levels:
1:
example_code_2: "```\n{print} Hello!\n{ask} What is your name?\n{echo} hello\n```\n"
@@ -684,7 +684,7 @@ adventures:
description: Introduction ask command
default_save_name: ask_command
is_command:
- name: is
+ name: "{is}"
levels:
14:
start_code: "age = {ask} 'How old are you?'\n{if} age < 13\n {print} 'You are younger than me!'\n{else}\n {print} 'You are older than me!'"
@@ -703,7 +703,7 @@ adventures:
description: introducing is command
default_save_name: is_command
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -721,12 +721,12 @@ adventures:
start_code: "animals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal"
story_text: "## For\nIn this level we learn a new code called `{for}`. With `{for}` you can make a list and use all elements.\n`{for}` creates a block, like `{repeat}` and `{if}` so all lines in the block need to start with 4 spaces."
example_code: "```\nanimals {is} dog, cat, blobfish\n{for} animal {in} animals\n {print} 'I love ' animal\n```\n"
- name: for
+ name: "{for}"
description: for command
default_save_name: for
and_or_command:
description: introducing and or
- name: and or
+ name: "{and} & {or}"
default_save_name: and or
levels:
13:
@@ -752,7 +752,7 @@ adventures:
description: Harry Potter adventures
default_save_name: Harry Potter
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -775,7 +775,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -792,7 +792,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -805,7 +805,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -822,7 +822,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -854,7 +854,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -871,7 +871,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -910,7 +910,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/th.yaml b/content/adventures/th.yaml
index b0f1338483c..1aec60f7780 100644
--- a/content/adventures/th.yaml
+++ b/content/adventures/th.yaml
@@ -684,11 +684,11 @@ adventures:
example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n"
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
ask_command:
- name: ask
+ name: "{ask}"
levels:
1:
story_text_2: "## The echo command\nIf you want the computer to repeat the answer back to you, you can use the `{echo}` command. Mind that the answer is echoed back at the end of the sentence, so it this example after hello.\n"
@@ -722,11 +722,11 @@ adventures:
example_code_2: "```\nname = {ask} 'What is your name?'\n{if} name == 'Hedy'\n {print} 'You are cool!'\n```\n"
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -752,7 +752,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -770,7 +770,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -787,7 +787,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -800,7 +800,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -809,7 +809,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -847,7 +847,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -864,7 +864,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -879,7 +879,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ default_save_name: clear_command
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ name: '{clear}'
+ description: clear command
diff --git a/content/adventures/tl.yaml b/content/adventures/tl.yaml
index 7ed30010a58..1631004eeea 100644
--- a/content/adventures/tl.yaml
+++ b/content/adventures/tl.yaml
@@ -665,7 +665,7 @@ adventures:
name: Key presses
description: Try linking a keyboard key to a command!
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -688,7 +688,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -705,7 +705,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -737,7 +737,7 @@ adventures:
description: Introduction quotation marks
default_save_name: quotation_marks
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -769,7 +769,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -788,7 +788,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -807,7 +807,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -820,7 +820,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -829,7 +829,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -846,7 +846,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -861,7 +861,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -874,7 +874,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -883,7 +883,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/tn.yaml b/content/adventures/tn.yaml
index 9813de597e2..f3ce9e05d06 100644
--- a/content/adventures/tn.yaml
+++ b/content/adventures/tn.yaml
@@ -678,11 +678,11 @@ adventures:
start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -696,7 +696,7 @@ adventures:
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
while_command:
default_save_name: while_command
- name: while
+ name: "{while}"
description: while
levels:
15:
@@ -713,7 +713,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -736,7 +736,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -755,7 +755,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -774,7 +774,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -791,7 +791,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -804,7 +804,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -813,7 +813,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -845,7 +845,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -862,7 +862,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/tr.yaml b/content/adventures/tr.yaml
index 2da987ae0b7..03db7a97398 100644
--- a/content/adventures/tr.yaml
+++ b/content/adventures/tr.yaml
@@ -22,7 +22,11 @@ adventures:
{echo} İstiyorsunuz
```
story_text_2: |
- `{print}` hâlâ aynı çalışıyor, ama `{ask}` komutu değişti. `{ask}` komutunda da bir değişken kullanman gerekiyor. Bu da şu şekilde görünüyor:
+ Oyuncu bir hamburger ve kola yazarsa, "yani hamburger ve kola istersiniz" diyemezsiniz, ancak iki ayrı satır yapmanız gerekir.
+ Ayrıca, '{echo}' komutu yalnızca cümlenin sonundaki sözcüğü yankılandırır. Yani "hamburgeriniz hemen geliyor!" diyemezsiniz.
+
+ Bu seviye 2'de değişir. Seviye 2'de, birden fazla bilgi parçasını kaydetmenize ve bunları istediğiniz herhangi bir yere yazdırmanıza izin veren değişkenlerle çalışmayı öğreneceksiniz.
+ Öyleyse bir sonraki sekmeye geçelim!
start_code: "{print} Merhaba Dünya!"
3:
story_text: |
@@ -1031,7 +1035,7 @@ adventures:
{print} 'those are' points ' point'
```
Can you make the code so that you get the total score for 8 dice? To do that, you have to cut and paste some lines of the code.
- example_code_2: |
+ example_code_2: |2
Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7!
start_code: "{print} 'What will the die indicate this time?'"
@@ -1107,10 +1111,10 @@ adventures:
start_code: "# place your code here"
3:
story_text: |
+ You can use the `{at} {random}` command to let the computer pick rock, paper or scissors!
- In this level we can enter lists and choose things from them.
- You first make a list with `{is}`. Then you can let the computer choose something from the list with `{at} {random}`.
- For example, you can let the computer pick from rock, paper and scissors.
+ ### Exercise
+ Finish the code by using the `{at} {random}` command.
example_code: |
```
@@ -2542,7 +2546,7 @@ adventures:
description: Try linking a keyboard key to a command!
name: Key presses
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -2574,7 +2578,7 @@ adventures:
description: Introducing maths
default_save_name: maths
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -2592,7 +2596,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -2615,7 +2619,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -2634,7 +2638,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -2653,7 +2657,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -2670,7 +2674,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -2683,7 +2687,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -2692,7 +2696,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -2709,7 +2713,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -2741,7 +2745,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -2756,7 +2760,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -2769,7 +2773,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -2778,7 +2782,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -2795,3 +2799,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/uk.yaml b/content/adventures/uk.yaml
index 662675a7f4d..ee8e4609873 100644
--- a/content/adventures/uk.yaml
+++ b/content/adventures/uk.yaml
@@ -673,7 +673,7 @@ adventures:
default_save_name: Pressed
description: Try linking a keyboard key to a command!
print_command:
- name: print
+ name: "{print}"
default_save_name: print
description: Introduction print command
levels:
@@ -696,7 +696,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -730,7 +730,7 @@ adventures:
description: Introduction quotation marks
default_save_name: quotation_marks
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -763,7 +763,7 @@ adventures:
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
rock_2:
@@ -785,7 +785,7 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -804,7 +804,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -823,7 +823,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -840,7 +840,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -849,7 +849,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -866,7 +866,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -877,7 +877,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -894,7 +894,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -909,7 +909,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -918,7 +918,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -926,3 +926,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ levels:
+ 4:
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ description: clear command
+ default_save_name: clear_command
diff --git a/content/adventures/ur.yaml b/content/adventures/ur.yaml
index dfcbf5fc34c..8749f0a9564 100644
--- a/content/adventures/ur.yaml
+++ b/content/adventures/ur.yaml
@@ -684,12 +684,12 @@ adventures:
example_code_2: "```\ntemperature = 25\n{print}('It is ', temperature, ' degrees outside')\n```\n"
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
add_remove_command:
description: introducing add to and remove from
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
default_save_name: add_remove_command
levels:
3:
@@ -701,7 +701,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -736,11 +736,11 @@ adventures:
example_code_2: "```\n{print} Hello!\n{ask} What is your name?\n{echo} hello\n```\n"
example_code_3: "```\n_ How are you doing?\n_\n```\n"
start_code: "{print} Hello!\n{ask} What is your name?\n{echo} hello\n"
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -759,7 +759,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -776,7 +776,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -785,7 +785,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -823,7 +823,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -840,7 +840,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -855,7 +855,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -883,7 +883,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "Now that you have learned how to use the `{ask} command, you can make your rock, paper, scissors code interavtive too!\n\n### Exercise\nMake the rock, paper, scissors code interactive by adding the `{ask}` command and a question to your rock, paper, scissors code.\n"
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/vi.yaml b/content/adventures/vi.yaml
index a0dca5b3764..3568e762241 100644
--- a/content/adventures/vi.yaml
+++ b/content/adventures/vi.yaml
@@ -1,12 +1,12 @@
adventures:
default:
name: Giới thiệu
- description: Level explanation
- default_save_name: intro
+ description: Giải thích cấp độ
+ default_save_name: phần giới thiệu
levels:
1:
start_code: '{print} hello world!'
- story_text: "In Level 1 you can use the commands `{print}`, `{ask}` and `{echo}`.\nType your code in the programming field. Or press the green button in the example code block, and the code will be typed for you!\nTry the code yourself with the green 'Run code' button under the programming field.\n\nYou can print text to the screen using the `{print}` command. \n"
+ story_text: "Ở Cấp độ 1, bạn có thể sử dụng các lệnh `{print}`, `{ask}` và `{echo}`.\nNhập mã của bạn vào trường lập trình. Hoặc nhấn vào nút màu xanh trong khối mã ví dụ, và mã sẽ được gõ tự động cho bạn!\nHãy thử mã của bạn bằng cách sử dụng nút 'Chạy mã' màu xanh dưới trường lập trình.\nBạn có thể in ra màn hình văn bản bằng cách sử dụng lệnh `{print}`.\n"
5:
story_text: "In level 5 there is something new, the `{if}`! With the `{if}` you can choose between two different options.\nThis code prints nice if you enter Hedy as a name, and boo! if you enter something else.\n`{ask}` and `{print}` still work like they did in level 4.\n"
example_code: "```\nname {is} {ask} 'what is your name?'\n{if} name {is} Hedy {print} 'nice' {else} {print} 'boo!'\n```\n"
@@ -32,12 +32,12 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nYou can use the square brackets as well to point out a place in the lists."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
2:
- story_text: "In level 2 we learn two new commands: `{is}` and `{sleep}`.\nYou can name a word with `{is}`. This is called a variable. In this example we made a variable called name and a variable called age. You can use the word name anywhere in your code and it will be replaced by Hedy, like this:\n\nThis way you no longer need the `{echo}` command!\n"
+ story_text: "Ở cấp độ 2, chúng ta học hai lệnh mới: `{is}` và `{sleep}`.\nBạn có thể đặt tên cho một từ bằng cách sử dụng lệnh `{is}`. Điều này được gọi là biến. Trong ví dụ này, chúng tôi tạo ra một biến có tên là \"name\" và một biến có tên là \"age\". Bạn có thể sử dụng từ \"name\" bất kỳ nơi nào trong mã của bạn và nó sẽ được thay thế bằng \"Hedy\", như thế này:\nNhư vậy, bạn không cần sử dụng lệnh `{echo}` nữa!\n"
example_code: "```\nname {is} Hedy\nage {is} 15\n{print} name is age years old\n```\n"
- story_text_2: "`{print}` still works the same, but the `{ask}` command has changed. You need to use a variable in the `{ask}` command as well. It looks like this:\n"
+ story_text_2: "`{print}` vẫn hoạt động như cũ, nhưng lệnh `{ask}` đã thay đổi. Bạn cần sử dụng một biến trong lệnh `{ask}` cũng như vậy. Nó trông như thế này:\n"
start_code: '{print} hello world!'
3:
- story_text: "In level 3 you can make a list. You can let the computer choose something random from the list. You do that with `{at} {random}`.\n"
+ story_text: "Ở cấp độ 3, bạn có thể tạo một danh sách. Bạn có thể để máy tính chọn ngẫu nhiên một phần tử từ danh sách đó. Bạn thực hiện điều đó bằng cách sử dụng `{at} {random}`.\n"
start_code: '{print} hello world!'
4:
start_code: "{print} 'Hello world'"
@@ -666,7 +666,7 @@ adventures:
name: Key presses
default_save_name: Pressed
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -689,7 +689,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -698,7 +698,7 @@ adventures:
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
story_text: "## The sleep command\nAnother new command in this level is `{sleep}`, which pauses your program for a second. If you type a number behind the {sleep} command, the program pauses for that amount of seconds.\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -716,7 +716,7 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
example_code: "```\nname = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'\n```\n"
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
rock_2:
@@ -738,7 +738,7 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -757,7 +757,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -776,7 +776,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -793,7 +793,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -806,7 +806,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -823,7 +823,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -855,7 +855,7 @@ adventures:
example_code_4: "```\nscore = 25\n{print} 'You got ' score\n```\n"
start_code: "name = {ask} 'What is your name?'\n{if} name = 'Hedy the Robot'\n {print} 'Hi there!'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -883,7 +883,7 @@ adventures:
story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n## Exercise\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n"
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
maths:
@@ -902,7 +902,7 @@ adventures:
story_text: "**Decimal numbers**\nSo far, Hedy did not allow for decimal numbers like 1.5, but now we do allow that. Note that computers use the `.` for decimal numbers."
example_code: "```\n{print} 'Two and a half plus two and a half is...'\n{print} 2.5 + 2.5\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -911,7 +911,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -919,3 +919,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/zh_Hans.yaml b/content/adventures/zh_Hans.yaml
index 2bdda010f03..0a893bca104 100644
--- a/content/adventures/zh_Hans.yaml
+++ b/content/adventures/zh_Hans.yaml
@@ -602,7 +602,7 @@ adventures:
story_text: |
在这一关,你可以用数学计算客人的订单总价,这会让你的虚拟餐厅更真实。
- example_code: |
+ example_code: |2
你可以写一段简单的餐厅代码,像这样:
```
@@ -821,7 +821,7 @@ adventures:
story_text: |
在上一级,你创造了你的第一台算命机器,但海蒂不会算任何东西,只会“{echo}”。
在这一级,你可以用变量和`{at} {random}`命令来真正让海蒂为你选择一个答案。比如看看这段代码:
- example_code: |
+ example_code: |2
在这个例子里,玩家可以向海蒂{ask}一个是非题,然后海蒂会任意选择一个答案。
```
@@ -1346,7 +1346,7 @@ adventures:
story_text: "在此级别中,您可以使用 `{for}` 数字 `{in}` `{range}` 命令倒计时到新年。\n\n### 练习\n填空并使代码正常工作!\n"
example_code: "```\n{for} 数字{in} {range} _{to} _\n {print} 数字\n{print} '新年快乐!'\n```\n"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -1417,7 +1417,7 @@ adventures:
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -1440,7 +1440,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -1459,7 +1459,7 @@ adventures:
example_code_2: "```\nfavorite_animals is ask What is your favorite animal?\nprint I like favorite_animals\n```\n"
start_code: "name {is} {ask} What is your name?\n{print} Hello name\nage {is} {ask} How old are you?\n{print} name is age years old."
is_command:
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
levels:
@@ -1478,7 +1478,7 @@ adventures:
story_text_3: "You can also compare if something is *not* equal to something else using `!=` like this:\n"
example_code_3: "```\nname = {ask} 'What is your name?'\n{if} name != 'Hedy'\n {print} 'You are not Hedy'\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -1491,7 +1491,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -1500,7 +1500,7 @@ adventures:
example_code: "```\n{print} My favorite colour is...\n{sleep} 2\n{print} green!\n```\n"
start_code: "{print} My favorite colour is...\n{sleep} 2\n{print} green!"
if_command:
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
levels:
@@ -1517,7 +1517,7 @@ adventures:
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -1528,7 +1528,7 @@ adventures:
example_code_2: "```\nanimals is dog, cow, sheep\nanswer is ask 'What is your favorite animal?'\n_ answer _ animals _ 'Mine too!'\n_ _ 'My favorite animals are dogs, cows and sheep'\n```\n"
start_code: "pretty_colors {is} green, yellow\nfavorite_color {is} {ask} 'What is your favorite color?'\n{if} favorite_color {in} pretty_colors {print} 'pretty!'\n{else} {print} 'meh'"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -1545,7 +1545,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -1560,7 +1560,7 @@ adventures:
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
story_text: "### In the block or not?\nIn this level you have to think carefully which lines of code should be in the block and which shouldn't.\nFor example: If you want to sing the song *the muffin man*. You only want the line with 'the muffin man' to be repeated twice.\nThis means the last line shouldn't start with indentation as it doesn't belong to the block.\nIf you do start the last line with indentation the song will turn out wrong.\n\n## Exercise\nEach line in the example code starts with a blank. Remove the blanks and try to figure out which line need indentation and which don't to make the muffin man song.\n"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -1573,7 +1573,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -1582,7 +1582,7 @@ adventures:
start_code: "name = {ask} 'what is your name?'\nage = {ask} 'what is your age?'\n{if} name {is} 'Hedy' {and} age {is} 2\n {print} 'You are the real Hedy!'"
story_text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two `{if}`s but can use `{and}` and `{or}`.\n\nIf you use `{and}`, both statements, left and right of the `{and}` need to be true. We can also use `{or}`. Then only one statement needs to be correct."
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -1591,7 +1591,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -1599,3 +1599,12 @@ adventures:
story_text: "In this level you can also use a new command: `{elif}`. `{elif}` is short for `{else}` `{if}` and you need it when you want to make 3 (or more!) options.\nCheck it out!\n"
example_code: "```\nprices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'\n```\n"
start_code: "prices = ['1 million dollars', 'an apple pie', 'nothing']\nyour_price = prices[{random}]\n{print} 'You win ' your_price\n{if} your_price == '1 million dollars' :\n {print} 'Yeah! You are rich!'\n{elif} your_price == 'an apple pie' :\n {print} 'Lovely, an apple pie!'\n{else}:\n {print} 'Better luck next time..'"
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/adventures/zh_Hant.yaml b/content/adventures/zh_Hant.yaml
index 5c676d93e0f..4a9d1fbe24a 100644
--- a/content/adventures/zh_Hant.yaml
+++ b/content/adventures/zh_Hant.yaml
@@ -665,7 +665,7 @@ adventures:
name: Key presses
description: Try linking a keyboard key to a command!
print_command:
- name: print
+ name: "{print}"
description: Introduction print command
default_save_name: print
levels:
@@ -688,7 +688,7 @@ adventures:
story_text_3: The final change we will need to make to get Python code is changing `{ask}` into `{input}`.
example_code_3: "```\n{print}('My name is Hedy!')\nname = {input}('What is your name?')\n{print}('So your name is ', name)\n```\n"
ask_command:
- name: ask
+ name: "{ask}"
description: Introduction ask command
default_save_name: ask_command
levels:
@@ -722,11 +722,11 @@ adventures:
story_text_2: "### Exercise\nTime to make your own variables!\nIn the example code we made an example of the variable `favorite_animals`. In line 1 the variable is set, and in line 2 we haved used the variable in a print command.\nFirstly, finish our example by filling in your favorite animal in the blanks. Then make at least 3 of these codes yourself. Pick a variable, and set the variable with the {is} command. Then use it with a {print} command, just like we did.\n"
example_code_2: "```\nfavorite_animals is _\n{print} I like favorite_animals\n```\n"
start_code: "name {is} Hedy\nage {is} 15\n{print} name is age years old"
- name: is
+ name: "{is}"
description: introducing is command
default_save_name: is_command
sleep_command:
- name: sleep
+ name: "{sleep}"
description: introducing sleep command
default_save_name: sleep_command
levels:
@@ -748,11 +748,11 @@ adventures:
start_code: "name {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n"
example_code: "```\nname {is} {ask} 'What is your name?'\n{if} name {is} Hedy\n {print} 'Welcome Hedy'\n {print} 'You can play on your computer!'\n```\n"
story_text: "## If... Else...\nYou have learned to repeat a block of lines of code after a `{repeat}` command.\nNow you can also use indentation to make blocks after a {if} or {else} command.\nCheck out the example code.\n\n### Exercise\nAdd an {else} command to the example code. Make a block of line using indentation. You do this by starting each line with 4 spaces.\n"
- name: if else
+ name: "{if} & {else}"
description: Introducing the if command
default_save_name: if_command
in_command:
- name: in
+ name: "{in}"
description: Introducing the in command
default_save_name: in_command
levels:
@@ -799,7 +799,7 @@ adventures:
description: Introducing maths
default_save_name: maths
and_or_command:
- name: and or
+ name: "{and} & {or}"
description: introducing and or
default_save_name: and or
levels:
@@ -817,7 +817,7 @@ adventures:
example_code: "```\nchoice is _\n{print} I choose choice\n```\n"
start_code: "# place your code here"
random_command:
- name: random
+ name: "{random}"
description: introducing at random command
default_save_name: random_command
levels:
@@ -834,7 +834,7 @@ adventures:
story_text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels.\nWe use square brackets to point out a place in a list. The {at} {random} command can not be used anymore."
example_code: "```\nfriends = ['Ahmed', 'Ben', 'Cayden']\nlucky_numbers = [15, 18, 6]\n{for} i {in} {range} 1 {to} 3\n {print} 'the lucky number of ' friends[i]\n {print} 'is ' lucky_numbers[i]\n```\n"
add_remove_command:
- name: add and remove
+ name: "{add} {to} & {remove} {from}"
description: introducing add to and remove from
default_save_name: add_remove_command
levels:
@@ -847,7 +847,7 @@ adventures:
example_code_3: "```\n{print} Mystery milkshake\nflavors {is} strawberry, chocolate, vanilla\nhope {is} {ask} What flavor are you hoping for?\n_\nallergies {is} {ask} Are you allergic to any flavors?\n_\n{print} You get a flavors {at} {random} milkshake\n```\n"
start_code: "animals {is} dog, cat, kangaroo\nlike {is} {ask} What is your favorite animal?\n{add} like {to_list} animals\ndislike {is} {ask} What animal do you not like?\n{remove} dislike {from} animals\n{print} I choose animals {at} {random}"
repeat_command:
- name: Repeat
+ name: "{repeat}"
description: repeat command
default_save_name: repeat_command
levels:
@@ -864,7 +864,7 @@ adventures:
story_text: "In this level you can not only use multiple lines with `{if}` and `{repeat}`, but you can also put them together!\nIn the example you see an `{if}` command within a `{repeat}` command. It is also allowed the other way around, and an `{if}` is also allowed in an `{if}` and a `{repeat}` in a `{repeat}`.\nGive it a try!\n"
example_code: "```\n{repeat} 3 {times}\n food = {ask} 'What do you want?'\n {if} food {is} pizza\n {print} 'nice!'\n {else}\n {print} 'pizza is better'\n```\n"
repeat_command_2:
- name: Repeat 2
+ name: "{repeat} 2"
description: repeat command 2
default_save_name: repeat_command_2
levels:
@@ -879,7 +879,7 @@ adventures:
example_code: "```\n_ {print} 'Do you know the muffin man?'\n_ {repeat} 2 {times}\n_ {print} 'The muffin man'\n_ {print} 'Do you know the muffin man, who lives on Drury Lane?'\n```\n"
start_code: "{repeat} 3 {times}\n {print} 'This line will be repeated...'\n {print} 'This one too...'\n{print} 'but this one will not!'"
for_command:
- name: for
+ name: "{for}"
description: for command
default_save_name: for
levels:
@@ -892,7 +892,7 @@ adventures:
story_text: "In this level, we add a new form of the `{for}`. In earlier levels, we used `{for}` with a list, but we can also use `{for}` with numbers.\nWe do that by adding a variable name, followed by `{in}` `{range}`. We then write the number to start at, `{to}` and the number to end at.\n\nTry the example to see what happens! In this level again, you will need to use indentations in lines below the `{for}` statements."
example_code: "```\n{for} counter {in} {range} 1 {to} 5\n {print} counter\n```\n"
while_command:
- name: while
+ name: "{while}"
description: while
default_save_name: while_command
levels:
@@ -901,7 +901,7 @@ adventures:
story_text: "We are going to learn a new loop, the `{while}` loop! We continue the loop as long as the statement is true.\nSo don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given.\nIf the correct answer is never given, the loop never ends!"
example_code: "```\nanswer = 0\n{while} answer != 25\n answer = {ask} 'What is 5 times 5?'\n{print} 'A correct answer has been given'\n```\n"
elif_command:
- name: elif
+ name: "{elif}"
description: elif
default_save_name: elif
levels:
@@ -918,3 +918,12 @@ adventures:
story_text: "### Exercise\nWe can also make a Harry Potter themed fortune teller. Fill in blanks such that 9 lines are printed.\n**Extra** Change the theme of the fortune teller into something else, such as your favorite book, film or tv show.\n"
example_code: "```\nhouses = Gryffindor, Slytherin, Hufflepuff, Ravenclaw\nsubjects = potions, defence against the dark arts, charms, transfiguration\nfears = Voldemort, spiders, failing your OWL test\nnames = Harry, Ron, Hermione\n_\n_ {print} name ' is placed in ' houses {at} {random}\n_ {print} name ' is great at ' subjects {at} {random}\n_ {print} name 's greatest fear is ' fears {at} {random}\n```\n"
start_code: '# place your code here'
+ clear_command:
+ name: '{clear}'
+ description: clear command
+ default_save_name: clear_command
+ levels:
+ 4:
+ start_code: "print '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n"
+ story_text: "Time for a new command! With `{clear}` you can clear all the text form your output screen. This way you can prevent your screen getting too full of text.\nBeware! If you are using a `{clear}` command, remember to use a `{sleep}` above it. Otherwise Hedy will clear your screen without giving you the time to read!\n"
+ example_code: "```\nprint '3'\nsleep\nclear\nprint '2'\nsleep\nclear\nprint '1'\nsleep\nclear\nprint 'SURPRISE!'\n```\n"
diff --git a/content/cheatsheets/nl.yaml b/content/cheatsheets/nl.yaml
index 4833034c495..5f9daaccf94 100644
--- a/content/cheatsheets/nl.yaml
+++ b/content/cheatsheets/nl.yaml
@@ -12,7 +12,7 @@
{echo} dus je lievelingskleur is
- name: "{print} emoji"
explanation: "Print een emoji met `{print}`."
- demo_code: "{print} \U0001F64B \U0001F30D ❗"
+ demo_code: "{print} 🙋 🌍 ❗"
- name: "{forward}"
explanation: "Een lijn tekenen met `{forward}`."
demo_code: "{forward} 100"
@@ -109,7 +109,7 @@
demo_code: |-
antwoord = {ask} 'Hoeveel is 10 plus 10?'
{if} antwoord {is} 20 {print} 'Goedzo!' {else} {print} 'Foutje'
-- name: "`{ask}` en `{if}` met turtle"
+- name: "`{ask}` en `{if}` met schildpad"
explanation: "De gebruiker vragen hoeveel hoeken hij wil."
demo_code: |-
hoeken = {ask} 'Hoeveel hoeken krijgt dit figuur?'
diff --git a/content/cheatsheets/sq.yaml b/content/cheatsheets/sq.yaml
index fec9a003f17..004b9b051c1 100644
--- a/content/cheatsheets/sq.yaml
+++ b/content/cheatsheets/sq.yaml
@@ -14,8 +14,8 @@
- name: '{in}'
explanation: Check elements with `{in}`.
demo_code: "pretty_colors {is} green, yellow\ncolor {is} {ask} 'What {is} your favorite color?'\n{if} color {in} pretty_colors {print} 'pretty!' {else} {print} 'meh'"
-- name: '{pressed}'
- explanation: Check whether a given key on the keyboard is `{pressed}`.
+- name: '{shtypur}'
+ explanation: Vështro nëse nje karakter në tastier është `{shtypur}`.
demo_code: "{if} a {is} {pressed} {print} 'You pressed A!' {else} {print} 'You pressed another key!'"
7:
- name: '{print}'
@@ -89,7 +89,7 @@
- name: '{ask}'
explanation: Ask for a calculation and check whether it is correct.
demo_code: "answer = {ask} 'What is 10 plus 10?'\n{if} answer {is} 20 {print} 'Yes!' {else} {print} 'Oops'"
-- name: '{ask} and {if} with turtle'
+- name: '`{pyet}`{pyet} dhe {nëse} me breshkë'
explanation: Ask the user how many angles they want.
demo_code: "angles = {ask} 'How many angles?'\nangle = 360 / angles\n{forward} 50"
8:
@@ -102,7 +102,7 @@
- name: '{repeat} with turtle'
explanation: Repeat multiple lines.
demo_code: "{repeat} 4 {times}\n {turn} 90\n {forward} 50"
-- name: '{pressed}'
+- name: '{shtypur}'
explanation: Check whether a given key on the keyboard is `{pressed}`.
demo_code: "{if} a {is} {pressed}\n {print} 'You pressed A!'\n{else}\n {print} 'You pressed another key!'"
9:
diff --git a/content/client-messages/fr.yaml b/content/client-messages/fr.yaml
index 50c890ca913..f6de43b4865 100644
--- a/content/client-messages/fr.yaml
+++ b/content/client-messages/fr.yaml
@@ -22,4 +22,4 @@ songs: 🎵,🎶
dice: 🎲
Empty_output: Ce code fonctionne mais n'imprime rien. Ajoutez une commande d'impression à votre code ou utilisez la tortue pour obtenir une sortie.
Program_repair: Ceci pourrait être le bon code, pouvez-vous le réparer ?
-Errors_found: You made a mistake! Don't worry, Hedy is trying to find the mistakes
+Errors_found: Vous avez fait une erreur ! Ne t'inquiètes pas, Hedy essaie de trouver les erreurs
diff --git a/content/emails/en_devel.yaml b/content/emails/en_devel.yaml
index 0c4bd59f1bb..6c8248f4493 100644
--- a/content/emails/en_devel.yaml
+++ b/content/emails/en_devel.yaml
@@ -27,7 +27,7 @@ welcome_teacher_body: |
If anything is unclear, you can let us know on Discord, or send us an email.
How to report bugs
- In Discord, we have a channel for reporting bugs, called #bugs. That is the perfect place to let us know about issues you are running into. If you know how to use GitHub, you can create an issue there.
+ In Discord, we have a channel for reporting bugs, called #bugs. That is the perfect place to let us know about issues you are running into. If you know how to use GitHub, you can create an issue there.
Keep programming!
The Hedy team
diff --git a/content/keywords/sq.yaml b/content/keywords/sq.yaml
index d9c5f740166..5c62efdebae 100644
--- a/content/keywords/sq.yaml
+++ b/content/keywords/sq.yaml
@@ -1,9 +1,9 @@
-return: return
-define: define
+return: rikthe
+define: defino
def: def
-call: call
-with: with
-print: print
+call: thirr
+with: me
+print: printo
ask: pyet
echo: përsërit
forward: përpara
@@ -59,5 +59,5 @@ comma: ','
quote: "'"
pressed: shtypur
button: button
-not in: not in
-clear: clear
+not in: jo në
+clear: pastro
diff --git a/content/pages/es.yaml b/content/pages/es.yaml
index 1fb91ca434f..d78afe13f28 100644
--- a/content/pages/es.yaml
+++ b/content/pages/es.yaml
@@ -7,9 +7,9 @@ sections:
- title: ¿Cómo funciona Hedy?
text: "Hedy se divide en niveles, en los cuales se enseñan nuevos comandos. Cada nivel contiene una variedad de aventuras para practicar los nuevos comandos aprendidos.\nComo profesor/a, tú decides qué aventuras están disponibles a tu alumnos. ¿Harán un restaurante, una calculadora o una casa encantada en este nivel? En cada nivel, las aventuras están ordenadas de mas fácil a difícil.\nDe ésta forma tus estudiantes siempre tienen un reto. Las aventuras pueden realizarse por alumnos individuales o puedes enseñarlas en grupos.\n\nLas aventuras también incluyen un código de ejemplo, para asegurarse que ¡incluso profesores con poca experiencia de programación puedan usar Hedy también!\n¡Por supuesto Hedy también permite a los profesores más creativos que prefieren crear sus propias aventuras!\n\nDespués de resolver todas las aventuras de un nivel concreto, tus alumnos pueden poner a prueba sus conocimientos con la encuesta.\nPuedes revisar el trabajo de tus alumnos y su progreso en la página de la clase.\n"
- title: Dispositivos
- text: "Hedy está basado en web, lo que significa que funciona en cualquier dispositivo con un navegador (Google Chrome, Firefox, Edge etc), así que los portátiles, chromebooks, tablets e incluso teléfonos inteligentes son adecuados para usar Hedy.\nNo hay necesidad de descargar nada antes de empezar a trabajar con Hedy, sólo ve a la página web ¡y estás listo!\n"
+ text: "Hedy está basado en la web, lo que significa que funciona en cualquier dispositivo con un navegador (Google Chrome, Firefox, Edge etc), así que los portátiles, chromebooks, tablets e incluso teléfonos inteligentes son adecuados para usar Hedy.\nNo hay necesidad de descargar nada antes de empezar a trabajar con Hedy, sólo ve a la página web ¡y listo!\n"
- title: La comunidad de Hedy
- text: "Todos los profesores de Hedy, programadores y otros fans son bienvenidos a unirse a nuestro [Discord server](https://discord.gg/8yY7dEme9r). Este es el lugar ideal para discutir sobre Hedy: tenemos canales donde puedes mostrar tus interesantes proyectos y lecciónes, canales para reportar errores y canales para hablar con otros profesores y con el equipo desarrollador de Hedy.\n"
+ text: "Todos los profesores de Hedy, programadores y otros fans son bienvenidos a unirse a nuestro servidor Discord.. Este es el lugar ideal para discutir sobre Hedy: tenemos canales donde puedes mostrar tus interesantes proyectos y lecciones, canales para reportar errores y canales para hablar con otros profesores y con el equipo desarrollador de Hedy.\n"
title: Introducción
key: intro
- title: "Tutorial"
@@ -17,22 +17,22 @@ sections:
subsections:
- title: "Tutorial"
text: |
- Do you want to follow the tutorial (again)? Click [here](https://hedycode.com/tutorial)
+ ¿Quieres ver el tutorial (de nuevo)? Haz clic aquí.
- title: Preparaciones
key: preparaciones
subsections:
- title: Creando una clase
- text: "Como profesor, puedes crear una clase para tus estudiantes. En esta clase puedes ver las cuentas de cada uno de los estudiantes y sus programas. También puedes monitorear su progreso.\nEs posible personaliyar tu clase y elegir que aventuras están disponibles. De esta forma, tus estudiantes no serán abrumados por la cantidad de aventuras y niveles, y ellos se puedes enfocar en las aventuras que te gustarían que practiquen.\n"
+ text: "Como profesor, puedes crear una clase para tus estudiantes. En esta clase puedes ver las cuentas de cada uno de los estudiantes y sus programas. También puedes monitorear su progreso.\nEste vídeo demuestra cómo crear rápidamente una clase en Hedy.\n"
- title: "Customize your Class"
text: |
- You can also customize your class and choose which adventures are available for them. This way your students won't be overwhelmed by the amount of adventures and levels, and they can specifically focus on the adventures you'd like them to practice with.
- This [video](https://www.youtube.com/watch?v=qva9gXBoUwY&t=10s) shows you how to customize your class.
+ Puedes además personalizar tu clase y elegir las aventuras disponibles. Así, tus estudiantes no serán abrumados con la cantidad de aventuras y niveles, y pueden enfocarse específicamente en las aventuras con las que les gustaría practicar.
+ Este vídeo te muestra cómo personalizar tu clase.
- title: Cuentas de Estudiantes
- text: "Hay 2 formas de permitir que tus estudiantes se unan a tu clase: Puedes dejarles crear sus propias cuentas o puedes crearlas por ellos.\n\n**Los estudiantes hacer sus propies cuentas**\nTus estudiantes pueder in a la página web de Hedy y crear su cuenta, igual que tu lo hiciste. Para tenerlos en tu clase, ellos simplemente deber hacer click en el link de la invitación.\nPuedes encontrar el link para invitarlos en la página de la clase y enviarlo a tus estudiantes. Ten en cuenta que tus estudiantes deben estar conectados en Hedy cuando hagan click en el link, para hacer que todo funcione fácilmente.\n\n**Tú creas las cuentas para tus estudiantes**\nAlgunas veces es más fácil que tu crees muchas cuentas para tus estudiantes. Esto se hace al hacer click en el botón 'crear cuentas de estudiantes' y rellenando los nombres de usuarios y contraseñas por ellos.\nLos estudiantes pueden conectarse con el nombre de usuario y contraseña que elegiste. Después, ellos pueden cambiar su nombre de usuario o contraseña si quieren, manteniéndose en tu clase.\n"
+ text: "Hay 2 formas de permitir que tus estudiantes se unan a tu clase: Puedes dejarles crear sus propias cuentas, o puedes crearlas por ellos.\n\n**Los estudiantes crean sus propias cuentas**\nTus estudiantes pueden in a la página web de Hedy y crear su cuenta, igual que tú lo hiciste. Para tenerlos en tu clase, ellos simplemente deber hacer clic en el enlace de la invitación.\nPuedes encontrar el enlace para invitarlos en la página de la clase y enviarlo a tus estudiantes. Ten en cuenta que tus estudiantes deben estar conectados en Hedy cuando hagan clic en el enlace, para hacer que todo funcione fácilmente.\n\n**Tú creas las cuentas para tus estudiantes**\nAlgunas veces es más fácil que tú crees las cuentas para tus estudiantes. Esto se hace al hacer clic en el botón 'crear cuentas de estudiantes' y rellenando los nombres de usuarios y contraseñas por ellos.\nLos estudiantes pueden conectarse con el nombre de usuario y contraseña que elegiste. Después, ellos pueden cambiar su nombre de usuario o contraseña si quieren, manteniéndose en tu clase.\nEste vídeo muestra cómo agregar estudiantes a tu clase de la manera más rápida y fácil.\n"
- title: Escoger lenguage preferido
- text: "Cuando los alumnos crean sus perfiles deben escoger su 'idioma preferido'. Hedy siempre cargará utilizando este idioma.\nEl idioma siempre se podrá modificar a posteriori navegando a ' Mi cuenta' y 'Mis opciones personales'.\nDesde Diciembre 2021, es obligatorio definir tu idioma preferido para cada cuenta de Hedy.\nSi tu cuenta o la cuenta de tus alumnos fue creada antes de esta fecha, recibirás un mensaje notificando de que el idioma preferido no se ha seleccionado.\n¡No te preocupes! Navega a 'Mi perfil' y añade el idioma en tus opciones.\nHasta que selecciones un idioma Hedy se mostrará en el idioma configurado en tu navegador, y cuando ese idioma no esté soportado, en inglés.\n\n**Para no hablantes de la lengua inglesa**\nNo solo puedes cambiar el idioma de las aventuras a tu propio idioma. También puedes cambiar el idioma de los comandos (por ejemplo 'print' o 'ask').\nDe ésta forma puedes enseñar a tus alumnos con los comandos originales en Inglés pero también puedes permitirles utilizar su propio idioma. Por ejemplo, los estudiantes holandeses pueden utilizar 'vraag' en vez de 'ask'.\n"
+ text: "Cuando los alumnos crean sus perfiles deben escoger su 'idioma preferido'. Hedy siempre cargará utilizando este idioma.\nEl idioma siempre se podrá modificar a posteriori navegando a ' Mi cuenta' y 'Mis opciones personales'.\nDesde Diciembre de 2021, es obligatorio definir tu idioma preferido para cada cuenta de Hedy.\nSi tu cuenta o la cuenta de tus alumnos fue creada antes de esta fecha, recibirás un mensaje notificando que el idioma preferido no se ha seleccionado.\n¡No te preocupes! Navega a 'Mi perfil' y añade el idioma en tus opciones.\nHasta que selecciones un idioma Hedy se mostrará en el idioma configurado en tu navegador, y cuando ese idioma no esté soportado, en inglés.\n\n**Para no hablantes de la lengua inglesa**\nNo solo puedes cambiar el idioma de las aventuras a tu propio idioma. También puedes cambiar el idioma de los comandos (por ejemplo 'print' o 'ask').\nDe ésta forma, puedes enseñar a tus alumnos con los comandos originales en Inglés pero también puedes permitirles utilizar su propio idioma. Por ejemplo, los estudiantes holandeses pueden utilizar 'vraag' en vez de 'ask'.\n\n**Video**\nEste vídeo muestra cómo establecer el lenguaje preferido y también cómo cambiar los comandos a tu lenguaje preferido.\n"
- title: Almacenar programas
- text: "Como ahora estás identificado, verás el banner azul con Mi perfil y Mis programas.\nEstas pestañas también existen para tus estudiantes. En Mis programas puedes encontrar todo el código que hayas guardado.\n\nPuedes guardar tus proyectos simplemente dándoles un nombre en la barra blanca y apretando el botón verde Guardar Código.\nTú y tus estudiantes podéis compartir los programas. Estos programas se publicarán en nuestra página de explorador, para que todo el mundo pueda verlos y utilizarlos.\nSi no quieres publicar tu programa, ve a 'Mis programas' y haz click en 'No compartir'.\n"
+ text: "Cuando estés identificado, verás Mis programas junto a tu icono de perfil.\nEsta opción también existen para tus estudiantes. En Mis programas puedes encontrar todo el código que hayas guardado.\nPor defecto, los programas serán guardados en \"Mis programas\" cuando ejecutes el código, y cada 10 segundos, bajo el nombre por defecto y su nivel (Por ejemplo, historia 5). \n\nTú y tus estudiantes podéis compartir los programas usando el botón a lado de los nombres de programa. Estos programas se publicarán en nuestra página de explorador, para que todo el mundo pueda verlos y utilizarlos. Si no quieres publicar tu programa, ve a 'Mis programas' y haz clic en 'No compartir'.\n\nEl icono de papel plano puede y usar para entregar programas al profesor de la clase. Los programas que se han entregado, no serán más editables.\n"
- subsections:
- text: "Hedy contiene muchos niveles diferentes, cada uno de ellos enseña una nueva habilidad. Nosotros recomendamos enseñar un nivel por lección.\nEsto le da suficiente tiempo a tus estudiantes para entender completamente un nuevo comando o concepto y practicar con él, antes de avanyar al siguiente nivel.\nUsamos esta estructura en nuestras lecciónes:\n"
title: 'Enseñando con Hedy'
@@ -42,7 +42,7 @@ sections:
- title: Introducción
text: "Puedes empezar tus lecciones recordando a tus alumnos conocimiento previo: ¿Qué es lo que saben sobre el tema?, ¿Qué aprendieron en la lección anterior y qué errores cometieron de los cuales han aprendido?\nDe ésta forma, tus alumnos tendrán en mente todos los comandos aprendidos y los errores comunes cuando empieces una nueva clase.\n"
- title: Introducción de nuevos conceptos y comandos
- text: "Los nuevos conceptos y comandos pueden ser muy difíciles de comprender para algunos alumnos.\nPor eso es importante dar un modelo del uso correcto de los comandos a los alumnos.\nEspecialmente en los niveles iniciales cuando un alumno no tiene experiencia ninguna con programación, puede ser difícil para ellos comprender los conceptos abstractos.\nMostrar un montón de ejemplos hace que un concepto abstracto (por ejemplo '¿Qué es una variable?) más fácil de reconocer y entender ('¡Mira!, la variable a cambiado a perro').\n"
+ text: "Los nuevos conceptos y comandos pueden ser muy difíciles de comprender para algunos alumnos.\nPor eso es importante dar un modelo del uso correcto de los comandos a los alumnos.\nEspecialmente en los niveles iniciales cuando un alumno no tiene experiencia alguna en programación, puede ser difícil para ellos comprender los conceptos abstractos.\nMostrar varios ejemplos hace que un concepto abstracto (por ejemplo, '¿Qué es una variable?') sea más fácil de reconocer y entender ('¡Mira!, la variable a cambiado a perro').\n"
- title: Vamos a trabajar
text: "Cada nivel contiene diferentes aventuras que podrás encontrar en las pestañas rosas. La primera pestaña rosa explica los nuevos comandos del nivel.\nLas siguientes pestañas son las aventuras que tus alumnos pueden probar y hacer por sí mismos.\nLas aventuras están ordenadas de fácil a difícil, así que recomendamos empezar por la izquierda hacia la derecha.\nLa última pestaña da una pequeña pista de que aprenderás en el siguiente nivel. Por supuesto, puedes seleccionar las aventuras que quieras que tus alumnos hagan en cada nivel.\nNo siempre tienen que hacer todas las aventuras. Cada aventura contiene un código de ejemplo que los alumnos pueden probar con el botón verde.\nEl código de ejemplo se copia en el area de trabajo, donde los alumnos pueden probar y ajustar a su gusto.\nAnima a tus alumnos a convertir los ejemplos en sus propios proyectos, añadiendo sus propias ideas e introduciendo variaciones a las aventuras.\n"
- title: Quiz
diff --git a/content/pages/fr.yaml b/content/pages/fr.yaml
index 05a220ff4c1..c8ada107bef 100644
--- a/content/pages/fr.yaml
+++ b/content/pages/fr.yaml
@@ -107,53 +107,53 @@ sections:
Cette vidéo présente les quiz et les puzzles..
- title: "Évaluation"
text: |
- Round up your lesson by having a brief evaluation. What did the students learn? Which hardships did they come across?
- How did they learn from their mistakes? And of course: What did they create?
- Students are often very proud of their own creations, so it's nice to save a little time and give your students the opportunity to show their work to their classmates.
+ Terminez votre leçon par une brève évaluation. Qu'ont appris les élèves ? Quelles difficultés ont-ils rencontrées ?
+ Comment ont-ils appris de leurs erreurs ? Et bien sûr, qu'ont-ils créé ? Qu'ont-ils créé ?
+ Les élèves sont souvent très fiers de leurs propres créations. Il est donc intéressant de prendre le temps de donner à vos élèves la possibilité de montrer leur travail à leurs camarades de classe.
key: enseigner
-- title: "Extra Hedy features"
- key: "features"
+- title: "Caractéristiques supplémentaires de Hedy"
+ key: "caractéristiques"
subsections:
- - title: "Teacher Statistics"
+ - title: "Statistiques des enseignants"
text: |
- This [video](https://www.youtube.com/watch?v=iwHVG4NRKI4&t=5s) shows you more information on how to use the teacher statistics in your class.
- - title: "Make your own adventure"
+ Cette [video](https://www.youtube.com/watch?v=iwHVG4NRKI4&t=5s) donne plus d'informations sur comment utiliser les statistiques des enseignants dans votre cours.
+ - title: "Créez votre propre aventure"
text: |
- It is also possible for teachers to create your own adventure. [This video](https://www.youtube.com/watch?v=A0zbXpxX4q4) shows you how to create your own adventure as a teacher and add it to your class(es).
- - title: "Explore page"
+ Les enseignants peuvent également créer leur propre aventure. [Cette vidéo] (https://www.youtube.com/watch?v=A0zbXpxX4q4) vous montre comment créer votre propre aventure en tant qu'enseignant et l'ajouter à votre (vos) cour(s).
+ - title: "Explorer la page"
text: |
- On the [explore](https://hedycode.com/explore) page you can view the work of other Hedy users. You can try out their programs and use them as inspiration to create something cool yourself.
- You can also add a program you've made to the explore page yourself by clicking 'Save and share code' in the coding screen or go to My Programs and click 'Share'.
- Don't want to share your work anymore? Simply go to 'My Programs' and click 'Unshare'.
- If you want more information about the explore page, check out this [video](https://www.youtube.com/watch?v=26boFjqvS5Q).
- - title: "My achievements"
+ Sur la page [explorer](https://hedycode.com/explore), vous pouvez voir le travail d'autres utilisateurs de Hedy. Vous pouvez essayer leurs programmes et vous en inspirer pour créer vous-même quelque chose de cool.
+ Vous pouvez également ajouter vous-même un programme que vous avez créé à la page d'exploration en cliquant sur "Enregistrer et partager le code" dans l'écran de codage ou en allant dans "Mes programmes" et en cliquant sur "Partager".
+ Vous ne voulez plus partager votre travail ? Il vous suffit d'aller dans "Mes programmes" et de cliquer sur "Annuler le partage".
+ Si vous souhaitez obtenir davantage d'informations sur la page d'exploration, consultez cette [vidéo] (https ://www.youtube.com/watch?v=26boFjqvS5Q).
+ - title: "Mes réalisations"
text: |
- If you click on your username in the topright corner of your screen, you can go to [My achievements](https://hedycode.com/my-achievements). On this page you achievements are collected. Your students have such a page as well.
- When you hover over the badge with your mouse, you'll see how to earn the badge. There are hidden badges too, of which you'll have to find out yourself how to earn them.
- If you want more information on the achievements, check out this [video](https://www.youtube.com/watch?v=-FjmKejukCs).
- - title: "High Scores"
+ Si vous cliquez sur votre nom d'utilisateur dans le coin supérieur droit de votre écran, vous pouvez aller sur [Mes réalisations] (https://hedycode.com/my-achievements). Sur cette page, vos réalisations sont rassemblées. Vos élèves disposent également d'une telle page.
+ Lorsque vous passez la souris sur le badge, vous voyez comment l'obtenir. Il existe également des badges cachés, que vous devrez découvrir par vous-même.
+ Si vous voulez plus d'informations sur les réalisations, regardez cette [vidéo] (https://www.youtube.com/watch?v=-FjmKejukCs).
+ - title: "Les meilleurs scores"
text: |
- On [this page](https://hedycode.com/highscores) you can see the high scores of all Hedy users.
- In this [video](https://www.youtube.com/watch?v=IqTiUkBVTo8) you can learn some more about the high scores.
- - title: "Debugger"
+ Sur [cette page](https://hedycode.com/highscores), vous pouvez voir les meilleurs scores de tous les utilisateurs de Hedy.
+ Dans cette [vidéo](https://www.youtube.com/watch?v=IqTiUkBVTo8), vous en apprendrez davantage sur les meilleurs scores.
+ - title: "Débogueur"
text: |
- Is your (student's) code not working? There must be a bug (coding mistake) in it! You can use the debugger to find the mistake.
- The debugger is the ladybig button in your coding screen. If you press it, you can run your code line by line to find your mistake.
- Have you found the mistake? Press the red stop button and the debugger will shut off.
- - title: "Read aloud"
+ Votre code (ou celui de l'élève) ne fonctionne pas ? Il doit y avoir un bogue (une erreur de codage) ! Vous pouvez utiliser le débogueur pour trouver l'erreur.
+ Le débogueur est le gros bouton de votre écran de codage. Si vous appuyez sur ce bouton, vous pouvez exécuter votre code ligne par ligne pour trouver votre erreur.
+ Avez-vous trouvé l'erreur ? Appuyez sur le bouton rouge d'arrêt et le débogueur s'éteindra.
+ - title: "Lire à haute voix"
text: |
- Do you want the output of your program to be read aloud? Then you can use the read aloud function that is found under the 'run code' button in your coding screen.
- - title: "Programmers mode"
+ Voulez-vous que la sortie de votre programme soit lue à haute voix ? Dans ce cas, vous pouvez utiliser la fonction de lecture à haute voix qui se trouve sous le bouton "exécuter le code" dans votre écran de codage.
+ - title: "Mode programmeur"
text: |
- Distracted by all the adventures, or do you want to make a long program? Then check out the 'Programmers Mode' switch at the bottom of your coding screen.
- Programmers mode allows you and your students to use a bigger coding screen.
+ Vous êtes distrait par toutes les aventures, ou vous voulez faire un long programme ? Alors, regardez le bouton "Mode Programmateur" en bas de votre écran de codage.
+ Ce mode vous permet, à vous et à vos élèves, d'utiliser un écran de codage plus grand.
- title: "Cheat sheets"
text: |
In every level there is a button with this emoji 🤔. You and your students can find the "cheat sheets" there. On this cheat sheet, you can find all the commands that are usable in this level in their correct form.
So if you've forgotten how a command works, simply take a peek at the cheat sheet!
- title: "Other useful features"
text: |
- This [video](https://www.youtube.com/watch?v=c4MntPPgl1Y) shows you even more features of Hedy, like the cheatsheets and the keyboard switcher.
+ Cette [vidéo] (https://www.youtube.com/watch?v=c4MntPPgl1Y) vous présente d'autres fonctionnalités de Hedy, comme les aides mémoire et le sélecteur de clavier.
- title: "Answers to the exercises"
key: answers
intro: |
@@ -161,7 +161,7 @@ sections:
To go to the 'Hedy_answers' profile, please click here.
- title: "Erreurs fréquemment commises"
- key: "common_mistakes"
+ key: "erreurs_courantes"
intro: |
Vous pouvez apprendre de vos erreurs, surtout en codage !
Il est inévitable de faire des erreurs, et c'est une excellente occasion d'apprendre, mais pour les enseignants, il peut être difficile de trouver la bonne solution à une erreur !
@@ -191,287 +191,287 @@ sections:
solution_code: |
{ask} Pourquoi mon code marche-t-il ?
{print} Parce que j'ai enlevé les majuscules !
- - title: "Students use echo without ask"
+ - title: "Les élèves utilisent la dis sans le demander"
example:
error_text: |
- Echo is made to repeat an answer after an ask command. Without ask echo won't do anything.
+ Dis est fait pour répéter une réponse après une commande demande. Sans demande, dis ne fera rien.
error_code: |
- echo Your name is
+ dis Ton nom est
solution_text: |
- Add an ask command to make it work.
+ Ajoute une commande demande pour que cela fonctionne.
solution_code: |
- ask What's your name?
- echo Your name is
- - title: "Students want their echo word (variable) to be in the middle of a sentence"
+ demande Quel est votre nom ?
+ dis Ton nom est
+ - title: "Les élèves veulent que leur \"dis mot\" (variable) se trouve au milieu d'une phrase"
example:
error_text: |
- And they are right! That's why they will learn to use proper variables in the next level.
+ Et ils ont raison ! C'est pourquoi ils apprendront à utiliser les variables au niveau suivant.
error_code: |
- ask Which programming language is the most fun?
- echo is the best!
+ demande Quel est le langage de programmation le plus amusant ?
+ dis est le meilleur !
solution_text: |
- In level 1 we have to keep it at this:
+ Au niveau 1, nous devons nous en tenir à cela :
solution_code: |
- ask Which programming language is the most fun?
- echo The best is...
- - title: "Turtle: Students let the turtle walk off of the screen"
+ demande Quel est le langage de programmation le plus amusant ?
+ dis Le meilleur est...
+ - title: "Tortue : Les élèves laissent la tortue sortir de l'écran"
example:
error_text: |
- Often students love to try out big numbers when using the turtle, which causes the arrow to walk off the screen.
+ Souvent, les élèves aiment essayer les grands nombres en utilisant la tortue, ce qui fait sortir la flèche de l'écran.
error_code: |
- forward 300
- turn 90
+ avance 300
+ tourne 90
solution_text: |
- In the example. students tend to think that the turn command doesn't work. Eventhough is does work, but you can't see it happening off screen. Use smaller numbers to prevent this from happening.
+ Dans l'exemple, les élèves ont tendance à penser que la commande "tourne" ne fonctionne pas. Bien qu'elle fonctionne, vous ne pouvez pas voir son effet en dehors de l'écran. Utilisez des nombres plus petits pour éviter cela.
solution_code: |
- forward 100
- turn 90
- - title: "Turtle: Students use the command backward, but that doens't exist"
+ avance 100
+ tourne 90
+ - title: "Tortue : Les élèves utilisent la commande à recule, mais elle n'existe pas"
example:
error_text: |
- Backward is not a command.
+ Recule n'est pas une commande.
error_code: |
- backward 100
+ recule 100
solution_text: |
- To make the turtle go backwards, you use the forward command and a negative number. For example:
+ Pour faire reculer la tortue, il faut utiliser la commande avance et un nombre négatif. Par exemple :
solution_code: |
- forward -100
+ avance -100
- level: '2'
sections:
- - title: "Students make typos in their commands"
+ - title: "Les élèves font des fautes de frappe dans leurs commandes"
example:
error_text: |
- Hedy can't recognize a command with a typo.
+ Hedy ne peut pas reconnaître une commande contenant une faute de frappe.
error_code: |
- prinnt Don't make typos!
+ afffiche Ne faites pas de fautes de frappe!
solution_text: |
- Teach your students to read the error messages. This way they can find out themselves what went wrong.
+ Apprenez à vos élèves à lire les messages d'erreur. Ils pourront ainsi découvrir eux-mêmes ce qui n'a pas fonctionné.
solution_code: |
- print Don't make typos!
- - title: "Students forget that the ask command has changed"
+ affiche Ne fais pas de fautes de frappe !
+ - title: "Les élèves oublient que la commande \"demande\" a changé"
example:
error_text: |
- In this level students learn about variables. The ask command requires a variable as well, but students forget this.
+ Dans ce niveau, les élèves apprennent ce que sont les variables. La commande demande nécessite également une variable, mais les élèves l'oublient.
error_code: |
- ask what would you like to eat?
+ demande Qu'aimeriez-vous manger ?
solution_text: |
- In this level you have to tell Hedy where to save your answer, so it can be used later on. This is called a variable.
+ Dans ce niveau, tu dois dire à Hedy où enregistrer ta réponse pour qu'elle puisse être utilisée plus tard. C'est ce qu'on appelle une variable.
solution_code: |
- order is What would you like to eat?
- - title: "Students try to use the echo command. "
+ demande Qu'aimeriez-vous manger?
+ - title: "Les élèves essaient d'utiliser la commande dis. "
example:
error_text: |
- For some students it might be frustrating to learn that the echo command doesn't work anymore. That's why it's very important to explain the advantages of using variables. For example you can use multiple variables in a code, and you can put them anywhere you like in a sentence!
+ Pour certains élèves, il peut être frustrant d'apprendre que la commande dis ne fonctionne plus. C'est pourquoi il est très important d'expliquer les avantages de l'utilisation des variables. Par exemple, vous pouvez utiliser plusieurs variables dans un code, et vous pouvez les placer où vous voulez dans une phrase!
error_code: |
- answer is ask Why doesn't echo work anymore?!
- echo
+ réponse est demande Pourquoi dis ne fonctionne plus?!
+ dis
solution_text: |
- Use a varible instead.
+ Utilise plutôt une variable.
solution_code: |
- answer is ask Why doens't echo work anymore?!
- print answer
- - title: "Students use a variable name or as a normal word"
+ réponse est demande Pourquoi dis ne fonctionne-t-il plus ?
+ affiche réponse
+ - title: "Les élèves utilisent un nom de variable ou un mot normal"
example:
error_text: |
- In the example below the word 'name' is used a a variable, but also as a normal text. The output of this code will be 'Hi my Hedy is Hedy'.
+ Dans l'exemple ci-dessous, le mot "nom" est utilisé comme variable, mais aussi comme texte normal. Le résultat de ce code sera "Bonjour mon Hedy est Hedy".
error_code: |
- name is Hedy
- print Hi my name is name
+ nom est Hedy
+ affiche Bonjour mon nom est nom
solution_text: |
- So don't use a word you want to use in the text as a variable name. In level 4 this is solved with quotation marks.
+ N'utilise donc pas un mot que vous voulez utiliser dans le texte comme nom de variable. Au niveau 4, ce problème est résolu à l'aide de guillemets.
solution_code: |
- name is Hedy
- print Hi I'm name
- - title: "Students use long variable names containing two words."
+ nom est Hedy
+ affiche Bonjour, je suis nom
+ - title: "Les élèves utilisent des noms de variables longs contenant deux mots."
example:
error_text: |
- A variable should be named with one word. You could use an underscore to connect two words. That counts as one.
+ Une variable doit être nommée avec un seul mot. Vous pouvez utiliser un tiret bas pour relier deux mots. Cela compte pour un seul mot.
error_code: |
- chosen door is ask Which door do you pick?
+ porte choisie est demande Quelle porte choisissez-vous ?
solution_text: |
- Add an underscore.
+ Ajoute un tiret bas.
solution_code: |
- chosen_door is ask which door do you pick?
- - title: "Students might use two different names for the same variable"
+ porte_choisie est demande Quelle porte choisissez-vous ?
+ - title: "Les élèves peuvent utiliser deux noms différents pour la même variable"
example:
error_text: |
- In this example the student has used 'horse' and 'name' for the same variables.
+ Dans cet exemple, l'élève a utilisé "cheval" et "nom" pour les mêmes variables.
error_code: |
- horse is ask What is your horse called?
- print Your horse is called name
+ cheval est demande Quel est le nom de votre cheval ?
+ affiche Votre cheval est appelé nom
solution_text: |
- Always check wheter the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code.
+ Vérifiez toujours si la variable porte le même nom dans tout le code. De légères différences peuvent être difficiles à repérer (par exemple les pluriels), mais elles interfèrent avec le code.
solution_code: |
- name is ask What is your horse called?
- print Your horse is called name
+ nom est demande Quel est le nom de votre cheval ?
+ affiche Votre cheval s'appelle nom
- level: '3'
sections:
- - title: "Students try to print whole lists"
+ - title: "Les élèves essaient d'imprimer des listes en entier"
example:
error_text: |
- A list can't be printed. You can only print one item from the list with at random.
+ Une liste ne peut pas être imprimée. Vous ne pouvez imprimer qu'un seul élément de la liste, au hasard.
error_code: |
- groceries is apples, milk, chocolate
- print groceries
+ courses est pommes, lait, chocolat
+ affiche courses
solution_text: |
- To print a list of all the groceries, you simply need to put them after a print command. Else you can use the list to print one item with at random.
+ Pour afficher une liste de toutes les courses, il suffit de les placer après une commande affiche. Sinon, vous pouvez utiliser la liste pour imprimer un article au hasard.
solution_code: |
- print apples, milk, chocolate
+ {print} pommes, lait, chocolat
- or
+ ou
- groceries is apples, milk, chocolate
- print groceries at random
- - title: "Le élèves utilises le nom de la variable ou d'une liste comme du texte normal"
+ courses {is} pommes, lait, chocolat
+ {affiche} épicerie {at} {random}
+ - title: "Le élèves utilisent le nom de la variable ou d'une liste comme du texte normal"
example:
error_text: |
- This problem probably occured in level 2 as well. Now it can happen with lists too.
+ Ce problème s'est probablement produit au niveau 2 également. Désormais, il peut également se produire avec les listes.
error_code: |
- name is Hedy
- print Hi my name is name
+ nom {is} Hedy
+ {print} Bonjour, mon nom est nom
- or
+ ou
- animal is rhino, bee, swan
- print The best animal is... animal at random
+ animal {is} rhinocéros, abeille, cygne
+ {affiche} Le meilleur animal est... animal {at} {random}
solution_text: |
- Don;t use the names of variables or lists in regular text to print. In level 4 this problem is solves with quotation marks.
+ N'utilisez pas les noms de variables ou de listes dans du texte normal à imprimer. Au niveau 4, ce problème est résolu avec des guillemets.
solution_code: |
- name is Hedy
- print Hi I'm name
+ nom est Hedy
+ affiche Bonjour je suis nom
- or
+ ou
- animals is rhino, bee, swan
- print The best animal is... animals at random
- - title: "Students forget at in at random"
+ animaux est rhinocéros, abeille, cygne
+ affiche Le meilleur animal est... animal au hasard
+ - title: "Les élèves oublient `{at}` dans `{at}` `{random}`"
example:
error_text: |
- Like in the example
+ Comme dans l'exemple
error_code: |
- birds is sparrow, seagull, robin
- print birds random
+ oiseaux est moineau, mouette, corneille
+ affiche oiseaux hasard
solution_text: |
- This problem is solved by adding the word at.
+ Ce problème est résolu en ajoutant le mot "au".
solution_code: |
- birds is sparrow, seagull, robin
- print birds at random
- - title: "Les élèves oublient d'utiliser la commande print alors qu'ils utilisent la commande at random"
+ oiseaux est moineau, mouette, corneille
+ affiche oiseaux au hasard
+ - title: "Les élèves oublient d'utiliser la commande `{print}` quand ils utilisent aussi la commande `{at}` `{random}`"
example:
error_text: |
- Or they will sometimes put at random at the beginning of the line.
+ Ou alors ils vont quelques fois mettre `{at}` au début d'une ligne.
error_code: |
- fruit is apple, cherry, banana
- fruit at random
+ fruit est pomme, cerise, banane
+ fruit au hasard
solution_text: |
- Emphasize to your students that you always need a print to print text.
+ Insistez auprès de vos élèves sur le fait que vous avez toujours besoin de la commande affiche pour afficher un texte.
solution_code: |
- fruit is apple, cherry, banana
- print fruit at random
- - title: "Students forget to use commas in their lists"
+ fruit {is} pomme, cerise, banane
+ {print} fruit {at} {random}
+ - title: "Les élèves oublient d'utiliser des virgules dans leurs listes"
example:
error_text: |
- In a list items are seperated with a comma.
+ Dans une liste, les éléments sont séparés par une virgule.
error_code: |
- pizzas is funghi tonno quattro stagioni
- print pizzas at random
+ pizzas {is} champignons thon quatre saisons
+ {print} pizzas {at} {random}
solution_text: |
- After each item on your list, there should be a comma
+ Chaque élément de votre liste doit être suivi d'une virgule
solution_code: |
- pizzas is funghi, tonno, quattro stagioni
- print pizzas at random
- - title: "Les élèves essaient d'utiliser at random sans une liste"
+ pizzas {is} champignons, thon, quatre saisons
+ {print} pizzas {at} {random}
+ - title: "Les élèves essaient d'utiliser `{at}` `{random}` sans une liste"
example:
error_text: |
- For example
+ Par exemple
error_code: |
- clubs is Manchester United
- print clubs at random
+ clubs {is} Machester United
+ {print} clubs {at} {random}
solution_text: |
- Hedy can't print anything at random, because there is no list to choose from.
+ Hedy ne peut pas afficher quelque chose au hasard, parce qu'il n'y a pas de liste à partir de laquelle choisir.
solution_code: |
- clubs is Manchester United, Bayrn Munchen, FC Barcelona
- print clubs at random
- - title: "Students try to use add/remove without a list "
+ clubs {is} Manchester United, Bayrn Munchen, FC Barcelona
+ {print} clubs {at} {random}
+ - title: "Les élèves essaient d'utiliser les fonctions ajouter/supprimer sans liste "
example:
error_text: |
- In the example below 'names' is not a list, but a variable. You cannot add anything to it.
+ Dans l'exemple ci-dessous, "noms" n'est pas une liste, mais une variable. Vous ne pouvez rien y ajouter.
error_code: |
- names is Jake
- your_name is ask Who are you?
- add your_name to names
- print names at random
+ noms {is} Jake
+ ton_nom {is} {ask} Qui es-tu ?
+ {add} ton_nom {to} noms
+ {print} noms {at} {random}
solution_text: |
- There has to be a list first, so you have to add a second name to turn names into a list, for example Amy. If you don't want amy on your list, you can use remove to remove it after.
+ Il faut d'abord qu'il y ait une liste, donc vous devez ajouter un deuxième nom pour transformer les noms en liste, par exemple Amy. Si vous ne voulez pas d'Amy dans votre liste, vous pouvez utiliser remove pour la supprimer ensuite.
solution_code: |
- names is Jake, Amy
- your_name is ask Who are you?
- add your_name to names
- print names at random
- - title: "Les élèves oublient d'utiliser to/from dans add/remove"
+ noms {is} Jake, Amy
+ ton_nom {is} {ask} Qui es-tu ?
+ {add} ton_nom {to} noms
+ {print} noms {at} {random}
+ - title: "Les élèves oublient d'utiliser à/de dans ajoute/supprime"
example:
error_text: |
- Without to/from the add/remove command won't work.
+ Sans à/de, la commande ajoute/supprime ne marchera pas..
error_code: |
- adventures is story, parrot, dice
- choice is Which adventure do you like best?
- add choice
- remove dice
- print I love adventures at random
+ aventures {is} histoire, perroquet, dé
+ choix {is} Quelle aventure tu préfères?
+ {add} choix
+ {remove} dé
+ {print} J'aime aventures {at} {random}
solution_text: |
- Hedy has to know which list the item should be added to/removed from.
+ Hedy doit savoir à quelle liste l'élément doit être ajouté/supprimé.
solution_code: |
- adventures is story, parrot, dice
- choice is Which adventure do you like best?
- add choice to adventures
- remove dice from adventures
- print I love adventures at random
+ aventures est histoire, perroquet, dé
+ choix est Quelle aventure préférez-vous ?
+ ajoute choix à aventures
+ supprime dé de aventures
+ affiche J'aime aventures au hasard
- level: '4'
sections:
- - title: "Students forget to use quotation marks on both sides of the text"
+ - title: "Les élèves oublient d'utiliser les guillemets des deux côtés du texte"
example:
error_text: |
- In this level print and ask need a set of quotation marks. One before of the text and one after.
+ Dans ce niveau, il affiche et demande ont besoin de guillemets. Un avant le texte et un après.
error_code: |
- print Hello
- mood is ask 'How are you?
+ affiche Hello
+ humeur demande 'Comment vas-tu ?
solution_text: |
- Add the correct quotation marks.
+ Ajoute correctement les guillemets.
solution_code: |
- print 'Hello'
- mood is ask 'How are you?'
- - title: "Students use the wrong quotation marks"
+ affiche 'Hello'
+ humeur est demande 'Comment vas-tu?'
+ - title: "Les élèves utilisent les mauvais guillemets"
example:
error_text: |
- It is important to start your lesson by checking if the students know how to type a quotation mark properly. ELse they might use the "double quotes" or the `skewed one`.
+ Il est important de commencer votre cours en vérifiant si les étudiants savent comment taper un guillemet correctement. Sinon, ils pourraient utiliser les "doubles guillemets" ou les guillemets inversés ` .
error_code: |
- print `Welcome to the restaurant`
- food is ask "What would you like to order?"
+ print `Bienvenue au restaurant`
+ nourriture is demande "Que voulez-vous commander?"
solution_text: |
- These are the correct quotation marks:
+ Ce sont les guillemets corrects :
solution_code: |
- print 'Welcome to the restaurant'
- food is ask 'What would you like to order?'
- - title: "Students use an apostrophe in their text"
+ affiche 'Bienvenue au restaurant'
+ nourriture est demande 'Que voulez-vous commander ?'
+ - title: "Les élèves utilisent une apostrophe dans leur texte"
example:
error_text: |
- From this level on apostrophes are not allowed. They are often used in English when thyping contractions like you're, don't or what's.
+ A partir de ce niveau, les apostrophes ne sont plus autorisées. Elles sont souvent utilisées en français pour signifier l'élision de voyelles comme dans l'entrée, par exemple.
error_code: |
- print 'You're not allowed to type this'
+ affiche 'Vous n'êtes pas autorisé à entrer ceci'
solution_text: |
- You can choose to use the wrong grammar and just leave the apostrophe out. Or you could use the ` as an apostrophe.
+ Vous pouvez choisir d'utiliser la mauvaise grammaire et d'omettre l'apostrophe. Vous pouvez aussi utiliser le ` comme apostrophe.
solution_code: |
- print 'Youre allowed to type this'
- print 'And you`re able to do this'
+ print 'T'es autorisé à entrer ceci'
+ print 'Et t`es capable de faire ceci'
- level: '5'
sections:
- - title: "Students forget to use print in an if command"
+ - title: "Les élèves oublient d'utiliser `{print}` dans une commande `{if}`"
example:
error_text: |
- After students use if or else they forget to use a second command like print or ask.
+ Après avoir utilisé `{if}`ou `{else}`, les élèves oublient d'utiliser une deuxième commande comme `{print}` ou `{ask}`.
error_code: |
- if name is Hedy 'Great!'
- else 'Hedy is better!'
+ si nom est Hedy 'Super!'
+ sinon 'Hedy est mieux!'
solution_text: |
Add the print command to fix it.
solution_code: |
diff --git a/content/pages/pl.yaml b/content/pages/pl.yaml
index 8a1810a5437..86cc14c6f13 100644
--- a/content/pages/pl.yaml
+++ b/content/pages/pl.yaml
@@ -147,15 +147,15 @@ sections:
error_code: "napizs Nie rób literówek!\n"
solution_text: "Naucz swoich uczniów, by zwracali uwagę na wiadomości z błędami. W ten sposób szybciej dojdą do tego, co poszło nie tak.\n"
solution_code: "napisz Nie rób literówek!\n"
- - title: Students forget that the ask command has changed
+ - title: Uczniowie zapominają, że komenda ask uległa zmianie
example:
- error_text: "In this level students learn about variables. The ask command requires a variable as well, but students forget this.\n"
+ error_text: "Na tym poziomie uczniowie uczą się o zmiennych. Komenda ask również wymaga zmiennej, ale uczniowie o tym zapominają.\n"
error_code: "zapytaj Co chciałbyś zjeść?\n"
solution_text: "W tym poziomie musisz wskazać Hedy'emu, gdzie przechować odpowiedź, by użyć ją później. Coś takiego nazywane jest 'zmienną'.\n"
solution_code: "zamówienie to Co chciałbyś zjeść?\n"
- title: 'Uczniowie próbują użyć komendy ''dołącz'' '
example:
- error_text: "For some students it might be frustrating to learn that the echo command doesn't work anymore. That's why it's very important to explain the advantages of using variables. For example you can use multiple variables in a code, and you can put them anywhere you like in a sentence!\n"
+ error_text: "Dla niektórych uczniów frustrujące może być to, że polecenie echo już nie działa. Dlatego bardzo ważne jest, aby wyjaśnić zalety korzystania ze zmiennych. Na przykład można używać wielu zmiennych w kodzie i można je umieszczać w dowolnym miejscu w zdaniu!\n"
error_code: "odpowiedź to zapytaj Czemu dołącz już nie działa?!\ndołącz\n"
solution_text: "Użyj zmiennej.\n"
solution_code: "odpowiedź to zapytaj Czemu dołącz już nie działa?!\nnapisz odpowiedź\n"
@@ -179,7 +179,7 @@ sections:
title: Uczniowie używają nieistniejącej zmiennej
- level: '3'
sections:
- - title: Students try to print whole lists
+ - title: Uczniowie próbują wyświetlić całe listy
example:
error_text: "A list can't be printed. You can only print one item from the list with at random.\n"
error_code: "groceries is apples, milk, chocolate\nprint groceries\n"
@@ -516,7 +516,7 @@ sections:
solution_text: "This is the correct code:\n"
solution_code: "temperature = 25\nprint('It is ', temperature, 'degrees outside')\n"
title: Często popełniane błędy
- key: common_mistakes
+ key: częste_pomyłki
intro: "Możesz uczyć się na błędach, zwłaszcza w programowaniu!\nPomyłki są nieuniknione, dając przy tym świetną okazję do uczenia się, jednak znalezienie odpowiedniego ich rozwiązania może okazać się dość problematyczne dla samych nauczycieli.\nSzczególnie w późniejszych poziomach, kiedy kod staje się coraz dłuższy i bardziej skomplikowany. Z tego też powodu stworzyliśmy listę najczęściej spotykanych błędów w każdym z poziomów, wraz z ich rozwiązaniami.\n"
title: Dokumentacja
learn-more-sections:
diff --git a/content/pages/ru.yaml b/content/pages/ru.yaml
index 2f01e4dc9d0..a3c48df5657 100644
--- a/content/pages/ru.yaml
+++ b/content/pages/ru.yaml
@@ -147,7 +147,7 @@ sections:
- title: "Создайте свое собственное приключение"
text: |
It is also possible for teachers to create your own adventure. [This video](https://www.youtube.com/watch?v=A0zbXpxX4q4) shows you how to create your own adventure as a teacher and add it to your class(es).
- - title: "Исследовать страницу"
+ - title: "Страница «Обзор»"
text: |
On the [explore](https://hedycode.com/explore) page you can view the work of other Hedy users. You can try out their programs and use them as inspiration to create something cool yourself.
You can also add a program you've made to the explore page yourself by clicking 'Save and share code' in the coding screen or go to My Programs and click 'Share'.
@@ -1108,18 +1108,18 @@ learn-more-sections:
title: Hedy в новостях
start-sections:
- title: Текстовое программирование стало проще!
- text: "Учиться программировать бывает сложно. Это не значит, что программирование сложно само по себе. Однако, как и при изучении русского языка, нужно запоминать правила и практиковаться.\n\nСейчас вы без труда читаете этот текст. Но помните ли вы, как сложно было читать в раннем детстве? Каждая буква давалась с трудом.\nТак же и с программированием: поначалу бывает трудно, но со временем становится проще.\n\nХэди — *поэтапный* язык программирования. Это значит, что вам не придётся изучать все правила с самого начала.\nНа первых нескольких этапах правил не так много, так что вы спокойно привыкнете к самому процессу программирования.\nНа каждом новом этапе добавляется несколько новых правил, так что вы постепенно изучаете всё больше *команд* — инструкций для компьютера.\n"
+ text: "Многие школы и учителя по всему миру хотят научить своих учеников программированию. Вначале это часто делается с помощью игровых инструментов, начиная от робота Beebot и заканчивая\nScratch Junior или Scratch. После использования таких инструментов дети часто хотят перейти к более мощным текстовым языкам программирования, таким как Python.\n\nОднако Python сложен, потому что он доступен только на английском языке и требует от учеников одновременного изучения сложных концепций программирования и синтаксиса.\nHedy - это простой способ начать изучать текстовые языки программирования! Hedy бесплатен в использовании, имеет открытый исходный код и не похож ни на один другой язык текстового программирования по трем параметрам.\n\n1. Hedy является мультиязычным, вы можете использовать Hedy на своем родном языке.\n2. Hedy является постепенным, поэтому вы можете изучать одну концепцию и ее синтаксис за раз.\n3. Hedy создан для работы в классе, что позволяет учителям полностью адаптировать опыт своих учеников.\n"
- title: Многоязычное программирование
text: "В то время как почти все текстовые языки программирования имеют ключевые слова на английском языке, такие как `for` или `repeat`, Hedy можно использовать на любом языке! В настоящее время мы поддерживаем 39 различных языков, включая испанский, арабский, упрощенный китайский и хинди. Если ваш язык недоступен, вы всегда можете начать новый перевод.\n"
- title: Пошаговое обучение
text: "Изучение языка программирования может оказаться непосильной задачей, поскольку учащимся приходится одновременно изучать концепции (например, if-else или циклы) и синтаксис (например, кавычки или круглые скобки). В Hedy понятия сначала вводятся с небольшим количеством синтаксиса, а затем совершенствуются. Научно доказанный способ обучения!\n"
-- title: "Multi-lingual programming"
+- title: "Создан для классной комнаты"
text: |
- While almost all textual programming language have keywords in English, such as `for` or `repeat`, Hedy can be used in any language! We currently support 39 different languages, including Spanish, Arabic, Simplified Chinese and Hindi. If your language is not available you can always start a a new translation.
-- title: "Built for the classroom"
+ Hedy предназначен для детей в возрасте от 10 лет и старше и разработан для использования в классе.
+ Учителя могут использовать наши бесплатные встроенные планы уроков, а также создавать собственные уроки и загружать их в пользовательский интерфейс Hedy.
+- title: "Программирование в контексте"
text: |
- Hedy is suitable for kids aged 10 and up and designed for classroom use.
- Teachers can use our free, built-in lesson plans, but can also author their own lessons and load these into the Hedy user interface.
+ Hedy демонстрирует программирование в самом широком смысле и может быть использован различными увлекательными способами. Hedy позволяет создавать цифровые и интерактивные истории, красочные рисунки, которые можно не только показывать на экране, но и рисовать пером или вышивать на рубашке, а также использовать для создания игр или приложений с кнопками и действиями на клавиатуре.
- title: Понадобится ли мне опыт программирования?
text: "Да! Hedy имеет \"открытый исходный код\", что означает, что каждый может помочь нам сделать Hedy лучше.\nВы можете найти наш код на Github.\nЕсли вам нравится Hedy и вы хотите внести свой вклад, мы принимаем (и очень благодарны за это) пожертвования!\n"
- title: Бесплатен ли Хэди?
diff --git a/content/pages/vi.yaml b/content/pages/vi.yaml
index 026f022f43f..9c799de667a 100644
--- a/content/pages/vi.yaml
+++ b/content/pages/vi.yaml
@@ -24,8 +24,8 @@ sections:
text: "Là giáo viên, bạn có thể tạo lớp học cho học sinh của mình. Trong lớp học này, bạn có thể xem tài khoản của học sinh, xem những chương trình học sinh viết và giám sát quá trình học tập.\nĐây là video hướng dẫn nhanh cách tạo lớp học trong Hedy.\n"
- title: "Tùy chỉnh lớp học của bạn"
text: |
- You can also customize your class and choose which adventures are available for them. This way your students won't be overwhelmed by the amount of adventures and levels, and they can specifically focus on the adventures you'd like them to practice with.
- This [video](https://www.youtube.com/watch?v=qva9gXBoUwY&t=10s) shows you how to customize your class.
+ Bạn cũng có thể tủy chỉnh lớp học và cho phép những nội dung phù hợp xuất hiện. Bằng cách này, học sinh của bạn sẽ không bị choáng ngợp bởi lượng kiến thức và có thể tập trung vào những bài học được lựa chọn bởi giáo viên.
+ Đây là video hướng dẫn bạn cách tùy chỉnh lớp học.
- title: Tài khoản học sinh
text: "Có hai cách để học sinh tham gia lớp học của bạn. Học sinh của bạn có thể tự tạo tài khoản, hoặc bạn có thể tạo tài khoản cho học sinh của mình.\n\n**Học sinh tự tạo tài khoản**\nCũng như giáo viên, học sinh có thể truy cập website của Hedy và tạo tài khoản cho bản thân. Quá trình vào lớp rất đơn giản, học sinh chỉ cần truy cập đường dẫn lời mời.\nBạn có thể thấy link mời trên trang lớp học, và có thể gửi nó đến học sinh của mình. Để quá trình diễn ra thuận lợi, hãy nhớ rằng học sinh cần đăng nhập vào Hedy khi họ truy cập link.\n\n**Giáo viên tạo tài khoản cho học sinh**\nĐôi khi, việc tự tạo một loạt tài khoản cho học sinh của bạn sẽ dễ dàng hơn. Điều này có thể được thực hiện bằng cách nhấp vào nút 'tạo tài khoản học sinh' và điền tên người dùng và mật khẩu cho họ.\nCác học sinh có thể đăng nhập với tên người dùng và mật khẩu mà bạn đã chọn. Sau đó, họ có thể thay đổi tên người dùng hoặc mật khẩu nếu muốn và họ sẽ vẫn ở trong lớp học của bạn.\n"
- title: Cài đặt ngôn ngữ ưu tiên
diff --git a/content/quizzes/ar.yaml b/content/quizzes/ar.yaml
index f7f6c6dc3dc..5fad5b4d1da 100644
--- a/content/quizzes/ar.yaml
+++ b/content/quizzes/ar.yaml
@@ -2852,10 +2852,10 @@ levels:
- feedback: No that's not it
option: In line 4 = should have been used instead of ==
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
hint: The symbols are right
- feedback: No that's not it
correct_answer: B
question_score: '10'
5:
@@ -2912,9 +2912,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2973,7 +2973,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ correct_answer: B
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - feedback: No that's not it
+ option: In line 1 == should be used instead of =
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ question_score: '10'
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/bg.yaml b/content/quizzes/bg.yaml
index d1754cf1937..094d02dbb90 100644
--- a/content/quizzes/bg.yaml
+++ b/content/quizzes/bg.yaml
@@ -2905,7 +2905,7 @@ levels:
code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- feedback: True!
option: You must be taller than 120 cm to go on the roller coaster
@@ -2914,7 +2914,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2943,8 +2943,8 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_text: What should be filled in in the blanks?
- feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
@@ -2959,10 +2959,10 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
- feedback: No that's not it
5:
question_text: 'Which symbol should be filled in on the blanks if the movie is suitable for kids for the age of 12 and up? '
code: "age = {ask} 'How old are you?'\nticket = {ask} 'Do you have a ticket?'\n{if} age _ and ticket == 'yes'\n {print} 'You can enter the movie theater.'\n{else}\n {print} 'You are not allowed to come in!'\n"
@@ -2978,3 +2978,153 @@ levels:
correct_answer: B
hint: '> means greater than'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ question_text: Which command should be filled in on the two blanks?
+ correct_answer: B
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - feedback: That's not it
+ option: In line 5 if should have been used instead of while
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/bn.yaml b/content/quizzes/bn.yaml
index 827e2c79b7f..4e992ee1d97 100644
--- a/content/quizzes/bn.yaml
+++ b/content/quizzes/bn.yaml
@@ -2884,7 +2884,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2935,7 +2935,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2944,7 +2944,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are।
+ feedback: There are।
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2972,9 +2972,159 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right।'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right।
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer।
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right।
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right।
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right।
+ question_text: How should this program be changed to that it works?
+ correct_answer: A
+ hint: The last one should say you win।
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet।
+ feedback: It only sprays when you're in there।
+ - option: The lights will always stay on।
+ feedback: That wouldn't be right।
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied।
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app।
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ correct_answer: C
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead।'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/ca.yaml b/content/quizzes/ca.yaml
index 1dea62c00d7..6da8ec86cc0 100644
--- a/content/quizzes/ca.yaml
+++ b/content/quizzes/ca.yaml
@@ -170,7 +170,7 @@ levels:
correct_answer: D
question_score: '10'
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
option: Line 2 and 4
@@ -2022,7 +2022,7 @@ levels:
- feedback: No that's not it
option: In line 4 = should have been used instead of ==
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
@@ -2090,7 +2090,7 @@ levels:
hint: '> 8 means more than 8'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2099,7 +2099,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2114,7 +2114,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - feedback: That is not right.
+ option: '`=!`'
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - feedback: No that's not it
+ option: In line 1 == should be used instead of =
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - feedback: You are correct!
+ option: = wetness - 1
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - feedback: That's not quite right.
+ option: '... change the second {if} into a {while}'
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - feedback: You are right!
+ option: name_player_1
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/cs.yaml b/content/quizzes/cs.yaml
index 8b6589cebe2..2456a397cde 100644
--- a/content/quizzes/cs.yaml
+++ b/content/quizzes/cs.yaml
@@ -2927,10 +2927,10 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_score: '10'
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
9:
@@ -2960,7 +2960,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
4:
@@ -2973,8 +2973,158 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
+ 15:
+ 6:
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ question_text: what is wrong with this code?
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ question_score: '10'
+ correct_answer: A
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ correct_answer: B
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - feedback: You should fill in a name, not a number
+ option: points_player_1
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
+ 1:
+ correct_answer: C
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 5:
+ correct_answer: C
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - feedback: No that's not it
+ option: In line 1 == should be used instead of =
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
diff --git a/content/quizzes/cy.yaml b/content/quizzes/cy.yaml
index 308065f2f41..0a21ec295a1 100644
--- a/content/quizzes/cy.yaml
+++ b/content/quizzes/cy.yaml
@@ -1119,7 +1119,7 @@ levels:
- option: Line 3 and 5
feedback: Great job!
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
correct_answer: D
hint: The lines after an `{if}` or `{else}` command should start with 4 spaces.
question_score: '10'
@@ -1986,7 +1986,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -1995,7 +1995,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2023,7 +2023,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
question_score: '10'
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
@@ -2114,7 +2114,157 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ correct_answer: B
+ question_score: '10'
+ feedback: That's not it
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - feedback: That's not quite right.
+ option: '... change the third {if} into a {while}'
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ correct_answer: A
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - feedback: That wouldn't be right.
+ option: The lights will always stay on.
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ correct_answer: B
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - feedback: You should fill in a name, not a number
+ option: points_player_1
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/da.yaml b/content/quizzes/da.yaml
index 7cc5f7052ca..7174ca2d48d 100644
--- a/content/quizzes/da.yaml
+++ b/content/quizzes/da.yaml
@@ -1198,7 +1198,7 @@ levels:
- option: Line 3 and 5
feedback: Great job!
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
correct_answer: D
hint: The lines after an `{if}` or `{else}` command should start with 4 spaces.
question_score: '10'
@@ -2037,11 +2037,11 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
question_score: '10'
9:
question_text: How many pieces of chocolate will give you a stomach ache according to this fitbit?
@@ -2070,7 +2070,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
hint: You win the game by having the most points
question_score: '10'
3:
@@ -2099,8 +2099,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_score: '10'
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
5:
@@ -2118,3 +2118,153 @@ levels:
correct_answer: B
hint: '> means greater than'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ correct_answer: C
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ correct_answer: C
+ 3:
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ question_text: Which command should be filled in on the two blanks?
+ correct_answer: B
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/de.yaml b/content/quizzes/de.yaml
index 814de86dfca..cb84f1c35ca 100644
--- a/content/quizzes/de.yaml
+++ b/content/quizzes/de.yaml
@@ -2798,7 +2798,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
question_score: '10'
6:
hint: "!= means 'is not'"
@@ -2834,7 +2834,7 @@ levels:
hint: '> means greater than'
question_score: '10'
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2843,7 +2843,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
9:
mp_choice_options:
@@ -2869,11 +2869,11 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
hint: You win the game by having the most points
question_score: '10'
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- feedback: No it's not, one player has a higher score
correct_answer: B
2:
question_text: Which of these codes has used the correct = or == symbol?
@@ -2919,3 +2919,153 @@ levels:
correct_answer: B
hint: '> means greater than'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - feedback: Correct
+ option: '`!=`'
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ correct_answer: B
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/el.yaml b/content/quizzes/el.yaml
index 283a821f0eb..15c2647fcbd 100644
--- a/content/quizzes/el.yaml
+++ b/content/quizzes/el.yaml
@@ -2883,8 +2883,8 @@ levels:
- feedback: No that's not it
option: In line 4 = should have been used instead of ==
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2942,7 +2942,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
@@ -2965,7 +2965,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2974,7 +2974,157 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ question_text: Which command should be filled in on the two blanks?
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - feedback: You should fill in a name, not a number
+ option: points_player_1
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/en.yaml b/content/quizzes/en.yaml
index f1456666afa..933fd9f4a95 100644
--- a/content/quizzes/en.yaml
+++ b/content/quizzes/en.yaml
@@ -3164,7 +3164,7 @@ levels:
- option: "In line 4 = should have been used instead of =="
feedback: "No that's not it"
- option: "In line 4 <= should have been used instead of >="
- feedback: "No that's not it"
+ feedback: "No that's not it"
correct_answer: "B"
hint: "The symbols are right"
question_score: "10"
@@ -3243,7 +3243,7 @@ levels:
question_text: "Which statement is true about this roller coaster?"
code: |
length = {ask} 'Please fill in your length in cm'
- {if} length > 120
+ {if} length < 120
{print} 'Sorry, you cannot go on this roller coaster.'
{else}
{print} 'Enjoy the ride'
@@ -3255,7 +3255,7 @@ levels:
- option: "You must be shorter than 120 cm to go on the roller coaster"
feedback: "> means greater than"
- option: "There are no length restrictions to go on the roller coaster"
- feedback: "There are."
+ feedback: "There are."
correct_answer: "A"
hint: "> means greater than"
question_score: "10"
@@ -3295,10 +3295,231 @@ levels:
- option: "'player 2 loses'"
feedback: "Look at who has the highest score!"
- option: "'It is a tie'"
- feedback: "No it's not, one player has a higher score"
+ feedback: "No it's not, one player has a higher score"
correct_answer: "B"
hint: "You win the game by having the most points"
question_score: "10"
+ 15:
+ 1:
+ question_text: "Which symbol should be used on the blank?
+ Tip: You must keep guessing until you get it right."
+ code: |
+ answer = 0
+ while answer _ 'Amsterdam'
+ answer = ask 'What is the capital city of the Netherlands?'
+ print 'You have given the correct answer'
+ mp_choice_options:
+ - option: "`=!`"
+ feedback: "That is not right."
+ - option: "`==`"
+ feedback: "You don't have to keep guessing if you've given the right answer."
+ - option: "`!=`"
+ feedback: "Correct"
+ - option: "`=`"
+ feedback: "That's not it"
+ correct_answer: "C"
+ hint: "Keep guessing until you say Amsterdam"
+ question_score: "10"
+ 2:
+ question_text: "Which of these codes has used the correct symbol(s)?"
+ mp_choice_options:
+ - option: |
+ ```
+ {while} name = Hedy
+ ```
+ feedback: "No"
+ - option: |
+ ```
+ {while} age = 24
+ ```
+ feedback: "No"
+ - option: |
+ ```
+ {while} time > 0
+ ```
+ feedback: "Yes!"
+ - option: |
+ ```
+ {while} answer == yes'
+ ```
+ feedback: "A quotation mark is missing"
+ correct_answer: "C"
+ hint: "When you are comparing two answers you should use =="
+ question_score: "10"
+ 3:
+ question_text: "Which command should be filled in on the two blanks?"
+ code: |
+ _ age >= 18
+ print 'you are not allowed in this bar'
+ mp_choice_options:
+ - option: "`{in}`"
+ feedback: "That's not it"
+ - option: "`{while}`"
+ feedback: "You are right"
+ - option: "`{for}`"
+ feedback: "That's not it"
+ - option: "`{range}`"
+ feedback: "That's not it"
+ correct_answer: "B"
+ hint: "You are not allowed in the bar as long as you are 17 or younger"
+ question_score: "10"
+ 4:
+ question_text: "What's wrong with this code?"
+ code: |
+ options = 1, 2, 3, 4, 5, 6
+ print 'Throw 6 as fast as you can!'
+ thrown = 0
+ tries = 0
+ while thrown == 6
+ thrown = options at random
+ print 'You threw ' thrown
+ tries = tries + 1
+ print 'Yes! You have thrown 6 in ' tries ' tries.'
+ mp_choice_options:
+ - option: "In line 1 == should be used instead of ="
+ feedback: "No that's not it"
+ - option: "Line 2 misses quotation marks"
+ feedback: "That's not right"
+ - option: "In line 5 if should have been used instead of while"
+ feedback: "That's not it"
+ - option: "In line 5 != should have been used instead of =="
+ feedback: "You are correct"
+ correct_answer: "D"
+ hint: "There is something wrong in line 5"
+ question_score: "10"
+ 5:
+ question_text: "What should be placed on the blank to make this program work correctly?"
+ code: |
+ wetness = 10
+ while wetness != 0
+ print 'Your hair is still wet, hair dryer on!'
+ sleep 1
+ clear
+ wetness _
+
+ print 'All dry!'
+ mp_choice_options:
+ - option: "= wetness"
+ feedback: "That will not change anything"
+ - option: "= wetness = 1"
+ feedback: "You can't have two times = in one line"
+ - option: "= wetness - 1"
+ feedback: "You are correct!"
+ - option: "= wetness + 1"
+ feedback: "The program should count down"
+ correct_answer: "C"
+ hint: "wetness should get less each time"
+ question_score: "10"
+ 6:
+ question_text: "What is wrong with this code?"
+ code: |
+ lives = 100
+ {while} lives != 0
+ answer = {ask} 'Are you annoyed yet?'
+ {if} answer == 'yes'
+ lives = lives - 1
+ mp_choice_options:
+ - option: "while should be if"
+ feedback: "No that is not right"
+ - option: "if should be while"
+ feedback: "No that is not right"
+ - option: "Line 3 should start with more indentation"
+ feedback: "No that's not right"
+ - option: "Line 2 should start with less indentation"
+ feedback: "That is correct"
+ correct_answer: "D"
+ hint: "Look closely at the indentation"
+ question_score: "10"
+ 7:
+ question_text: "How should this program be changed to that it works?"
+ code: |
+ {print} 'Guess which number'
+ numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
+ number = numbers {at} {random}
+ game = 'on'
+ {if} game == 'on'
+ guess = {ask} 'Which number do you think it is?'
+ {if} guess < number
+ {print} _
+ {if} guess > number
+ {print} _
+ {if} guess == number
+ {print} _
+ game = 'over'
+ mp_choice_options:
+ - option: "... change the first {if} into a {while}"
+ feedback: "Perfect!"
+ - option: "... change the second {if} into a {while}"
+ feedback: "That's not quite right."
+ - option: "... change the third {if} into a {while}"
+ feedback: "That's not quite right."
+ - option: "... change the fourth {if} into a {while}"
+ feedback: "That's not quite right."
+ correct_answer: "A"
+ hint: "The last one should say you win."
+ question_score: "10"
+ 8:
+ question_text: "Which statement is true about this automated toilet system?"
+ code: |
+ while toilet == 'occupied'
+ lights = 'on'
+ air_freshener_sprays = 'yes'
+ sleep 60
+ else
+ lights = 'off'
+ mp_choice_options:
+ - option: "The lights and air freshener will turn off after 1 minute"
+ feedback: "False!"
+ - option: "The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet"
+ feedback: "Great job"
+ - option: "The air freshener sprays once you leave the toilet."
+ feedback: "It only sprays when you're in there."
+ - option: "The lights will always stay on."
+ feedback: "That wouldn't be right."
+ correct_answer: "B"
+ hint: "The block after the while command keeps happening while the toilet is occupied."
+ question_score: "10"
+ 9:
+ question_text: "What will the diet app say if you have eaten 1600 calories today?"
+ code: |
+ calories = {ask} 'How many calories have you eaten today?'
+ {while} calories <= 1000
+ {print} 'You could eat some more'
+ {while} calories > 1000 and calories =< 2000
+ {print} 'That is alright'
+ {while} calories > 2000
+ {print} 'You have had enough for today'
+ mp_choice_options:
+ - option: "Nothing. 1600 is not programmed into the app."
+ feedback: "No"
+ - option: "you could eat some more"
+ feedback: "No"
+ - option: "That is alright"
+ feedback: "Yes!"
+ - option: "You have eaten enough for today"
+ feedback: "No"
+ correct_answer: "C"
+ hint: "1600 is between 1000 and 2000"
+ question_score: "10"
+ 10:
+ question_text: "What should be filled in in the blanks? Tip: the player with the most points is in the lead."
+ code: |
+ name_player_1 = {ask} 'Name player 1:'
+ name_player_2 = {ask} 'Name player 2:'
+ {while} points_player_1 > points_player_2
+ {print} _ ' is in the lead right now!'
+ mp_choice_options:
+ - option: "name_player_1"
+ feedback: "You are right!"
+ - option: "name_player_2"
+ feedback: "No they are losing!"
+ - option: "points_player_1"
+ feedback: "You should fill in a name, not a number"
+ - option: "points_player_2"
+ feedback: "You should fill in a name, not a number"
+ correct_answer: "A"
+ hint: "You win the game by having the most points. Your name should appear on the screen"
+ question_score: "10"
# Empty format for a question to use later
# 10:
diff --git a/content/quizzes/eo.yaml b/content/quizzes/eo.yaml
index 4ad0c2d109d..86a493383ff 100644
--- a/content/quizzes/eo.yaml
+++ b/content/quizzes/eo.yaml
@@ -1339,7 +1339,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2127,8 +2127,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2194,7 +2194,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- feedback: True!
option: You must be taller than 120 cm to go on the roller coaster
@@ -2203,7 +2203,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2233,7 +2233,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_score: '10'
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ 2:
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ question_text: Which of these codes has used the correct symbol(s)?
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - feedback: You are right
+ option: '`{while}`'
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ correct_answer: C
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ correct_answer: D
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ mp_choice_options:
+ - feedback: Perfect!
+ option: '... change the first {if} into a {while}'
+ - feedback: That's not quite right.
+ option: '... change the second {if} into a {while}'
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ correct_answer: B
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/es.yaml b/content/quizzes/es.yaml
index eb35d6e54de..a75feef77d3 100644
--- a/content/quizzes/es.yaml
+++ b/content/quizzes/es.yaml
@@ -18,30 +18,22 @@ levels:
question_text: "¿Qué debe introducirse en los huecos para que aparezca el texto \"Hello!\"?"
mp_choice_options:
- option: |
- ```
- {echo}
- ```
+ `{echo}`
feedback: "`{echo}` repite una respuesta dada."
- option: |
- ```
- {print}
- ```
+ `{print}`
feedback: "Correcto !"
- option: |
- ```
- hello
- ```
+ `hola`
feedback: "Hello no es un comando."
- option: |
- ```
- {ask}
- ```
+ `{ask}`
feedback: "Con `{ask}`, puedes preguntar una pregunta."
correct_answer: "B"
- hint: "_?_ Hola Mundo !"
+ hint: "_ ¡Hola mundo!"
question_score: '10'
code: |
- ___ Hello!
+ _ ¡Hola!
3:
question_text: "¿Cómo preguntas cuál el color favorito de alguien?"
mp_choice_options:
@@ -77,8 +69,8 @@ levels:
mp_choice_options:
- option: "`{print}` faltante en la línea 1."
feedback: "¡Correcto!"
- - option: "La línea 1 está mal escrita."
- feedback: "Yo soy esta escribido incorrecto a propósito; Hedy todavia no entiende las apóstrofes."
+ - option: "El comando de la línea 2 está mal escrito."
+ feedback: "El comando está bien escrito."
- option: "`{echo}` no es un comando."
feedback: "`{echo}` es un comando, hay otro error."
- option: "¡Nada! ¡Este código está perfecto!"
@@ -90,27 +82,19 @@ levels:
question_text: "¿Qué comando falta en la línea 2?"
code: |-
{ask} ¿Cuál es tu mascota favorita?
- _?_ Entonces tu mascota favorita es..."
+ _ Así que tu mascota favorita es...
mp_choice_options:
- option: |
- ```
- {print}
- ```
+ `{print}`
feedback: "No, quieres que el programa te repita la respuesta."
- option: |
- ```
- Hedy
- ```
+ `Hedy`
feedback: "Hedy no es un comando."
- option: |
- ```
- {ask}
- ```
+ `{ask}`
feedback: "Con `{ask}` puedes preguntar una pregunta."
- option: |
- ```
- {echo}
- ```
+ `{echo}`
feedback: "Exacto !"
correct_answer: "D"
hint: "Quieres ver la respuesta al final de la línea 2..."
@@ -127,9 +111,9 @@ levels:
feedback: "`{print}` el la línea 1 está correcto."
- option: "In line 2, `{print}` should be replaced with `{ask}`."
feedback: "Genial! Pusiste atención !"
- - option: "Line 3 has to begin with `{print}` instead of `{echo}`."
+ - option: "La línea 3 tiene que empezar con `{print}` en vez de `{echo}`."
feedback: "`{echo}` es correcto."
- - option: "In line 4, `{print}` is spelled wrong."
+ - option: "En la línea 4, `{print}` está mal escrito."
feedback: "Hay un error de la de ortografía en otro lugar..."
correct_answer: "B"
hint: "Verifica la forma en que se escriben los comandos."
@@ -137,18 +121,18 @@ levels:
7:
question_text: "Que pasa de malo con este código ?"
code: |-
- {print} Welcome at Hedys restaurant!
- {ask} What would you like to eat?
- {echo} So you want to order ...
- {print} Coming right up! Enjoy!
+ {print} ¡Bienvenido al restaurante Hedy's!
+ {ask} ¿Qué te gustaría comer?
+ {echo} Así que quieres pedir …
+ {print} ¡Ya viene! ¡Que aproveche!
mp_choice_options:
- option: "In line 1 `{print}` needs to be replaced with `{ask}`"
feedback: "Estás seguro/a que hay algo incorrecto ?"
- option: "In line 1 `{print}` needs to be replaced with `{echo}`"
feedback: "Estás seguro/a que hay algo incorrecto ?"
- option: "In line 3 `{echo}` needs to be replaced with `{print}`"
- feedback: "Are you sure something is wrong?"
- - option: "Nothing! This is a perfect code!"
+ feedback: "¿Estás seguro de que algo va mal?"
+ - option: "¡Nada! ¡El código está perfecto!"
feedback: "Correcto !"
correct_answer: "D"
hint: "Chequea el código línea por línea"
@@ -156,13 +140,13 @@ levels:
8:
question_text: "Como usas el comando `{echo}`?"
mp_choice_options:
- - option: "You can use it to `{ask}` a question."
+ - option: "Puedes usarlo para `{ask}` una pregunta."
feedback: "Para eso es `{ask}` !"
- - option: "You can use it to `{print}` text."
+ - option: "Puedes usarlo exactamente de la misma manera que `{print}`."
feedback: "Para eso es `{print}` !"
- - option: "You can use it to repeat an answer."
+ - option: "Puedes utilizarlo para repetir una respuesta."
feedback: "Buen trabajo !"
- - option: "You can use it to make text disappear."
+ - option: "Puedes utilizarlo para hacer que el texto desaparezca."
feedback: "Eso no es correcto..."
correct_answer: "C"
hint: "`{echo}` de usa después de un comando para `{ask}`."
@@ -170,23 +154,23 @@ levels:
9:
question_text: "Que para de malo con este código ?"
code: |-
- {print} Hello!
- {print} How are you doing?
- {echo} So you are doing...
+ {print} ¡Hola!
+ {print} ¿Qué tal?
+ {echo} Así que estás...
mp_choice_options:
- option: "`{print}` in line 1 should be `{ask}`"
- feedback: "No, `{print}` is right. Where is the question being asked?"
+ feedback: "No, `{print}` es correcto. ¿Dónde se hace la pregunta?"
- option: "`{print}` in line 2 should be `{ask}`"
- feedback: "Super!"
+ feedback: "¡Super!"
- option: "`{echo}` in line 3 should be `{ask}`"
feedback: "No, `{echo}` es correcto. Donde se está preguntando la pregunta ?"
- - option: "Nothing. This is a perfect code!"
+ - option: "Nada. ¡El código está perfecto!"
feedback: "Busca con más cuidado por el error..."
correct_answer: "B"
hint: "`{ask}` te deja preguntar una pregunta"
question_score: '10'
10:
- question_text: "Which output will be in your outputscreen after you've run this code?"
+ question_text: "¿Qué resultado habrá en tu pantalla de salida después de ejecutar este código?"
code: |
{ask} Are you ready to go to level 2?
{echo}
@@ -213,40 +197,40 @@ levels:
1:
question_text: "Cuál declaración es verdadera?"
mp_choice_options:
- - option: "In level 2 the `{print}` command doesn't exist anymore"
- feedback: "`{print}` todavia sirve"
- - option: "In level 2 the `{ask}` command doesn't exist anymore"
- feedback: "`{ask}` todavia funciona !"
- - option: "In level 2 the `{echo}` command doesn't exist anymore"
+ - option: "Puedes usar el comando `{print}`para hacer preguntas."
+ feedback: "Para eso sirve preguntar"
+ - option: "Puedes usar el comando `{ask}` para mostrar las respuestas."
+ feedback: "Eso no es verdad"
+ - option: "Con el comando `{print}` puedes hacer que el texto aparezca"
feedback: "Bueno"
- - option: "In level 2 all the level 1 commands still work"
- feedback: "No one command doesn't work anymore."
+ - option: "Con el comando {sleep}, puedes eliminar texto de tu pantalla."
+ feedback: "Así es como no funciona `{sleep}`."
correct_answer: "C"
- hint: "`{print}` y `{ask}` todavía existen."
+ hint: "`{print}` todavía funciona de la misma manera que en el nivel 1"
question_score: '10'
2:
- question_text: "Which code is correct?"
+ question_text: "¿Qué código es correcto?"
mp_choice_options:
- option: |
```
- name {is} {ask} What is your name?
+ nombre {is} {ask} ¿Cómo te llamas?
```
- feedback: "Super!"
+ feedback: "¡Super!"
- option: |
```
- {ask} {is} name What is your name
+ {ask} {is} nombre Cómo te llamas
```
feedback: "Las palabras son correcta, la orden no esta correcta !"
- option: |
```
- {ask} What is your name?
+ {ask} ¿Cómo te llamas?
```
feedback: "Esto funciona en el primer nivel, pero en el nivel 2 y arriba sirve diferente."
- option: |
```
- {ask} What is your name? {is} name
+ {ask} ¿Cómo te llamas? {is} nombre
```
- feedback: "The words are right, the order isn't!"
+ feedback: "Las palabras son correctas, ¡el orden no!"
correct_answer: "A"
hint: "`{ask}` no funciona como en el nivel 1."
question_score: '10'
@@ -256,44 +240,44 @@ levels:
nombre {is} Marleen
{print} nombre va al mercado y compra una manzana
mp_choice_options:
- - option: "name goes to the market and she buys an apple."
+ - option: "nombre va al mercado y compra una manzana."
feedback: "La palabra nombre es reemplazada con Marleen"
- - option: "Marleen goes to the market."
- feedback: "The second part of the sentence isn't left out!"
- - option: "Marleen goes to the market and she buys an apple."
+ - option: "Marleen va al mercado."
+ feedback: "¡La segunda parte de la frase no se ha omitido!"
+ - option: "Marleen va al mercado y compra una manzana."
feedback: "Right on!"
- - option: "Marleen goes to the market and Marleen buys an apple."
- feedback: "She is not replaced with the name"
+ - option: "Marleen va al mercado y Marleen compra una manzana."
+ feedback: "No se le sustituye por el nombre"
correct_answer: "C"
hint: "The palabra nombre es reemplazada com Marleen."
question_score: '10'
4:
- question_text: "What will you see on the output screen when you run this code?"
+ question_text: "¿Qué verás en la pantalla de salida cuando ejecutes este código?"
code: |-
nombre {is} Hedy
{print} Hola mi nombre es nombre !
mp_choice_options:
- option: "Hi my name is name"
- feedback: "The variable name is replaced with Hedy"
+ feedback: "El nombre de la variable se reemplaza por Hedy"
- option: "Hi my name is Hedy"
- feedback: "The variable name is replaced with Hedy"
+ feedback: "El nombre de la variable se reemplaza por Hedy"
- option: "Hi my Hedy is name"
- feedback: "The variable name is replaced with Hedy"
+ feedback: "El nombre de la variable se reemplaza por Hedy"
- option: "Hi my Hedy is Hedy"
feedback: "Correcto, este error se va arreglar en el tercer nivel!"
correct_answer: "D"
hint: "'nombre' se está reemplazando con 'Hedy' en los dos lugares"
question_score: '10'
5:
- question_text: "Que pasa cuando uses el comando `{sleep}`"
+ question_text: "¿Qué pasa cuando usas el comando `{sleep}`?"
mp_choice_options:
- - option: "It slows down your computer"
+ - option: "Ralentiza tu ordenador"
feedback: "Afortunadamente no !"
- - option: "It closes down Hedy"
- feedback: "fortunately not!"
- - option: "Your program pauses for a second and then continues"
+ - option: "Se cierra Hedy"
+ feedback: "¡afortunadamente no!"
+ - option: "Tu programa se pausa durante un segundo y después continúa"
feedback: "Eso es correcto !"
- - option: "You put it at the end so Hedy knows your program is finished"
+ - option: "Lo pones al final para que Hedy sepa que tu programa ha acabado"
feedback: "No, sería inútil al final de tu código"
correct_answer: "C"
hint: "La computadora espera por un segundo en el comando de suspensión"
@@ -301,687 +285,671 @@ levels:
6:
question_text: "Que deberia estar en las líneas ?"
code: |-
- {print} Y el premio para el mejor lenguaje de programación es para...
- _?_
- {print} Hedy !
+ {print} Y el premio para el mejor lenguaje de programación es para...
+ _
+ {print} ¡Hedy!
mp_choice_options:
- option: |
- ```
- {sleep}
- ```
+ `{sleep}`
feedback: "Perfecto !"
- option: |
- ```
- {echo}
- ```
+ `{echo}`
feedback: "No hay nada para repetir aquí"
- option: |
- ```
- {print}
- ```
+ `{print}`
feedback: "No hay texto para `{print}` allí."
- option: |
- ```
- {ask}
- ```
+ `{ask}`
feedback: "No hay ninguna pregunta para preguntar"
correct_answer: "A"
- hint: "Pause for dramatic effect..."
+ hint: "Pausa para un efecto dramático..."
question_score: '10'
7:
- question_text: "What command should be used on line 2?"
+ question_text: "¿Qué comando se debería usar en la línea 2?"
code: |-
- {print} I will explode in 3 seconds!
- _?_
- {print} BOOM!
+ {print} ¡Explotaré en 3 segundos!
+ _
+ {print} ¡BOOM!
mp_choice_options:
- option: |
```
{print} 3
```
- feedback: "You don't need to `{print}`"
+ feedback: "No necesitas `{print}`"
- option: |
```
{sleep} 3
```
- feedback: "Perfect!"
+ feedback: "¡Perfecto!"
- option: |
```
{sleep}
```
- feedback: "This way the bomb will explode in 1 second"
+ feedback: "De esta manera la bomba explotará en 1 segundo"
- option: |
```
{sleep} {sleep} {sleep}
```
- feedback: "Make it easier on yourself by using the number 3"
+ feedback: "Póntelo más fácil usando el número 3"
correct_answer: "B"
- hint: "You want the computer to wait for 3 seconds"
+ hint: "Quieres que el ordenador espere durante 3 segundos"
question_score: '10'
8:
- question_text: "How would you correct the first line of code?"
+ question_text: "¿Cómo corregirías la primera línea de código?"
code: |-
- {ask} {is} How old are you?
- {print} age
+ {ask} {is} ¿Cuántos años tienes?
+ {print} edad
mp_choice_options:
- option: |
```
- age {ask} {is} How old are you?
+ edad {ask} {is} ¿Cuántos años tienes?
```
- feedback: "That is the wrong order"
+ feedback: "Ese es el orden incorrecto"
- option: |
```
- {ask} {is} age How old are you?
+ {ask} {is} edad ¿Cuántos años tienes?
```
- feedback: "That is the wrong order"
+ feedback: "Ese es el orden incorrecto"
- option: |
```
- age {is} {ask} How old are you?
+ edad {is} {ask} ¿Cuántos años tienes?
```
- feedback: "You get it!"
+ feedback: "¡Lo conseguiste!"
- option: |
```
- age {is} How old are you?
+ edad {is} ¿Cuántos años tienes?
```
feedback: "Where is the `{ask}` command?"
correct_answer: "C"
- hint: "The variable name should come first"
+ hint: "El nombre de la variable debe ir primero"
question_score: '10'
9:
- question_text: "What is going wrong in this code?"
+ question_text: "¿Qué está fallando en este código?"
code: |-
- dogs {is} animal
- {print} I love animal
+ perros {is} animal
+ {print} Amo los animal
mp_choice_options:
- - option: "Line 1 should say: dogs `{is}` animals"
- feedback: "The variable name is animal"
- - option: "Line 1 should say: animal `{is}` dogs"
+ - option: "La línea 1 debería decir: perros `{is}` animales"
+ feedback: "El nombre de la variable es animal"
+ - option: "La línea 1 debería decir: animal `{is}` perros"
feedback: "Great!"
- - option: "Line 2 should say: `{print}` I love animals"
- feedback: "The variable name is animal"
- - option: "Line 2 should say: `{sleep}` I love animals"
- feedback: "Sleep is not used to `{print}` text"
+ - option: "La línea 2 debería decir: `{print}` Amo los animales"
+ feedback: "El nombre de la variable es animal"
+ - option: "La línea 2 debería decir: `{sleep}` Amo los animales"
+ feedback: "Dormir no se usa para `{print}` texto"
correct_answer: "B"
- hint: "You want to `{print}` 'I love dogs'"
+ hint: "Quieres `{print}` 'Amo los perros'"
question_score: '10'
10:
- question_text: "What command should be used on the line 1?"
+ question_text: "¿Qué comando se debería usar en la línea 1?"
code: |-
- flavor {is} _?_
- {print} Your favorite icecream is...
+ sabor {is} _
+ {print} Tu helado favorito es...
{sleep}
- {print} flavor
+ {print} sabor
mp_choice_options:
- option: |
```
{sleep} 3
```
- feedback: "You want to know the favorite flavor!"
+ feedback: "¡Quieres saber el sabor favorito!"
- option: |
```
- {print} strawberries
+ {print} fresas
```
- feedback: "You do not want a `{print}` command at the middle of the line..."
+ feedback: "No quieres un comando `{print}`en mitad de una línea..."
- option: |
```
- strawberries, chocolate, vanilla
+ fresas, chocolate, vainilla
```
- feedback: "This way you are making a list. You don't want that now."
+ feedback: "Así se hace una lista. Ahora no queremos eso."
- option: |
```
- {ask} What flavor icecream do you like?
+ {ask} ¿Qué sabor de helado te gusta?
```
- feedback: "That's right!"
+ feedback: "¡Eso es correcto!"
correct_answer: "D"
- hint: "You want to `{ask}` a question"
+ hint: "Quieres `{ask}` una pregunta"
question_score: '10'
3:
1:
- question_text: "What command do you use to let Hedy pick something arbitrarily?"
+ question_text: "¿Qué comando(s) usas para dejar que Hedy elija algo arbitrariamente?"
mp_choice_options:
- option: |
- ```
- {print}
- ```
- feedback: "`{print}` is used to print text"
+ `{print}`
+ feedback: "`{print}` se usa para imprimir texto"
- option: |
- ```
- {ask}
- ```
- feedback: "`{ask}` is used to ask a question"
+ `{ask}`
+ feedback: "`{ask}` se usa para hacer una pregunta"
- option: |
- ```
- {is}
- ```
- feedback: "`{is}` is used to make a list"
+ `{is}`
+ feedback: "`{is}` se usa para hacer una lista"
- option: |
- ```
- {at} {random}
- ```
- feedback: "Correct!"
+ `{at}` `{random}`
+ feedback: "¡Correcto!"
correct_answer: "D"
- hint: "Arbitrarily means without a plan or randomly."
+ hint: "Arbitrariamente significa sin planificar o de manera aleatoria."
question_score: '10'
2:
- question_text: "What's wrong with this code?"
+ question_text: "¿Qué falla en este código?"
code: |-
- animals {is} dog cat cow
- {print} animals {at} {random}
- mp_choice_options:
- - option: "You need commas in line 1: dog, cat, cow."
- feedback: "Good job!"
- - option: "Line 1 needs to start with `{print}`."
- feedback: "No, you don't need `{print}`"
- - option: "Line 2 needs to say 'animal' instead of 'animals'',"
- feedback: "animals is correct."
- - option: "`{at} {random}` is spelled incorrectly"
- feedback: "`{at} {random}` is the correct spelling"
+ animales {is} perro gato vaca
+ {print} animales {at} {random}
+ mp_choice_options:
+ - option: "Necesitas comas en la línea 1: perro, gato, vaca."
+ feedback: "¡Buen trabajo!"
+ - option: "La línea 1 tiene que empezar con `{print}`."
+ feedback: "No, no necesitas `{print}`"
+ - option: "La línea 2 tiene que decir 'animal' en vez de 'animales'"
+ feedback: "animales es correcto."
+ - option: "`{at} {random}` está mal escrito"
+ feedback: "`{at} {random}` está bien escrito"
correct_answer: "A"
- hint: "There's something wrong in line 1"
+ hint: "Hay algo mal en la línea 1"
question_score: '10'
3:
question_text: "How do you fix the mistake in line 2 of this code?"
code: |-
- options {is} rock, paper, scissors
- {print} rock, paper, scissors {at} {random}
+ opciones {is} piedra, papel, tijeras
+ {print} piedra, papel, tijeras {at} {random}
mp_choice_options:
- option: |
```
{at} {random} {print} options
```
- feedback: "You're almost there. The order of the words isn't right yet."
+ feedback: "Ya casi está. El orden de las palabras todavía no está bien."
- option: |
```
- {print} rock {at} {random}
+ {print} piedra {at} {random}
```
- feedback: "you don't always want the Hedy to {print} rock, sometimes you want scissors or paper."
+ feedback: "no siempre quieres que Hedy {print} piedra, a veces quieres tijeras o papel."
- option: |
```
{print} options {at} {random}
```
- feedback: "Very good!"
- - option: "Nothing, the code is correct!"
- feedback: "Look carefully for the mistake"
+ feedback: "¡Muy bien!"
+ - option: "¡Nada, el código es correcto!"
+ feedback: "Busca cuidadosamente el error"
correct_answer: "C"
- hint: "The variable (the list) is called options."
+ hint: "La variable (la lista) se llama opciones."
question_score: '10'
4:
- question_text: "What should change in line 2 to print a random price?"
+ question_text: "¿Qué debería cambiar en la línea 2 para mostrar un precio aleatorio?"
code: |-
- prices {is} 1 dollar, 100 dollar, 1 million dollar
- {print} price {at} {random}
+ precios {is} 1 dólar, 100 dólares, 1 millón de dólares
+ {print} precio {at} {random}
mp_choice_options:
- option: |
```
- {print} price
+ {print} precio
```
- feedback: "You don't want to `{print}` the word price, but you want to `{print}` one price out of your list `{at} {random}`"
+ feedback: "No quieres `{print}` la palabra precio, pero sí quieres `{print}` un precio de la lista `{at} {random}`"
- option: |
```
- {print} prices {at} {random}
+ {print} precios {at} {random}
```
- feedback: "Great! You've really paid attention."
+ feedback: "¡Genial! Has prestado atención."
- option: |
```
- {print} {at} {random} price
+ {print} {at} {random} precio
```
- feedback: "`{at} {random}` is placed behind the variable."
- - option: "Nothing, this code is alright."
- feedback: "Look carefully for the mistake you missed!"
+ feedback: "`{at} {random}` se pone detrás de la variable."
+ - option: "Nada, tu código está bien."
+ feedback: "¡Busca cuidadosamente el error que has pasado por alto!"
correct_answer: "B"
- hint: "The variable name is prices"
+ hint: "El nombre de la variable es precios"
question_score: '10'
5:
- question_text: "What is wrong in this code?"
- code: |-
- question {is} {ask} What do you want to know?
- {print} question
- answers {is} yes, no, maybe
- {print} answers {at} {random}
- mp_choice_options:
- - option: "Line 1 needs to say `{print}` instead of `{ask}`"
- feedback: "No, that's not wrong."
- - option: "Line 2 needs to say `{ask}` instead of `{print}`"
- feedback: "No that's not wrong."
- - option: "Line 2 needs to say answers `{at} {random}` `{is}` yes, no, maybe"
- feedback: "No, that's not wrong."
- - option: "Nothing, this code is perfect"
- feedback: "That's right!"
+ question_text: "¿Qué falla en este código?"
+ code: |-
+ pregunta {is} {ask} ¿Qué quieres saber?
+ {print} pregunta
+ respuestas {is} sí, no, quizás
+ {print} respuestas {at} {random}
+ mp_choice_options:
+ - option: "La línea 1 tiene que decir `{print}` en vez de `{ask}`"
+ feedback: "No, no está mal."
+ - option: "La línea 2 tiene que decir `{ask}` en vez de `{print}`"
+ feedback: "No, no está mal."
+ - option: "La línea 2 tiene que decir respuestas `{at} {random}` `{is}` sí, no, quizás"
+ feedback: "No, no está mal."
+ - option: "Nada, el código está perfecto"
+ feedback: "¡Eso es!"
correct_answer: "D"
- hint: "Does this code even have a mistake?"
+ hint: "¿Tiene algún error este código?"
question_score: '10'
6:
- question_text: "What's wrong with this code?"
- code: |-
- question {is} {ask} What do you want to know?
- answers yes, no, maybe
- {print} answers {at} {random}
- mp_choice_options:
- - option: "Line 2 needs to say question instead of answers"
- feedback: "No that's not right"
- - option: "Line 2 needs the `{is}` command"
- feedback: "Correct"
- - option: "Line 3 needs to say answer instead of answers"
- feedback: "No the variable's called answers"
- - option: "Nothing! This code is great!"
- feedback: "Actually, line 2 has a mistake."
+ question_text: "¿Qué falla en este código?"
+ code: |-
+ pregunta {is} {ask} ¿Qué quieres saber?
+ respuestas sí, no, quizás
+ {print} respuestas {at} {random}
+ mp_choice_options:
+ - option: "La línea 2 tiene que decir pregunta en vez de respuestas"
+ feedback: "No, eso no es correcto"
+ - option: "La línea 2 necesita el comando `{is}`"
+ feedback: "Correcto"
+ - option: "La línea 3 tiene que decir respuesta en vez de respuestas"
+ feedback: "No, la variable se llama respuestas"
+ - option: "¡Nada! ¡Este código está genial!"
+ feedback: "En realidad, la línea 2 tiene un fallo."
correct_answer: "B"
- hint: "There is something wrong with line 2."
+ hint: "Hay algo mal en la línea 2."
question_score: '10'
7:
- question_text: "What does the `{add}` command do?"
+ question_text: "¿Qué hace el comando `{add}`?"
code: |-
books {is} Harry Potter, The Hobbit, Green Eggs and Ham
your_book {is} {ask} What is your favorite book?
{add} your_book {to} books
{print} books {at} {random}
mp_choice_options:
- - option: "The `{add}` command removes a random book from the list"
- feedback: "The remove command removes, the add command adds"
- - option: "The `{add}` command adds a random book to a list"
- feedback: "It doesn't. It adds your answer to the list!"
- - option: "The `{add}` command adds your favorite book to the list"
- feedback: "Correct!"
- - option: "The `{add}` command prints your favorite book."
- feedback: "No, it adds your favorite book to the list"
+ - option: "El comando `{add}` elimina un libro al azar de la lista"
+ feedback: "El comando eliminar elimina, el comando añadir añade"
+ - option: "El comando `{add}` añade un libro al azar a una lista"
+ feedback: "No es así. ¡Añade tu respuesta a la lista!"
+ - option: "El comando `{add}` añade tu libro favorito a la lista"
+ feedback: "¡Correcto!"
+ - option: "El comando `{add}` imprime tu libro favorito."
+ feedback: "No, añade tu libro favorito a la lista"
correct_answer: "C"
- hint: "The `{add}` command adds a book, but which one?"
+ hint: "El comando `{add}` añade un libro, ¿pero cuál?"
question_score: '10'
8:
- question_text: "What is the output of this code?"
+ question_text: "¿Cuál es el resultado de este código?"
code: |-
- crisps {is} sea salt, paprika, sour cream
- {remove} sea salt {from} crisps
- {remove} paprika {from} crisps
- {print} crisps {at} {random}
+ patatas_fritas {is} sal marina, pimentón, crema agria
+ {remove} sal marina {from} patatas_fritas
+ {remove} pimentón {from} patatas_fritas
+ {print} patatas_fritas {at} {random}
mp_choice_options:
- - option: "You can't tell, because Hedy will `{print}` one of the 3 flavors `{at} {random}`"
- feedback: "Take a look at the `{remove}` commands"
+ - option: "No se puede decir, porque Hedy `{print}` uno de los 3 sabores `{at} {random}`"
+ feedback: "Echa un vistazo a los comandos `{remove}`"
- option: "sea salt"
- feedback: "sea salt is removed from the list"
- - option: "paprika"
- feedback: "Paprika is removed from the list"
- - option: "sour cream"
- feedback: "That's right!"
+ feedback: "la sal marina se ha eliminado de la lista"
+ - option: "pimentón"
+ feedback: "Pimentón se ha eliminado de la lista"
+ - option: "crema agria"
+ feedback: "¡Cierto!"
correct_answer: "D"
- hint: "There are 3 flavors, bit 2 are removed. Which one remains?"
+ hint: "Hay 3 sabores, pero 2 se han eliminado. ¿Cuál queda?"
question_score: '10'
9:
- question_text: "What's wrong with this code?"
- code: |-
- colors {is} blue, purple, green
- chosen_color {is} {ask} Which haircolor wouldn't your like to have?
- {remove} chosen_color {from} colors
- {print} I will dye my hair color {at} {random}
- mp_choice_options:
- - option: "Line 3 should say: `{remove}` blue `{from}` colors"
- feedback: "Maybe you want blue hair though!"
- - option: "Line 3 should have an `{add}` command instead of a `{remove}` command"
- feedback: "You want to remove the chosen color so `{remove}` is right."
- - option: "In line 4 the variable should be called colors instead of color"
- feedback: "Great job!"
- - option: "Nothing, this is a correct code!"
- feedback: "Find the mistake!"
+ question_text: "¿Qué le pasa a este código?"
+ code: |-
+ colores {is} azul, morado, verde
+ color_elegido {is} {ask} ¿Qué color de pelo no te gustaría tener?
+ {remove} color_elegido {from} colores
+ {print} Me teñiría el pelo de color {at} {random}
+ mp_choice_options:
+ - option: "La línea 3 debería decir: `{remove}` azul `{from}` colores"
+ feedback: "¡Tal vez quieras el pelo azul!"
+ - option: "La línea 3 debe tener un comando `{add}` en vez de un comando `{remove}`"
+ feedback: "Quieres eliminar el color elegido así que `{remove}` es correcto."
+ - option: "En la línea 4 la variable se debería llamar colores en vez de color"
+ feedback: "¡Gran trabajo!"
+ - option: "Nada, ¡el código es correcto!"
+ feedback: "¡Encuentra el fallo!"
correct_answer: "C"
- hint: "Look at line 3"
+ hint: "Mira la línea 3"
question_score: '10'
10:
- question_text: "What should be on the _?_?"
+ question_text: "¿Qué debería ser en el _?"
code: |-
- walkers {is} dad, mom, Sam, Petra
- walked_yesterday {is} {ask} Who walked the dogs yesterday?
- {print} walked_yesterday shouldn't have to walk the dogs again today
+ senderistas {is} papá, mamá, Sam, Petra
+ camino_ayer {is} {ask} ¿Quién paseó a los perros ayer?
+ {print} camino_ayer no tendría que pasear a los perros otra vez hoy
_?_
- {print} walkers {at} {random} , it's your turn to walk the dogs!
+ {print} senderistas {at} {random} , ¡es tu turno de pasear a los perros!
mp_choice_options:
- option: |
```
- {remove} walked_yesterday {from} walkers
+ {remove} caminado_ayer {from} senderistas
```
- feedback: "Super!"
+ feedback: "¡Super!"
- option: |
```
- {remove} walked yesterday {to} walkers
+ {remove} caminado ayer {to} senderistas
```
feedback: "`{remove} {from}` or `{add} {to}`, not `{remove} {to}`"
- option: |
```
- {remove} walkers {from} yesterday
+ {remove} senderistas {from} ayer
```
- feedback: "yesterday is not a variable"
+ feedback: "ayer no es una variable"
- option: |
```
- {add} walked_yesterday {to} walkers
+ {add} caminado_ayer {to} senderistas
```
- feedback: "This increased the change that the person who walked yesterday now has to do it again. That's mean."
+ feedback: "Esto aumenta la probabilidad de que la persona que andó ayer tenga que hacerlo otra vez. Eso es malo."
correct_answer: "A"
- hint: "The person who walked the dog yesterday should be removed from the list."
+ hint: "Se debería borrar de la lista a la persona que paseó al perro ayer."
question_score: '10'
4:
1:
- question_text: "Which of these is true?"
- mp_choice_options:
- - option: "`{print}` and `{ask}` now need quotation marks"
- feedback: "That's right"
- - option: "Only `{print}` needs quotation marks"
- feedback: "`{ask}` needs quotation marks too!"
- - option: "`{at} {random}` doesn't work anymore in level 4"
- feedback: "`{at} {random}` still works"
- - option: "`{at} {random}` now needs quotation marks"
- feedback: "No, but 2 other commands do."
+ question_text: "¿Cuál de estos códigos es correcto?"
+ mp_choice_options:
+ - option: "```\n{print} '¡Tengo muchas ganas de hacer este cuestionario!'\n```\n"
+ feedback: "Eso es cierto"
+ - option: "```\n{print} ¡Tengo muchas ganas de hacer este cuestionario!\n```\n"
+ feedback: "¡`{ask}` también necesita comillas!"
+ - option: "```\n{print} '¡Tengo muchas ganas de hacer este cuestionario!'\n```\n"
+ feedback: "`{at} {random}` todavía funciona"
+ - option: "```\n{print} '¡Tengo muchas ganas de hacer este cuestionario!\n```\n"
+ feedback: "No, pero otros 2 comandos sí."
correct_answer: "A"
- hint: "In level 4 you need quotation marks for 2 commands."
+ hint: "En el nivel 4 necesitas comillas para 2 comandos."
question_score: '10'
2:
- question_text: "Which code uses the proper quotation marks?"
+ question_text: "¿Qué código utiliza las comillas adecuadas?"
mp_choice_options:
- option: |
```
{print} `hello`
```
- feedback: "This quotation mark is skewed, you need a straight one."
+ feedback: "Esta comilla está torcida, necesitas una recta."
- option: |
```
- {print} 'hello'
+ {print} 'hola'
```
- feedback: "Correct"
+ feedback: "Correcto"
- option: |
```
- {print} hello
+ {print} hola
```
- feedback: "There are no quotation marks here!."
+ feedback: "¡Aquí no hay comillas!."
- option: |
```
- {print} ,hello,
+ {print} ,hola,
```
- feedback: "This is a comma, you need quotation marks."
+ feedback: "Esto es una coma, necesitas comillas."
correct_answer: "B"
- hint: "Pick the right quotation marks."
+ hint: "Elige las comillas correctas."
question_score: '10'
3:
- question_text: "Where are the quotation marks used correctly?"
+ question_text: "¿Dónde se utilizan correctamente las comillas?"
mp_choice_options:
- option: |
```
{print} Hi Im Hedy
```
- feedback: "Add quotation marks please!"
+ feedback: "¡Añade comillas, por favor!"
- option: |
```
{print} 'Hi Im Hedy
```
- feedback: "Both before and after the words you want to print should be a quotation mark."
+ feedback: "Debe haber una comilla tanto antes como después de las palabras que quieras imprimir."
- option: |
```
'{print} Hi Im Hedy'
```
- feedback: "The first quotation mark should be behind the word {print}"
+ feedback: "La primera comilla estar detrás de la palabra {print}"
- option: |
```
{print} 'Hi Im Hedy'
```
- feedback: "Perfect!"
+ feedback: "¡Perfecto!"
correct_answer: "D"
- hint: "Both before and after the words you want to print should be a quotation mark."
+ hint: "Debe haber una comilla tanto antes como después de las palabras que quieras imprimir."
question_score: '10'
4:
- question_text: "Which statement is true?"
- mp_choice_options:
- - option: "You need quotation marks around the word `{print}`, like this: `'{print}'`."
- feedback: "The quotation marks shouldn't be around the command itself."
- - option: "You need quotation marks around the words you want to print."
- feedback: "Super!"
- - option: "You do not need quotation marks when using the `{ask}` command"
- feedback: "Both `{print}` and `{ask}` require quotation marks"
- - option: "You can choose yourself whether to use quotation marks or not."
- feedback: "Unfortunately, Hedy is stricter than that."
+ question_text: "¿Qué sentencia es verdadera?"
+ mp_choice_options:
+ - option: "Necesitas comillas alrededor de la palabra `{print}`, tal que así: `'{print}'`."
+ feedback: "Las comillas no deben ir alrededor del propio comando."
+ - option: "Necesitas comillas alrededor de las palabras que quieras imprimir."
+ feedback: "¡Super!"
+ - option: "No necesitas comillas cuando uses el comando `{ask}`"
+ feedback: "Tanto `{print}` como `{ask}` necesitan comillas"
+ - option: "Tú mismo puedes elegir si usar comillas o no."
+ feedback: "Por desgracia, Hedy es más estricto que eso."
correct_answer: "B"
- hint: "From level 4 on you need to use quotation marks."
+ hint: "Desde el nivel 4 en adelante necesitas usar comillas."
question_score: '10'
5:
- question_text: "What has to be changed in order for the game to work?"
+ question_text: "¿Qué hay que cambiar para que el juego funcione?"
code: |-
- options {is} rock, paper, scissors
- {print} 'options {at} {random}'
+ opciones {is} piedra, papel, tijeras
+ {print} 'opciones {at} {random}'
mp_choice_options:
- option: |
```
'{print} options {at} {random}'
```
- feedback: "Never put the quotation mark in front of the {print} command."
+ feedback: "Nunca pongas las comillas delante del comando {print}."
- option: |
```
{print} 'options' {at} {random}
```
- feedback: "options is a variable. You don't literally want to print 'options {at} {random}'."
+ feedback: "opciones es una variable. Literalmente no quieres imprimir 'opciones {at} {random}'."
- option: |
```
{print} options {at} {random}
```
- feedback: "That's right"
- - option: "Nothing, the game already works!"
- feedback: "Look carefully. There is an error."
+ feedback: "Eso es cierto"
+ - option: "Nada, ¡el juego ya funciona!"
+ feedback: "Presta atención. Hay un error."
correct_answer: "C"
- hint: "You don't want Hedy to literally print 'options {at} {random}', you want it to print 'rock' or 'paper' or 'scissors'."
+ hint: "No quieres que Hedy imprima literalmente 'opciones {at} {random}', quieres que imprima 'piedra' o 'papel' o 'tijeras'."
question_score: '10'
6:
- question_text: "What would be a good next line in this code?"
+ question_text: "¿Cuál sería una buena línea siguiente en este código?"
code: |-
- prices {is} 1 dollar, 100 dollars, 1 million dollars
+ precios {is} 1 dólar, 100 dólares, 1 millón dólares
mp_choice_options:
- option: |
```
- {print} 'You win...' prices {at} {random}
+ {print} 'Ganaste...' precios {at} {random}
```
- feedback: "Great! You get it!"
+ feedback: "¡Genial! ¡Lo conseguiste!"
- option: |
```
- {print} You win... 'prices {at} {random}'
+ {print} Ganaste... 'precios {at} {random}'
```
- feedback: "Hedy will literally print 'prices {at} {random}'"
+ feedback: "Hedy literalmente imprimirá 'precios {at} {random}'"
- option: |
```
- {print} You win... prices {at} {random}
+ {print} Ganaste... precios {at} {random}
```
- feedback: "You need some quotation marks!"
+ feedback: "¡Necesitas algunas comillas!"
- option: |
```
- {print} 'You win... prices {at} {random}'
+ {print} 'Ganaste... precios {at} {random}'
```
- feedback: "Hedy will literally print 'prices {at} {random}''"
+ feedback: "Hedy literalmente imprimirá 'precios {at} {random}''"
correct_answer: "A"
- hint: "Think carefully: what is a variable and should be outside of the quotation marks? And what are normal words that should be inside?."
+ hint: "Piénsalo bien: ¿Qué es una variable y debería estar fuera de las comillas?¿Y cuáles son las palabras que deberían estar dentro?"
question_score: '10'
7:
- question_text: "What's wrong with this code?"
+ question_text: "¿Qué le pasa a este código?"
code: |-
- question {is} {ask} What do you want to know?
- answers {is} yes, no, maybe
- {print} answers {at} {random}
+ pregunta {is} {ask} ¿Qué quieres saber?
+ respuestas {is} sí, no, quizás
+ {print} respuestas {at} {random}
mp_choice_options:
- - option: "Quotation marks are missing in line 1"
- feedback: "Correct!"
- - option: "Quotation marks are missing in line 2"
- feedback: "A variable doesn't need quotes"
- - option: "Quotation marks are missing in line 3"
- feedback: "You don't want Hedy to literally print 'answers {at} {random}' so no quotation marks needed here!"
- - option: "Nothing, this code is good as is!"
- feedback: "Look carefully. You missed a mistake!"
+ - option: "Faltan las comillas en la línea 1"
+ feedback: "¡Correcto!"
+ - option: "Faltan las comillas en la línea 2"
+ feedback: "Una variable no necesita comillas"
+ - option: "Faltan las comillas en la línea 3"
+ feedback: "No quieres que Hedy literalmente imprima 'respuestas {at} {random}' ¡así que no se necesitan comillas aquí!"
+ - option: "Nada, ¡tu código está bien como está!"
+ feedback: "Presta atención. Look carefully. ¡Te has saltado un error!"
correct_answer: "A"
- hint: "Check each line on whether they'd need quotation marks or not."
+ hint: "Comprueba en cada línea sí necesitan comillas o no."
question_score: '10'
8:
- question_text: "What would be a good next line for this code?"
+ question_text: "¿Qué sería una buena siguiente línea para este código?"
code: |-
- {print} 'Welcome at the money show!'
- {print} 'In front of you are 3 doors'
- door {is} {ask} 'Which door do you choose?'
+ {print} '¡Bienvenido al espectáculo del dinero!'
+ {print} 'Delante tuya hay 3 puertas'
+ puerta {is} {ask} '¿Qué puerta eliges?'
mp_choice_options:
- option: |
```
- {print} So you pick door door
+ {print} Así que eliges la puerta puerta
```
- feedback: "We need quotation marks"
+ feedback: "Necesitamos comillas"
- option: |
```
- {print} 'So you pick ' door door
+ {print} 'Así que eliges la ' puerta puerta
```
- feedback: "If the player chooses door 3, Hedy will say 'So you pick 3 3"
+ feedback: "Si el jugador elige puerta 3, Hedy dirá 'Así que eliges 3 3"
- option: |
```
- {print} 'So you pick door ' door
+ {print} 'Así que eliges la puerta ' puerta
```
- feedback: "Super!"
+ feedback: "¡Super!"
- option: |
```
- {print} 'So you pick door door'
+ {print} 'Así que eliges la puerta puerta'
```
- feedback: "Hedy will literally print 'So you pick door door"
+ feedback: "Hedy literalmente imprimirá 'Así que eliges la puerta puerta"
correct_answer: "C"
- hint: "The second word door should be replaced with the number, the first should still be the word door..."
+ hint: "La segunda palabra puerta se debe reemplazar con el número, la primera aun debe seguir siendo la palabra puerta..."
question_score: '10'
9:
- question_text: "What will never appear in your output screen?"
- code: |-
- clubs {is} Real Madrid, Bayern Munchen, Manchester United, Ajax
- {print} clubs {at} {random} ' is going the win the champions league'
- mp_choice_options:
- - option: "Ajax is going to win the champions league"
- feedback: "Hedy could `{print}` that"
- - option: "Real Madrid is going to win the champions league"
- feedback: "Hedy could `{print}` that"
- - option: "Bayer Munchen is going to win the champions league"
- feedback: "Hedy could `{print}` that"
- - option: "FC Barcelona is going to win the champions league"
- feedback: "That's right. It's not in the list"
+ question_text: "¿Qué no aparecerá nunca en tu pantalla de salida?"
+ code: |-
+ clubs {is} Real Madrid, Bayern Munich, Manchester United, Ajax
+ {print} clubs {at} {random} ' va a ganar la Liga de Campeones'
+ mp_choice_options:
+ - option: "Ajax va a ganar la Liga de Campeones"
+ feedback: "Hedy puede `{print}` eso"
+ - option: "Real Madrid va a ganar la Liga de Campeones"
+ feedback: "Hedy puede `{print}` eso"
+ - option: "Bayer Munich va a ganar la Liga de Campeones"
+ feedback: "Hedy puede `{print}` eso"
+ - option: "FC Barcelona va a ganar la Liga de Campeones"
+ feedback: "Cierto. No está en la lista"
correct_answer: "D"
- hint: "What are Hedy's options to randomly pick from?"
+ hint: "¿Cuáles son las opciones de Hedy para elegir al azar?"
question_score: '10'
10:
- question_text: "Which statement is true?"
- code: |-
- people {is} mom, dad, Emma, Sophie
- {print} The dishes are done by...
- {print} people {at} {random}
- mp_choice_options:
- - option: "Quotation marks are missing in line 1"
- feedback: "A list doesn't need quotation marks"
- - option: "Quotation marks are missing in line 2"
- feedback: "Correct"
- - option: "Quotation marks are missing in both line 2 and 3"
- feedback: "Line 3 doesn't need quotation marks because it's not printed literally"
- - option: "Nothing, this code has no mistakes"
- feedback: "You missed one!"
+ question_text: "¿Qué sentencia es verdadera?"
+ code: |-
+ gente {is} mamá, papá, Emma, Sofía
+ {print} La vajilla será lavada por...
+ {print} gente {at} {random}
+ mp_choice_options:
+ - option: "Faltan las comillas en la línea 1"
+ feedback: "Una lista no necesita comillas"
+ - option: "Faltan las comillas en la línea 2"
+ feedback: "Correcto"
+ - option: "Faltan las comillas en ambas líneas 2 y 3"
+ feedback: "La línea 3 no necesita comillas porque literalmente no se imprime"
+ - option: "Nada, este código no tiene fallos"
+ feedback: "¡Te dejaste una!"
correct_answer: "B"
- hint: "One line needs quotation marks, because you want it to be printed literally."
+ hint: "Una línea necesita comillas, porque quieres que se imprima literalmente."
question_score: '10'
5:
1:
- question_text: "What is true?"
+ question_text: "¿Qué comando debe rellenarse en el _?"
mp_choice_options:
- - option: "In level 5 `{print}` works differently than in level 4"
+ - option: "`{print}`\n"
feedback: "`{print}` is still the same"
- - option: "In level 5 `{ask}` works differently than in level 4"
+ - option: "`{if}`\n"
feedback: "`{ask}` is still the same"
- - option: "In level 5 `{ask}` and `{print}` work differently than in level 4"
+ - option: "`{sleep}`\n"
feedback: "`No these commands remain the same"
- - option: "In level 5 `{ask}` and `{print}` work the same as in level 4"
+ - option: "`{else}`\n"
feedback: "Correct!"
correct_answer: "D"
- hint: "We have only learned a new command in level 5."
+ hint: "¿Cuál va junto con el comando `{if}`?"
question_score: '10'
- code: "number {is} {ask} 'What is your lucky number?'\n{if} number {is} 5 {print} 'Mine too!'\n_?_ {print} 'My lucky number is 5!'"
+ code: "numero {is} {ask} '¿Cuál es tu número de la suerte?'\n{if} numero {is} 5 {print} '¡También el mío!'\n_?_ {print} '¡Mi número de la suerte es 5!'"
2:
- question_text: "What appears in your output screen when you type in the name Hedy?"
+ question_text: "¿Qué aparece en tu pantalla de salida cuando escribes Hedy en el nombre?"
code: |-
- name {is} {ask} 'What is your name?'
- {if} name {is} Hedy {print} 'fun' {else} {print} 'less fun'
+ nombre {is} {ask} '¿Cómo te llamas?'
+ {if} nombre {is} Hedy {print} 'divertido' {else} {print} 'menos divertido'
mp_choice_options:
- - option: "fun"
- feedback: "That's right!"
- - option: "less fun"
- feedback: "If the name is Hedy, it will say 'fun''"
+ - option: "divertido"
+ feedback: "¡Eso es cierto!"
+ - option: "menos divertido"
+ feedback: "Si el nombre es Hedy, dirá 'menos divertido''"
- option: "Hedy"
- feedback: "No, it doesn't print the name"
+ feedback: "No, no imprime el nombre"
- option: "Error"
- feedback: "Fortunately not!"
+ feedback: "¡Afortunadamente no!"
correct_answer: "A"
hint: "`{if}` name `{is}` Hedy `{print}` ...?"
question_score: '10'
3:
- question_text: "What is the right password?"
+ question_text: "¿Cuál es la contraseña correcta?"
code: |-
- password {is} {ask} 'What is the password?'
- {if} password {is} SECRET {print} 'Correct!'
- {else} {print} 'ALARM! INTRUDER!'
+ contraseña {is} {ask} '¿Cuál es la contraseña?'
+ {if} contraseña {is} SECRETA {print} '¡Correcto!'
+ {else} {print} '¡ALERTA! ¡INTRUSO!'
mp_choice_options:
- - option: "Correct!"
- feedback: "This is printed when you type in the correct password"
+ - option: "¡Correcto!"
+ feedback: "Esto se imprime cuando escribes la contraseña correcta"
- option: "SECRET"
- feedback: "That's right!'"
+ feedback: "¡Eso es cierto!'"
- option: "password"
- feedback: "The password isn't password..."
+ feedback: "La contraseña no es contraseña..."
- option: "ALARM INTRUDER"
- feedback: "This is printed when you type in the incorrect password!"
+ feedback: "¡Esto se imprime cuando escribes la contraseña incorrecta!"
correct_answer: "B"
- hint: "`{if}` password `{is}` ... `{print}` 'Correct!'!'"
+ hint: "`{if}` contraseña `{is}` ... `{print}` '¡Correcto!'!'"
question_score: '10'
4:
- question_text: "What does Hedy print when you type in the wrong password?"
+ question_text: "¿Qué imprimirá Hedy cuando escribas la contraseña incorrecta?"
code: |-
- password {is} {ask} 'What is the password?'
- {if} password {is} SECRET {print} 'Correct!'
- {else} {print} 'ALARM! INTRUDER!'
+ contraseña {is} {ask} '¿Cuál es la contraseña?'
+ {if} contraseña {is} SECRETA {print} '¡Correcto!'
+ {else} {print} '¡ALERTA! ¡INTRUSO!'
mp_choice_options:
- - option: "Correct"
- feedback: "That's printed if the correct answer is given, not the wrong one..."
+ - option: "Correcto"
+ feedback: "Eso se imprime si se da la respuesta correcta, no la incorrecta..."
- option: "SECRET"
- feedback: "That's not the right answer"
- - option: "Wrong!"
- feedback: "No, this is not what Hedy will print"
+ feedback: "Esa no es la respuesta correcta"
+ - option: "¡Incorrecto!"
+ feedback: "No, esto no es lo que Hedy imprimirá"
- option: "ALARM! INTRUDER!"
- feedback: "Great job!"
+ feedback: "¡Gran trabajo!"
correct_answer: "D"
- hint: "Your computer will sound the alarm for intruders!"
+ hint: "¡Tu ordenador dará la alarma a los intrusos!"
question_score: '10'
5:
- question_text: "Why will Hedy say 'ALARM! INTRUDER' when you type in 'secret'?"
- code: |-
- password {is} {ask} 'What is the password?'
- {if} password {is} SECRET {print} 'Correct!'
- {else} {print} 'ALARM! INTRUDER!'
- mp_choice_options:
- - option: "Because it needs to be in capitals, so SECRET"
- feedback: "Indeed!"
- - option: "Because the password is alarm"
- feedback: "No, this is not the password."
- - option: "Because it's spelled wrong."
- feedback: "That's not how you spell secret"
- - option: "Because Hedy makes a mistake"
+ question_text: "¿Por qué Hedy dirá '¡ALERTA! INTRUSO' cuando escribas 'secreta'?"
+ code: |-
+ contraseña {is} {ask} '¿Cuál es la contraseña?'
+ {if} contraseña {is} SECRETA {print} '¡Correcto!'
+ {else} {print} '¡ALERTA! ¡INTRUSO!'
+ mp_choice_options:
+ - option: "Poruqe tiene que ser en mayúsculas, así SECRETA"
+ feedback: "¡Cierto!"
+ - option: "Porque la contraseña es alarma"
+ feedback: "No, esta no es la contraseña."
+ - option: "Porque está mal escrito."
+ feedback: "Así no se escribe secreta"
+ - option: "Porque Because Hedy cometió un fallo"
feedback: "No, Hedy is right"
correct_answer: "A"
- hint: "The spelling of the word has to be exactly the same."
+ hint: "La ortografía de la palabra tiene que ser exactamente la misma."
question_score: '10'
6:
- question_text: "Which word should be on the place of the question mark in the last line?"
+ question_text: "¿Qué palabra debe ir en el lugar del signo de interrogación en la última línea?"
code: |-
- {print} 'Im Hedy the football fortune teller!'
- {print} 'I will predict what place your team will end up!'
- club is {ask} 'Which club is your favorite?'
- {if} club {is} ajax {print} 'Ajax is going to win of course!'
- _?_ {print} 'Sorry, your club is gonna be in last place...'
+ {print} '¡Soy Hedy, el advino de fútbol!'
+ {print} '¡Voy a predecir en que posición acabará tu equipo!'
+ equipo es {ask} '¿Cuál es tu equipo favorito?'
+ {if} equipo {is} ajax {print} '¡Ajax va a ganar por supuesto!'
+ _ {print} 'Lo siento, tu equipo va a quedar último...'
mp_choice_options:
- option: |
```
{if}
```
- feedback: "`{if}` is already in the line above"
+ feedback: "`{if}` ya está en la línea anterior"
- option: |
```
{at} {random}
```
- feedback: "No, you need `{else}`."
+ feedback: "No, necesitas `{else}`."
- option: |
```
{else}
@@ -991,642 +959,624 @@ levels:
```
{print}
```
- feedback: "`{print}` is already there, we need a word before it!"
+ feedback: "`{print}` ya está ahí, ¡necesitas una palabra antes de eso!"
correct_answer: "C"
- hint: "`{if}` goes together with...?"
+ hint: "`{if}` va junto con...?"
question_score: '10'
7:
- question_text: "Which word should be in the place of the question mark?"
+ question_text: "¿Qué palabra debe ir en el lugar del signo de interrogación?"
code: |-
- {print} 'I can predict if you will be a millionair or not!'
- name {is} {ask} 'Whats your name?'
- {if} name {is} Hedy {print} 'You will be a millionair!'
- {else} _?_ 'Unfortunately... No big money for you.'
+ {print} '¡Puedo predecir si serás millonario o no!'
+ nombre {is} {ask} '¿Cómo te llamas?'
+ {if} nombre {is} Hedy {print} '¡Vas a ser millonario!'
+ {else} _ 'Por desgracia... No hay mucho dinero para ti.'
mp_choice_options:
- option: |
- ```
- {if}
- ```
- feedback: "`{if}` is in the line above."
+ `{if}`
+ feedback: "`{if}` está en la línea anterior."
- option: |
- ```
- {at} {random}
- ```
- feedback: "No, you don't need `{at} {random}`."
+ `{at}` `{random}`
+ feedback: "No, no necesitas `{at} {random}`."
- option: |
- ```
- {else}
- ```
- feedback: "There already is an `{else}` command"
+ `{else}`
+ feedback: "Ya hay un comando `{else}`"
- option: |
- ```
- {print}
- ```
- feedback: "Awesome!"
+ `{print}`
+ feedback: "¡Increible!"
correct_answer: "D"
- hint: "After `{else}` a `{print}` command follows"
+ hint: "Tras `{else}` le sigue un comando `{print}`"
question_score: '10'
8:
- question_text: "Which word should be on the place of the question mark?"
+ question_text: "¿Qué palabra debe ir en el lugar del signo de interrogación?"
code: |-
- animal {is} {ask} 'What is your favorite animal?'
- {if} _?_ {is} penguin {print} 'Thats my favorite animal too!'
- {else} {print} 'Cool! I like penguins.'
+ animal {is} {ask} '¿Cuál es tu animal favorito?'
+ {if} _ {is} pingüino {print} '¡También es mi animal favorito!'
+ {else} {print} '¡Mola! Me gustan los pingüinos.'
mp_choice_options:
- option: |
```
- favorite animal
+ animal favorito
```
- feedback: "That's not the variable name."
+ feedback: "Ese no es el nombre de la variable."
- option: |
```
animal
```
- feedback: "Great job!"
+ feedback: "¡Gran trabajo!"
- option: |
- ```
- {if}
- ```
- feedback: "`{if}` is already there"
+ `{if}`
+ feedback: "`{if}` ya está ahí"
- option: |
- ```
- {print}
- ```
- feedback: "No, that's not it."
+ `{print}`
+ feedback: "No, no es eso."
correct_answer: "B"
- hint: "What the variable name?"
+ hint: "¿Cuál es el nombre de la variable?"
question_score: '10'
9:
- question_text: "Which door should you choose to escape??"
+ question_text: "¿Qué puerta debes elegir para escapar?"
code: |-
- {print} 'Escape from the haunted house!'
- {print} 'There are 3 doors in front of you'
- door {is} {ask} 'Which door do you choose?'
- monsters {is} vampire, werewolf, giant spider
- {if} door {is} 2 {print} 'Yay, you can escape!'
- {else} {print} 'You are being devoured by a... ' monsters {at} {random}
+ {print} '¡Escapa de la casa encantada!'
+ {print} 'Hay 3 puertas delante de ti'
+ puerta {is} {ask} '¿Qué puerta eliges?'
+ monstruos {is} vampiro, hombre lobo, araña gigante
+ {if} puerta {is} 2 {print} '¡Sí, puedes escapar!'
+ {else} {print} 'Eres devorado por un... ' monstruos {at} {random}
mp_choice_options:
- option: "1"
- feedback: "Bad choice! You're being eaten"
+ feedback: "¡Mala elección! Se te han comido"
- option: "2"
- feedback: "Super! You escaped!"
+ feedback: "¡Super! Escapaste!"
- option: "3"
- feedback: "Bad choice! You're being eaten."
- - option: "It's a trap, you will always be eaten!"
- feedback: "Luckily not!"
+ feedback: "¡Mala elección! Se te han comido."
+ - option: "Es una trampa, ¡siempre se te comerán!"
+ feedback: "¡Afortunadamente no!"
correct_answer: "B"
- hint: "One of the doors will keep you safe.."
+ hint: "Una de las puertas te mantendrá a salvo.."
question_score: '10'
10:
- question_text: "Which monster is standing behind door 1?"
- code: |-
- {print} 'Escape from the haunted house!'
- {print} 'There are 3 doors in front of you'
- door {is} {ask} 'Which door do you choose?'
- monsters {is} vampire, werewolf, giant spider
- {if} door {is} 2 {print} 'Yay, you can escape!'
- {else} {print} 'You are being devoured by a... ' monsters {at} {random}
- mp_choice_options:
- - option: "Hedy picks a random monster each time."
- feedback: "Awesome!"
- - option: "vampire"
- feedback: "Not always..."
- - option: "werewolf"
- feedback: "Not always..."
- - option: "giant spider"
- feedback: "Not always..."
+ question_text: "¿Qué monstruo se encuentra detrás de la puerta 1?"
+ code: |-
+ {print} '¡Escapa de la casa encantada!'
+ {print} 'Hay 3 puertas delante de ti'
+ puerta {is} {ask} '¿Qué puerta eliges?'
+ monstruos {is} vampiro, hombre lobo, araña gigante
+ {if} puerta {is} 2 {print} '¡Sí, puedes escapar!'
+ {else} {print} 'Eres devorado por un... ' monstruos {at} {random}
+ mp_choice_options:
+ - option: "Hedy elige un monstruo aleatorio cada vez."
+ feedback: "¡Increible!"
+ - option: "vampiro"
+ feedback: "No siempre..."
+ - option: "hombre lobo"
+ feedback: "No siempre..."
+ - option: "araña gigante"
+ feedback: "No siempre..."
correct_answer: "A"
- hint: "Mind the last 3 words... monsters `{at} {random}`..."
+ hint: "Cuidado con las 3 últimas palabras... monstruos `{at} {random}`..."
question_score: '10'
6:
1:
- question_text: "What's Hedy's output when you run this code?"
+ question_text: "¿Cuál es el resultado de Hedy cuando ejecutes este código?"
code: "{print} 2*10"
mp_choice_options:
- option: "20"
- feedback: "Correct!"
+ feedback: "¡Correcto!"
- option: "12"
- feedback: "No, the plus sign is used in addition"
+ feedback: "No, el signo más se usa en sumas"
- option: "2*10"
- feedback: "No, Hedy will calculate the answer"
+ feedback: "No, Hedy calculará la respuesta"
- option: "210"
- feedback: "Mind it's a calculation."
+ feedback: "Cuidado, es un cálculo."
correct_answer: "A"
- hint: "The `*` is used as a multiplication sign"
+ hint: "El `*` se usa como signo de multiplicación"
question_score: '10'
2:
- question_text: "Which sign do you use for an addition?"
+ question_text: "¿Qué signo usas para una suma?"
mp_choice_options:
- option: "`-`"
- feedback: "That's not it"
+ feedback: "Ese no"
- option: "plus"
- feedback: "That's not it"
+ feedback: "Ese no"
- option: "`*`"
- feedback: "That's not it"
+ feedback: "Ese no"
- option: "`+`"
- feedback: "Correct!"
+ feedback: "¡Correcto!"
correct_answer: "D"
hint: "It's the plus sign."
question_score: '10'
3:
- question_text: "What's Hedy's output when you run this code?"
+ question_text: "¿Cuál es el resultado de Hedy cuando ejecutes este código?"
code: "{print} '3*10'"
mp_choice_options:
- option: "30"
- feedback: "This would be the right answer if there were no quotation marks."
+ feedback: "Esta sería la respuesta correcta si no hubiera comillas."
- option: "13"
- feedback: "Try again.."
+ feedback: "Inténtalo de nuevo.."
- option: "3*10"
- feedback: "Correct! There are quotation marks, so Hedy will print it literally."
- - option: "Nothing, Hedy will give an error message."
- feedback: "No, Hedy will print it literally."
+ feedback: "¡Correcto! Hay comillas, así que Hedy las mostrará literalmente."
+ - option: "Nada, Hedy mostrará un mensaje de error."
+ feedback: "No, Hedy lo imprimirá literalmente."
correct_answer: "C"
- hint: "Mind the quotation marks!!"
+ hint: "¡¡Cuidado con las comillas!!"
question_score: '10'
4:
- question_text: "Kim is 10 years old. What will Hedy print for her?"
+ question_text: "Kim tiene 10 años. ¿Qué imprimirá Hedy para ella?"
code: |-
- name = {ask} 'How many letters are in your name?'
- age = {ask} 'How old are you?'
- luckynumber = name*age
- {print} 'Your lucky number is...' luckynumber
+ nombre = {ask} '¿Cuántas letras tiene tu nombre?'
+ edad = {ask} '¿Qué edad tienes?'
+ numero_suerte = nombre*edad
+ {print} 'Tu número de la suerte es...' numero_suerte
mp_choice_options:
- option: "30"
- feedback: "Mind, Hedy also prints 'Your lucky number is...'"
+ feedback: "Recuerda, Hedy también imprimirá 'Tu número de la suerte es...'"
- option: "10"
- feedback: "Please try again."
- - option: "Your lucky number is... 30"
- feedback: "That's right!"
- - option: "Your lucky number is... 10"
- feedback: "Her lucky number is name times age..."
+ feedback: "Por favor inténtalo de nuevo."
+ - option: "Tu número de la suerte es... 30"
+ feedback: "¡Eso es!"
+ - option: "Tu número de la suerte es... 10"
+ feedback: "Su número de la suerte es el nombre multiplicado por la edad..."
correct_answer: "C"
- hint: "Kim has 3 letters, she is 10 years old so: letters times age = 3*10 = 30."
+ hint: "Kim tiene 3 letras, ella tiene 10 años así que: letras por edad = 3*10 = 30."
question_score: '10'
5:
- question_text: "If 5 people eat at this restaurant, how much do they have to pay in total?"
- code: |-
- {print} 'Welcome to Hedys!'
- people = {ask} 'How many people are eating with us tonight?'
- price = people * 10
- {print} 'That will be ' price 'dollar please'
- mp_choice_options:
- - option: "5 dollars"
- feedback: "Unfortunately, it's not that cheap."
- - option: "10 dollars"
- feedback: "No, it's 10 dollars each."
- - option: "15 dollars"
- feedback: "The * means multiplication."
- - option: "50 dollars"
+ question_text: "Si 5 personas comen en este restaurante, ¿cuánto tienen que pagar en total?"
+ code: |-
+ {print} '¡Bienvenidos a Hedys!'
+ gente = {ask} '¿Cuántas personas van a comer con nosotros esta noche?'
+ precio = gente * 10
+ {print} 'Serán ' precio 'dólares por favor'
+ mp_choice_options:
+ - option: "5 dólares"
+ feedback: "Por desgracia, no es tan barato."
+ - option: "10 dólares"
+ feedback: "No, son 10 dólares cada uno."
+ - option: "15 dólares"
+ feedback: "El * significa multiplicación."
+ - option: "50 dólares"
feedback: "Great!"
correct_answer: "D"
hint: "`price` `is` `people` `times` 10"
question_score: '10'
6:
- question_text: "How much does a hamburger cost is this virtual restaurant?"
- code: |-
- {print} 'Welcome at Hedys diner'
- food = {ask} 'What would you like to eat?'
- price = 0
- {if} food {is} hamburger price = 15
- {if} food {is} fries price = 6
- mp_choice_options:
- - option: "15 dollars"
- feedback: "Super!"
- - option: "6 dollars"
- feedback: "The fries are 6 dollars"
- - option: "0 dollars"
- feedback: "The hamburger isn't free!"
- - option: "21 dollars"
- feedback: "That's the price for a hamburger and fries!"
+ question_text: "¿Cuánto cuesta una hamburguesa en este restaurante virtual?"
+ code: |-
+ {print} 'Bienvenido a la cena de Hedys'
+ comida = {ask} '¿Qué le gustaría comer?'
+ precio = 0
+ {if} comida {is} hamburguesa precio = 15
+ {if} comida {is} patatas fritas precio = 6
+ mp_choice_options:
+ - option: "15 dólares"
+ feedback: "¡Super!"
+ - option: "6 dólares"
+ feedback: "Las patatas fritas cuestan 6 dólares"
+ - option: "0 dólares"
+ feedback: "¡La hamburguesa no es gratis!"
+ - option: "21 dólares"
+ feedback: "¡Ese es el precio por una hamburguesa y patatas fritas!"
correct_answer: "A"
- hint: "Mind the fourth line."
+ hint: "Cuidado con la cuarta línea."
question_score: '10'
7:
- question_text: "Why does line 7 say 'price is price + 3' instead of 'price is 3'?"
- code: |-
- {print} 'Welcome at Hedys diner'
- food = {ask} 'What would you like to eat?'
- price = 0
- {if} food {is} hamburger price = price + 15
- {if} food {is} fries price = price + 6
- drinks is {ask} 'What would you like to drink?'
- {if} drinks {is} coke price = price + 3
- {if} drinks {is} water price = price + 1
- {print} price ' dollars please'
- mp_choice_options:
- - option: "It could have been `price = 3` just as well."
- feedback: "No, that's not true. Hedy needs to add 3 dollars to the total."
- - option: "Because Hedy doesn't understand `price = 3`."
- feedback: "Hedy would understand, but it wouldn't be right."
- - option: "Because Hedy would otherwise forget about the previous order. The price would be 3 dollars in total."
- feedback: "That's right!"
- - option: "Because the price is 0 dollars to begin with."
- feedback: "That's true, but not the reason"
+ question_text: "¿Por qué la línea 7 dice 'precio es precio + 3' en vez de 'precio es 3'?"
+ code: |-
+ {print} 'Bienvenido a la cena de Hedys'
+ comida = {ask} '¿Qué le gustaría comer?'
+ precio = 0
+ {if} comida {is} hamburguesa precio = precio + 15
+ {if} comida {is} patatas fritas precio = precio + 6
+ bebidas es {ask} '¿Qué le gustaría beber?'
+ {if} bebidas {is} refresco precio = precio + 3
+ {if} bebidas {is} agua precio = precio + 1
+ {print} precio ' dólares por favor'
+ mp_choice_options:
+ - option: "También podría haber sido `price = 3`."
+ feedback: "No, eso no es cierto. Hedy tiene que añadir 3 dólates al total."
+ - option: "Porque Hedy no entiende `price = 3`."
+ feedback: "Hedy lo entendería, pero no estaría bien."
+ - option: "Porque si no, Hedy se olvidaría del pedido anterior. El precio sería de 3 dólares en total."
+ feedback: "¡Eso es!"
+ - option: "Para empezar, porque el precio es 0 dólares."
+ feedback: "Eso es verdad, pero no es la razón"
correct_answer: "C"
- hint: "The price shouldn't be 3, but 3 dollars more than it already was"
+ hint: "El precio no debe ser 3 sino 3 dólares más de lo que ya es"
question_score: '10'
8:
- question_text: "Why is this code incorrect?"
+ question_text: "¿Por qué este código es incorrecto?"
code: |-
- correct answer = 3*12
- answer = {ask} 'What is 3 times 12?'
- {if} answer {is} correct answer {print} 'Good job!'
- {else} {print} 'No... It was ' correct answer
+ respuesta correcta = 3*12
+ respuesta = {ask} '¿Cuánto es 3 veces 12?'
+ {if} respuesta {is} respuesta correcta {print} '¡Buen trabajo!'
+ {else} {print} 'No... Fue ' respuesta correcta
mp_choice_options:
- - option: "There shouldn't be quotation marks in line 2"
- feedback: "No, there should be!"
- - option: "The variable is called correct answer, but a variable's name can only be 1 word. So it should be correct_answer"
- feedback: "Correct!"
- - option: "The `{if}` and `{else}` commands should be in the same line."
- feedback: "No, that's not true."
- - option: "The variable in line 2 can't be called answer, because it is too similar to the variable correct answer."
- feedback: "Variable names can be similar, but they can't be 2 words..."
+ - option: "No debería haber comillas en la línea 2"
+ feedback: "¡No, debería haber!"
+ - option: "La variable se llama respuesta correcta, pero un nombre de variable sólo puede ser una palabra. Así que debería ser respuesta_correcta"
+ feedback: "¡Correcto!"
+ - option: "Los comandos `{if}` y `{else}` deberían estar en la misma línea."
+ feedback: "No, eso no es cierto."
+ - option: "La variable en la línea 2 no se puede llamar respuesta, porque es muy similar a la variable respuesta correcta."
+ feedback: "Los nombres de las variables pueden ser parecidos, pero no pueden ser 2 palabras..."
correct_answer: "B"
- hint: "Inspect what the variables are called."
+ hint: "Revisa como se llaman las variables."
question_score: '10'
9:
- question_text: "Imagine you love football a 10, you've eaten 2 bananas and have washed your hands 3 times today. How smart does the silly fortune teller think you are?"
+ question_text: "Imagina que te gusta el fútbol un 10, te has comido 2 plátanos y te has lavado las manos 3 veces hoy. ¿Cómo de listo se cree que eres el necio adivino?"
code: |-
- {print} 'Im Hedy the silly fortune teller'
- {print} 'I will predict how smart you are!'
- football = {ask} 'On a scale of 0 to 10 how much do you love football?'
- bananas = {ask} 'How many bananas have you eaten this week?'
- hygiene = {ask} 'How many times did you wash your hands today??'
- result = bananas + hygiene
- result = result * football
- {print} 'You are ' result 'percent smart.'
+ {print} 'Soy Hedy el adivino de tontos'
+ {print} '¡Voy a predecir cómo eres de inteligente!'
+ fútbol = {ask} 'En una escala de 0 a 10, ¿cuánto amas el fútbol?'
+ plátanos = {ask} '¿Cuántos plátanos te has comido esta semana?'
+ higiene = {ask} '¿Cuántas veces te has lavado las manos hoy??'
+ resultado = plátanos + higiene
+ resultado = resultado * fútbol
+ {print} 'Eres ' resultado ' por ciento inteligente.'
mp_choice_options:
- option: "10%"
- feedback: "(2 bananas + 3 hygiene) * 10 football = 5*10 =?"
+ feedback: "(2 plátanos + 3 higiene) * 10 fútbol = 5*10 =?"
- option: "32%"
- feedback: "(2 bananas + 3 hygiene) * 10 football = 5*10 =?"
+ feedback: "(2 plátanos + 3 higiene) * 10 fútbol = 5*10 =?"
- option: "50%"
- feedback: "Super! You are 100 percent smart!"
+ feedback: "¡Super! ¡Eres 100 por cien inteligente!"
- option: "100%"
- feedback: "(2 bananas + 3 hygiene) * 10 football = 5*10 =?"
+ feedback: "(2 plátanos + 3 higiene) * 10 fútbol = 5*10 =?"
correct_answer: "C"
- hint: "(2 bananas + 3 hygiene) * 10 football = 5*10 =?"
+ hint: "(2 plátanos + 3 higiene) * 10 fútbol = 5*10 =?"
question_score: '10'
10:
- question_text: "Which statement is true?"
- code: |-
- name _?_ Hedy
- {print} name 'is walking trough the forrest'
- mp_choice_options:
- - option: "You can only fill in the word is on the `_?_`"
- feedback: "You are allowed to use the `=` sign as well"
- - option: "You can fill in either the word is or the `=` sign on the `_?_`"
- feedback: "Amazing!"
- - option: "You have to fill in =is= on the `_?_`"
- feedback: "No, one `=` sign is enough"
- - option: "You can only use the `=` sign when working with numbers, not with words."
- feedback: "You can also use `=` with words."
+ question_text: "¿Qué afirmación es cierta?"
+ code: |-
+ name _ Hedy
+ {print} nombre 'está caminando por el bosque'
+ mp_choice_options:
+ - option: "Sólo puedes rellenar la palabra en el `_`"
+ feedback: "También se permite que uses el signo `=`"
+ - option: "Puedes rellenar o la palabra es o el signo `=` en el `_`"
+ feedback: "¡Increíble!"
+ - option: "Tienes que rellenar =es= en el `_`"
+ feedback: "No, un signo `=` es suficiente"
+ - option: "Sólo puedes usar el signo `=` cuando trabajas con números, no con palabras."
+ feedback: "También puedes usar `=` con palabras."
correct_answer: "B"
- hint: "`{is}` and `=` are both allowed"
+ hint: "se permiten ambos `{is}` y `=`"
question_score: '10'
7:
1:
- question_text: "How many lines can you repeat at once with the repeat command at this level?"
+ question_text: "¿Cuántas líneas puedes repetir de una vez con el comando repetir en este nivel?"
mp_choice_options:
- option: "0"
- feedback: "No you can repeat a line."
+ feedback: "No, puedes repetir una línea."
- option: "1"
- feedback: "Correct, one line at a time"
- - option: "2"
- feedback: "In this level only one line at a time"
- - option: "infinite"
- feedback: "In this level you can only repeat one line at a time"
+ feedback: "Correcto, una línea cada vez"
+ - option: "3"
+ feedback: "En este nivel sólo una línea cada vez"
+ - option: "infinito"
+ feedback: "En este nivel sólo puedes repetir una línea cada vez"
correct_answer: "B"
- hint: "You can only repeat 1 line at a time"
+ hint: "Sólo puedes repetir 1 línea cada vez"
question_score: '10'
2:
- question_text: "Which code is right?"
+ question_text: "¿Qué código es correcto?"
mp_choice_options:
- option: |
```
- {print} 100 {times} 'hello'
+ {print} 100 {times} 'hola'
```
- feedback: "`{repeat}` 100 `{times}` `{print}` 'hello'"
+ feedback: "`{repeat}` 100 `{times}` `{print}` 'hola'"
- option: |
```
- {print} {repeat} 100 {times} 'hello'
+ {print} {repeat} 100 {times} 'hola'
```
- feedback: "{repeat} 100 {times} {print} 'hello'"
+ feedback: "{repeat} 100 {times} {print} 'hola'"
- option: |
```
- {repeat} 'hello' 100 {times}
+ {repeat} 'hola' 100 {times}
```
- feedback: "{repeat} 100 {times} {print} 'hello'"
+ feedback: "{repeat} 100 {times} {print} 'hola'"
- option: |
```
- {repeat} 100 {times} {print} 'hello'
+ {repeat} 100 {times} {print} 'hola'
```
- feedback: "That's right!"
+ feedback: "¡Eso es!"
correct_answer: "D"
- hint: "First the repeat command, then the `{print}` command"
+ hint: "Primero el comando repetir, después el comando `{print}`"
question_score: '10'
3:
- question_text: "Is this code right or wrong?"
- code: "{repeat} 100 {times} 'Hello!'"
+ question_text: "¿Este código está bien o mal?"
+ code: "{repeat} 100 {times} '¡Hola!'"
mp_choice_options:
- option: "Right"
- feedback: "No, a word is missing"
- - option: "Wrong, the word `{repeat}` is missing"
- feedback: "The word `{repeat}` is there, another word is missing"
- - option: "Wrong, the word `{times}` is missing"
- feedback: "The word `{times}` is there, another word is missing."
- - option: "Wrong, the word `{print}` is missing"
- feedback: "Correct"
+ feedback: "No, falta una palabra"
+ - option: "Incorrecto, falta la palabra `{repeat}`"
+ feedback: "La palabra `{repeat}` está ahí, falta otra palabra"
+ - option: "Incorrecto, falta la palabra `{times}`"
+ feedback: "La palabra `{times}` está ahí, falta otra palabra."
+ - option: "Incorrecto, falta la palabra `{print}`"
+ feedback: "Correcto"
correct_answer: "D"
- hint: "It should be: `{repeat}` 100 `{times}` `{print}` 'Hello'"
+ hint: "Debería ser: `{repeat}` 100 `{times}` `{print}` 'Hola'"
question_score: '10'
4:
- question_text: "Which word is wrong in the code?"
+ question_text: "¿Qué palabra es incorrecta en el código?"
code: |-
- {print} 'I'm blue'
+ {print} 'Soy azul'
{repeat} 7 {times} {print} 'da ba dee, da ba da'
mp_choice_options:
- option: |
```
I'm
```
- feedback: "That's right!"
+ feedback: "¡Eso es!"
- option: |
- ```
- {print}
- ```
- feedback: "`{print}` is spelled correctly"
+ `{print}`
+ feedback: "`{print}` está mal escrito"
- option: |
- ```
- {repeat}
- ```
- feedback: "`{repeat}` is spelled correctly"
+ `{repeat}`
+ feedback: "`{repeat}` está mal escrito"
- option: |
- ```
- {times}
- ```
- feedback: "`{times}` is spelled correctly"
+ `{times}`
+ feedback: "`{times}` está mal escrito"
correct_answer: "A"
- hint: "I'm is wrong, you can't use apostrophes"
+ hint: "Yo soy es incorrecto, no puedes usar apóstrofes"
question_score: '10'
5:
- question_text: "Is this code right or wrong?"
+ question_text: "¿Este código está bien o mal?"
code: |-
- {repeat} 100 {times} {print} 'Hedy is awesome!'
+ {repeat} 100 {times} {print} '¡Hedy es increíble!'
mp_choice_options:
- - option: "Correct"
- feedback: "That's right!"
- - option: "Wrong"
- feedback: "That's not it"
+ - option: "Correcto"
+ feedback: "¡Eso es!"
+ - option: "Incorrecto"
+ feedback: "No es eso"
correct_answer: "A"
- hint: "The code is correct!"
+ hint: "¡El código es correcto!"
question_score: '10'
6:
- question_text: "What will be the output from this code?"
- code: |-
- {print} 'The wheels on the bus go'
- {repeat} 3 {times} {print} ' round and round'
- mp_choice_options:
- - option: "the wheels on the bus go\nround and round"
- feedback: "Only the second line is repeated 3 times"
- - option: "the wheels on the bus go\nthe wheels on the bus go\nthe wheels on the bus go\nround and round"
- feedback: "Only the second line is repeated 3 times"
- - option: "the wheels on the bus go\nround and round\nthe wheels on the bus go\nround and round\nthe wheels on the bus go\nround and round"
- feedback: "Only the second line is repeated 3 times"
- - option: "the wheels on the bus go\nround and round\nround and round\nround and round"
- feedback: "All though the town! Perfect!"
+ question_text: "¿Cuál será la salida de este código?"
+ code: |-
+ {print} 'las ruedas del bus'
+ {repeat} 3 {times} {print} ' giran y giran'
+ mp_choice_options:
+ - option: "las ruedas del bus\ngiran y giran"
+ feedback: "Sólo la segunda línea se repite 3 veces"
+ - option: "las ruedas del bus\nlas ruedas del bus\nlas ruedas del bus\ngiran y giran"
+ feedback: "Sólo la segunda línea se repite 3 veces"
+ - option: "las ruedas del bus\ngiran y giran\nlas ruedas del bus\ngiran y giran\nlas ruedas del bus\ngiran y giran"
+ feedback: "Sólo la segunda línea se repite 3 veces"
+ - option: "las ruedas del bus\ngiran y giran\ngiran y giran\ngiran y giran"
+ feedback: "¡Por toda la ciudad! ¡Perfecto!"
correct_answer: "D"
- hint: "Only 'round and round' is repeated 3 times."
+ hint: "Sólo 'giran y giran' se repite 3 veces."
question_score: '10'
7:
- question_text: "What will be the output from this code?"
+ question_text: "¿Cuál será el resultado de este código?"
code: |-
- {repeat} 2 {times} {print} 'We will'
- {print} 'ROCK YOU!'
+ {repeat} 2 {times} {print} 'Vamos'
+ {print} '¡A SACUDIRTE!'
mp_choice_options:
- - option: "We will We will\nROCK YOU!"
- feedback: "'We will' won't appear twice in the same line"
- - option: "We will\nWe will\nROCK YOU!"
+ - option: "Vamos Vamos\n¡A SACUDIRTE!"
+ feedback: "'Vamos' no aparecerá dos veces en la misma línea"
+ - option: "Vamos\nVamos\n¡A SACUDIRTE!"
feedback: "Great!"
- - option: "We will\nROCK YOU!\nWe will\nROCK YOU!"
- feedback: "ROCK YOU! won't be repeated"
- - option: "We will\nROCK YOU!"
- feedback: "Mind the repeat command"
+ - option: "Vamos\n¡A SACUDIRTE!\nVamos\n¡A SACUDIRTE!"
+ feedback: "¡A SACUDIRTE! no sé repetirá"
+ - option: "Vamos\n¡A SACUDIRTE!"
+ feedback: "Cuidado con el comando repetir"
correct_answer: "B"
- hint: "Mind the `{repeat}` command."
+ hint: "Cuidado con el comando `{repeat}`."
question_score: '10'
8:
- question_text: "Welke Hedy code hoort bij dit resultaat"
- code: "Here comes the sun\nDo do do do\nHere comes the sun\nAnd I say\nIts alright"
+ question_text: "¿Qué código de Hedy corresponde a esta salida?"
+ code: "Ahí viene el Sol\nDo do do do\nAhí viene el Sol\nY digo\nTodo está bien"
mp_choice_options:
- option: |
```
- {print} 'Here comes the sun'
+ {print} 'Ahí viene el Sol'
{print} 'Do do do do'
- {print} 'Here comes the sun'
- {print} 'And I say'
- {print} 'Its alright'
+ {print} 'Ahí viene el Sol'
+ {print} 'Y digo'
+ {print} 'Todo está bien'
```
- feedback: "Perfect, je kan het `{repeat}` commando hier niet gebruiken."
+ feedback: "Increíble, no puedes usar aquí el comando `{repeat}`."
- option: |
```
- {repeat} 2 {times} {print} 'Here comes the sun'
- {print} 'And I say'
- {print} 'Its alright'"
- feedback: "Waar is de 'Do do do do' gebleven?"
+ {repeat} 2 {times} {print} 'Ahí viene el Sol'
+ {print} 'Y digo'
+ {print} 'Todo está bien'
+ feedback: "¿Dónde dejaste 'Do do do do'?"
- option: |
```
- {repeat} 2 {times} {print} 'Here comes the sun'
+ {repeat} 2 {times} {print} 'Ahí viene el Sol'
{print} 'Do do do do'
- {print} 'And I say'
- {print} 'Its alright'
+ {print} 'Y digo'
+ {print} 'Todo está bien'
```
- feedback: "Dit is niet de juiste volgorde.."
+ feedback: "Este no es el orden correcto.."
- option: |
```
- {repeat} 2 {times} {print} 'Here comes the sun'
+ {repeat} 2 {times} {print} 'Ahí viene el Sol'
{repeat} 2 {times} {print} 'Do do'
- {print} 'And I say'
- {print} 'Its alright'"
+ {print} 'Y digo'
+ {print} 'Todo está bien'
```
- feedback: "Dit is niet de juiste volgorde.."
- hint: "`{repeat}` kan alleen worden gebruikt als je dezelfde regel meerdere keren achter elkaar wil uitvoeren."
+ feedback: "Este no es el orden correcto.."
+ hint: "`{repeat}` sólo se puede usar si quieres ejecutar la misma línea varias veces seguidas."
correct_answer: "A"
question_score: '10'
9:
- question_text: "Welke Hedy code hoort bij dit resultaat ?"
+ question_text: "¿Qué código de Hedy pertenece a este resultado?"
code: |-
- Batman was flying through Gotham.
- When suddenly he heard someone screaming...
- Help !
- Help !
- Help !
- Please help me !"
+ Batman estaba volando por Gotham.
+ Cuando de repente oyó a alguien gritar...
+ ¡Ayuda!
+ ¡Ayuda!
+ ¡Ayuda!
+ ¡Por favor ayúdadme!
mp_choice_options:
- option: |
```
- {print} 'Batman was flying through Gotham. '
- {print} 'When suddenly he heard someone screaming...'
- {print} 'Help !'
- {repeat} 3 {times} {print} 'Please help me !'
+ {print} 'Batman estaba volando por Gotham. '
+ {print} '¡Cuando de repente oyó a alguien gritar!'
+ {print} '¡Ayuda!'
+ {repeat} 3 {times} {print} '¡Por favor ayúdadme!'
```
- feedback: "Je herhaalt de verkeerde regel"
+ feedback: "Tu línea repetida es incorrecta."
- option: |
```
- {print} 'Batman was flying through Gotham.'
- {print} 'When suddenly he heard someone screaming...'
- {repeat} 3 {times} 'Help !'
- {print} 'Please help me !'
+ {print} 'Batman estaba volando por Gotham.'
+ {print} '¡Cuando de repente oyó a alguien gritar!'
+ {repeat} 3 {times} '¡Ayuda!'
+ {print} '¡Por favor ayúdadme!'
```
- feedback: "Het commando `{print}` mist op regel 3"
+ feedback: "Falta el comando `{print}` en la línea 3."
- option: |
```
- {print} Batman was flying through Gotham.
- {print} When suddenly he heard someone screaming...
- {repeat} 3 {times} {print} Help !
- {print} Please help me !
+ {print} Batman estaba volando por Gotham.
+ {print} ¡Cuando de repente oyó a alguien gritar!
+ {repeat} 3 {times} {print} ¡Ayuda!
+ {print} ¡Por favor ayúdadme!
```
- feedback: "Je vergeet de aanhalingstekens"
+ feedback: "Te faltan las comillas"
- option: |
```
- {print} 'Batman was flying through Gotham.'
- {print} 'When suddenly he heard someone screaming...'
- {repeat} 3 {times} {print} 'Help !'
- {print} 'Please help me !'
+ {print} 'Batman estaba volando por Gotham.'
+ {print} '¡Cuando de repente oyó a alguien gritar!'
+ {repeat} 3 {times} {print} '¡Ayuda!'
+ {print} '¡Por favor ayúdadme!'
```
- feedback: "Perfect"
+ feedback: "Perfecto"
question_score: '10'
- hint: "'Help !' wordt 3x herhaald."
+ hint: "'¡Ayuda!' se repite 3 veces."
correct_answer: "D"
10:
- question_text: "What Hedy code belongs to this output?"
+ question_text: "¿Qué código de Hedy corresponde a este resultado?"
code: |-
- if youre happy and you know it clap your hands
- if youre happy and you know it clap your hands
- if youre happy and you know it and you really want to show it
- if youre happy and you know it clap your hands
+ si estás feliz y lo sabes aplaude
+ si estás feliz y lo sabes aplaude
+ si estás feliz y lo sabes y realmente quieres mostrarlo
+ si estás feliz y lo sabes aplaude
mp_choice_options:
- option: |
```
- {repeat} 2 {times} 'if youre happy and you know it clap your hands'
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it clap your hands'
+ {repeat} 2 {times} 'si estás feliz y lo sabes aplaude'
+ {print} 'si estás feliz y lo sabes y realmente quieres mostrarlo'
+ {print} 'si estás feliz y lo sabes aplaude'
```
- feedback: "Almost! the first line needs an extra word"
+ feedback: "¡Casi! la primera línea necesita una palabra extra"
- option: |
```
- {repeat} 2 {times} {print} 'if youre happy and you know it clap your hands'
- {print} 'if youre happy and you know it and you really want to show it'
- {print} 'if youre happy and you know it clap your hands'
+ {repeat} 2 {times} {print} 'si estás feliz y lo sabes aplaude'
+ {print} 'si estás feliz y lo sabes y realmente quieres mostrarlo'
+ {print} 'si estás feliz y lo sabes aplaude'
```
feedback: "Great!"
- option: |
```
- {repeat} 3 {times} {print} 'if youre happy and you know it clap your hands'
- {print} 'if youre happy and you know it and you really want to show it'
+ {repeat} 3 {times} {print} 'si estás feliz y lo sabes aplaude'
+ {print} 'si estás feliz y lo sabes y realmente quieres mostrarlo'
```
- feedback: "This is not in the right order."
+ feedback: "Esto no está en el orden correcto."
- option: |
```
- {repeat} 4 {times} 'if youre happy and you know it'
- {repeat} 2 times 'clap your hands'
- {print} 'and you really want to show it'
- {print} 'clap your hands'
+ {repeat} 4 {times} 'si estás feliz y lo sabes'
+ {repeat} 2 veces 'aplaude'
+ {print} 'y realmente quieres mostrarlo'
+ {print} 'aplaude'
```
- feedback: "This is not in the right order."
+ feedback: "Esto no está en el orden correcto."
correct_answer: "B"
- hint: "Mind the order of the sentences."
+ hint: "Cuidado con el orden de las frases."
question_score: '10'
8:
1:
- question_text: "Which output will be produced by this code?"
+ question_text: "¿Qué resultado producirá este código?"
code: |-
{repeat} 2 {times}
- {print} 'Hello'
- {print} 'Im Hedy!'
- mp_choice_options:
- - option: "Hello\nIm Hedy!"
- feedback: "Everything is printed twice."
- - option: "Hello\nHello\nIm Hedy"
- feedback: "The second line is repeated twice as well."
- - option: "Hello\nIm Hedy!\nHello\nIm Hedy!"
- feedback: "Super!"
- - option: "Hello\nHello\nIm Hedy!\nIm Hedy!"
- feedback: "Everything is printed twice"
+ {print} 'Hola'
+ {print} '¡Soy Hedy!'
+ mp_choice_options:
+ - option: "Hola\n¡Soy Hedy!\n"
+ feedback: "Todo se imprime dos veces."
+ - option: "Hola\nHola\nSoy Hedy\n"
+ feedback: "La segunda línea también se repite dos veces."
+ - option: "Hola\n¡Soy Hedy!\nHola\n¡Soy Hedy!\n"
+ feedback: "¡Super!"
+ - option: "Hola\nHola\n¡Soy Hedy!\n¡Soy Hedy!\n"
+ feedback: "Todo se imprime dos veces"
correct_answer: "C"
- hint: "Both lines are repeated twice."
+ hint: "Ambas líneas se repiten dos veces."
question_score: '10'
2:
- question_text: "What is wrong with this code?"
+ question_text: "¿Qué le pasa a este código?"
code: |-
{repeat} 5 {times}
- {print} 'Hedy is cool!'
- mp_choice_options:
- - option: "This should be only one line, not 2."
- feedback: "No it should be 2 lines."
- - option: "This `{print}` command has to go"
- feedback: "No, you need it."
- - option: "There is a spelling mistake in the `{repeat}` command."
- feedback: "Nee, repeat is de goede spelling"
- - option: "The second line need to start with 4 spaces as indentation."
- feedback: "Correct!"
+ {print} '¡Hedy mola!'
+ mp_choice_options:
+ - option: "Esto debería ser una línea, no 2."
+ feedback: "No, deberían ser 2 líneas."
+ - option: "Este comando `{print}` se tiene que eliminar."
+ feedback: "No, lo necesitas."
+ - option: "Hay una falta de ortografía en el comando `{repeat}`."
+ feedback: "No, la ortografía correcta es repetir"
+ - option: "La segunda línea tiene que empezar con 4 espacios de sangría."
+ feedback: "¡Correcto!"
correct_answer: "D"
- hint: "Something is missing in the second line?"
+ hint: "¿Falla algo en la segunda línea?"
question_score: '10'
3:
- question_text: "What output will be produced when you run this program?"
+ question_text: "¿Qué resultado se producirá al ejecutar este programa?"
code: |-
{repeat} 3 {times}
{print} 'Baby shark tututudutudu'
{print} 'Baby shark'
mp_choice_options:
- option: "Baby shark tututudutudu\nBaby shark"
- feedback: "Mind the `{repeat}` command!"
+ feedback: "¡Cuidado con el comando `{repeat}`!"
- option: "Baby shark tututudutudu\nBaby shark\nBaby shark tututudutudu\nBaby shark\nBaby shark tututudutudu\nBaby shark"
- feedback: "The last line has no indentation, so it's not repeated."
+ feedback: "La última línea no tiene sangría, así que no se repite."
- option: "Baby shark tututudutudu\nBaby shark tututudutudu\nBaby shark tututudutudu\nBaby shark"
- feedback: "Right!"
+ feedback: "¡Muy bien!"
- option: "Baby shark tututudutudu\nBaby shark\nBaby shark\nBaby shark"
- feedback: "What is being repeated and what isn't."
+ feedback: "Qué se repite y qué no."
correct_answer: "C"
- hint: "What is being repeated and what is not?."
+ hint: "¿Qué se repite y qué no?."
question_score: '10'
4:
- question_text: "Which output is correct?"
+ question_text: "¿Qué resultado es correcto?"
code: |-
- {print} 'The children went:'
+ {print} 'Los niños se fueron:'
{repeat} 2 {times}
- {print} 'Yay!'
- {print} 'Were going on holiday!'
+ {print} '¡Yay!'
+ {print} '¡Estamos de vacaciones!'
mp_choice_options:
- option: "The children went:\nYay!\nWere going on holiday!"
- feedback: "Mind the `{repeat}` command !"
+ feedback: "¡Cuidado con el comando `{repeat}`!"
- option: "The children went:\nYay!\nWere going on holiday!\nYay!\nWere going on holiday!"
- feedback: "Correct!"
+ feedback: "¡Correcto!"
- option: "The children went:\nYay!\nYay!\nWere going on holiday!\nWere going on holiday!"
- feedback: "This order is incorrect."
+ feedback: "Este orden es incorrecto."
- option: "The children went:\nYay!\nYay!\nWere going on holiday!"
- feedback: "The last line is repeated too."
+ feedback: "La última línea también se repite."
correct_answer: "B"
- hint: "The block under the `{repeat}` command is repeated twice."
+ hint: "El bloque debajo del comando `{repeat}` se repite dos veces."
question_score: '10'
5:
- question_text: "What is wrong with this code?"
+ question_text: "¿Qué le pasa a este código?"
code: |-
- end = {ask} 'Do you want a happy or a sad ending?'
- {if} end {is} happy {print} 'They lived happily ever after'
- {else} {print} 'The world exploded. The end.'
+ final = {ask} '¿Quieres un final feliz o final triste?'
+ {if} final {is} feliz {print} 'Vivieron felices para siempre'
+ {else} {print} 'El mundo explotó. Fin.'
mp_choice_options:
- - option: "The `{print}` commands on the last two lines should start on new lines en start with 4 spaces."
- feedback: "That's right!"
+ - option: "Los comandos `{print}` en las últimas dos líneas deberían comenzar en líneas nuevas con 4 espacios."
+ feedback: "¡Eso es!"
- option: "`{else}` is not a command!"
- feedback: "It is!"
- - option: "Lines that start with `{if}` should start with 4 spaces"
- feedback: "That's not true"
- - option: "`{ask}` is no longer a command"
- feedback: "That's not true"
+ feedback: "¡Lo es!"
+ - option: "Las líneas que empiezan con `{if}` deberían empezar con 4 espacios"
+ feedback: "Eso no es cierto"
+ - option: "`{ask}` ya no es un comando"
+ feedback: "Eso no es cierto"
correct_answer: "A"
- hint: "Something is wrong with indentation"
+ hint: "Algo falla con la sangría"
question_score: '10'
6:
question_text: "What will be the output of this code when we enter pancakes?"
@@ -1662,367 +1612,367 @@ levels:
hint: "The first sentence and question will not be repeated"
question_score: '10'
7:
- question_text: "What is wrong with this code?"
- code: |-
- eten = {ask} 'What would you like to eat?'
- {if} food {is} fries
- sauce = {ask} 'What sauce would you like?'
- {print} 'One fries with ' sauce
- {if} food {is} pizza
- topping = {ask} 'What topping would you like?'
- {print} 'One pizza with ' topping
- {print} 'That you for your order'
- mp_choice_options:
- - option: "Nothing this code is correct!"
- feedback: "Something is wrong!."
- - option: "You're not allowed to use an `{if}` command after an `{ask}` command."
- feedback: "You are!."
- - option: "You don't have to use indentation twice. Only in the first `{if}` command."
- feedback: "You always have to use indentation."
- - option: "The indentation is wrong in the first `{if}` command."
- feedback: "That's right."
+ question_text: "¿Qué le pasa a este código?"
+ code: |-
+ comida = {ask} '¿Qué te gustaría comer?'
+ {if} comida {is} patatas fritas
+ salsa = {ask} '¿Qué salsa quieres?'
+ {print} 'Unas patatas fritas con ' salsa
+ {if} comida {is} pizza
+ ingrediente = {ask} '¿Qué ingrediente le gustaría?'
+ {print} 'Una pizza con ' ingrediente
+ {print} 'Gracias por su pedido'
+ mp_choice_options:
+ - option: "¡Nada de este código es correcto!"
+ feedback: "¡Algo falla!"
+ - option: "No se permite usar un comando `{if}` tras un comando `{ask}`."
+ feedback: "¡Lo eres!"
+ - option: "No tienes que usar la sangría dos veces. Sólo en el primer comando `{if}`."
+ feedback: "Siempre tienes que usar la sangría."
+ - option: "La sangría está mal en el primer comando `{if}`."
+ feedback: "Eso es."
correct_answer: "D"
- hint: "Take a careful look at the indentation."
+ hint: "Presta mucha atención a la sangría."
question_score: '10'
8:
- question_text: "In which of the codes is the indentation done right?"
+ question_text: "¿En cuál de los códigos la sangría está bien hecha?"
mp_choice_options:
- option: |
```
- {if} answer is right
- {print} You are...
- sleep
- {print} right!
+ {if} respuesta {is} 32
+ {print} 'Estas...'
+ {sleep}
+ {print} '¡en lo cierto!'
{else}
- {print} You are wrong!
+ {print} '¡Estás equivocado!'
```
- feedback: "You are wrong!"
+ feedback: "¡Te equivocas!"
- option: |
```
- {if} answer is right
- {print} You are...
- sleep
- {print} right!
+ {if} respuesta {is} 32
+ {print} 'Estas...'
+ {sleep}
+ {print} '¡en lo cierto!'
{else}
- {print} You are wrong!
+ {print} '¡Estás equivocado!'
```
- feedback: "You are wrong!"
+ feedback: "¡Te equivocas!"
- option: |
```
- {if} answer is right
- {print} You are...
- sleep
- {print} right!
+ {if} respuesta {is} 32
+ {print} 'Estas...'
+ {sleep}
+ {print} '¡en lo cierto!'
{else}
- {print} You are wrong!
+ {print} '¡Estás equivocado!'
```
- feedback: "You are... right!"
+ feedback: "¡Tienes... razón!"
- option: |
```
- {if} answer is right
- {print} You are...
- sleep
- {print} right!
+ {if} respuesta {is} 32
+ {print} 'Estas...'
+ {sleep}
+ {print} '¡en lo cierto!'
{else}
- {print} You are wrong!
+ {print} '¡Estás equivocado!'
```
- feedback: "You are wrong!"
+ feedback: "¡Te equivocas!"
correct_answer: "C"
- hint: "What should happen if the person is right? And what else?"
+ hint: "¿Qué debería ocurrir si la persona tiene razón? ¿Y qué más?"
question_score: '10'
9:
- question_text: "What line(s) in this code should start with 4 spaces?"
+ question_text: "¿Qué línea(s) en este código deberían empezar con 4 espacios?"
code: |-
- 1 music = {ask} 'What is your favorite music genre?'
- 2 {if} music is rock
+ 1 música = {ask} '¿Cuál es tu género musical favorito?'
+ 2 {if} música {is} rock
3 {print} '🤘'
4 {else}
5 {print} '👎'
mp_choice_options:
- - option: "Line 2 and 4"
- feedback: "The lines after the `{if}` and `{else}` command should start with 4 spaces"
- - option: "Only line 3"
- feedback: "Not only 3..."
- - option: "Line 3, 4 and 5"
- feedback: "Line 4 shouldn't"
- - option: "Line 3 and 5"
- feedback: "Great job!"
+ - option: "Líneas 2 y 4"
+ feedback: "Las líneas tras el comando `{if}` y `{else}` debería empezar con 4 espacios"
+ - option: "Sólo la línea 3"
+ feedback: "No sólo 3..."
+ - option: "Líneas 3, 4 y 5"
+ feedback: "La línea 4 no debería"
+ - option: "Línea 3 y 5"
+ feedback: "¡Gran trabajo!"
correct_answer: "D"
- hint: "The lines after an `{if}` or `{else}` command should start with 4 spaces."
+ hint: "Las líneas tras un comando `{if}` o `{else}` deberían empezar con 4 espacios."
question_score: '10'
10:
- question_text: "Which statement is true?"
- code: |-
- 1 level = {ask} 'What level are you on?"
- 2 {if} level {is} 8
- 3 {print} Great job!
- mp_choice_options:
- - option: "All lines should start with 4 spaces"
- feedback: "That's not true"
- - option: "Line 2 and 3 should start with 4 spaces"
- feedback: "That's not true"
- - option: "Line 2 should start with 4 spaces"
- feedback: "That's not true"
- - option: "Line 3 should start with 4 spaces"
- feedback: "You are correct!"
+ question_text: "¿Qué afirmación es cierta?"
+ code: |-
+ 1 nivel = {ask} '¿En qué nivel estás?'
+ 2 {if} nivel {is} 8
+ 3 {print} '¡Gran trabajo!'
+ mp_choice_options:
+ - option: "Todas las líneas deben empezar con 4 espacios"
+ feedback: "Eso no es cierto"
+ - option: "Las líneas 2 y 3 deberían empezar con 4 espacios"
+ feedback: "Eso no es cierto"
+ - option: "La línea 2 debería empezar con 4 espacios"
+ feedback: "Eso no es cierto"
+ - option: "La línea 3 debería empezar con 4 espacios"
+ feedback: "¡Tienes razón!"
correct_answer: "D"
- hint: "Only one line starts with 4 spaces, but which one...?"
+ hint: "Sólo una linea empieza con 4 espacios, ¿pero cuál de ellas...?"
question_score: '10'
9:
1:
- question_text: "What is wrong with this code?"
+ question_text: "¿Qué le pasa a este código?"
code: |-
{repeat} 3 {times}
- eten = {ask} 'What would you like to eat?'
- {if} food {is} fries
- sauce = {ask} 'What sauce would you like?'
- {print} 'One fries with ' sauce
- {if} food {is} pizza
- topping = {ask} 'What topping would you like?'
- {print} 'One pizza with ' topping
- {print} 'That you for your order'
- mp_choice_options:
- - option: "Nothing this code is correct!"
- feedback: "That's right!."
- - option: "You're not allowed to use an `{if}` command after an `{ask}` command."
- feedback: "You are!."
- - option: "You don't have to use indentation twice."
- feedback: "You always have to use indentation."
- - option: "The indentation is wrong in the last `{if}` command."
- feedback: "It not, though."
+ comida = {ask} '¿Qué te gustaría comer?'
+ {if} comida {is} patatas fritas
+ salsa = {ask} '¿Qué salsa quieres?'
+ {print} 'Unas patatas fritas con ' salsa
+ {if} comida {is} pizza
+ ingrediente = {ask} '¿Qué ingrediente le gustaría?'
+ {print} 'Una pizza con ' ingrediente
+ {print} 'Gracias por su pedido'
+ mp_choice_options:
+ - option: "¡Nada, este código es correcto!"
+ feedback: "¡Eso es!"
+ - option: "No se permite usar un comando `{if}` tras un comando `{ask}`."
+ feedback: "¡Lo eres!"
+ - option: "No tienes que usar la sangría dos veces."
+ feedback: "Siempre tienes que usar sangría."
+ - option: "La sangría está mal en el último comando `{if}`."
+ feedback: "No es la sangría."
correct_answer: "A"
- hint: "all the indentation is done correctly."
+ hint: "Todá la sangría está hecha correctamente."
question_score: '10'
2:
- question_text: "What will be printed after entering the correct password?"
+ question_text: "¿Qué se imprimirá tras introducir la contraseña correcta?"
code: |-
- password = {ask} 'What is the password?'
- correct_password = Hedy
- {if} password {is} correct_password
+ contraseña = {ask} '¿Cuál es la contraseña?'
+ contraseña_correcta = Hedy
+ {if} contraseña {is} contraseña_correcta
{repeat} 2 {times}
- {print} 'Good job!'
- {print} 'You can use the computer!'
+ {print} ''Buen trabajo!'
+ {print} '¡Puedes usar el ordenador!'
{else}
- {print} 'The computer will explode in 5... 4... 3... 2... 1...'
+ {print} 'El ordenador explotará en 5... 4... 3... 2... 1...'
mp_choice_options:
- option: "Good job!\nGood job!"
- feedback: "That's not it!"
- - option: "The computer will explode in 5... 4... 3... 2... 1..."
- feedback: "That's not it!"
+ feedback: "¡No es eso!"
+ - option: "```\nEl ordenador explotará en 5... 4... 3... 2... 1...\n```"
+ feedback: "¡No es eso!"
- option: "Good job !\nGood job!\nYou can use the computer!"
- feedback: "That's not it!"
+ feedback: "¡No es eso!"
- option: "Good job!\nYou can use the computer!\nGood job!\nYou can use the computer!"
- feedback: "Correct!"
+ feedback: "¡Correcto!"
correct_answer: "D"
- hint: "Everything under the `{repeat}` command is repeated twice."
+ hint: "Todo debajo del comando `{repeat}` se repite dos veces."
question_score: '10'
3:
- question_text: "Which case should you choose to win a million dollars?"
- code: |-
- {print} 'Choose the right case and win!'
- case = {ask} 'Which case will you pick? 1 or 2?'
- {if} case {is} 1
- action = {ask} 'Open it or sell it?'
- {if} action {is} sell
- {print} 'You sell your case for 10 dollars'
- {if} action {is} open
- {print} 'You open the case and win an apple pie'
- {if} case {is} 2
- action = {ask} 'Open it or sell it?'
- {if} action {is} sell
- {print} 'You sell the case for 500 dollars'
- {if} action {is} open
- {print} 'You open the case and win a million dollars!'
- mp_choice_options:
- - option: "case 1, sell"
- feedback: "You don't win a million!"
- - option: "case 1, open"
- feedback: "You don't win a million"
- - option: "case 2, sell"
- feedback: "You don't win a million"
- - option: "case 2, open"
- feedback: "Great job! You win!"
+ question_text: "¿Qué caso deberías elegir para ganar un millón de dólares?"
+ code: |-
+ {print} '¡Elige la caja correcta y gana!'
+ caja = {ask} '¿Qué caja elegirás? 1 o 2?'
+ {if} caja {is} 1
+ acción = {ask} '¿La abres o la vendes?'
+ {if} acción {is} vender
+ {print} 'Vendes tu caja por 10 dólares'
+ {if} acción {is} abrir
+ {print} 'Abres la caja y ganas una tarta de manzana'
+ {if} caja {is} 2
+ acción = {ask} '¿La abres o la vendes?'
+ {if} acción {is} vender
+ {print} 'Vendes la caja por 500 dólares'
+ {if} acción {is} abrir
+ {print} '¡Abres la caja y ganas un millón de dólares!'
+ mp_choice_options:
+ - option: "caso 1, vende"
+ feedback: "¡No ganas un millón!"
+ - option: "caso 1, abrir"
+ feedback: "No ganas un millón"
+ - option: "caso 2, vende"
+ feedback: "No ganas un millón"
+ - option: "caso 2, abrir"
+ feedback: "¡Gran trabajo! ¡Ganaste!"
correct_answer: "D"
- hint: "Follow the right path"
+ hint: "Sigue el camino correcto"
question_score: '10'
4:
- question_text: "Which statement is true?"
+ question_text: "¿Qué afirmación es cierta?"
code: |-
- name = {ask} 'What is your name?'
- size = {ask} 'What is your shoe size?'
- {if} size {is} 38
- {if} name {is} Cinderella
- {print} 'I was looking for you!'
+ nombre = {ask} '¿Cómo te llamas?'
+ talla = {ask} '¿Cuál es tu número de calzado??'
+ {if} talla {is} 38
+ {if} nombre {is} Cenicienta
+ {print} '❤️❤️❤️'
{else}
- {print} 'You are not the one!'
+ {print} '¡Tu no eres!'
{else}
- {print} 'Ill keep looking'
- mp_choice_options:
- - option: "Sleeping Beauty with shoe size 38 gets the output 'Ill keep looking'"
- feedback: "No, she gets 'You are not the one!'"
- - option: "Cinderella with shoe size 40 gets the output: 'I was looking for you!'"
- feedback: "No, she gets 'Ill keep looking'"
- - option: "Sleeping Beauty with shoe size 40 gets the output 'Ill keep looking'"
- feedback: "That's right!"
- - option: "Cinderella with shoe size 40 gets the output 'I was looking for you!'"
- feedback: "No she gets 'Ill keep looking'"
+ {print} 'Seguiré buscando'
+ mp_choice_options:
+ - option: "La Bella Durmiente con una talla 38 de calzado recibe el mensaje 'seguiré mirando'"
+ feedback: "No, ella recibe '¡Tú no eres!'"
+ - option: "Cenicienta con talla 40 de calzado recibe el mensaje '❤️❤️❤️'"
+ feedback: "No, ella recibe 'seguiré mirando'"
+ - option: "La Bella Durmiente con talla 40 de calzado recibe el mensaje 'seguiré mirando'"
+ feedback: "¡Eso es!"
+ - option: "Cenicienta con talla 38 de calzado recibe el mensaje 'seguiré mirando'"
+ feedback: "No, ella conseguirá '❤️❤️❤️'"
correct_answer: "C"
- hint: "No matter what your name is, if you have shoe size 40 you will get the message 'Ill keep looking'."
+ hint: "No importa como se llama, si tiene una talla 40 de calzado recibe el mensaje 'seguiré mirando'."
question_score: '10'
5:
- question_text: "Which code produced this output?"
+ question_text: "¿Qué código produce este resultado?"
mp_choice_options:
- option: |
```
- desert = {ask} 'What is your favorite type of desert?'
- {if} desert {is} icecream
+ postre = {ask} '¿Cuál es tu postre favorito?'
+ {if} postre {is} helado
{repeat} 3 {times}
- {print} 'Icecream is the best!'
+ {print} '¡El helado es el mejor!'
```
- feedback: "Don't forget the indentation after `{repeat}` commands."
+ feedback: "No te olvides la sangría tras los comandos `{repeat}`."
- option: |
```
- desert = {ask} 'What is your favorite type of desert?'
- {if} desert {is} icecream
+ postre = {ask} '¿Cuál es tu postre favorito?'
+ {if} postre {is} helado
{repeat} 3 {times}
- {print} 'Icecream is the best!'
+ {print} '¡El helado es el mejor!'
```
- feedback: "Use indentation after an `{if}` command"
+ feedback: "Usa sangría tras un comando `{if}`"
- option: |
```
- desert = {ask} 'What is your favorite type of desert?'
- {if} desert {is} icecream
+ postre = {ask} '¿Cuál es tu postre favorito?'
+ {if} postre {is} helado
{repeat} 3 {times}
- {print} 'Icecream is the best!'
+ {print} '¡El helado es el mejor!'
```
- feedback: "Perfect"
+ feedback: "Perfecto"
- option: |
```
{repeat} 3 {times}
- desert = {ask} 'What is your favorite type of desert?'
- {if} desert {is} icecream
+ postre = {ask} '¿Cuál es tu postre favorito?'
+ {if} postre {is} helado
{repeat} 3 {times}
- {print} 'Icecream is the best!'
+ {print} '¡El helado es el mejor!'
```
- feedback: "There are 2 `{repeat}` commands in this code."
+ feedback: "Hay 2 comandos `{repeat}` en este código."
correct_answer: "C"
- hint: "Watch the indentation"
+ hint: "Revisa la sangría"
question_score: '10'
- output: "Icecream is the best!\nIcecream is the best!\nIcecream is the best!"
+ output: "¡El helado es el mejor!\n¡El helado es el mejor!\n¡El helado es el mejor!"
6:
- question_text: "After which command(s) should you use indentation (starting the next line with 4 spaces)?"
+ question_text: "¿Tras qué comando(s) se debería usar sangría (Que empiece la siguiente línea con 4 espacios)?"
mp_choice_options:
- option: "`{if}`"
- feedback: "Don't forget the others"
+ feedback: "No te olvides de los otros"
- option: "`{if}` `{repeat}`"
- feedback: "Don't forget `{else}`!"
+ feedback: "¡No olvides `{else}`!"
- option: "`{if}` `{else}` `{repeat}`"
- feedback: "Keep it up!"
+ feedback: "¡Sigue así!"
- option: "`{if}` `{else}` `{repeat}` `{print}`"
- feedback: "Not with print"
+ feedback: "No con imprimir"
correct_answer: "C"
- hint: "Indentation happens on the line below some commands"
+ hint: "La sangría ocurre en la línea inferior de algunos comandos"
question_score: '10'
7:
- question_text: "In this code from a pizza restaurant. \nYoull get a 5 dollar discount if you order a medium pizza with coke.\n What should you do to debug this code?"
+ question_text: "Conseguirás un descuento de 5 dólares si pides una pizza mediana y un refresco. ¡Pero el código tiene un fallo! ¿Cómo depurarlo?"
code: |-
- {if} food {is} pizza
- {if} size {is} medium
- {if} drink {is} coke
- price = price - 2
+ {if} comida {is} pizza
+ {if} tamaño {is} mediana
+ {if} bebida {is} refresco
+ precio = precio - 5
mp_choice_options:
- option: |
```
- {if} food {is} pizza
- {if} size {is} medium
- {if} drink {is} coke
- price = price - 2
+ {if} comida {is} pizza
+ {if} tamaño {is} mediana
+ {if} bebida {is} refresco
+ precio = precio - 5
```
- feedback: "Amazing!"
+ feedback: "¡Increíble!"
- option: |
```
- {if} food {is} pizza
- {if} size {is} medium
- {if} drink {is} coke
- price = price - 2
+ {if} comida {is} pizza
+ {if} tamaño {is} mediana
+ {if} bebida {is} refresco
+ precio = precio - 5
```
- feedback: "Try again!"
+ feedback: "¡Falta código en el segundo `{if}`!"
- option: |
```
- {if} food {is} pizza
- {if} size {is} medium
- {if} drink {is} coke
- price = price - 2
+ {if} comida {is} pizza
+ {if} tamaño {is} mediana
+ {if} bebida {is} refresco
+ precio = precio - 5
```
- feedback: "Try again"
+ feedback: "Dos `{if}`s consecutivos nunca es correcto."
- option: |
```
- {if} food {is} pizza
- {if} size {is} medium
- {if} drink {is} coke
- price = price - 2
+ {if} comida {is} pizza
+ {if} tamaño {is} mediana
+ {if} bebida {is} refresco
+ precio = precio - 5
```
feedback: "Try again"
correct_answer: "A"
- hint: "After each `{if}` command, the line below should indent"
+ hint: "Tras cada comando `{if}`, la línea de debajo debe tener sangría"
question_score: '10'
8:
- question_text: "What is wrong is this code?"
- code: |-
- age = {ask} 'Happy Birthday! How old are you?'
- singing = {ask} 'Would you like us to sing?'
- if singing {is} yes
- {repeat} years {times}
- {print} 'Hip Hip Hooray'
- mp_choice_options:
- - option: "You can't put two questions in a row"
- feedback: "Yes you can."
- - option: "The variable called 'age' is later on used as 'years'"
- feedback: "Keen eye! Good job!"
- - option: "You're not allowed to start with 8 spaces, like line 4 and 5 do"
- feedback: "You actually must start like that."
- - option: "A code must always start with a `{print}` command in the first line"
- feedback: "That's not true."
+ question_text: "¿Qué falla en este código?"
+ code: |-
+ edad = {ask} '¡Feliz cumpleaños! ¿Qué edad tienes?'
+ cantar = {ask} '¿Quieres que cantemos?'
+ {if} cantar {is} sí
+ {repeat} años {times}
+ {print} 'Hip Hip Hurra'
+ mp_choice_options:
+ - option: "No puedes poner dos preguntas seguidas"
+ feedback: "Sí puedes."
+ - option: "La variable llamada 'edad' se usa después como 'años'"
+ feedback: "¡Buen ojo! ¡Buen trabajo!"
+ - option: "No está permitido empezar con 8 espacios, como pasa en las líneas 4 y 5"
+ feedback: "De hecho debes empezar así."
+ - option: "Un código siempre debe empezar con un comando `{print}` en la primera línea"
+ feedback: "Eso no es cierto."
correct_answer: "B"
- hint: "The indentation is done right this time"
+ hint: "Esta vez la sangría está bien hecha"
question_score: '10'
9:
- question_text: "How many `{if}` commands can be placed inside another `{if}` command?"
+ question_text: "¿Cuántos comandos `{if}` se pueden poner dentro de otro comando `{if}`?"
mp_choice_options:
- - option: "None, that is not allowed"
- feedback: "You are allowed to"
- - option: "Only 1"
- feedback: "You could use more if you like"
+ - option: "Ninguno, no está permitido"
+ feedback: "Tienes permiso"
+ - option: "Sólo 1"
+ feedback: "Puedes usar más si quieres"
- option: "3"
- feedback: "You could use more if you like"
- - option: "Infinite, as long as you keep using indentation correctly"
- feedback: "That is true"
+ feedback: "Puedes usar más si quieres"
+ - option: "Infinito, siempre y cuando utilices la sangría correctamente"
+ feedback: "Eso es cierto"
correct_answer: "D"
- hint: "You can put an `{if}` command inside an `{if}` command."
+ hint: "Puedes poner un comando `{if}` dentro de un comando `{if}`."
question_score: '10'
10:
- question_text: "Which statement is true?"
+ question_text: "¿Qué afirmación es cierta?"
code: |-
1 {repeat} 2 {times}
- 2 {if} level {is} 9
- 3 {print} Great job!
- mp_choice_options:
- - option: "All lines should start with 4 spaces"
- feedback: "Only line 2 and 3 start with spaces"
- - option: "Line 2 and 3 should start with 4 spaces"
- feedback: "Line 3 should start with 8"
- - option: "Line 2 and 3 should start with 8 spaces"
- feedback: "Line 2 should start with 4"
- - option: "line 2 should atart with 4 spaces and line 3 with 8"
- feedback: "You are correct!"
+ 2 {if} nivel {is} 9
+ 3 {print} ¡Gran trabajo!
+ mp_choice_options:
+ - option: "Todas las líneas deberían empezar con 4 espacios"
+ feedback: "Sólo las líneas 2 y 3 deberían empezar con espacios"
+ - option: "Las líneas 2 y 3 deberían empezar con 4 espacios"
+ feedback: "La línea 3 debería empezar con 8"
+ - option: "Las líneas 2 y 3 deberían empezar con 8 espacios"
+ feedback: "La línea 2 debería empezar con 4"
+ - option: "la línea 2 debería empezar con 4 espacios y la línea 3 con 8"
+ feedback: "¡Tienes razón!"
correct_answer: "D"
- hint: "The first line doens't start with any spaces"
+ hint: "La primera línea no empieza con ningún espacio"
question_score: '10'
11:
1:
question_text: "What word should be at the place of the question mark?"
code: |-
- {for} i {in} _?_ 1 {to} 10
+ {for} i {in} _ 1 {to} 10
{print} i
mp_choice_options:
- option: |
@@ -2031,19 +1981,13 @@ levels:
```
feedback: "No"
- option: |
- ```
- {range}
- ```
+ `{range}`
feedback: "Correct"
- option: |
- ```
- {if}
- ```
+ `{if}`
feedback: "No"
- option: |
- ```
- {for}
- ```
+ `{for}`
feedback: "No"
correct_answer: "B"
hint: "What did you learn in this level?"
@@ -2066,7 +2010,7 @@ levels:
hint: "How do the numbers appear in the screen?"
question_score: '10'
3:
- question_text: "Which code was used to get this output?"
+ question_text: "¿Qué código se usó para conseguir este resultado?"
output: |-
1
2
@@ -2166,41 +2110,41 @@ levels:
hint: "There is something wrong with the indention"
question_score: '10'
6:
- question_text: "How many times does the word Hello appear on your screen when you run the code?"
+ question_text: "¿Cuántas veces aparece la palabra Hola en tu pantalla cuando ejecutes el código?"
code: |-
{for} i {in} {range} 0 {to} 2
- {print} 'Hello'
+ {print} 'Hola'
mp_choice_options:
- - option: "1 time"
+ - option: "1 vez"
feedback: "No"
- - option: "2 times"
+ - option: "2 veces"
feedback: "No"
- - option: "3 times"
- feedback: "That's right!"
- - option: "Never"
+ - option: "3 veces"
+ feedback: "¡Eso es!"
+ - option: "Nunca"
feedback: "No"
correct_answer: "C"
- hint: "0 also counts. So 0,1,2 that's 3 times."
+ hint: "0 también cuenta. Así que 0,1,2 son 3 veces."
question_score: '10'
7:
- question_text: "What should be on the place of the question mark?"
+ question_text: "¿Qué debería ir en lugar del interrogante?"
code: |-
- {print} 'Welcome to Hedys diner'
- people is {ask} 'How many people will be eating here tonight?'
- _?_
- food is {ask} 'What would you like to order?'
- {print} food
+ {print} 'Bienvenido a la cena de Hedys'
+ gente = {ask} '¿Cuántas personas comerán aquí esta noche?'
+ _
+ comida = {ask} '¿Qué te gustaría pedir?'
+ {print} comida
mp_choice_options:
- option: |
```
{for} i {in} {range} 0 {to} 3
```
- feedback: "There's not always 3 people"
+ feedback: "No siempre hay 3 personas"
- option: |
```
- {for} i {in} {range} 1 {to} guests
+ {for} i {in} {range} 1 {to} invitados
```
- feedback: "The variable is not named guests"
+ feedback: "La variable no se llama invitados"
- option: |
```
{for} i {in} {range} 1 {to} people
@@ -2210,47 +2154,47 @@ levels:
```
{for} i {in} {range} 0 {to} people
```
- feedback: "That's one order too many!"
+ feedback: "¡Es un pedido de más!"
correct_answer: "C"
- hint: "Use the variable 'people'"
+ hint: "Usa la variable 'gente'"
question_score: '10'
8:
- question_text: "What will be the output from this code?"
+ question_text: "¿Cuál será el resultado de este código?"
code: |-
{for} i {in} {range} 23 {to} 25
{print} 'hi'
mp_choice_options:
- option: "23\n24\n25"
- feedback: "The numbers don't appear. It doesn't say `{print}` i."
+ feedback: "El número no aparece. No dice `{print}` i."
- option: "23 hi 24 hi 25 hi"
- feedback: "The numbers don't appear. It doesn't say `{print}` i"
+ feedback: "El número no aparece. No dice `{print}` i"
- option: "hi\nhi\nhi"
- feedback: "Correct"
- - option: "The word 'hi' will appear 25 times in a row."
- feedback: "No it will only appear 3 times."
+ feedback: "Correcto"
+ - option: "La palabra 'hola' aparecerá 25 veces seguidas."
+ feedback: "No, sólo aparecerá 3 veces."
correct_answer: "C"
- hint: "It doesn't say `{print}` i"
+ hint: "No dice `{print}` i"
question_score: '10'
9:
- question_text: "How many times does Hedy chant Hip Hip Hooray?"
- code: |-
- age = {ask} 'How old are you?'
- {for} i {in} {range} 1 {to} age
- {print} 'Hip Hip Hoorray!'
- mp_choice_options:
- - option: "1 time"
- feedback: "Try again"
- - option: "2 times"
- feedback: "Try again"
- - option: "Never"
- feedback: "Try again"
- - option: "That depends on how old you are"
- feedback: "That's right!"
+ question_text: "¿Cuántas veces Hedy canta Hip Hip Hurra?"
+ code: |-
+ edad = {ask} '¿Qué edad tienes?'
+ {for} i {in} {range} 1 {to} edad
+ {print} '¡Hip Hip Hurra!'
+ mp_choice_options:
+ - option: "1 vez"
+ feedback: "Inténtalo de nuevo"
+ - option: "2 veces"
+ feedback: "Inténtalo de nuevo"
+ - option: "Nunca"
+ feedback: "Inténtalo de nuevo"
+ - option: "Que depende de cuantos años tienes"
+ feedback: "¡Eso es!"
correct_answer: "D"
- hint: "`{for}` i `{in}` `{range}` 1 `{to}` age"
+ hint: "`{for}` i `{in}` `{range}` 1 `{to}` edad"
question_score: '10'
10:
- question_text: "Which code belongs to this output?"
+ question_text: "¿Qué código pertenece a este resultado?"
output: |-
Baby shark tututudutudu
Baby shark tututudutudu
@@ -2263,125 +2207,125 @@ levels:
{print} Baby shark tututudutudu
{print} Baby shark
```
- feedback: "Mind the indention"
+ feedback: "Cuidado con la sangría"
- option: |
```
{for} i {in} {range} 1 {to} 3
{print} Baby shark tututudutudu
{print} Baby shark
```
- feedback: "That's right!"
+ feedback: "¡Eso es!"
- option: |
```
{for} i {in} {range} 0 {to} 3
{print} Baby shark tututudutudu
{print} Baby shark
```
- feedback: "`{range}` 0 `{to}` 3 is 4 times."
+ feedback: "`{range}` 0 `{to}` 3 son 4 veces."
- option: |
```
{for} i {in} {range} 0 {to} 3
{print} Baby shark tututudutudu
{print} Baby shark
```
- feedback: "`{range}` 0 `{to}` 3 is 4 times."
+ feedback: "`{range}` 0 `{to}` 3 son 4 veces."
correct_answer: "B"
- hint: "Mind the indention"
+ hint: "Cuidado con la sangría"
question_score: '10'
10:
1:
- question_text: "What do we need to fill in on the `_?_` if we want to print each compliment?"
+ question_text: "¿Qué tenemos que rellenar en el `_` si queremos imprimir cada cumplido?"
code: |-
- compliments = perfect, great job, amazing
- _?_
- {print} compliment
+ cumplidos = perfecto, gran trabajo, increíble
+ _
+ {print} cumplido
mp_choice_options:
- option: |
```
- {for} each compliment
+ {for} cada cumplido
```
- feedback: "That's not it"
+ feedback: "No es eso"
- option: |
```
- {for} compliment {in} compliments
+ {for} cumplido {in} cumplidos
```
- feedback: "You deserve all those compliments!"
+ feedback: "¡Te mereces todos esos cumplidos!"
- option: |
```
- {if} compliment {in} compliments
+ {if} cumplido {in} cumplidos
```
- feedback: "That's not it"
+ feedback: "No es eso"
- option: |
```
- {for} compliments {in} compliment
+ {for} cumplidos {in} cumplido
```
- feedback: "Almost there!"
+ feedback: "¡Ya casi está!"
correct_answer: "B"
- hint: "`{for}` each compliment in the lists of compliments..."
+ hint: "`{for}` cada cumplido en la lista de cumplidos..."
question_score: '10'
2:
- question_text: "Which output is correct?"
- code: |-
- meals = pizza, pasta, pancakes
- {for} meal {in} meals
- {print} 'I love ' meal
- mp_choice_options:
- - option: "I love pizza"
- feedback: "Line 2 says `{for}` each meal in the list of meals. So each meal is printed."
- - option: "I love pasta"
- feedback: "Line 2 says `{for}` each meal in the list of meals. So each meal is printed."
- - option: "I love pancakes"
- feedback: "Line 2 says `{for}` each meal in the list of meals. So each meal is printed."
+ question_text: "¿Qué resultado es correcto?"
+ code: |-
+ comidas = pizza, pasta, tortitas
+ {for} comida {in} comidas
+ {print} 'Me encanta ' comida
+ mp_choice_options:
+ - option: "Me encanta la pizza"
+ feedback: "La línea 2 dice `{for}` cada comida en la lista de comidas. Así que se imprime cada comida."
+ - option: "Me encanta la pasta"
+ feedback: "La línea 2 dice `{for}` cada comida en la lista de comidas. Así que se imprime cada comida."
+ - option: "Me encanta las tortitas"
+ feedback: "La línea 2 dice `{for}` cada comida en la lista de comidas. Así que se imprime cada comida."
- option: |-
- I love pizza
- I love pasta
- I love pancakes
+ Me encanta la pizza
+ Me encanta la pasta
+ Me encanta las tortitas
feedback: "Great!"
correct_answer: "D"
- hint: "Line 2 says for each meal in the list of meals. So each meal is printed."
+ hint: "La línea 2 dice cada comida en la lista de comidas. Así que se imprime cada comida."
question_score: '10'
3:
- question_text: "Which output is correct?"
+ question_text: "¿Qué resultado es correcto?"
code: |-
- animals = dogs, cats, hamsters, chickens
- {for} animal {in} animals
- {print} animal ' are lovely pets'
+ animales = perros, gatos, hámsteres, gallinas
+ {for} animal {in} animales
+ {print} animal ' son mascotas adorables'
mp_choice_options:
- - option: "dogs are lovely pets"
- feedback: "Line 2 says {for} each animal in the list of animals. So each animal is {print}ed."
- - option: "dogs, cats, hamsters, chickens are lovely pets"
- feedback: "Each animal gets their own line in the output."
+ - option: "los perros son mascotas adorables"
+ feedback: "La línea 2 dice {for} cada animal en la lista de animales. Así que se {print} cada animal."
+ - option: "perros, gatos, hámsteres, gallinas son mascotas adorables"
+ feedback: "Cada animal tiene su propia línea en la salida."
- option: |-
- dogs are lovely pets
- cats are lovely pets
- hamsters are lovely pets
- chickens are lovely pets
+ los perros son mascotas adorables
+ los gatos son mascotas adorables
+ los hámsteres son mascotas adorables
+ las gallinas son mascotas adorables
feedback: "Great!"
- - option: "You don't know yet. Because it chooses one of the animals {at} {random}."
- feedback: "Line 2 says {for} each animal in the list of animals. So each animal is {print}ed."
+ - option: "Todavía no lo sabes. Porque elige uno de los animales {at} {random}."
+ feedback: "La línea 2 dice {for} cada animal en la lista de animales. Así que se {print} cada animal."
correct_answer: "C"
- hint: "Line 2 says {for} each animal in the list of animals. So each animal is printed"
+ hint: "La línea 2 dice {for} cada animal en la lista de animales. Así que se imprime cada animal"
question_score: '10'
4:
- question_text: "What's wrong with this code?"
+ question_text: "¿Qué le pasa a este código?"
code: |-
- groceries = apples, bread, milk
- {for} item {in} groceries
- {print} 'We need ' groceries
- mp_choice_options:
- - option: "Line 2 needs to start with 4 spaces as indentation"
- feedback: "No it doesn't. Only line 3 needs indentation, which it has."
- - option: "Line 3 does not need to start with 4 spaces as indentation"
- feedback: "Line 2 is a `{for}`command so line 3 does need to start with an indent."
- - option: "Line 3 should say item instead of groceries"
- feedback: "Good job!"
- - option: "Line 2 should say groceries instead of item"
- feedback: "No it does not."
+ alimentos = manzanas, pan, leche
+ {for} objeto {in} alimentos
+ {print} 'Necesitamos ' alimentos
+ mp_choice_options:
+ - option: "La línea 2 tiene que empezar con 4 espacios como sangría"
+ feedback: "No. Sólo la línea 3 necesita sangría, la cual tiene."
+ - option: "La línea 3 no tiene que empezar con 4 espacios como sangría"
+ feedback: "La línea 2 es un comando `{for}` así que la línea 3 no tiene que empezar con sangría."
+ - option: "La línea 3 debería decir artículo en vez de comestibles"
+ feedback: "¡Buen trabajo!"
+ - option: "La línea 2 debería decir comestibles en vez de artículo"
+ feedback: "No, no es así."
correct_answer: "C"
- hint: "Line 2 says `{for}` each item in the list of groceries"
+ hint: "La línea 2 dice `{for}` cada artículo en la lista de la compra"
question_score: '10'
5:
- question_text: "What word should be on the _?_ with these digital dice?"
+ question_text: "¿Qué palabra debería ir en el _ con estos dados digitales?"
code: |-
{print} 'Welcome to the digital dice!'
players = Ann, John, Jesse
@@ -2389,44 +2333,44 @@ levels:
{for} player {in} players
{print} player ' throws ' _?_ {at} {random}
mp_choice_options:
- - option: "players"
- feedback: "It would say 'Ann throws Jesse', instead of 'Ann throws 6'."
- - option: "choices"
- feedback: "That's right!"
- - option: "choice"
- feedback: "You are very close. But you need Hedy to pick from the list called 'choices' not 'choice'..."
- - option: "dice"
- feedback: "Look at the names of the variables."
+ - option: "jugadores"
+ feedback: "Diría 'Ann lanza a Jesse', en vez de 'Ann lanza un 6'."
+ - option: "opciones"
+ feedback: "¡Eso es!"
+ - option: "opcion"
+ feedback: "Estás muy cerca. Pero necesitas que Hedy elija de la lista llamada 'opciones' no 'opcion'..."
+ - option: "dados"
+ feedback: "Mira los nombres de las variables."
correct_answer: "B"
- hint: "Hedy needs to pick a number `{at} {random}`"
+ hint: "Hedy tiene que elegir un número `{at} {random}`"
question_score: '10'
6:
- question_text: "Which of the answers below is a possible outcome when you run the code?"
+ question_text: "¿Cuál de las respuestas de abajo es un posible resultado cuando ejecutes el código?"
code: |-
- choices = rock, paper, scissors
- players = Kelly, Meredith
- {for} player {in} players
- {print} player ' chooses ' choices {at} {random}
+ opciones = piedra, papel, tijeras
+ jugadores = Kelly, Meredith
+ {for} jugador {in} jugadores
+ {print} jugador ' elige ' opciones {at} {random}
mp_choice_options:
- option: |-
- Kelly chooses rock
- feedback: "Meredith wants to play too!"
+ Kelly elige piedra
+ feedback: "¡Meredith también quiere jugar!"
- option: |-
- Meredith chooses scissors
- Kelly chooses rock
- feedback: "So close! But Kelly is first in the list, so she goes first"
+ Meredith elige tijeras
+ Kelly elige piedra
+ feedback: "¡Muy cerca! Pero Kelly es la primera en la lista, así que ella elige primero"
- option: |-
- Meredith chooses paper
- feedback: "Kelly wants to play too!"
+ Meredith elige papel
+ feedback: "¡Kelly también quiere jugar!"
- option: |-
- Kelly chooses paper
- Meredith chooses scissors
- feedback: "Amazing!"
+ Kelly elige papel
+ Meredith elige tijeras
+ feedback: "¡Increíble!"
correct_answer: "D"
- hint: "Each player will pick an option. The player that's first on the list will go first."
+ hint: "Cada jugador elegirá una opción. El jugador que esté primero en la lista escogerá primero."
question_score: '10'
7:
- question_text: "What line should be on the _?_ in this code that decides what these people will have for dinner?"
+ question_text: "¿Qué línea debería ir en el _ en este código que decide lo que cenarán estas personas?"
code: |-
names = Ron, Leslie, April, Andy
food = pasta, fries, salad
@@ -2435,60 +2379,60 @@ levels:
mp_choice_options:
- option: |
```
- {for} name {in} names
+ {for} nombre {in} nombres
```
- feedback: "You are on fire!"
+ feedback: "¡Estás en racha!"
- option: |
```
- {for} names {in} name
+ {for} nombres {in} nombre
```
- feedback: "No it should be for each name in the list nameS, so the other way around"
+ feedback: "No, debería ser para cada nombre en la lista de nombres, así que al revés"
- option: |
```
- {for} food {in} food
+ {for} comida {in} comida
```
- feedback: "Each name should be told what they will have for dinner."
+ feedback: "Hay que decir a cada uno lo que va a cenar."
- option: |
```
- {for} name {in} food
+ {for} nombre {in} comida
```
- feedback: "Each name should be told what they will have for dinner."
+ feedback: "Hay que decir a cada uno lo que va a cenar."
correct_answer: "A"
- hint: "Each name should be told what they will have for dinner."
+ hint: "Hay que decir a cada uno lo que va a cenar."
question_score: '10'
8:
- question_text: "What should be on the _?_ in this code that decides which color shirt you get?"
+ question_text: "¿Qué debería ir en el _ en este código que decide qué color de camiseta recibes?"
code: |-
- names = Donna, Tommy, Ben
- colors = blue, red, purple
- {for} name {in} names
- {print} _?_
+ nombres = Donna, Tommy, Ben
+ colores = azul, rojo, morado
+ {for} nombre {in} nombres
+ {print} _
mp_choice_options:
- option: |
```
- 'name gets a color shirt'
+ 'nombre recibe una camiseta de color'
```
- feedback: "That's not it!"
+ feedback: "¡No es eso!"
- option: |
```
- name 'gets a ' colors {at} {random} ' shirt'
+ nombre 'consigue una camiseta ' colores {at} {random}
```
- feedback: "Great job! This was a hard one!"
+ feedback: "¡Gran trabajo! Este era difícil!"
- option: |
```
- names 'gets a ' color {at} {random} ' shirt'
+ nombres 'consigue una camiseta ' color {at} {random}
```
- feedback: "You want each name printed. So the first word should not be names but..."
+ feedback: "Quieres que se imprima cada nombre. Así que la primera palabra no debería ser nombres pero..."
- option: |
```
- 'people gets a colors shirt'
+ gente ' recibe una camiseta de colores'
```
- feedback: "There is no variable named people.."
+ feedback: "No hay una variable llamada gente.."
correct_answer: "B"
- hint: "Mind the quotation marks and the names of the variables"
+ hint: "Cuidado con las comillas y los nombres de las variables"
question_score: '10'
9:
- question_text: "What is the first question Hedy will `{ask}` you when you run the program?"
+ question_text: "¿Cuál será la primera pregunta que Hedy te preguntará cuando ejecutes el programa?"
code: |-
courses = appetizer, main course, dessert
names = Timon, Onno
@@ -2497,484 +2441,634 @@ levels:
food = {ask} name ', what would you like to eat as your ' course '?'
{print} name ' orders ' food ' as their ' course
mp_choice_options:
- - option: "Timon, what would you like to eat as your appetizer?"
- feedback: "Perfect!"
- - option: "Onno, what would you like to eat as your appetizer?"
- feedback: "Timon is first on the list!"
- - option: "Timon, what would you like to eat as your dessert?"
- feedback: "Appetizers are first in the list"
- - option: "You don't know that. Hedy will choose `{at} {random}`."
- feedback: "There is no `{at} {random}` in this code..."
+ - option: "Timón, ¿qué te gustaría comer como aperitivo?"
+ feedback: "¡Perfecto!"
+ - option: "Onno, qué te gustaría comer de aperitivo?"
+ feedback: "¡Timón es el primero en la lista!"
+ - option: "Timón, qué te gustaría comer de postre?"
+ feedback: "Aperitivos son los primeros en la lista"
+ - option: "No sabes eso. Hedy elegirá `{at} {random}`."
+ feedback: "No hay `{at} {random}` en este código..."
correct_answer: "A"
- hint: "The first options from both lists are chosen."
+ hint: "Se eligen las primeras opciones de ambas listas."
question_score: '10'
10:
- question_text: "What is true about this code?"
+ question_text: "¿Qué hay de cierto en este código?"
code: |-
prices = 1 million dollars, car, sandwich
names = Bob, Patrick, Sandy, Larry
{for} price {in} prices
{print} 'The ' price 'is won by ' names {at} {random}
mp_choice_options:
- - option: "Everybody will always win a price."
- feedback: "That is not true, you could end up without a price."
- - option: "All the prices always go to one single person."
- feedback: "That is not true. All the prices are given away, but to random people"
- - option: "Larry will never win a price"
- feedback: "That is not true. Larry has the same odds as the others"
- - option: "Someone might win with two prices"
- feedback: "You get it!"
+ - option: "Todo el mundo siempre ganará un premio."
+ feedback: "Eso no es cierto, puede que acabes sin llevarte un premio."
+ - option: "Todos los premios siempre van a la misma persona."
+ feedback: "Eso no es cierto. Todos los premios se reparten, pero a gente al azar"
+ - option: "Larry nunca ganará con un premio"
+ feedback: "Eso no es cierto. Larry tiene las mismas probabilidades que los otros"
+ - option: "Alguno podría ganar con dos premios"
+ feedback: "¡Lo conseguiste!"
correct_answer: "D"
- hint: "Try to imagine the output of this code."
+ hint: "Intenta imaginar el resultado de este código."
question_score: '10'
12:
1:
mp_choice_options:
- - feedback: Don't forget the first line of code!
+ - feedback: ¡No olvides la primera línea de código!
option: "5\n"
- option: "3.5 + 1.5\n"
- feedback: This is not the one!
- - option: "thee and a half plus one and a half is...\nfive\n"
- feedback: Take a close look at the second line...
- - option: "three and a half plus one and a half is...\n5\n"
- feedback: Great job!
- question_text: Which output is correct?
- code: "print 'three and a half plus one and a half is...'\nprint 3.5 + 1.5"
+ feedback: ¡Este no es el uno!
+ - option: "tres y medio más uno y medio es...\ncinco\n"
+ feedback: Fíjate bien en la segunda línea...
+ - option: "tres y medio más uno y medio es...\n5\n"
+ feedback: ¡Gran trabajo!
+ question_text: ¿Qué resultado es correcto?
+ code: "{print} 'tres y medio más uno y medio es...'\n{print} 3.5 + 1.5"
correct_answer: D
- hint: Both lines are printed!
+ hint: ¡Se imprimen ambas líneas!
question_score: '10'
2:
question_score: '10'
- question_text: Which of these codes is correct?
+ question_text: ¿Cuál de estos códigos es correcto?
mp_choice_options:
- - option: "```\nflavors is vanilla, strawberry, chocolate\nprint 'I would like a ' flavors at random ' cake.'\n```"
- feedback: All the different values of flavors should be in quotation marks.
- - option: "```\n'flavors = vanilla, strawberry, chocolate'\nprint 'I would like a ' flavors at random ' cake.'\n```"
- feedback: All the different values of flavors should be in quotation marks.
- - option: "```\nflavors = 'vanilla', 'strawberry', 'chocolate'\nprint 'I would like a ' flavors at random ' cake.'\n```"
- feedback: Alright!
- - option: "\n```\nflavors = 'vanilla, strawberry, chocolate'\nprint 'I would like a ' flavors at random ' cake.'\n```\n"
- feedback: All the different values of flavors should be in quotation marks.
+ - option: "```\nsabores {is} vainilla, fresa, chocolate\n{print} 'Me gustaría tomar una tarta de ' sabores {at} {random}\n```"
+ feedback: Todos los diferentes valores de sabores deberían estar entre comillas.
+ - option: "```\n'sabores = vainilla, fresa, chocolate'\n{print} 'Me gustaría tomar una tarta de ' sabores {at} {random}\n```"
+ feedback: Todos los diferentes valores de sabores deberían estar entre comillas.
+ - option: "```\nsabores = 'vainilla, fresa, chocolate'\n{print} 'Me gustaría tomar una tarta de ' sabores {at} {random}\n```"
+ feedback: ¡Muy bien!
+ - option: "\n```\nsabores = 'vainilla, fresa, chocolate'\n{print} 'Me gustaría tomar una tarta de ' sabores {at} {random} \n```\n"
+ feedback: Todos los diferentes valores de sabores deberían estar entre comillas.
correct_answer: C
- hint: The second line is the same in each code, pay attention to the first line
+ hint: La segunda línea es la misma en cada código, presta atención a la primera línea
3:
question_score: '10'
- question_text: What's wrong with this code?
- code: "favorite_animal = ask 'What is your favorite animal?'\nprint 'I like ' favoriteanimal ' too!'"
- mp_choice_options:
- - option: "The name of the variable is different in line 1 than in line 2.\n"
- feedback: Correct!
- - option: "The quotation marks aren't used correctly in line 2\n"
- feedback: That's not true
- - option: "You can't use the = sign when using an ask command\n"
- feedback: That's not true
- - option: "Nothing is wrong.\n"
- feedback: That's not true
+ question_text: ¿Qué le pasa a este código?
+ code: "animal_favorito = {ask} '¿Cuál es tu animal favorito?'\n{print} 'Me gustan ' animalfavorito ' también!'"
+ mp_choice_options:
+ - option: "El nombre de la variable es diferente en la línea 1 que en la línea 2.\n"
+ feedback: ¡Correcto!
+ - option: "No se han utilizado correctamente las comillas en la línea 2\n"
+ feedback: Eso no es cierto
+ - option: "No puedes usar el signo = al usar un comando {ask}\n"
+ feedback: Eso no es cierto
+ - option: "No ocurre nada.\n"
+ feedback: Eso no es cierto
correct_answer: A
- hint: The quotation marks are used correctly
+ hint: Las comillas se han utilizado correctamente
5:
correct_answer: B
- question_text: What output does Agent007 get when they put in the correct password?
+ question_text: ¿Qué resultado tendrá el Agente007 cuando pongan la contraseña correcta?
code: "name is ask 'What is your name?'\nif name is 'Agent007'\n a is 'Go to the airport '\nelse\n a is 'Go to the train station '\npassword is ask 'What is the password?'\nif password is 'TOPSECRET'\n b is 'tomorrow at 02.00'\nelse\n b is 'today at 10.00'\nprint a + b"
mp_choice_options:
- - option: Go to the train station today at 10.00
- feedback: The agent won't be catching any bad guys here
- - option: Go to the airport tomorrow at 02.00
- feedback: You've cracked the code!
- - option: Go to the train station tomorrow at 02.00
- feedback: The agent won't be catching any bad guys here
- - option: Go to the airport tomorrow at 10.00
- feedback: The agent won't be catching any bad guys here
- hint: The correct password is TOPSECRET
+ - option: Ve a la estación de trenes hoy a las 10.00
+ feedback: El agente no atrapará a ningún malo aquí
+ - option: Ve al aeropuerto mañana a las 02.00
+ feedback: ¡Has descifrado el código!
+ - option: Ve a la estación de trenes mañana a las 02.00
+ feedback: El agente no atrapará a ningún malo aquí
+ - option: Ve al aeropuerto mañana a las 10.00
+ feedback: El agente no atrapará a ningún malo aquí
+ hint: La contraseña correcta es TOPSECRET
question_score: '10'
6:
question_score: '10'
- question_text: Which line should be filled in at the ???
+ question_text: ¿Qué línea debe rellenarse en ???
code: "print 'Welcome to McHedy!'\norder = ask 'Would you like a hamburger or fries?'\nif order = 'hamburger'\n price = 12\nif order = 'fries'\n price = 4\ndrinks = ask 'Would you like a drink with that for 2 dollars?'\nif drinks = 'yes'\n ???\nprint 'That will be ' price ' dollar please'\n"
mp_choice_options:
- - option: "```\nprice = 14\n```\n"
- feedback: What if you only order fries and a drink?
- - option: "```\nprice = '14'\n```"
- feedback: What if you only order fries and a drink?
- - option: "```\nprice = price + 2\n```"
- feedback: Excellent!
- - option: "```\nprice = + 2\n```"
- feedback: Almost there!
+ - option: "```\nprecio = 14\n```\n"
+ feedback: ¿Qué ocurre si sólo pides patatas fritas y una bebida?
+ - option: "```\nprecio = '14'\n```"
+ feedback: ¿Qué ocurre si sólo pides patatas fritas y una bebida?
+ - option: "```\nprecio = precio + 2\n```"
+ feedback: ¡Excelente!
+ - option: "```\nprecio = + 2\n```"
+ feedback: ¡Ya casi está!
correct_answer: C
- hint: What if you only order fries and a drink?
+ hint: ¿Qué ocurre si sólo pides patatas fritas y una bebida?
7:
question_score: '10'
- question_text: Which output does a vegan get?
+ question_text: ¿Qué resultado obtiene un vegano?
code: "menu = 'cookies', 'cheese', 'grapes'\nprint \"It's my birthday! I`ve brought some snacks!\"\ndiet = ask 'Do you have any dietary restrictions?'\nif diet = 'gluten free'\n remove 'cookies' from menu\nif diet = 'vegan'\n remove 'cheese' from menu\nprint 'For you I have brought: '\nfor snack in menu\n print snack"
mp_choice_options:
- - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ncookies\ngrapes"
- feedback: Terrific!
- - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ngrapes"
- feedback: There's more options than just one
- - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ncheese\ngrapes"
- feedback: A vegan person can't have cheese
- - option: "It's my birthday! I've brought some snacks!\nFor you I have brought:\ngrapes\ncookies"
- feedback: Almost there, but look at the order of snacks in the list
+ - option: "¡Es mi cumpleaños! ¡He traído algunos aperitivos!\nPara ti he traído:\ngalletas\nuvas"
+ feedback: ¡Magnífico!
+ - option: "¡Es mi cumpleaños! ¡He traído algunos aperitivos!\nPara ti he traído:\nuvas"
+ feedback: Hay más opciones que una
+ - option: "¡Es mi cumpleaños! ¡He traído algunos aperitivos!\nPara ti he traído:\nqueso\nuvas"
+ feedback: Una persona vegana no puede comer queso
+ - option: "¡Es mi cumpleaños! ¡He traído algunos aperitivos!\nPara ti he traído:\nuvas\ngalletas"
+ feedback: Ya casi está, pero mira el orden de los aperitivos de la lista
correct_answer: A
- hint: What item is removed from the list when you answer 'vegan'?
+ hint: ¿Qué elemento se elimina de la lista cuando respondes 'vegano'?
8:
question_score: '10'
- question_text: Which code was used to create this output?
+ question_text: ¿Qué código se ha utilizado para crear este resultado?
code: '3.5'
mp_choice_options:
- - option: "```\nprint '7 / 2'\n```"
+ - option: "```\n{print} '7 / 2'\n```"
feedback: No
- - option: "```\nprint 7 / 2\n```"
- feedback: That is right!
- - option: "```\nprint 7 : 2\n```"
+ - option: "```\n{print} 7 / 2\n```"
+ feedback: ¡Así es!
+ - option: "```\n{print} 7 : 2\n```"
feedback: No
- - option: "```\nprint 7 * 2\n```"
+ - option: "```\n{print} 7 * 2\n```"
feedback: No
correct_answer: B
- hint: 7 devided by 2 is 3.5
+ hint: 7 dividido por 2 es 3.5
4:
- question_text: In which lines are quotation marks needed to get the code to work?
+ question_text: ¿En qué líneas se necesitan comillas para conseguir que el código funcione?
code: "print Welcome to the online shoe shop\ncategory = ask What kind of shoes are you looking for?\nif category = high heels\n print High heels are 50% off now!"
mp_choice_options:
- - option: "Line 1 and 2\n"
+ - option: "Líneas 1 y 2\n"
feedback: No
- - option: "Line 1, 2 and 3\n"
+ - option: "Líneas 1, 2 y 3\n"
feedback: No
- - option: "Line 1, 2 and 4\n"
+ - option: "Líneas 1, 2 y 4\n"
feedback: No
- - option: "All of the lines\n"
- feedback: Perfect!
+ - option: "Todas las líneas\n"
+ feedback: ¡Perfecto!
correct_answer: D
- hint: Does line 3 need quotation marks too?
+ hint: ¿La línea 3 también necesita comillas?
question_score: '10'
9:
- question_text: Which code should be filled in in line 1 at the ???
- code: "???\nprint 'You won ' prices at random '!'"
- mp_choice_options:
- - option: "```\nprices = 'one' 'million' 'dollars', 'nothing'\n```"
- feedback: You won nothing
- - option: "```\nprices = 'one million dollars, nothing'\n```"
- feedback: You won nothing
- - option: "```\nprices = 'one million dollars', 'nothing'\n```"
- feedback: Winner!
- - option: "```\n'prices' = 'one million dollars', 'nothing'\n```"
- feedback: You one nothing
+ question_text: ¿Qué código debe rellenarse en la línea 1 en ???
+ code: "???\n{print} 'Ganaste ' premios {at} {random} '!'"
+ mp_choice_options:
+ - option: "```\npremios = 'un' 'millón' 'dólares', 'nada'\n```"
+ feedback: No ganaste nada
+ - option: "```\npremios = 'un millón de dólares, nada'\n```"
+ feedback: No ganaste nada
+ - option: "```\npremios = 'un millón de dólares', 'nada'\n```"
+ feedback: ¡Ganador!
+ - option: "```\n'premios' = 'un millón de dólares', 'nada'\n```"
+ feedback: Tú nada
correct_answer: C
- hint: The items on the list should be in quotation marks
+ hint: Los objetos de la lista deben ir entre comillas
question_score: '10'
10:
- question_text: Which line of code should be filled in at the ??? to complete the song ?
- code: "actions = 'clap your hands', 'stomp your feet', 'shout Hurray!'\n???\n for i in range 0 to 1\n print 'if youre happy and you know it'\n print action\n print 'if youre happy and you know it and you really want to show it'\n print 'if youre happy and you know it'\n print action"
- mp_choice_options:
- - option: for i in range 1 to 3
- feedback: This is a hard one! All the actions on the list must be in the song.
- - option: for action in actions
- feedback: You are amazing!
- - option: repeat 3 times
- feedback: This is a hard one! All the actions on the list must be in the song.
- - option: print actions at random
- feedback: This is a hard one! All the actions on the list must be in the song.
+ question_text: ¿Qué línea de código debe rellenarse en ??? para completar la canción ?
+ code: "acciones = 'aplaude', 'pisa fuerte', 'grita ¡Hurra!'\n???\n {for} i {in} rango 0 {to} 1\n {print} 'si estás feliz y lo sabes'\n {print} accion\n {print} 'si estás feliz y lo sabes y realmente quieres mostrarlo'\n {print} 'si estás feliz y lo sabes'\n {print} accion"
+ mp_choice_options:
+ - option: "```\n{for} i {in} {range} 1 {to} 3\n```"
+ feedback: ¡Esta es difícil! En la canción deben aparecer todas las acciones de la lista.
+ - option: "```\n{for} acción {in} acciones\n```"
+ feedback: ¡Eres increíble!
+ - option: "```\n{repeat} 3 {times}\n```"
+ feedback: ¡Esta es difícil! En la canción deben aparecer todas las acciones de la lista.
+ - option: "```\n{print} acciones {at} {random}\n```"
+ feedback: ¡Esta es difícil! En la canción deben aparecer todas las acciones de la lista.
correct_answer: B
- hint: This is a hard one! All the actions on the list must be in the song.
+ hint: ¡Esta es difícil! En la canción deben aparecer todas las acciones de la lista.
question_score: '10'
13:
4:
question_score: '10'
- question_text: Which line of code should follow this line in rock-paper-scissors game?
- code: if computer_choice is 'rock' and your_choice is 'paper'
- mp_choice_options:
- - option: print 'you win'
- feedback: You win!
- - option: print 'you lose'
- feedback: You lose!
- - option: print 'tie'
- feedback: It's only a tie if both choices are the same
- - option: print 'try again'
- feedback: Try again!
+ question_text: ¿Qué línea de código debe seguir a esta línea en el juego de piedra-papel-tijeras?
+ code: "{if} opcion_ordenador {is} 'piedra' {and} tu_opcion {is} 'papel'"
+ mp_choice_options:
+ - option: "```\n{print} 'ganas'\n```"
+ feedback: ¡Ganas!
+ - option: "```\n{print} 'pierdes'\n```"
+ feedback: ¡Pierdes!
+ - option: "```\n{print} 'empate'\n```"
+ feedback: Sólo hay empate si ambas opciones son iguales
+ - option: "```\n{print} 'inténtalo de nuevo'\n```"
+ feedback: ¡Inténtalo de nuevo!
correct_answer: A
- hint: Paper beats rock
+ hint: Papel vence a piedra
5:
correct_answer: C
- question_text: Which statement is true about this code?
- code: "if name = 'Cinderella' and shoe_size = '38'\n print 'You are my one true love!'"
- mp_choice_options:
- - option: Every person with shoe size 38 is this prince's one true love
- feedback: The prince is a little more picky than that!
- - option: Every person named Cinderella is this prince's one true love
- feedback: The prince is a little more picky than that!
- - option: Every person that is named Cinderella and has shoe size 38 is this prince's one true love
- feedback: Fantastic!
- - option: Every person that's not named Cinderella and does not have shoe size 38 is this prince's one true love
- feedback: The prince is a little more picky than that!
- hint: Both statements have to be true
+ question_text: ¿Qué afirmación es cierta sobre este código?
+ code: "{if} nombre = 'Cenicienta' {and} talla_calzado = '38'\n {print} '¡Eres mi único amor verdadero!'"
+ mp_choice_options:
+ - option: Toda persona con una talla 38 de calzado es el verdadero amor del príncipe
+ feedback: ¡El príncipe es un poco más exigente que eso!
+ - option: Toda persona que se llame Cenicienta es el amor verdadero del príncipe
+ feedback: ¡El príncipe es un poco más exigente que eso!
+ - option: Toda persona que se llame Cenicienta y tiene una talla 38 de calzado es el amor verdadero del príncipe
+ feedback: ¡Fantástico!
+ - option: Toda persona que no se llama Cenicienta y no tiene una talla 38 de calzado es el amor verdadero del príncipe
+ feedback: ¡El príncipe es un poco más exigente que eso!
+ hint: Ambas afirmaciones tienen que ser ciertas
question_score: '10'
7:
mp_choice_options:
- - option: The grey cat is called Abby
- feedback: This is true!
- - feedback: This is true
- option: Milo the orange cat eats 4 scoops of cat nibbles
- - option: The black hamster needs to be fed a piece of carrot
- feedback: Great job!
- - option: The yellow bird was fed this morning
- feedback: This is true
- question_text: Which statement is false?
+ - option: El gato gris se llama Abby
+ feedback: ¡Esto es verdad!
+ - feedback: Esto es verdad
+ option: Milo, el gato naranja, come 4 cucharadas de bocaditos para gatos
+ - option: El hámster negro tiene que alimentarse con un trozo de zanahoria
+ feedback: ¡Gran trabajo!
+ - option: El pájaro amarillo se alimentó esta mañana
+ feedback: Esto es verdad
+ question_text: ¿Qué afirmación es falsa?
code: "print 'Thank you for helping me take care of my pets'\nprint 'Here is a program to help feed them'\nanimal is ask 'What kind of animal are they?'\ncolor is ask 'What colour are they?'\nif animal is 'cat' and color = 'grey'\n print 'That is Abby. She eats 3 scoops of cat nibbles'\nif animal is 'cat' and color = 'orange'\n print 'That is Milo. He eats 4 scoops of cat nibbles'\nif animal is 'bird' or color is 'black'\n print 'I fed them this moring! They do not need more food today'\nif animal is 'hamster' and color is 'brown'\n print 'You can feed them a piece of carrot'"
correct_answer: C
- hint: Read the last 4 lines carefully
+ hint: Lee con atención las 4 últimas líneas
question_score: '10'
8:
- question_text: What output do you get if you order popcorn but no drink?
- mp_choice_options:
- - feedback: You have paid too much!
- option: "Welcome to the movie theater\nThat will be 8 dollars please\nEnjoy the movie"
- - option: "Welcome to the movie theater\nThat will be 5 dollars please\nEnjoy the movie"
- feedback: Amazing!
- - option: "Welcome to the movie theater\nThat will be 3 dollars please\nEnjoy the movie"
- feedback: That's not enough money!
- - option: "Welcome to the movie theater\nOk\nEnjoy the movie"
- feedback: You have to pay for your popcorn!
+ question_text: ¿Qué salida recibes si pides palomitas sin bebida?
+ mp_choice_options:
+ - feedback: ¡Has pagado demasiado!
+ option: "Bienvenido al cine\nSerán 8 dólares por favor\nDisfruta de la película"
+ - option: "Bienvenido al cine\nSerán 5 dólares por favor\nDisfruta de la película"
+ feedback: ¡Increíble!
+ - option: "Bienvenido al cine\nSerán 3 dólares por favor\nDisfruta de la película"
+ feedback: ¡No es suficiente dinero!
+ - option: "Bienvenido al cine\nVale\nDisfruta de la película"
+ feedback: ¡Tienes que pagar tus palomitas!
code: "print 'Welcome to the movie theater'\npopcorn = ask 'Would you like some popcorn?'\ndrink = ask 'Would you like a drink?'\nif popcorn = 'yes' and drink = 'yes'\n print 'That will be 8 dollars please'\nif popcorn = 'no' and drink = 'yes'\n print 'That will be 3 dollars please'\nif popcorn = 'yes' and drink = 'no'\n print 'That will be 5 dollars please'\nif popcorn = 'no' and drink = 'no'\n print 'Ok'\nprint 'Enjoy the movie'"
correct_answer: B
- hint: popcorn = yes and drink = no
+ hint: palomitas = sí y bebida = no
question_score: '10'
9:
question_score: '10'
- question_text: What is wrong with this code?
+ question_text: ¿Qué le pasa a este código?
code: "1 chocolate = ask 'Would you like chocolate sauce on your ice cream?'\n2 sprinkles = ask 'Would you like sprinkles on your ice cream?'\n3 if chocolate and sprinkles = 'yes'\n4 print 'Ice cream with chocolate sauce and sprinkles, coming up!'\n5 if chocolate = 'yes' and sprinkles = 'no'\n6 print 'Ice cream with chocolate sauce, coming up!'\n7 if chocolate = 'no' and sprinkles = 'yes'\n8 print 'Ice cream with sprinkles, coming up'\n9 if chocolate = 'no' and sprinkles = 'no'\n10 print 'Just plain icecream, coming up!'"
mp_choice_options:
- option: "Line 3 should be:\n```\n{if} chocolate = 'yes' {and} sprinkles = 'yes'\n```\n"
- feedback: Correct!
+ feedback: ¡Correcto!
- option: "Line 3 should be:\n```\n{if} chocolate = 'no' {and} sprinkles = 'no'\n```\n"
- feedback: This is not what I ordered!
+ feedback: ¡Esto no es lo que he pedido!
- option: "Line 5 should be:\n```\n{if} chocolate = 'yes' {and} sprinkles = 'yes'\n```\n"
- feedback: This is not what I ordered!
+ feedback: ¡Esto no es lo que he pedido!
- option: "Line 7 should be:\n```\n{if} chocolate = 'yes' {and} sprinkles = 'no'\n```\n"
- feedback: This is not what I ordered!
+ feedback: ¡Esto no es lo que he pedido!
correct_answer: A
- hint: There is a mistake in line 3
+ hint: Hay un fallo en la línea 3
10:
mp_choice_options:
- - option: and
- feedback: There are no items that are both the list of snacks and the list of drinks
- - option: or
- feedback: Great job!
- - option: in
+ - option: '`{and}`'
+ feedback: No hay artículos que estén a la vez en la lista de aperitivos y en la lista de bebidas
+ - option: '`{or}`'
+ feedback: ¡Gran trabajo!
+ - option: '`{in}`'
feedback: No
- feedback: No
- option: if
- question_text: Which command needs to be in line 8 at the place of the ??? ?
+ option: '`{if}`'
+ question_text: ¿Qué comando se necesita en la línea 8 en el lugar de ??? ?
code: "print 'Welcome to the product finder of this supermarkt'\nitem is ask 'What product are you looking for?'\nbakery = 'bread', 'buns', 'muffins'\ndrinks = 'soda', 'water', 'lemonade'\nsnacks = 'chips', 'nuts', 'dips'\nfrozen = 'fries', 'icecream', 'pizza'\nfruit = 'bananas', 'apples', 'oranges'\nif item in snacks ??? item in drinks\n print 'This item is in aile 3'\nif item in bakery or item in bakery\n print 'This item in in the back of the store'\nif item in fruit\n print 'The fruit is sold near the register'"
correct_answer: B
- hint: The item is either in the list of snacks, or in the list of drinks
+ hint: El artículo o está en la lista de aperitivos, o en la lista de bebidas
question_score: '10'
1:
- question_text: Which code should be filled in at the ??? ?
- code: "name = ask 'What is your name?'\nsong = ask 'Whould you like to hear a song?'\nbirthday = ask 'Is today your birthday?'\n???\n print 'Happy Birthday to you!'\n print 'Happy Birthday to you!'\n print 'Happy Birthday. dear ' name\n print 'Happy Birthday to you!'"
- mp_choice_options:
- - option: "```\nif birthday and song = 'yes'\n```"
- feedback: Almost there
- - option: "```\nif birthday = 'yes' and name = 'Hedy'\n```"
- feedback: Hedy only sings for you if you like to hear a song
- - option: "```\nif song = 'yes' and birthday = 'yes'\n```"
- feedback: Super!
- - option: "```\nif song = 'yes' or birthday = 'yes'\n```"
- feedback: Hedy only sings if both answers are yes
+ question_text: ¿Qué código debe rellenarse en ??? ?
+ code: "nombre = {ask} '¿Cómo te llamas?'\ncanción = {ask} '¿Quieres escuchar una canción?'\ncumpleaños = {ask} '¿Hoy es tu cumpleaños?'\n???\n {print} '¡Cumpleaños Feliz para ti!'\n {print} '¡Cumpleaños Feliz para ti!'\n {print} 'Cumpleaños Feliz querido ' nombre\n {print} '¡Cumpleaños Feliz para ti!'"
+ mp_choice_options:
+ - option: "```\n{if} cumpleaños {and} canción = 'sí'\n```"
+ feedback: Ya casi está
+ - option: "```\n{if} cumpleaños = 'sí' {and} nombre = 'Hedy'\n```"
+ feedback: Hedy sólo canta para ti si quieres escuchar una canción
+ - option: "```\n{if} canción = 'sí' {and} cumpleaños = 'sí'\n```"
+ feedback: ¡Super!
+ - option: "```\n{if} canción = 'sí' {or} cumpleaños = 'sí'\n```"
+ feedback: Hedy sólo canta si ambas respuestas son afirmativas
correct_answer: C
- hint: Hedy sings if you want to hear a song and it's you birthday
+ hint: Hedy canta si quieres escuchar una canción y es tu cumpleaños
question_score: '10'
2:
- question_text: Which command is missing in the code at the place of the ??? ?
+ question_text: ¿Qué comando falta en el código en el lugar de ??? ?
code: "menu = 'cheese', 'sausage rolls', 'cookies'\ndiet = ask 'Do you have any dietary restrictions?'\nif diet = 'vegan' ??? diet = 'halal'\n remove 'sausage rolls' from menu"
mp_choice_options:
- - option: and
- feedback: You don't have to be vegan and muslim
- - option: or
- feedback: Great thinking!
- - option: ' + '
+ - option: '`{and}`'
+ feedback: No tienes que ser vegano y musulmán
+ - option: '`{or}`'
+ feedback: ¡Muy bien pensado!
+ - option: ' `+` '
feedback: No
- - option: print
+ - option: '`{print}`'
feedback: No
correct_answer: B
- hint: Neither vegans nor muslims can eat sausage rolls.
+ hint: Ni los veganos ni los musulmanes pueden comer panecillos de salchichas.
question_score: '10'
3:
- question_text: Which output is given to a member without a discount code?
+ question_text: ¿Qué salida se le da a un miembro sin un código de descuento?
code: "member = ask 'Do you have a membership card?'\ndiscount = ask 'Do you have a discount code?'\nif member = 'yes' or discount = 'yes'\n print 'You get a free apple pie!'\nelse\n print 'That will be 5 dollars please'"
mp_choice_options:
- - option: You get a free pie!
- feedback: Great job!
- - option: That will be 5 dollars please
- feedback: That is not true
- - option: This code won't work, so there is no output
- feedback: There is nothing wrong with the code
- - option: There is no way of knowing
- feedback: There is! Read the question carefully
+ - option: ¡Recibes una tarta de manzana gratis!
+ feedback: ¡Gran trabajo!
+ - option: Serán 5 dólares por favor
+ feedback: Eso no es cierto
+ - option: El código no funciona, así que no hay un resultado
+ feedback: No hay nada malo en el código
+ - option: No hay manera de saber
+ feedback: ¡Ahí está! Lee la pregunta con cuidado
correct_answer: A
- hint: Mind the command 'or' in line 3
+ hint: Atención al comando `{or}` en la línea 3
question_score: '10'
6:
- question_text: Which statement about this code is true?
+ question_text: ¿Qué afirmación sobre este código es cierta?
code: "print 'Let me guess which family member you are!'\nglasses = ask 'Do you wear glasses?'\nfemale = ask 'Are you female?'\nif glasses = 'yes' and female = 'yes'\n print 'You must be Sophie!'\nif glasses = 'no' and female = 'yes'\n print 'You must be Marleen!'\nif glasses = 'yes' and female = 'no'\n print 'You must be Wouter!'\nif glasses = 'no' and female = 'no'\n print 'You must be Michael!'"
mp_choice_options:
- - option: Michael is a boy with glasses
- feedback: Try again
- - option: Marleen is a girl with glasses
- feedback: Try again
- - option: Wouter is a boy without glasses
- feedback: Try again
- - option: Sophie is a girl with glasses
- feedback: Great job!
+ - option: Michael es un chico con gafas
+ feedback: Inténtalo de nuevo
+ - option: Marleen es una chica con gafas
+ feedback: Inténtalo de nuevo
+ - option: Wouter es un chico sin gafas
+ feedback: Inténtalo de nuevo
+ - option: Sofía es una chica que lleva gafas
+ feedback: ¡Gran trabajo!
correct_answer: D
- hint: Take a good look! Or do you need glasses?
+ hint: ¡Mira bien! ¿O necesitas gafas?
question_score: '10'
14:
1:
mp_choice_options:
- option: '`=>`'
- feedback: This is not a symbol.
+ feedback: Esto no es un símbolo.
- option: '`==`'
- feedback: We are not comparing anything, just asking.
+ feedback: No estamos comparando nada, sólo preguntando.
- option: '`!=`'
- feedback: We are not comparing anything, just asking
+ feedback: No estamos comparando nada, sólo preguntando
- option: '`=`'
- feedback: Right!
- question_text: Which symbol should be used on the blank?
- code: "name _ {ask} 'Who are you?'\n{if} name == 'Hedy'\n {print} 'Me too!'\n"
- hint: We are not comparing anything, we are just asking a name.
+ feedback: ¡Muy bien!
+ question_text: ¿Qué símbolo se debería usar en el espacio en blanco?
+ code: "nombre _ {ask} '¿Quién eres?'\n{if} nombre == 'Hedy'\n {print} '¡Yo también!'\n"
+ hint: No comparamos nada, sólo estamos preguntando un nombre.
question_score: '10'
correct_answer: D
2:
mp_choice_options:
- - option: '{if} name = Hedy'
+ - option: '{if} nombre = Hedy'
feedback: No
- - option: '{if} age = 24'
+ - option: '{if} edad = 24'
feedback: No
- - option: answer = {ask} 'What is your answer'
- feedback: Yes!
- - option: answer == {ask} 'How are you doing?'
+ - option: respuesta = {ask} 'Cuál es tu respuesta'
+ feedback: ¡Sí!
+ - option: respuesta == {ask} '¿Qué tal estás?'
feedback: No
- question_text: Which of these codes has used the correct = or == symbol?
+ question_text: ¿Cuál de estos códigos han usado el símbolo correcto = o ==?
correct_answer: C
- hint: When you are comparing two answers you should use ==
+ hint: Cuando comparas dos respuestas debes usar ==
question_score: '10'
4:
correct_answer: B
- code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- mp_choice_options:
- - option: In line 1 == should be used instead of =
- feedback: No that's not it
- - option: Line 2 misses quotation marks
- feedback: You are correct
- - option: In line 4 = should have been used instead of ==
- feedback: No that's not it
- - option: In line 4 <= should have been used instead of >=
- question_text: What's wrong with this code?
- feedback: No that's not it
- hint: The symbols are right
+ code: "precio = 10\ndinero = {ask} ¿Cuánto dinero tienes?\ncomprar = {ask} '¿Quieres comprar este osito de peluche?'\n{if} dinero >= precio y comprar == 'sí'\n {print} '¡Puedes comprar el oso!'\n{else}\n {print} '¡No puedes comprar el oso!'\n"
+ mp_choice_options:
+ - option: En la línea 1 se debería haber usado == en vez de =
+ feedback: No, no es eso
+ - option: Faltan las comillas en la línea 2
+ feedback: Tienes razón
+ - option: En la línea 4 se debería haber usado = en vez de ==
+ feedback: No, no es eso
+ - option: En la línea 4 se debería haber usado <= en vez de >=
+ feedback: No es eso
+ question_text: ¿Qué le pasa a este código?
+ hint: Los símbolos son correctos
question_score: '10'
6:
question_score: '10'
- question_text: How many times do you have to say you are annoyed before this annoying game stops?
- mp_choice_options:
- - option: 10 times
- feedback: It stops after 2 times
- - option: 0 times
- feedback: It stops after 2 times
- - option: 1 time
- feedback: It stops after 2 times
- - option: 2 times
- feedback: That is correct
- code: "lives = 2\n{repeat} 10 times\n {if} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n {if} answer == 'yes'\n lives = lives - 1\n"
+ question_text: ¿Cuántas veces tienes que decir que estás enfadado antes que este irritante juego pare?
+ mp_choice_options:
+ - option: 10 veces
+ feedback: Se para tras 2 veces
+ - option: 0 veces
+ feedback: Se para tras 2 veces
+ - option: 1 vez
+ feedback: Se para tras 2 veces
+ - option: 2 veces
+ feedback: Eso es correcto
+ code: "vidas = 2\n{repeat} 10 veces\n {if} vidas != 0\n respuesta = {ask} '¿Ya estás enfadado?'\n {if} respuesta == 'sí'\n vidas = vidas - 1\n"
correct_answer: D
- hint: "!= means 'is not'"
+ hint: "!= significa 'no es'"
9:
mp_choice_options:
- - option: 1 or more
+ - option: 1 o más
feedback: No
- - option: 2 or more
+ - option: 2 o más
feedback: No
- - feedback: Almost
- option: 8 or more
- - feedback: Great!
- option: 9 or more
- code: "chocolate = {ask} 'How many pieces of chocolate have you eaten?'\n {if} chocolate <= 2\n {print} 'That is a healthy amount'\n {if} chocolate > 2 and chocolate =< 8\n {print} 'That is a bit much'\n {if} chocolate > 8\n {print} 'You will get a stomach ache!'\n"
- question_text: How many pieces of chocolate will give you a stomach ache according to this fitbit?
+ - feedback: Casi
+ option: 8 o más
+ - feedback: ¡Genial!
+ option: 9 o más
+ code: "chocolate = {ask} '¿Cuántos trozos de chocolate te has comido?'\n {if} chocolate <= 2\n {print} 'Eso es una cantidad sana'\n {if} chocolate > 2 y chocolate =< 8\n {print} 'Eso es demasiado'\n {if} chocolate > 8\n {print} '¡Te va a doler el estómago!'\n"
+ question_text: ¿Cuántas porciones de chocolate harán que te duela el estómago de acuerdo a este fitbit?
question_score: '10'
correct_answer: D
- hint: '> 8 means more than 8'
+ hint: '> 8 significa más de 8'
10:
question_score: '10'
- question_text: What should be filled in in the blanks?
- code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- mp_choice_options:
- - option: "'player 1 wins'"
- feedback: Look at who has the highest score!
- - option: "'player 2 wins'"
- feedback: Yes!
- - option: "'player 2 loses'"
- feedback: Look at who has the highest score!
- - option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ question_text: ¿Qué debe rellenarse en los espacios en blanco?
+ code: "{print} '¡Quién consiga más puntos gana!'\n{if} puntos_jugador_1 < puntos_jugador_2\n {print} _\n"
+ mp_choice_options:
+ - option: "'el jugador 1 gana'"
+ feedback: ¡Mira quién tiene la puntuación más alta!
+ - option: "'el jugador 2 gana'"
+ feedback: ¡Sí!
+ - option: "'el jugador 2 pierde'"
+ feedback: ¡Mira quién tiene la puntuación más alta!
+ - option: "'Es un empate'"
+ feedback: No, no lo es, un jugador tiene una puntuación más alta
correct_answer: B
- hint: You win the game by having the most points
+ hint: Ganas el juego por tener más puntos
3:
- question_text: Which symbols should be filled in on the two blanks?
- code: "guests = {ask} 'How many people are at the party?'\n{if} guests _ 130\n {print} 'You can come in!'\n{if} guests _ 130\n {print} 'Im sorry, the club is full. '\n {print} 'You have to wait for a guest to leave'\n"
- mp_choice_options:
- - option: '`>` and `<`'
- feedback: That's not it
- - option: '`=` and `>=`'
- feedback: That's not it
- - option: '`<` and `>=`'
- feedback: You are right
- - option: ' `+` and `==`'
- feedback: That's not it
+ question_text: ¿Qué símbolo debe rellenarse en los dos espacios en blanco?
+ code: "invitados = {ask} '¿Cuánta gente hay en la fiesta?'\n{if} invitados _ 130\n {print} '¡Puedes entrar!'\n{if} invitados _ 130\n {print} 'Lo siento, la sala está llena. '\n {print} 'Tienes que esperar a que alguien salga'\n"
+ mp_choice_options:
+ - option: '`>` y `<`'
+ feedback: No es eso
+ - option: '`=` y `>=`'
+ feedback: No es eso
+ - option: '`<` y `>=`'
+ feedback: Tienes razón
+ - option: ' `+` y `==`'
+ feedback: No es eso
correct_answer: C
- hint: There are 130 people allowed in the club
+ hint: El club admite 130 personas
question_score: '10'
5:
- question_text: 'Which symbol should be filled in on the blanks if the movie is suitable for kids for the age of 12 and up? '
- code: "age = {ask} 'How old are you?'\nticket = {ask} 'Do you have a ticket?'\n{if} age _ and ticket == 'yes'\n {print} 'You can enter the movie theater.'\n{else}\n {print} 'You are not allowed to come in!'\n"
+ question_text: '¿Qué símbolo debe rellenarse en los espacios en blanco si la película es apta para niños a partir de 12 años? '
+ code: "edad = {ask} '¿Cuántos años tienes?'\nentrada = {ask} '¿Tienes una entrada?'\n{if} edad _ y entrada == 'sí'\n {print} 'Puedes entrar al cine.'\n{else}\n {print} '¡No puedes entrar!'\n"
mp_choice_options:
- option: '`> 12`'
- feedback: 12 year olds are allowed too
+ feedback: También se admite a los de 12 años
- option: '`>= 12`'
- feedback: Great!
+ feedback: ¡Genial!
- option: '`< 12`'
- feedback: These kids are too young!
+ feedback: ¡Estos niños son muy jóvenes!
- option: '`<= 12`'
- feedback: These kids are too young
+ feedback: Estos niños son muy jóvenes
correct_answer: B
- hint: '> means greater than'
+ hint: '> significa mayor que'
question_score: '10'
7:
- question_text: What should be filled in on the three blanks?
- code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
- mp_choice_options:
- - option: "`'Lower'` and `'Higher'` and `'You win!'`"
- feedback: That's not quite right.
- - option: "`'Higher'` and `'Lower'` and `'You win!'`"
- feedback: You win!
- - option: "`'You win!'` and `'Lower!'` and `'Higher'`"
- feedback: That's not quite right.
- - option: "`'Lower!'` and `'You win!'` and `'Higher!'`"
- feedback: That's not quite right.
- hint: The last one should say you win.
+ question_text: ¿Qué debe rellenarse en los tres espacios en blanco?
+ code: "{print} 'Adivina el número'\nnúmeros = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnúmero = números {at} {random}\njuego = 'en marcha'\n{for} i {in} {range} 1 {to} 10\n {if} juego == 'en marcha'\n respuesta = {ask} '¿Qué número crees que es?'\n {if} respuesta < número\n {print} _\n {if} respuesta > número\n {print} _\n {if} respuesta == número\n {print} _\n juego = 'acabado'\n"
+ mp_choice_options:
+ - option: "`'Baja'` and `'Sube'` and `'¡Ganaste!'`"
+ feedback: Eso no es del todo correcto.
+ - option: "`'Sube'` and `'Baja'` and `'¡Ganaste!'`"
+ feedback: ¡Ganaste!
+ - option: "`'¡Ganaste!'` y `'¡Baja!'` y `'Sube'`"
+ feedback: Eso no es del todo correcto.
+ - option: "`'¡Baja!'` y `'¡Ganaste!'` y `'¡Sube!'`"
+ feedback: Eso no es del todo correcto.
+ hint: La última debe decir que ganaste.
+ correct_answer: B
+ question_score: '10'
+ 8:
+ mp_choice_options:
+ - option: Debes ser más alto de 120 cm para montar en la montaña rusa
+ feedback: '> significa mayor que'
+ - feedback: Si mides 120 cm no subirás
+ option: Debes ser más alto de 119 cm para montar en la montaña rusa
+ - option: Debes medir 120 cm o menos para montar en la montaña rusa
+ feedback: '¡Cierto!'
+ - option: No hay restricciones de altura para montar en una montaña rusa
+ feedback: Ahí está.
+ correct_answer: C
+ hint: 'Céntrate en qué valores de longitud están permitidos'
+ question_score: '10'
+ question_text: ¿Qué sentencia es verdadera sobre esta montaña rusa?
+ code: "altura = {ask} 'Por favor indica tu altura en centímetros'\n{if} altura < 120\n {print} 'Lo siento, no puedes montar en la montaña rusa.'\n{else}\n {print} 'Disfruta del viaje'\n"
+ 15:
+ 1:
+ question_text: '¿Qué símbolo debería usarse en el espacio en blanco? Consejo: Debes seguir adivinando hasta que lo consigas.'
+ code: "respuesta = 0\nwhile respuesta _ 'Amsterdam'\n respuesta = ask '¿Cuál es la capital de Paises Bajos?'\nprint 'Has dado la respuesta correcta'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: Eso no es correcto.
+ - option: '`==`'
+ feedback: No tienes que seguir adivinando si has dado la respuesta acertada.
+ - option: '`!=`'
+ feedback: Correcto
+ - option: '`=`'
+ feedback: No es eso
+ correct_answer: C
+ hint: Sigue adivinando hasta que digas Amsterdam
+ question_score: '10'
+ 2:
+ question_text: ¿Cuál de estos códigos ha usado el/los símbolo/s correcto/s?
+ mp_choice_options:
+ - option: "```\n{while} nombre = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} edad = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} tiempo > 0\n```\n"
+ feedback: ¡Sí!
+ - option: "```\n{while} respuesta == sí'\n```\n"
+ feedback: Falta una comilla
+ correct_answer: C
+ hint: Cuando comparas dos respuestas debes usar ==
+ question_score: '10'
+ 3:
+ question_text: ¿Qué comando debe rellenarse en los dos espacios en blanco?
+ code: "_ edad >= 18\n print 'no se te permite entrar en este bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: No es eso
+ - option: '`{while}`'
+ feedback: Tienes razón
+ - feedback: No es eso
+ option: '`{for}`'
+ - option: '`{range}`'
+ question_score: '10'
+ feedback: No es eso
correct_answer: B
+ hint: No puedes entrar al bar si tienes 17 años o menos
+ 4:
+ question_text: ¿Qué le pasa a este código?
+ code: "opciones = 1, 2, 3, 4, 5, 6\nprint '¡Lanza un 6 lo antes posible!'\nlanzamientos = 0\nintentos = 0\nwhile lanzamientos == 6\n lanzamientos = opciones at random\n print 'Lanzaste ' thrown\n intentos = intentos + 1\nprint '¡Sí! Has lanzado 6 en ' intentos ' intentos.'\n"
+ mp_choice_options:
+ - option: En la línea 1 debe utilizarse == en vez de =
+ feedback: No es eso
+ - option: Faltan comillas en la línea 2
+ feedback: Eso no está bien
+ - option: En la línea 5 se debería haber usado if en vez de while
+ feedback: No es eso
+ - option: En la línea 5 se debería haber usado != en vez de ==
+ feedback: Tienes razón
+ hint: Hay algo mal en la línea 5
+ question_score: '10'
+ correct_answer: D
+ 5:
+ question_text: ¿Qué hay que poner en el espacio en blanco para hacer que este programa funcione correctamente?
+ code: "humedad = 10\nwhile humedad != 0\n print 'Tu pelo sigue mojado, ¡secador activado!'\n sleep 1\n clear\n humedad _\n\nprint '¡Todo seco!'\n"
+ mp_choice_options:
+ - option: = humedad
+ feedback: Eso no cambiará nada
+ - option: = humedad = 1
+ feedback: No puedes tener dos veces = en una línea
+ - option: = humedad - 1
+ feedback: ¡Tienes razón!
+ - option: = humedad + 1
+ feedback: El programa debe contar hacia abajo
+ correct_answer: C
+ hint: la humedad debería ser menor cada vez
+ question_score: '10'
+ 6:
+ question_text: ¿qué le pasa a este código?
+ code: "vidas = 100\n {while} vidas != 0\n respuesta = {ask} '¿Ya estás enfadado?'\n{if} respuesta == 'sí'\n vidas = vidas - 1\n"
+ mp_choice_options:
+ - option: while debe ser if
+ feedback: No, eso no es correcto
+ - option: if debe ser while
+ feedback: No, eso no es correcto
+ - option: La línea 3 debe empezar con más sangría
+ feedback: No, eso no es correcto
+ - option: La línea 2 debe empezar con menos sangría
+ feedback: Eso es correcto
+ correct_answer: D
+ hint: Presta atención a la sangría
+ question_score: '10'
+ 7:
+ question_text: ¿Cómo se debe cambiar este programa para que funcione?
+ code: "{print} 'Adivina el número'\nnúmeros = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnúmero = números {at} {random}\njuego = 'encendido'\n{if} juego == 'encendido'\n respuesta = {ask} 'Which número do you think it is?'\n {if} respuesta < número\n {print} _\n {if} respuesta > número\n {print} _\n {if} respuesta == número\n {print} _\n juego = 'acabado'\n"
+ mp_choice_options:
+ - option: '... cambia el primer {if} por un {while}'
+ feedback: ¡Perfecto!
+ - option: '... cambia el segundo {if} por un {while}'
+ feedback: Eso no es del todo correcto.
+ - option: '... cambia el tercer {if} por un {while}'
+ feedback: Eso no es del todo correcto.
+ - option: '... cambia el cuarto {if} por un {while}'
+ feedback: Eso no es del todo correcto.
+ correct_answer: A
+ hint: El último debe decir que ganaste.
question_score: '10'
8:
+ question_text: ¿Qué sentencia es cierta sobre este sistema de baño automático?
+ code: "while baño == 'ocupado'\n luces = 'encendido'\n pulverizar_ambientados = 'sí'\n sleep 60\nelse\n luces = 'apagado'\n"
+ mp_choice_options:
+ - option: Las luces y el ambientador se apagarán tras 1 minuto
+ feedback: ¡Falso!
+ - option: El ambientador pulveriza una vez por minuto y las luces se mantienen encendidas todo el tiempo mientras estás en el baño
+ feedback: Gran trabajo
+ - option: El ambientador se pulveriza una vez has abandonado el baño.
+ feedback: Sólo pulveriza cuando estás dentro.
+ - option: Las luces siempre estarán encendidas.
+ feedback: Eso no estaría bien.
+ correct_answer: B
+ hint: El bloque después del comando while sigue ocurriendo mientras el baño está ocupado.
+ question_score: '10'
+ 9:
+ code: "chocolate = {ask} '¿Cuántas calorías has comido hoy?'\n {while} calorias <= 1000\n {print} 'Puedes comer más'\n {while} calorias > 1000 and calorias =< 2000\n {print} 'Está bien'\n {while} calorias > 2000\n {print} 'Ya has comido suficiente hoy'\n"
+ mp_choice_options:
+ - option: Nada. 1600 no está programado en la aplicación.
+ feedback: No
+ - option: puedes comer algo más
+ feedback: No
+ - option: Está bien
+ feedback: ¡Sí!
+ - option: Ya has comido suficiente por hoy
+ feedback: No
+ correct_answer: C
+ hint: 1600 se encuentra entre 1000 y 2000
+ question_score: '10'
+ question_text: ¿Qué dirá la aplicación de dieta si hoy te has comido 1600 calorías?
+ 10:
mp_choice_options:
- - option: You must be taller than 120 cm to go on the roller coaster
- feedback: True!
- - feedback: If you are 120 cm you won't get in
- option: You must be taller than 119 cm to go on the roller coaster
- - option: You must be shorter than 120 cm to go on the roller coaster
- feedback: '> means greater than'
- - option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ - option: name_player_1
+ feedback: ¡Tienes razón!
+ - feedback: ¡No, están perdiendo!
+ option: name_player_2
+ - option: puntos_jugador_1
+ feedback: Debes rellenar un nombre, no un número
+ - option: points_player_2
+ feedback: Debes rellenar un nombre, no un número
+ question_text: '¿Qué debería rellenarse en los espacios en blanco? Consejo: el jugador con más puntos está a la cabeza.'
+ code: "nombre_jugador_1 = {ask} 'Nombre jugador 1:'\nnombre_jugador_2 = {ask} 'Nombre jugador 2:'\n{while} puntos_jugador_1 > puntos_jugador_2\n {print} _ ' esté en cabeza ahora mismo!'\n"
correct_answer: A
- hint: '> means greater than'
+ hint: Ganas el juego por tener más puntos. Tu nombe debe aparecer en la pantalla
question_score: '10'
- question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
diff --git a/content/quizzes/et.yaml b/content/quizzes/et.yaml
index bb6b5be7ae3..a21a86f4c55 100644
--- a/content/quizzes/et.yaml
+++ b/content/quizzes/et.yaml
@@ -1140,7 +1140,7 @@ levels:
feedback: You are wrong!
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2156,9 +2156,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2188,10 +2188,10 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
- feedback: No that's not it
6:
question_text: How many times do you have to say you are annoyed before this annoying game stops?
code: "lives = 2\n{repeat} 10 times\n {if} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n {if} answer == 'yes'\n lives = lives - 1\n"
@@ -2233,7 +2233,157 @@ levels:
- feedback: Look at who has the highest score!
option: "'player 2 loses'"
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - feedback: You are correct
+ option: In line 5 != should have been used instead of ==
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ question_score: '10'
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/fa.yaml b/content/quizzes/fa.yaml
index 9b96db60370..b99f719c60c 100644
--- a/content/quizzes/fa.yaml
+++ b/content/quizzes/fa.yaml
@@ -2871,8 +2871,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_text: What's wrong with this code?
- feedback: No that's not it
correct_answer: B
5:
question_text: 'Which symbol should be filled in on the blanks if the movie is suitable for kids for the age of 12 and up? '
@@ -2920,7 +2920,7 @@ levels:
code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
question_score: '10'
8:
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
question_text: Which statement is true about this roller coaster?
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
@@ -2930,9 +2930,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
- feedback: There are.
question_score: '10'
9:
correct_answer: D
@@ -2959,9 +2959,9 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
correct_answer: B
- feedback: No it's not, one player has a higher score
hint: You win the game by having the most points
question_score: '10'
2:
@@ -2978,3 +2978,153 @@ levels:
correct_answer: C
hint: When you are comparing two answers you should use ==
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ hint: There is something wrong in line 5
+ question_score: '10'
+ correct_answer: D
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ question_score: '10'
+ hint: Look closely at the indentation
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ question_score: '10'
+ correct_answer: A
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - feedback: Great job
+ option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - feedback: No
+ option: You have eaten enough for today
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
+ correct_answer: A
diff --git a/content/quizzes/fi.yaml b/content/quizzes/fi.yaml
index 23b9e4a52c0..c25fe40fe33 100644
--- a/content/quizzes/fi.yaml
+++ b/content/quizzes/fi.yaml
@@ -668,7 +668,7 @@ levels:
- option: Line 3 and 5
feedback: Great job!
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
correct_answer: D
hint: The lines after an `{if}` or `{else}` command should start with 4 spaces.
question_score: '10'
@@ -2009,7 +2009,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2053,12 +2053,12 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
2:
question_text: Which of these codes has used the correct = or == symbol?
mp_choice_options:
@@ -2114,7 +2114,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - feedback: No
+ option: "```\n{while} age = 24\n```\n"
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ question_score: '10'
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - feedback: You should fill in a name, not a number
+ option: points_player_1
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/fr.yaml b/content/quizzes/fr.yaml
index 6ec5439fcec..aa095f770e1 100644
--- a/content/quizzes/fr.yaml
+++ b/content/quizzes/fr.yaml
@@ -292,13 +292,13 @@ levels:
{ask} {is} Quel âge as-tu ?
{print} age
mp_choice_options:
- - option: "âge ask is Quel âge as-tu ?"
+ - option: "```\nage {ask} {is} Quel âge as-tu ?\n```\n"
feedback: "Ce n'est pas le bon ordre !"
- - option: "ask is âge Quel âge as-tu ?"
+ - option: "```\n{ask} {is} age Quel âge as-tu ?\n```\n"
feedback: "Ce n'est pas le bon ordre !"
- - option: "âge is ask Quel âge as-tu ?"
+ - option: "```\nage {is} {ask} Quel âge as-tu ?\n```\n"
feedback: "Tu as compris !"
- - option: "âge is Quel âge as-tu ?"
+ - option: "```\nage {is} Quel âge as-tu ?\n```\n"
feedback: "Où est la commande `{ask}` ?"
correct_answer: "C"
hint: "Le nom de la variable doit venir en premier"
@@ -334,7 +334,7 @@ levels:
feedback: "Tu ne veux pas `{print}` au milieu de la ligne..."
- option: "fraises, chocolat, vanille"
feedback: "Si tu fait cela, tu feras une liste. Tu ne veux pas de ça maintenant."
- - option: "ask Quel parfum de glace aimes-tu ?"
+ - option: "```\n{ask} Quel parfum de glace aimes-tu ?\n```\n"
feedback: "C'est juste !"
correct_answer: "D"
hint: "Tu veux `{ask}` une question"
@@ -459,7 +459,7 @@ levels:
code: "books is Harry Potter, The Hobbit, Green Eggs and Ham\nyour_book is ask What is your favorite book?\nadd your_book to books\nprint books at random"
10:
question_text: Que devrait-il y avoir sur le _ ?
- code: "promeneurs {is} papa, maman, Sam, Petra\npromeneur_hier {is} {ask} Qui a promené les chiens hier ?\n{print} promeneur_hier ne devrait pas avoir à promener les chiens encore aujourd'hui\n_?_\n{print} promeneurs {at} {random}, c'est ton tour de promener les chiens !"
+ code: "promeneurs {is} papa, maman, Sam, Petra\npromeneur_hier {is} {ask} Qui a promené les chiens hier ?\n{print} promeneur_hier ne devrait pas avoir à promener les chiens encore aujourd'hui\n_\n{print} promeneurs {at} {random}, c'est ton tour de promener les chiens !"
mp_choice_options:
- option: "```\n{remove} promeneur_hier {from} promeneurs\n```\n"
feedback: Super !
@@ -504,15 +504,15 @@ levels:
correct_answer: C
4:
1:
- question_text: "Laquelle de ces réponses est vraie ?"
+ question_text: "Laquelle de ces réponses est correcte ?"
mp_choice_options:
- - option: "`{print}` et `{ask}` ont maintenant besoin de guillemets"
+ - option: "```\n{print} 'Je suis très excité à l'idée de répondre à ce quiz!'\n```\n"
feedback: "C'est exact !"
- - option: "Seul le `{print}` a besoin de guillemets"
+ - option: "```\n{print} Je suis très excité à l'idée de répondre à ce quiz!\n```\n"
feedback: "`{ask}` a aussi besoin de guillemets !"
- - option: "`{at} {random}` ne fonctionne plus au niveau 4"
+ - option: "```\n{print} 'Je suis très excité à l'idée de répondre à ce quiz!'\n```\n"
feedback: "`{at} {random}` fonctionne encore"
- - option: "`{at} {random}` a besoin de guillemets"
+ - option: "```\n{print} 'Je suis très excité à l'idée de répondre à ce quiz!'\n```\n"
feedback: "Non, mais 2 autres commandes en ont besoin."
correct_answer: "A"
hint: "Au niveau 4, il y 2 commandes qui ont besoin de guillemets."
@@ -525,7 +525,7 @@ levels:
- option: "```\n{print} 'bonjour'\n```\n"
feedback: "C’est bien ça"
- option: "```\n{print} bonjour\n```\n"
- feedback: "Il n'y a pas de guillemets ici !."
+ feedback: "Il n'y a pas de guillemets ici!"
- option: "```\n{print} ,bonjour,\n```\n"
feedback: "C'est une virgule, tu as besoin de guillemets."
correct_answer: "B"
@@ -539,7 +539,7 @@ levels:
- option: "```\n{print} 'Salut je suis Hedy\n```\n"
feedback: "Il doit y avoir un guillemet avant et après ce que tu veux afficher."
- option: "```\n'{print} Salut je suis Hedy'\n```\n"
- feedback: "Le premier guillemet doit se trouver après le mot {print}"
+ feedback: "Le premier guillemet doit se trouver après le mot `{print}`"
- option: "```\n{print} 'Salut je suis Hedy'\n```\n"
feedback: "Parfait !"
correct_answer: "D"
@@ -566,7 +566,7 @@ levels:
{print} 'options {at} {random}'
mp_choice_options:
- option: "```\n'{print} options {at} {random}'\n```\n"
- feedback: "N'utilise jamais de guillemets avant la commande {print}."
+ feedback: "N'utilise jamais de guillemets avant la commande `{print}`."
- option: "```\n{print} 'options' {at} {random}\n```\n"
feedback: "options est une variable. Tu ne souhaites pas afficher 'options {at} {random}'."
- option: "```\n{print} options {at} {random}\n```\n"
@@ -590,7 +590,7 @@ levels:
- option: "```\n{print} 'Tu gagnes... prix {at} {random}'\n```\n"
feedback: "Hedy va afficher 'prix{at} {random}''"
correct_answer: "A"
- hint: "Réfléchis bien : qu'est-ce qui est une variable et doit être en dehors des guillemets ? Et quels sont les mots normaux qui doivent être à l'intérieur ?."
+ hint: "Réfléchis bien : qu'est-ce qui est une variable et doit être en dehors des guillemets ? Et quels sont les mots normaux qui doivent être à l'intérieur ?"
question_score: '10'
7:
question_text: "Quel est le problème avec ce code ?"
@@ -613,16 +613,16 @@ levels:
8:
question_text: "Quelle serait la prochaine ligne à ajouter à ce code ?"
code: |-
- print 'Bienvenue au monty hall !'
- print 'Il y a 3 portes devant toi !'
- porte is ask 'Quel est la porte que tu choisi !'
+ {print} 'Bienvenue au monty hall !'
+ {print} 'Il y a 3 portes devant toi !'
+ porte {is} {ask} 'Quelle est la porte que tu choisis !'
mp_choice_options:
- option: "print Donc tu choisis la porte porte"
feedback: "Il faut des guillemets"
- option: "print 'Donc tu choisis la 'porte porte"
feedback: "Si le joueur choisit la porte 3, Hedy dira 'Donc tu choisis 3 3"
- option: "print 'Donc tu choisis la porte' porte"
- feedback: "Super !"
+ feedback: "Super !"
- option: "print 'Donc tu choisis la porte porte'"
feedback: "Hedy affichera 'Donc tu choisis la porte porte"
correct_answer: "C"
@@ -631,26 +631,26 @@ levels:
9:
question_text: "Qu'est-ce qui ne pourra pas être affiché sur ton écran de sortie ?"
code: |-
- glace is chocolat pistache, fraise vanille, chocolat menthe, chocolat
- print glace at random 'est ma glace préférée'
+ clubs {is} Real Madrid, Bayern Munchen, Manchester United, Ajax
+ {print} clubs {at} {random} ' va gagner la ligue des champions'
mp_choice_options:
- option: "chocolat est ma glace préférée"
- feedback: "Hedy pourra afficher ça"
+ feedback: "Hedy pourrait `{print}`er ça"
- option: "fraise vanille est ma glace préférée"
- feedback: "Hedy pourra afficher ça"
- - option: "chocolat pistache est ma glace préférée"
- feedback: "Hedy pourra afficher ça"
+ feedback: "Hedy pourrait `{print}`r ça"
+ - option: "Le Bayern Munich va gagner la ligue des champions"
+ feedback: "Hedy pourrait `{print}`r ça"
- option: "fraise est ma glace préférée"
feedback: "C'est vrai. Cette option n'est pas dans la liste"
correct_answer: "D"
- hint: "Regarde bien les options !"
+ hint: "Quelles sont les options parmis lesquelles Hedy peut choisir au hasard?"
question_score: '10'
10:
- question_text: "Quelle affirmation est vraie ?"
+ question_text: "Quelle affirmation est vraie ?"
code: |-
- famille is ma maman, mon papa, moi, mon frère, ma soeur
- print La vaisselle est faite par...
- print famille at random
+ personnes {is} maman, papa, Emma, Sophie
+ {print} La vaisselle est faite par...
+ {print} personnes {at} {random}
mp_choice_options:
- option: "Les guillemets manquent à la ligne 1"
feedback: "Une liste n'a pas besoin de guillemets"
@@ -659,187 +659,187 @@ levels:
- option: "Les guillemets sont absents aux lignes 2 et 3"
feedback: "La ligne 3 n'a pas besoin de guillemets, car elle n'est pas affichée littéralement."
- option: "Rien, ce code n'a pas d'erreurs"
- feedback: "Tu en as loupé une !"
+ feedback: "Tu en as loupé une !"
correct_answer: "B"
hint: "Regarde bien les guillemets !"
question_score: '10'
5:
1:
- question_text: "Quelle est la phrase vraie ?"
- mp_choice_options:
- - option: "Au niveau 5, `print` fonctionne différemment du niveau 4."
- feedback: "Non, cela n'a pas été modifié !"
- - option: "Au niveau 5, `ask` fonctionne différemment du niveau 4."
- feedback: "Non, cela n'a pas été modifié !"
- - option: "Au niveau 5, `print` et `ask` fonctionnent différemment du niveau 3."
- feedback: "Non, il n'y a eu aucun changement ces commandes !"
- - option: "Au niveau 5, `print` et `ask` fonctionne de la même manière qu'au niveau 3"
- feedback: "C'est exact !"
+ question_text: "Quelle commande devrait être remplie avec le _ ?"
+ mp_choice_options:
+ - option: "`{print}`\n"
+ feedback: "Il y a déjà une commande `{print}`."
+ - option: "`{if}`\n"
+ feedback: "La commande `{if}` est utlisée sur la ligne au dessus."
+ - option: "`{sleep}`\n"
+ feedback: "Non ce n'est pas ça !"
+ - option: "`{else}`\n"
+ feedback: "C'est exact !"
correct_answer: "D"
- hint: "Il n'y a pas eu de changement dans les commandes existantes."
+ hint: "Laquelle va avec la commande `{if}` ?"
question_score: '10'
- code: "number {is} {ask} 'What is your lucky number?'\n{if} number {is} 5 {print} Mine too!\n_?_ {print} My lucky number is 5!"
+ code: "nombre {is} {ask} 'Quel est ton nombre porte bonheur ?'\n{if} nombre {is} 5 {print} 'Pareil !'\n_ {print} 'Mon nombre porte bonheur est le 5 !'"
2:
- question_text: "Qu'est-ce qui s'affichera lorsque tu tapes le nom Hedy ?"
+ question_text: "Qu'est-ce qui s'affichera lorsque tu tapes le nom Hedy ?"
code: |-
- nom is ask 'Quel est ton nom ?'
- if nom is Hedy print 'Bien' else print 'Mouais'
+ nom {is} {ask} 'Quel est ton nom?'
+ {if} nom {is} Hedy {print} 'fun' {else} {print} 'mouais'
mp_choice_options:
- - option: "Bien"
- feedback: "Bien joué !"
- - option: "Mouais"
- feedback: "Ce sera dans le cas où tu taperas autre chose qu'Hedy"
+ - option: "fun"
+ feedback: "Correct !"
+ - option: "mouais"
+ feedback: "Si le nom est Hedy, il dira \"fun\""
- option: "Hedy"
feedback: "Non, cela n'affichera pas le nom"
- option: "Erreur"
- feedback: "Heureusement, non !"
+ feedback: "Heureusement, non !"
correct_answer: "A"
- hint: "if nom is Hedy print ...?"
+ hint: "`{if}` nom `{is}` Hedy `{print}` ... ?"
question_score: '10'
3:
- question_text: "Quel est le bon mot de passe ?"
+ question_text: "Quel est le bon mot de passe ?"
code: |-
- secret is ask 'Quel est le mot de passe ?'
- if secret is ada print 'Correct !'
- else print 'ALERTE ! INTRUSION !'
- mp_choice_options:
- - option: "Correct !"
- feedback: "Ceci est le texte qui sera affiché si tu as la bonne réponse"
- - option: "ada"
- feedback: "C'est ça !"
+ secret {is} {ask} 'Quel est le mot de passe ?'
+ {if} secret {is} SECRET {print} 'Correct !'
+ {else} {print} 'ALERTE ! INTRUSION !'
+ mp_choice_options:
+ - option: "Correct !"
+ feedback: "Ceci est le texte qui sera affiché si tu as le bon mot de passe"
+ - option: "SECRET"
+ feedback: "Correct !"
- option: "secret"
- feedback: "Le secret n'est pas secret"
- - option: "ALARM INTRUDER"
- feedback: "Ceci est le texte qui sera affiché si tu as la mauvaise réponse"
+ feedback: "Le mot de passe n'est pas secret..."
+ - option: "ALERTE INTRUSION"
+ feedback: "Ceci est le texte qui sera affiché si tu n'as pas le bon mot de passe !"
correct_answer: "B"
- hint: "if secret is ... print 'Correct !'"
+ hint: "`{if}` secret `{is}` ... `{print}` 'Correct !'"
question_score: '10'
4:
- question_text: "Qu'est-ce qu'Hedy affiche quand tu tapes le mauvais mot de passe ?"
+ question_text: "Qu'est-ce qu'Hedy affiche quand tu tapes le mauvais mot de passe ?"
code: |-
- secret is ask 'Quel est le mot de passe ?'
- if secret is ada print 'Correct !'
- else print 'ALERTE ! INTRUSION !'
+ secret {is} {ask} 'Quel est le mot de passe ?'
+ {if} secret {is} SECRET {print} 'Correct !'
+ {else} {print} 'ALERTE ! INTRUSION !'
mp_choice_options:
- option: "Correct"
- feedback: "Ceci est le texte qui sera affiché si tu as la bonne réponse"
- - option: "ada"
- feedback: "Ce n'est pas la bonne réponse !"
+ feedback: "Ceci est le texte qui sera affiché si tu as la bonne réponse..."
+ - option: "SECRET"
+ feedback: "Ce n'est pas la bonne réponse"
- option: "Faux !"
feedback: "Non, ce n'est pas ce qu'Hedy affichera"
- - option: "ALERTE ! INTRUSION !"
- feedback: "Bien joué !"
+ - option: "ALERTE ! INTRUSION !"
+ feedback: "Bien joué !"
correct_answer: "D"
- hint: "L'ordinateur déclenchera l'alarme en cas d'intrusion !"
+ hint: "L'ordinateur déclenchera l'alarme en cas d'intrusion !"
question_score: '10'
5:
- question_text: "Pourquoi Hedy sonnera l'alarme si tu tapes Ada ?"
+ question_text: "Pourquoi Hedy dira 'ALARME ! INTRUSION !' si tu tapes 'secret' ?"
code: |-
- secret is ask 'Quel est le mot de pass ?'
- if secret is ada print 'Correct !'
- else print 'ALERTE ! INTRUSION !'
+ secret {is} {ask} 'Quel est le mot de passe ?'
+ {if} secret {is} SECRET {print} 'Correct !'
+ {else} {print} 'ALERTE ! INTRUSION !'
mp_choice_options:
- - option: "Parce qu'il y a une majuscule à la première lettre."
- feedback: "Bien !"
- - option: "Parce que le mot de passe est 'secret'."
+ - option: "Parce qu'il doit être en majuscules, comme SECRET"
+ feedback: "Bien !"
+ - option: "Parce que le mot de passe est 'alarme'"
feedback: "Non, ce n'est pas le mot de passe."
- - option: "Parce que ça s'écrit adda."
- feedback: "Regarde mieux !"
- - option: "Parce qu'il manque un 'e' à passe"
- feedback: "C'est bien une faute de français, mais cela ne dérangera pas Hedy !"
+ - option: "Parce qu'il n'a pas la bonne orthographe."
+ feedback: "Regarde mieux"
+ - option: "Parce que Hedy fait erreur"
+ feedback: "Non, Hedy a raison"
correct_answer: "A"
- hint: "Fais attention aux majuscules !"
+ hint: "L'orthographe du mot doit être exactement la même."
question_score: '10'
6:
question_text: "Quel mot devrait être à la place du point d'interrogation dans la dernière ligne ?"
code: |-
- print 'Je suis Hedy, la voyante du football !'
- print 'Je vais prédire quelle place ton équipe va occuper !'
- club is ask 'Quel est ton club préféré ?'
- if club is Brest print 'Le Stade brestois 29 va gagner !'
- _?_ print 'Désolé, ton club va terminer à la dernière place...'
- mp_choice_options:
- - option: "if"
- feedback: "if est déjà au début de la ligne"
- - option: "at random"
- feedback: "Non, il n'en faut pas aussi"
- - option: "else"
- feedback: "Bien !"
- - option: "print"
- feedback: "print est déjà là, il nous faut un mot avant !"
+ {print} 'Je suis Hedy, la voyante du football !'
+ {print} 'Je vais prédire quelle place ton équipe va occuper !'
+ club is {ask} 'Quel est ton club préféré ?'
+ {if} club {is} Brest {print} 'Le Stade brestois 29 va gagner !'
+ _ {print} 'Désolé, ton club va terminer à la dernière place...'
+ mp_choice_options:
+ - option: "```\n{if}\n```\n"
+ feedback: "`{if}` est déjà sur la ligne du dessus"
+ - option: "```\n{at} {random}\n```\n"
+ feedback: "Non, tu as besoin de `{else}`."
+ - option: "```\n{else}\n```\n"
+ feedback: "Bien !"
+ - option: "```\n{print}\n```\n"
+ feedback: "`{print}` est déjà là, il nous faut un mot avant !"
correct_answer: "C"
- hint: "Au niveau 5, tu as appris 2 nouvelles commandes, if et ... ?"
+ hint: "`{if}` va avec...?"
question_score: '10'
7:
- question_text: "Quel mot devrait être à la place du point d'interrogation ?"
+ question_text: "Quel mot devrait être à la place du point d'interrogation ?"
code: |-
- print 'Je peux prédire si tu seras millionnaire ou pas !'
- prenom is ask 'Dis moi ton nom..'
- if prenom is Hedy print 'Tu seras millionnaire !'
- else _?_ 'Malheureusement... Pas de grosses fortunes pour toi.'
- mp_choice_options:
- - option: "if"
- feedback: "if est déjà sur la ligne juste au-dessus"
- - option: "at random"
- feedback: "Non, tu n'en as pas besoin."
- - option: "else"
- feedback: "Il y a déjà la commande else"
- - option: "print"
- feedback: "Superbe !"
+ {print} 'Je peux prédire si tu seras millionnaire ou pas !'
+ prenom {is} {ask} 'Dis moi ton nom..'
+ {if} prenom {is} Hedy {print} 'Tu seras millionnaire !'
+ {else} _ 'Malheureusement... Pas de grosse fortune pour toi.'
+ mp_choice_options:
+ - option: "`{if}`\n"
+ feedback: "`{if}` est déjà sur la ligne juste au-dessus."
+ - option: "`{at}` `{random}`\n"
+ feedback: "Non, tu n'as pas besoin de `{at} {random}`."
+ - option: "`{else}`\n"
+ feedback: "Il y a déjà la commande `{else}`"
+ - option: "`{print}`\n"
+ feedback: "Superbe !"
correct_answer: "D"
- hint: "Regarde sur la ligne du dessus !"
+ hint: "La commande `{print}` suit le `{else}`"
question_score: '10'
8:
- question_text: "Quel mot devrait être à la place du point d'interrogation ?"
+ question_text: "Quel mot devrait être à la place du point d'interrogation ?"
code: |-
- animal is ask 'Quel est ton animal favori ?'
- if _?_ is pingouin print 'Cest aussi mon animal préféré !'
- else print 'Cool ! moi je préfère les pingouins.'
+ animal {is} {ask} 'Quel est ton animal favori ?'
+ {if} _ {is} pingouin {print} 'Cest aussi mon animal préféré !'
+ {else} {print} 'Cool ! moi je préfère les pingouins.'
mp_choice_options:
- - option: "animal favori"
+ - option: "```\nanimal favori\n```\n"
feedback: "Ce n'est pas le nom de la variable."
- - option: "animal"
+ - option: "```\nanimal\n```\n"
feedback: "Excellent travail !"
- - option: "if"
- feedback: "if est déjà là"
- - option: "print"
+ - option: "`{if}`\n"
+ feedback: "`{if}`f est déjà là"
+ - option: "`{print}`\n"
feedback: "Non, ce n'est pas cela."
correct_answer: "B"
- hint: "Quel est le nom de la variable ?"
+ hint: "Quel est le nom de la variable ?"
question_score: '10'
9:
- question_text: "Quelle porte dois-tu choisir pour t'échapper ?"
+ question_text: "Quelle porte dois-tu choisir pour t'échapper??"
code: |-
- print 'Échappe-toi de la maison hantée !'
- print 'Il y a 3 portes devant toi'
- porte is ask 'Quelle porte choisis-tu ?'
- monstres is vampire, loup-garou, araignée géante
- if porte is 2 print 'Bravo, tu peux t échapper !'
- else print 'Tu es dévoré par un...' monstres at random
+ {print} 'Échappe-toi de la maison hantée !'
+ {print} 'Il y a 3 portes devant toi'
+ porte {is} {ask} 'Quelle porte choisis-tu ?'
+ monstres {is} vampire, loup-garou, araignée géante
+ {if} porte {is} 2 {print} 'Bravo, tu peux t échapper !'
+ {else} {print} 'Tu es dévoré par un...' monstres {at} {random}
mp_choice_options:
- option: "1"
- feedback: "Mauvais choix ! Tu as été mangé"
+ feedback: "Mauvais choix ! Tu as été mangé"
- option: "2"
- feedback: "Super ! Tu t'es échappé !"
+ feedback: "Super ! Tu t'es échappé !"
- option: "3"
- feedback: "Mauvais choix ! Tu as été mangé"
+ feedback: "Mauvais choix ! Tu as été mangé."
- option: "C'est un piège, tu seras toujours mangé !"
- feedback: "Heureusement, non !"
+ feedback: "Heureusement, non !"
correct_answer: "B"
hint: "L'une des portes te mettra en sécurité.."
question_score: '10'
10:
question_text: "Quel monstre se tient derrière la porte 1 ?"
code: |-
- print 'Échappe-toi de la maison hantée !'
- print 'Il y a 3 portes devant toi'
- porte is ask 'Quelle porte choisis-tu ?'
- monstres is vampire, loup-garou, araignée géante
- if porte is 2 print 'Bravo, tu peux t échapper !'
- else print 'Tu es dévoré par un...' monstres at random
+ {print} 'Échape toi de la maison hantée!'
+ {print} l y a 3 portes devant toi'
+ porte {is} {ask} 'Quelle porte choisis-tu ?'
+ monstres {is} vampire, loup-garou, araignée géante
+ {if} porte {is} 2 {print} 'Bravo, tu peux t échapper !'
+ {else} {print} 'Tu es dévoré par un...' monstres {at} {random}
mp_choice_options:
- option: "Hedy choisit un monstre au hasard à chaque fois."
- feedback: "Génial !"
+ feedback: "Génial !"
- option: "vampire"
feedback: "Pas toujours..."
- option: "loup-garou"
@@ -847,7 +847,7 @@ levels:
- option: "araignée géante"
feedback: "Pas toujours..."
correct_answer: "A"
- hint: "Attention au dernier de la dernière ligne.."
+ hint: "Attention aux 3 derniers mots... monstres `{at} {random}`..."
question_score: '10'
6:
@@ -931,27 +931,27 @@ levels:
- option: "50 dollars"
feedback: "Bien !"
correct_answer: "D"
- hint: "Le prix sera le nombre de personnes multiplié par 10"
+ hint: "`prix` `est` `personnes` `multiplie` 10"
question_score: '10'
6:
question_text: "Combien coûte un hamburger dans ce restaurant ?"
code: |-
- print 'Bienvenue chez Hedy !'
- choix is ask 'Qu est-ce que tu veux manger ?'
- prix is 0
- if choix is hamburger prix is 15
- if choix is frites prix is 5
+ {print} 'Bienvenue chez Hedy !'
+ choix = {ask} 'Qu est-ce que tu veux manger ?'
+ prix = 0
+ {if} choix {is} hamburger prix = 15
+ {if} choix {is} frites prix = 6
mp_choice_options:
- option: "15 dollars"
feedback: "Super !"
- - option: "5 dollars"
- feedback: "Les frites coûtent 5 dollars"
+ - option: "6 dollars"
+ feedback: "Les frites coûtent 6 dollars"
- option: "0 dollars"
feedback: "Le hamburger n'est pas gratuit !"
- - option: "20 dollars"
- feedback: "C'est le prix d'un hamburger et de frites !"
+ - option: "21 dollars"
+ feedback: "C'est le prix d'un hamburger avec des frites !"
correct_answer: "A"
- hint: "Regarde sur la 4eme ligne !"
+ hint: "Regarde sur la 4ème ligne."
question_score: '10'
7:
question_text: "Pourquoi n'a-t-on pas mis 'prix + 3' à la place de 'prix is prix + 3' à la ligne 7 ?"
@@ -1219,7 +1219,7 @@ levels:
- option: "123"
feedback: "Ce n'est pas ça !"
correct_answer: "A"
- hint: "Comment les nombres seront affichés ?"
+ hint: "`{for}` chaque compliment dans les listes de compliments..."
question_score: '10'
2:
question_text: "Quel sera le code pour avoir cette sortie ?"
@@ -1300,7 +1300,7 @@ levels:
- option: "ranch"
feedback: "Non !"
correct_answer: "B"
- hint: "Quel est la bonne écriture ?"
+ hint: "Hedy doit choisir un nombre `{at} {random}`"
question_score: '10'
6:
question_text: "Combien de fois le mot 'Hello' apparaît-il sur ton écran lorsque tu exécutes le code ?"
@@ -1349,7 +1349,7 @@ levels:
feedback: "Attention aux guillemets !"
- option: "23 hi 24 hi 25 hi"
feedback: "Attention aux guillemets !"
- - option: "hi\nhi\nhi"
+ - option: "```\nnoms 'obtient une chemise de ' couleur {at} {random}\n```\n"
feedback: "Correct"
- option: "Le mot 'hi' apparaîtra 25 fois"
feedback: "Attention on part de 23 !"
@@ -1363,11 +1363,11 @@ levels:
for i in range 1 to âge
print is 'Hip hip Hourra !'
mp_choice_options:
- - option: "1 fois"
+ - option: "Timon, que veux-tu manger en guise d'entrée ?"
feedback: "Hélas non !"
- - option: "2 fois"
+ - option: "Onno, que veux-tu manger en guise d'entrée ?"
feedback: "Hélas non !"
- - option: "jamais"
+ - option: "Timon, que veux-tu manger comme dessert ?"
feedback: "Hélas non !"
- option: "Cela dépend de ton âge."
feedback: "C'est ça !"
@@ -1375,7 +1375,7 @@ levels:
hint: "for i in range 1 to âge"
question_score: '10'
10:
- question_text: "Quel est le code qui à fait cet affichage !"
+ question_text: "Qu'est-ce qui est vrai dans ce code ?"
code: |-
les_prix = Le million de dollars,La voiture,Le sandwich
noms = Bob, Patrick, Sandy, Larry
@@ -2329,7 +2329,7 @@ levels:
question_text: What should be filled in on the three blanks?
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2338,7 +2338,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2358,19 +2358,19 @@ levels:
question_text: How many pieces of chocolate will give you a stomach ache according to this fitbit?
code: "chocolate = {ask} 'How many pieces of chocolate have you eaten?'\n {if} chocolate <= 2\n {print} 'That is a healthy amount'\n {if} chocolate > 2 and chocolate =< 8\n {print} 'That is a bit much'\n {if} chocolate > 8\n {print} 'You will get a stomach ache!'\n"
10:
- code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- mp_choice_options:
- - option: "'player 1 wins'"
- feedback: Look at who has the highest score!
- - option: "'player 2 wins'"
- feedback: Yes!
- - option: "'player 2 loses'"
- feedback: Look at who has the highest score!
- - option: "'It is a tie'"
+ code: "{print} 'Celle qui marque le plus de points gagne !'\n{if} points_joueuse_1 < points_joueuse_2\n {print} _\n"
+ mp_choice_options:
+ - option: "'joueuse 1 gagne'"
+ feedback: Regarde qui a le meilleur score !
+ - option: "'joueuse 2 gagne'"
+ feedback: Oui!
+ - option: "'joueuse 2 perd'"
+ feedback: Regarde qui a le meilleur score !
+ - option: "'C'est match nul'"
+ feedback: No it's not, one player has a higher score
correct_answer: B
- feedback: No it's not, one player has a higher score
question_text: What should be filled in in the blanks?
- hint: You win the game by having the most points
+ hint: Tu gagnes la partie en ayant le plus de points
question_score: '10'
3:
question_text: Which symbols should be filled in on the two blanks?
@@ -2398,7 +2398,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2432,3 +2432,153 @@ levels:
correct_answer: D
hint: "!= means 'is not'"
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ hint: There is something wrong in line 5
+ question_score: '10'
+ correct_answer: D
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - feedback: That will not change anything
+ option: = wetness
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ hint: Look closely at the indentation
+ question_score: '10'
+ correct_answer: D
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ question_score: '10'
+ correct_answer: A
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ correct_answer: B
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
+ correct_answer: A
diff --git a/content/quizzes/fy.yaml b/content/quizzes/fy.yaml
index 38fd7bc234e..cd4e8fafd62 100644
--- a/content/quizzes/fy.yaml
+++ b/content/quizzes/fy.yaml
@@ -2853,9 +2853,9 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2891,7 +2891,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2900,7 +2900,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2928,9 +2928,9 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
@@ -2978,3 +2978,153 @@ levels:
correct_answer: B
hint: '> means greater than'
question_score: '10'
+ 15:
+ 4:
+ question_score: '10'
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ 5:
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ correct_answer: D
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ correct_answer: A
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - feedback: Great job
+ option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ correct_answer: C
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/he.yaml b/content/quizzes/he.yaml
index f57ec323dff..41150888a4f 100644
--- a/content/quizzes/he.yaml
+++ b/content/quizzes/he.yaml
@@ -1185,7 +1185,7 @@ levels:
hint: The lines after an `{if}` or `{else}` command should start with 4 spaces.
question_score: '10'
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
10:
question_text: Which statement is true?
code: "1 level = {ask} 'What level are you on?\"\n2 {if} level {is} 8\n3 {print} Great job!"
@@ -2127,7 +2127,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
@@ -2166,7 +2166,7 @@ levels:
8:
question_score: '10'
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2175,7 +2175,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
9:
@@ -2202,10 +2202,10 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_score: '10'
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
2:
@@ -2237,3 +2237,153 @@ levels:
correct_answer: B
hint: The last one should say you win.
question_score: '10'
+ 15:
+ 1:
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - feedback: That is not right.
+ option: '`=!`'
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - feedback: That's not it
+ option: '`{in}`'
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/hi.yaml b/content/quizzes/hi.yaml
index 6d5e1767353..606f76a006a 100644
--- a/content/quizzes/hi.yaml
+++ b/content/quizzes/hi.yaml
@@ -2884,8 +2884,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
5:
@@ -2943,8 +2943,8 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are।
+ feedback: There are।
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2974,7 +2974,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right।'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right।
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer।
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right।
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right।
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right।
+ correct_answer: A
+ hint: The last one should say you win।
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet।
+ feedback: It only sprays when you're in there।
+ - option: The lights will always stay on।
+ feedback: That wouldn't be right।
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied।
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app।
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead।'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - feedback: You should fill in a name, not a number
+ option: points_player_1
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/hu.yaml b/content/quizzes/hu.yaml
index 2c2660c773d..1359acf3791 100644
--- a/content/quizzes/hu.yaml
+++ b/content/quizzes/hu.yaml
@@ -2884,7 +2884,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2942,9 +2942,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2974,7 +2974,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - feedback: That is not right.
+ option: '`=!`'
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ correct_answer: B
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/id.yaml b/content/quizzes/id.yaml
index 4d1031a2ccd..e825e0267cc 100644
--- a/content/quizzes/id.yaml
+++ b/content/quizzes/id.yaml
@@ -2867,9 +2867,9 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2898,9 +2898,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
9:
@@ -2930,7 +2930,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
3:
@@ -2978,3 +2978,153 @@ levels:
correct_answer: B
hint: The last one should say you win.
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - feedback: That's not right
+ option: Line 2 misses quotation marks
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - feedback: False!
+ option: The lights and air freshener will turn off after 1 minute
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ correct_answer: B
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/it.yaml b/content/quizzes/it.yaml
index 52d54132fba..b5e89b0e8b4 100644
--- a/content/quizzes/it.yaml
+++ b/content/quizzes/it.yaml
@@ -2869,8 +2869,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2928,9 +2928,9 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
@@ -2965,7 +2965,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2974,7 +2974,157 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ hint: There is something wrong in line 5
+ question_score: '10'
+ correct_answer: D
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ mp_choice_options:
+ - feedback: That will not change anything
+ option: = wetness
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - feedback: You are correct!
+ option: = wetness - 1
+ - option: = wetness + 1
+ feedback: The program should count down
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/ja.yaml b/content/quizzes/ja.yaml
index 366a68c8fb2..81be537e475 100644
--- a/content/quizzes/ja.yaml
+++ b/content/quizzes/ja.yaml
@@ -1030,7 +1030,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2113,8 +2113,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2157,9 +2157,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2190,7 +2190,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
1:
@@ -2237,3 +2237,153 @@ levels:
correct_answer: B
hint: The last one should say you win.
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ question_text: How should this program be changed to that it works?
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ question_score: '10'
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/kmr.yaml b/content/quizzes/kmr.yaml
index e42efd12ea4..9780639ced1 100644
--- a/content/quizzes/kmr.yaml
+++ b/content/quizzes/kmr.yaml
@@ -1187,7 +1187,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2022,9 +2022,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2053,9 +2053,9 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_score: '10'
question_text: What should be filled in in the blanks?
- feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
2:
@@ -2083,7 +2083,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2117,3 +2117,153 @@ levels:
correct_answer: B
hint: The last one should say you win.
question_score: '10'
+ 15:
+ 1:
+ mp_choice_options:
+ - feedback: That is not right.
+ option: '`=!`'
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ mp_choice_options:
+ - feedback: That's not it
+ option: '`{in}`'
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ question_score: '10'
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - feedback: That's not right
+ option: Line 2 misses quotation marks
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/ko.yaml b/content/quizzes/ko.yaml
index 4760cb71f82..bdb7d0954eb 100644
--- a/content/quizzes/ko.yaml
+++ b/content/quizzes/ko.yaml
@@ -434,7 +434,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2112,10 +2112,10 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
correct_answer: B
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
hint: The symbols are right
question_score: '10'
7:
@@ -2142,10 +2142,10 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_score: '10'
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
9:
@@ -2172,7 +2172,7 @@ levels:
- feedback: Look at who has the highest score!
option: "'player 2 loses'"
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
@@ -2237,3 +2237,153 @@ levels:
question_score: '10'
correct_answer: D
hint: "!= means 'is not'"
+ 15:
+ 1:
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ correct_answer: C
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/nb_NO.yaml b/content/quizzes/nb_NO.yaml
index e4a4e1fbbd9..f365bb52cf6 100644
--- a/content/quizzes/nb_NO.yaml
+++ b/content/quizzes/nb_NO.yaml
@@ -1759,7 +1759,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the {if} and {else} command should start with 4 spaces
@@ -2131,8 +2131,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
5:
question_text: 'Which symbol should be filled in on the blanks if the movie is suitable for kids for the age of 12 and up? '
code: "age = {ask} 'How old are you?'\nticket = {ask} 'Do you have a ticket?'\n{if} age _ and ticket == 'yes'\n {print} 'You can enter the movie theater.'\n{else}\n {print} 'You are not allowed to come in!'\n"
@@ -2187,9 +2187,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2234,7 +2234,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ question_score: '10'
+ correct_answer: A
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/nl.yaml b/content/quizzes/nl.yaml
index 1c843d838da..34f42089abc 100644
--- a/content/quizzes/nl.yaml
+++ b/content/quizzes/nl.yaml
@@ -2941,152 +2941,383 @@ levels:
hint: "Het item staat niet op meerdere lijsten, dus je kunt geen `{and}` gebruiken"
question_score: '10'
14:
- 3:
+ 1:
+ question_text: "Welk symbool moet op het lijntje komen te staan?"
+ code: |
+ naam _ {ask} 'Wie ben jij?'
+ {if} naam == 'Hedy'
+ {print} 'Ik ook!'
+ mp_choice_options:
+ - option: "`=>`"
+ feedback: "Dit symbool bestaat niet."
+ - option: "`==`"
+ feedback: "We vergelijken niets."
+ - option: "`!=`"
+ feedback: "We vergelijken niets."
+ - option: "`=`"
+ feedback: "Klopt!"
+ correct_answer: "D"
+ hint: "Er wordt niets vergeleken. We vragen alleen wat je naam is."
+ question_score: "10"
+ 2:
+ question_text: "Welke van deze codes gebruikt = of == correct?"
mp_choice_options:
- - option: '`>` and `<`'
- feedback: That's not it
- - option: '`=` and `>=`'
- feedback: That's not it
- - option: '`<` and `>=`'
- feedback: You are right
- - option: ' `+` and `==`'
- correct_answer: C
- question_text: Which symbols should be filled in on the two blanks?
- code: "guests = {ask} 'How many people are at the party?'\n{if} guests _ 130\n {print} 'You can come in!'\n{if} guests _ 130\n {print} 'Im sorry, the club is full. '\n {print} 'You have to wait for a guest to leave'\n"
- feedback: That's not it
- hint: There are 130 people allowed in the club
- question_score: '10'
+ - option: |
+ ```
+ {if} naam = Hedy
+ ```
+ feedback: "No"
+ - option: |
+ ```
+ {if} leeftijd = 24
+ ```
+ feedback: "No"
+ - option: |
+ ```
+ antwoord = {ask} 'Wat is je antwoord?'
+ ```
+ feedback: "Yes!"
+ - option: |
+ ```
+ antwoord == {ask} 'Hoe gaat het?'
+ ```
+ feedback: "No"
+ correct_answer: "C"
+ hint: "Je gebruikt == bij het vergelijken van twee antwoorden"
+ question_score: "10"
+ 3:
+ question_text: "Welke symbolen moeten worden ingevuld op de lijntjes?"
+ code: |
+ gasten = {ask} 'Hoeveel mensen gaan naar het feest?'
+ {if} gasten _ 130
+ {print} 'Je mag naar binnen!'
+ {if} gasten _ 130
+ {print} 'Sorry, de club is vol.'
+ {print} 'Je moet wachten tot er mensen weggaan'
+ mp_choice_options:
+ - option: "`>` en `<`"
+ feedback: "Dat klopt niet."
+ - option: "`=` en `>=`"
+ feedback: "Dat klopt niet."
+ - option: "`<` en `>=`"
+ feedback: "Dat klopt!"
+ - option: " `+` en `==`"
+ feedback: "Dat klopt niet."
+ correct_answer: "C"
+ hint: "Er mogen maximaal 130 mensen naar binnen."
+ question_score: "10"
4:
- question_score: '10'
- question_text: What's wrong with this code?
- code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
+ question_text: "Wat is er mis met deze code?"
+ code: |
+ prijs = 10
+ geld = {ask} Hoeveel geld heb je?
+ kopen = {ask} 'Wil je deze teddybeer kopen?'
+ {if} money >= prijs {and} kopen == 'yes'
+ {print} 'Je kunt de beer kopen!'
+ {else}
+ {print} 'Je kunt de beer helaas niet kopen!'
mp_choice_options:
- - option: In line 1 == should be used instead of =
- feedback: No that's not it
- - option: Line 2 misses quotation marks
- feedback: You are correct
- - option: In line 4 = should have been used instead of ==
- feedback: No that's not it
- - option: In line 4 <= should have been used instead of >=
- correct_answer: B
- feedback: No that's not it
- hint: The symbols are right
+ - option: "In regel moet == worden gebruikt in plaats van =."
+ feedback: "Dat klopt niet"
+ - option: "Regel 2 heeft aanhalingstekens nodig."
+ feedback: "Ja! Goedzo!"
+ - option: "In regel 4 moet == worden gebruikt in plaats van =."
+ feedback: "Dat is het niet."
+ - option: "In regel 4 moet <= worden gebruikt in plaats van >="
+ feedback: "Dat klopt niet"
+ correct_answer: "B"
+ hint: "De symbolen kloppen"
+ question_score: "10"
5:
- question_text: 'Which symbol should be filled in on the blanks if the movie is suitable for kids for the age of 12 and up? '
- mp_choice_options:
- - option: '`> 12`'
- feedback: 12 year olds are allowed too
- - option: '`>= 12`'
- feedback: Great!
- - option: '`< 12`'
- feedback: These kids are too young!
- - option: '`<= 12`'
- feedback: These kids are too young
- code: "age = {ask} 'How old are you?'\nticket = {ask} 'Do you have a ticket?'\n{if} age _ and ticket == 'yes'\n {print} 'You can enter the movie theater.'\n{else}\n {print} 'You are not allowed to come in!'\n"
- correct_answer: B
- hint: '> means greater than'
- question_score: '10'
+ question_text: "Welk symbool moet op de lijntjes ingevuld worden als de film geschikt is voor kinderen van 12 jaar en ouder? "
+ code: |
+ leeftijd = {ask} 'Hoe oud ben je?'
+ ticket = {ask} 'Heb je een kaartje?'
+ {if} leeftijd _ and ticket == 'ja'
+ {print} 'Je mag de zaal in.'
+ {else}
+ {print} 'Je mag de zaal niet in!'
+ mp_choice_options:
+ - option: |
+ ```
+ > 12
+ ```
+ feedback: "12 jarigen mogen ook naar binnen"
+ - option: |
+ ```
+ >= 12
+ ```
+ feedback: "Fantastisch!"
+ - option: |
+ ```
+ < 12
+ ```
+ feedback: "Deze kinderen zijn te jong!"
+ - option: |
+ ```
+ <= 12
+ ```
+ feedback: "Deze kinderen zijn te jong"
+ correct_answer: "B"
+ hint: "> betekent groter dan"
+ question_score: "10"
6:
- code: "lives = 2\n{repeat} 10 times\n {if} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n {if} answer == 'yes'\n lives = lives - 1\n"
- mp_choice_options:
- - option: 10 times
- feedback: It stops after 2 times
- - option: 0 times
- feedback: It stops after 2 times
- - option: 1 time
- feedback: It stops after 2 times
- - option: 2 times
- feedback: That is correct
- question_text: How many times do you have to say you are annoyed before this annoying game stops?
- correct_answer: D
- hint: "!= means 'is not'"
- question_score: '10'
+ question_text: "Hoe vaak moet je aangeven dat je je ergert voordat dit irritante spel stopt?"
+ code: |
+ levens = 2
+ {repeat} 10 {times}
+ {if} levens != 0
+ antwoord = {ask} 'Erger je je al?'
+ {if} antwoord == 'ja'
+ levens = levens - 1
+ mp_choice_options:
+ - option: "10 keer"
+ feedback: "Het stopt na 2x"
+ - option: "0 keer"
+ feedback: "Het stopt na 2x"
+ - option: "1 keer"
+ feedback: "Het stopt na 2x"
+ - option: "2 keer"
+ feedback: "Dat is correct"
+ correct_answer: "D"
+ hint: "!= betekent 'is niet'"
+ question_score: "10"
7:
- question_text: What should be filled in on the three blanks?
- mp_choice_options:
- - option: "`'Lower'` and `'Higher'` and `'You win!'`"
- feedback: That's not quite right.
- - option: "`'Higher'` and `'Lower'` and `'You win!'`"
- feedback: You win!
- - option: "`'You win!'` and `'Lower!'` and `'Higher'`"
- feedback: That's not quite right.
- - option: "`'Lower!'` and `'You win!'` and `'Higher!'`"
- feedback: That's not quite right.
- code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
- correct_answer: B
- hint: The last one should say you win.
- question_score: '10'
+ question_text: "Wat moet worden ingevuld op de 3 lijntjes?"
+ code: |
+ {print} 'Raad het getal'
+ getallen = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
+ getal = getallen {at} {random}
+ spel = 'aan'
+ {for} i {in} {range} 1 {to} 10
+ {if} spel == 'aan'
+ gok = {ask} 'Welk getal denk je?'
+ {if} gok < getal
+ {print} _
+ {if} gok > getal
+ {print} _
+ {if} gok == getal
+ {print} _
+ spel = 'over'
+ mp_choice_options:
+ - option: "'Lager' en 'Hoger' en 'Je wint!'"
+ feedback: "Bijna."
+ - option: "'Hoger' en 'Lager' en 'Je wint!'"
+ feedback: "Je wint!"
+ - option: "'Je wint' en 'Lager!' en 'Hoger'"
+ feedback: "De volgorde klopt niet."
+ - option: "'Lager!' en 'Je wint!' en 'Hoger!'"
+ feedback: "Die volgorde klopt niet"
+ correct_answer: "B"
+ hint: "Bij de laatste optie win je het spel."
+ question_score: "10"
+ 8:
+ question_text: "Wat klopt over deze achtbaan?"
+ code: |
+ lengte = {ask} 'Vul je lengte in in cm'
+ {if} lengte < 120
+ {print} 'Sorry, je mag niet in deze achtbaan.'
+ {else}
+ {print} 'Geniet van je ritje!'
+ mp_choice_options:
+ - option: "Je moet langer zijn dan 120 cm om in de achtbaan te mogen"
+ feedback: "Juist!"
+ - option: "Je moet langer zijn dan 119 cm om in de achtbaan te mogen"
+ feedback: "Als je precies 120 cm bent mag je er nog niet in"
+ - option: "Je moet korter zijn dan 120 cm om in de achtbaan te mogen"
+ feedback: "> betekent groter dan"
+ - option: "Iedereen mag in deze achtbaan, ongeacht lengte"
+ feedback: "Nee, hoor."
+ correct_answer: "A"
+ hint: "> betekent groter dan"
+ question_score: "10"
+ 9:
+ question_text: "Na hoeveel chocolaatjes krijg je buikpijn volgens deze fitbit?"
+ code: |
+ chocolaatjes = {ask} 'Hoeveel chocolaatjes heb je al gegeten?'
+ {if} chocolaatjes <= 2
+ {print} 'Dat is nog gezond'
+ {if} chocolaatjes > 2 and chocolaatjes =< 8
+ {print} 'Dat is best veel'
+ {if} chocolaatjes > 8
+ {print} 'Daar krijg je buikpijn van!'
+ mp_choice_options:
+ - option: "1 of meer"
+ feedback: "Nee"
+ - option: "2 of meer"
+ feedback: "Nee"
+ - option: "8 of meer"
+ feedback: "Bijna"
+ - option: "9 of meer"
+ feedback: "Goed!"
+ correct_answer: "D"
+ hint: "> 8 betekent meer dan 8"
+ question_score: "10"
10:
- code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- question_text: What should be filled in in the blanks?
+ question_text: "Wat moet er op de lijntjes staan?"
+ code: |
+ {print} 'Wie de meeste punten haalt wint!'
+ {if} punten_speler_1 < punten_speler_2
+ {print} _
mp_choice_options:
- - option: "'player 1 wins'"
- feedback: Look at who has the highest score!
- - option: "'player 2 wins'"
- feedback: Yes!
- - option: "'player 2 loses'"
- feedback: Look at who has the highest score!
- - option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
- correct_answer: B
- hint: You win the game by having the most points
- question_score: '10'
+ - option: "'speler 1 wint'"
+ feedback: "Kijk naar wie de hoogste score heeft!"
+ - option: "'speler 2 wint'"
+ feedback: "Yes!"
+ - option: "'speler 2 verliest'"
+ feedback: "Kijk naar wie de hoogste score heeft!"
+ - option: "'Gelijkspel!'"
+ feedback: "Nee, de ene speler heeft meer punten dan de ander."
+ correct_answer: "B"
+ hint: "Je wint het spel als je de meeste punten hebt"
+ question_score: "10"
+ 15:
1:
- question_text: Which symbol should be used on the blank?
- code: "name _ {ask} 'Who are you?'\n{if} name == 'Hedy'\n {print} 'Me too!'\n"
+ question_text: 'Welk symbool moet worden gebruikt op het streepje? Tip: Je moet blijven raden tot het antwoord goed is.'
+ code: "antwoord = 0\n{while} antwoord _ 'Amsterdam'\n antwoord = {ask} 'Wat is de hoofdstad van Nederland?'\nprint 'Je hebt het juiste antwoord gegeven'\n"
mp_choice_options:
- - option: '`=>`'
- feedback: This is not a symbol.
+ - option: '`=!`'
+ feedback: Dat klopt niet.
- option: '`==`'
- feedback: We are not comparing anything, just asking.
+ feedback: Je hoeft niet te blijven raden als je het goede antwoord hebt gegeven
- option: '`!=`'
- feedback: We are not comparing anything, just asking
+ feedback: Correct
- option: '`=`'
- feedback: Right!
- correct_answer: D
- hint: We are not comparing anything, we are just asking a name.
+ feedback: Dat klopt niet
+ correct_answer: C
+ hint: Blijf raden tot de speler Amsterdam zegt.
question_score: '10'
2:
- mp_choice_options:
- - option: '{if} name = Hedy'
- feedback: No
- - option: '{if} age = 24'
- feedback: No
- - feedback: Yes!
- option: answer = {ask} 'What is your answer'
- - option: answer == {ask} 'How are you doing?'
- feedback: No
- question_text: Which of these codes has used the correct = or == symbol?
+ question_text: Welk van deze codes gebruikt het juiste symbool/symbolen?
+ mp_choice_options:
+ - option: "```\n{while} naam = Hedy\n```\n"
+ feedback: Nee
+ - option: "```\n{while} leeftijd = 24\n```\n"
+ feedback: Nee
+ - option: "```\n{while} tijd > 0\n```\n"
+ feedback: Ja!
+ - option: "```\n{while} antwoord == ja'\n```\n"
+ feedback: Hier mist een aanhalingsteken
correct_answer: C
- hint: When you are comparing two answers you should use ==
+ hint: Je gebruikt == wanneer je twee dingen vergelijkt
question_score: '10'
- 8:
- mp_choice_options:
- - option: You must be taller than 120 cm to go on the roller coaster
- feedback: True!
- - option: You must be taller than 119 cm to go on the roller coaster
- feedback: If you are 120 cm you won't get in
- - option: You must be shorter than 120 cm to go on the roller coaster
- feedback: '> means greater than'
- - option: There are no length restrictions to go on the roller coaster
- question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- question_score: '10'
- feedback: There are.
+ 3:
+ question_text: Welk commando moet op het streepje?
+ code: "_ leeftijd >= 18\n print 'Jij mag deze bar niet in'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: Dat is hem niet.
+ - option: '`{while}`'
+ feedback: Goed gedaan!
+ - option: '`{for}`'
+ feedback: Dat is hem niet.
+ - option: '`{range}`'
+ feedback: Dat is hem niet.
+ correct_answer: B
+ hint: Je mag de bar niet in als je 17 of jonger bent.
+ question_score: '10'
+ 4:
+ question_text: Wat is er mis met deze code?
+ code: "opties = 1, 2, 3, 4, 5, 6\nprint 'Gooi zo snel mogelijk 6!'\ngegooid = 0\npogingen = 0\n{while} gegooid == 6\n gegooid = opties {at} {random}\n print 'Je gooide ' gegooid\n pogingen = pogingen + 1\nprint 'Hoera! Je gooide 6 in ' pogingen ' pogingen.'\n"
+ mp_choice_options:
+ - option: In regel 1 moet == worden gebruikt in plaats van =
+ feedback: Dat klopt niet
+ - option: Regel 2 mist aanhalingstekens
+ feedback: Dat klopt niet
+ - option: In regels 5 moet {if} gebruikt worden in plaats van {while}
+ feedback: Dat klopt niet
+ - option: In regel 5 moet != gebruikt worden in plaats van ==
+ feedback: Dat is juist!
+ correct_answer: D
+ hint: Er is iets mis in regel 5
+ question_score: '10'
+ 5:
+ question_text: Wat moet er op het streepje komen om dit programma goed te laten werken?
+ code: "vochtgehalte = 10\n{while} vochtgehalte != 0\n print 'Je haar is nog nat, zet de föhn aan!'\n {sleep} 1\n {clear}\n vochtgehalte _\n\nprint 'Helemaal droog!'\n"
+ mp_choice_options:
+ - option: = vochtgehalte
+ feedback: Dit verandert niets
+ - option: = vochtgehalte = 1
+ feedback: Dat klopt niet
+ - option: = vochtgehalte - 1
+ feedback: Super!
+ - option: = vochtgehalte + 1
+ feedback: Het programma moet aftellen
+ correct_answer: C
+ question_score: '10'
+ hint: Het haar moet steeds minder vochtig zijn.
+ 6:
+ question_text: Wat is er mis met deze code?
+ code: "levens = 100\n {while} levens != 0\n antwoord = {ask} 'Ben je al boos?'\n{if} antwoord == 'ja'\n levens = levens - 1\n"
+ mp_choice_options:
+ - option: "{while} moet {if} zijn."
+ feedback: Nee dat klopt niet
+ - option: "{if} moet {while} zijn."
+ feedback: Nee dat klopt niet
+ - option: Bij regel 3 moet meer worden ingesprongen
+ feedback: Nee dat klopt niet
+ - option: Bij regel 2 moet minder worden ingesprongen
+ feedback: That is correct
+ correct_answer: D
+ hint: Er wordt verkeerd ingesprongen
+ question_score: '10'
+ 7:
+ question_text: Wat moet er in deze code veranderen?
+ code: "{print} 'Raad mijn getal'\nnumemrs = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnummer = nummers {at} {random}\ngame = 'aan'\n{if} game == 'aan'\n gok = {ask} 'Welk getal denk jij dat het is?'\n {if} gok < nummer\n {print} _\n {if} gok > nummer\n {print} _\n {if} gok == nummer\n {print} _\n spel = 'over'\n"
+ mp_choice_options:
+ - option: 'De eerste {if} moet een {while} worden'
+ feedback: Perfect!
+ - option: 'De tweede {if} moet een {while} worden'
+ feedback: Helaas.
+ - option: 'De derde {if} moet een {while} worden'
+ feedback: Helaas.
+ - option: 'De vierde {if} moet een {while} worden'
+ feedback: Helaas.
correct_answer: A
- hint: '> means greater than'
+ hint: De laatste moet een {if} blijven.
+ question_score: '10'
+ 8:
+ question_text: Wat is waar over dit automatische toilet systeem?
+ code: "{while} toilet == 'bezet'\n licht = 'aan'\n lucgtverfrisser_sprayt = 'ja'\n {sleep} 60\nelse\n licht = 'uit'\n"
+ mp_choice_options:
+ - option: De lichten en luchtverfrisser gaan uit na 1 minuut
+ feedback: Fout!
+ - option: De luchtverfrisser sprayt een keer per minuut en de lichten blijven aan zolang je op de wc zit.
+ feedback: Geweldig!
+ - option: De luchtverfrisser sprayt als je het toilet verlaat.
+ feedback: Hij sprayt alleen als hij bezet is.
+ - option: Het licht blijft altijd aan.
+ feedback: Dat klopt niet.
+ hint: Het blok na het {while} commando blijft gebeuren zolang het toilet bezet is.
+ question_score: '10'
+ correct_answer: B
9:
- question_text: How many pieces of chocolate will give you a stomach ache according to this fitbit?
- mp_choice_options:
- - option: 1 or more
- feedback: No
- - option: 2 or more
- feedback: No
- - option: 8 or more
- feedback: Almost
- - option: 9 or more
- feedback: Great!
- code: "chocolate = {ask} 'How many pieces of chocolate have you eaten?'\n {if} chocolate <= 2\n {print} 'That is a healthy amount'\n {if} chocolate > 2 and chocolate =< 8\n {print} 'That is a bit much'\n {if} chocolate > 8\n {print} 'You will get a stomach ache!'\n"
- correct_answer: D
- hint: '> 8 means more than 8'
+ question_text: Wat zegt de dieetapp als je 1600 caloriëen hebt gegeten die dag?
+ code: "calorie = {ask} 'Hoeveel calorieën heb je vandaag gegeten?'\n {while} calorie <= 1000\n {print} 'Je kunt nog wat eten'\n {while} calorie > 1000 and calorie =< 2000\n {print} 'Prima'\n {while} calorie > 2000\n {print} 'Je hebt genoeg gehad'\n"
+ mp_choice_options:
+ - option: Niets. 1600 calorieën is niet geprogrammeerd
+ feedback: Nee
+ - option: Je kunt nog wat eten
+ feedback: Nee
+ - option: Prima
+ feedback: Ja!
+ - feedback: Nee
+ option: Je hebt genoeg gehad
+ correct_answer: C
+ hint: 1600 ligt tussen 1000 en 2000
+ question_score: '10'
+ 10:
+ question_text: 'Wat moet worden ingevuld op het streepje? Tip: de speler met de meeste punten staat voor.'
+ code: "naam_speler_1 = {ask} 'Naam speler 1:'\nnaam_speler_2 = {ask} 'Naam speler 2:'\n{while} punten_speler_1 > punten_speler_2\n {print} _ ' staat voor!'\n"
+ mp_choice_options:
+ - option: naam_speler_1
+ feedback: Fantastisch!
+ - option: name_player_2
+ feedback: Nee die verliest!
+ - option: punten_speler_1
+ feedback: Het moet een naam zijn, geen getal
+ - option: punten_speler_2
+ feedback: Het moet een naam zijn, geen getal
+ correct_answer: A
+ hint: Je wint het spel als je de meeste punten hebt. Je naam komt dan in beeld.
question_score: '10'
diff --git a/content/quizzes/pa_PK.yaml b/content/quizzes/pa_PK.yaml
index 5f7f18d2e32..dd9bdab3cc0 100644
--- a/content/quizzes/pa_PK.yaml
+++ b/content/quizzes/pa_PK.yaml
@@ -1188,7 +1188,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2128,8 +2128,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2216,9 +2216,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2233,7 +2233,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 2:
+ question_score: '10'
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ 8:
+ mp_choice_options:
+ - feedback: False!
+ option: The lights and air freshener will turn off after 1 minute
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/pl.yaml b/content/quizzes/pl.yaml
index 720097cba27..c64677ad52d 100644
--- a/content/quizzes/pl.yaml
+++ b/content/quizzes/pl.yaml
@@ -2836,7 +2836,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
correct_answer: B
@@ -2910,9 +2910,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2942,7 +2942,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ question_score: '10'
+ correct_answer: A
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - feedback: False!
+ option: The lights and air freshener will turn off after 1 minute
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/pt_BR.yaml b/content/quizzes/pt_BR.yaml
index ff2ba9aadbb..9f7af1f7c2d 100644
--- a/content/quizzes/pt_BR.yaml
+++ b/content/quizzes/pt_BR.yaml
@@ -2927,9 +2927,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2945,7 +2945,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
hint: You win the game by having the most points
question_score: '10'
4:
@@ -2957,9 +2957,9 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2978,3 +2978,153 @@ levels:
correct_answer: D
hint: '> 8 means more than 8'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - feedback: A quotation mark is missing
+ option: "```\n{while} answer == yes'\n```\n"
+ correct_answer: C
+ question_text: Which of these codes has used the correct symbol(s)?
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ question_score: '10'
+ correct_answer: A
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/pt_PT.yaml b/content/quizzes/pt_PT.yaml
index c62f586deb6..eb7ea15c81b 100644
--- a/content/quizzes/pt_PT.yaml
+++ b/content/quizzes/pt_PT.yaml
@@ -2859,9 +2859,9 @@ levels:
- feedback: No that's not it
option: In line 4 = should have been used instead of ==
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2919,9 +2919,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2951,7 +2951,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - feedback: That's not it
+ option: '`{for}`'
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ question_score: '10'
+ correct_answer: D
+ hint: Look closely at the indentation
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/ro.yaml b/content/quizzes/ro.yaml
index 5b12e997f42..375a7f2b83b 100644
--- a/content/quizzes/ro.yaml
+++ b/content/quizzes/ro.yaml
@@ -1187,7 +1187,7 @@ levels:
hint: Take a careful look at the indentation.
question_score: '10'
9:
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
question_text: What line(s) in this code should start with 4 spaces?
mp_choice_options:
- option: Line 2 and 4
@@ -2052,9 +2052,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2084,7 +2084,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2112,9 +2112,159 @@ levels:
- feedback: Look at who has the highest score!
option: "'player 2 loses'"
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
+ 15:
+ 1:
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ hint: Look closely at the indentation
+ question_score: '10'
+ correct_answer: D
+ 7:
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ correct_answer: B
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/ru.yaml b/content/quizzes/ru.yaml
index 72fd98b831d..9aa9eed5016 100644
--- a/content/quizzes/ru.yaml
+++ b/content/quizzes/ru.yaml
@@ -2866,9 +2866,9 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2934,7 +2934,7 @@ levels:
hint: '> means greater than'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2943,7 +2943,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2973,7 +2973,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ feedback: That's not it
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - feedback: Perfect!
+ option: '... change the first {if} into a {while}'
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ correct_answer: B
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ hint: 1600 is between 1000 and 2000
+ correct_answer: C
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - feedback: You should fill in a name, not a number
+ option: points_player_1
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/sq.yaml b/content/quizzes/sq.yaml
index 9360b15c641..ac466bc18be 100644
--- a/content/quizzes/sq.yaml
+++ b/content/quizzes/sq.yaml
@@ -1188,7 +1188,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2127,7 +2127,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_text: What's wrong with this code?
@@ -2179,9 +2179,8 @@ levels:
hint: The last one should say you win.
question_score: '10'
8:
- feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2190,6 +2189,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2233,7 +2233,157 @@ levels:
- feedback: Look at who has the highest score!
option: "'player 2 loses'"
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ mp_choice_options:
+ - feedback: That is not right.
+ option: '`=!`'
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ hint: Look closely at the indentation
+ correct_answer: D
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ question_score: '10'
+ correct_answer: A
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/sr.yaml b/content/quizzes/sr.yaml
index ea7ffde252a..0646c758f67 100644
--- a/content/quizzes/sr.yaml
+++ b/content/quizzes/sr.yaml
@@ -1939,7 +1939,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2037,9 +2037,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2070,7 +2070,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
hint: You win the game by having the most points
question_score: '10'
2:
@@ -2098,7 +2098,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2117,3 +2117,153 @@ levels:
correct_answer: B
hint: The last one should say you win.
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ question_score: '10'
+ hint: wetness should get less each time
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ mp_choice_options:
+ - feedback: False!
+ option: The lights and air freshener will turn off after 1 minute
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ correct_answer: B
+ 9:
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/sv.yaml b/content/quizzes/sv.yaml
index 486219868f9..cee79c30f98 100644
--- a/content/quizzes/sv.yaml
+++ b/content/quizzes/sv.yaml
@@ -2147,9 +2147,9 @@ levels:
- option: På rad 4 skulle = ha använts istället för ==
feedback: Nej, det stämmer inte
- option: På rad 4 ska <= användas istället för >=
+ feedback: No that's not it
question_text: Vad är fel med den här koden?
code: "pris = 10\npengar = {ask} Hur mycket pengar har du?\nköp = {ask} 'Vill du köpa den här nallebjörnen?'\n{if} pengar >= pris och köp == 'ja'\n {print} 'Du kan köpa björnen!'\n{else}\n {print} 'Du kan inte köpa den här björnen!'\n"
- feedback: Nej, det stämmer inte
correct_answer: B
hint: Symbolerna är rätt
question_score: '10'
@@ -2194,8 +2194,8 @@ levels:
- option: Du måste vara längre än 120 cm för att åka berg- och dalbanan
feedback: '> betyder större än'
- option: Det finns inga längdbegränsningar för att åka berg- och dalbana
+ feedback: There are.
code: "längd = {ask} 'Fyll i din längd i cm, tack'\n{if} längd > 120\n {print} 'Tyvärr, du kan inte åka på den här berg-och-dalbanan.'\n{else}\n {print} 'Ha en fin åktur'\n"
- feedback: Det finns det.
correct_answer: A
hint: '> betyder större än'
10:
@@ -2210,7 +2210,7 @@ levels:
- option: "'spelare 2 förlorar'"
feedback: Kolla vem som har högst poäng!
- option: "'Det är oavgjort'"
- feedback: Nej det är det inte, en spelare har högre poäng
+ feedback: No it's not, one player has a higher score
hint: Du vinner spelet genom att ha flest poäng
question_score: '10'
5:
@@ -2243,3 +2243,153 @@ levels:
correct_answer: D
hint: '> 8 betyder fler än 8'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ correct_answer: B
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ hint: You win the game by having the most points. Your name should appear on the screen
+ correct_answer: A
+ question_score: '10'
diff --git a/content/quizzes/sw.yaml b/content/quizzes/sw.yaml
index 3193c5407b4..f1176150f39 100644
--- a/content/quizzes/sw.yaml
+++ b/content/quizzes/sw.yaml
@@ -2870,8 +2870,8 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
correct_answer: B
- feedback: No that's not it
hint: The symbols are right
question_score: '10'
5:
@@ -2892,7 +2892,7 @@ levels:
8:
question_score: '10'
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2901,7 +2901,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
2:
@@ -2974,7 +2974,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - feedback: No
+ option: Nothing. 1600 is not programmed into the app.
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/te.yaml b/content/quizzes/te.yaml
index 4a93ff8176c..4eb21f5c400 100644
--- a/content/quizzes/te.yaml
+++ b/content/quizzes/te.yaml
@@ -1187,7 +1187,7 @@ levels:
hint: What should happen if the person is right? And what else?
question_score: '10'
9:
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
option: Line 2 and 4
@@ -2022,9 +2022,9 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2100,11 +2100,11 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
hint: You win the game by having the most points
question_score: '10'
8:
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2113,8 +2113,158 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
+ 15:
+ 2:
+ question_score: '10'
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ 5:
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/th.yaml b/content/quizzes/th.yaml
index 6af7f785180..db0b670308f 100644
--- a/content/quizzes/th.yaml
+++ b/content/quizzes/th.yaml
@@ -1188,7 +1188,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2141,16 +2141,15 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
- feedback: No that's not it
8:
- feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2159,6 +2158,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2233,7 +2233,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - feedback: That's not it
+ option: '`{in}`'
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ question_score: '10'
+ hint: There is something wrong in line 5
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/tl.yaml b/content/quizzes/tl.yaml
index 4f564ed02fe..87f01703a3f 100644
--- a/content/quizzes/tl.yaml
+++ b/content/quizzes/tl.yaml
@@ -1063,7 +1063,7 @@ levels:
question_score: '10'
correct_answer: D
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
10:
question_text: Which statement is true?
code: "1 level = {ask} 'What level are you on?'\n2 {if} level {is} 8\n3 {print} 'Great job!'"
@@ -1992,7 +1992,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
question_text: What's wrong with this code?
code: "price = 10\nmoney = {ask} How much money do you have?\nbuy = {ask} 'Would you like to buy this teddy bear?'\n{if} money >= price and buy == 'yes'\n {print} 'You can buy the bear!'\n{else}\n {print} 'You cannot buy this bear!'\n"
correct_answer: B
@@ -2024,9 +2024,9 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- feedback: No it's not, one player has a higher score
correct_answer: B
1:
question_text: Which symbol should be used on the blank?
@@ -2090,7 +2090,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2099,7 +2099,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2118,3 +2118,153 @@ levels:
correct_answer: D
hint: '> 8 means more than 8'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ hint: The last one should say you win.
+ correct_answer: A
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/tn.yaml b/content/quizzes/tn.yaml
index 317986084bb..3e96acef8ab 100644
--- a/content/quizzes/tn.yaml
+++ b/content/quizzes/tn.yaml
@@ -1203,7 +1203,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2112,7 +2112,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
question_score: '10'
question_text: What's wrong with this code?
@@ -2127,9 +2127,9 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
- feedback: There are.
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2157,7 +2157,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
@@ -2237,3 +2237,153 @@ levels:
correct_answer: B
hint: The last one should say you win.
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ correct_answer: C
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ correct_answer: B
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ hint: Look closely at the indentation
+ question_score: '10'
+ correct_answer: D
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ correct_answer: C
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/tr.yaml b/content/quizzes/tr.yaml
index 97ff3310b43..79feaeba3c5 100644
--- a/content/quizzes/tr.yaml
+++ b/content/quizzes/tr.yaml
@@ -2929,7 +2929,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2950,7 +2950,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2959,10 +2959,10 @@ levels:
- feedback: '> means greater than'
option: You must be shorter than 120 cm to go on the roller coaster
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
- feedback: There are.
10:
mp_choice_options:
- option: "'player 1 wins'"
@@ -2972,9 +2972,159 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - feedback: That is not right.
+ option: '`=!`'
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ correct_answer: C
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ correct_answer: B
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ question_text: How should this program be changed to that it works?
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/uk.yaml b/content/quizzes/uk.yaml
index 2ad2f5b1e6a..09d2f592c8f 100644
--- a/content/quizzes/uk.yaml
+++ b/content/quizzes/uk.yaml
@@ -598,7 +598,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2188,13 +2188,13 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2203,8 +2203,8 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
correct_answer: A
- feedback: There are.
hint: '> means greater than'
question_score: '10'
9:
@@ -2233,7 +2233,157 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ correct_answer: C
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/ur.yaml b/content/quizzes/ur.yaml
index e72d2229141..aa2b411420d 100644
--- a/content/quizzes/ur.yaml
+++ b/content/quizzes/ur.yaml
@@ -1120,7 +1120,7 @@ levels:
- option: Line 3 and 5
feedback: Great job!
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music is rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
correct_answer: D
hint: The lines after an `{if}` or `{else}` command should start with 4 spaces.
question_score: '10'
@@ -2129,7 +2129,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
6:
@@ -2163,9 +2163,8 @@ levels:
hint: The last one should say you win.
question_score: '10'
8:
- feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2174,6 +2173,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2188,7 +2188,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
@@ -2237,3 +2237,153 @@ levels:
correct_answer: D
hint: '> 8 means more than 8'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ hint: wetness should get less each time
+ question_score: '10'
+ question_text: What should be placed on the blank to make this program work correctly?
+ correct_answer: C
+ 6:
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - feedback: No that's not right
+ option: Line 3 should start with more indentation
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ question_text: what is wrong with this code?
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - feedback: Perfect!
+ option: '... change the first {if} into a {while}'
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/vi.yaml b/content/quizzes/vi.yaml
index 786724cae3f..fd78b5a3449 100644
--- a/content/quizzes/vi.yaml
+++ b/content/quizzes/vi.yaml
@@ -1339,7 +1339,7 @@ levels:
hint: Something is wrong with indentation
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2029,9 +2029,8 @@ levels:
code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{for} i {in} {range} 1 {to} 10\n {if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
hint: The last one should say you win.
8:
- feedback: There are.
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2040,6 +2039,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2069,7 +2069,7 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
- feedback: No it's not, one player has a higher score
+ feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
@@ -2097,7 +2097,7 @@ levels:
- feedback: No that's not it
option: In line 4 = should have been used instead of ==
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2118,3 +2118,153 @@ levels:
correct_answer: B
hint: '> means greater than'
question_score: '10'
+ 15:
+ 1:
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - option: '`=!`'
+ feedback: That is not right.
+ - feedback: You don't have to keep guessing if you've given the right answer.
+ option: '`==`'
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ feedback: That's not it
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ hint: There is something wrong in line 5
+ question_score: '10'
+ correct_answer: D
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - feedback: Perfect!
+ option: '... change the first {if} into a {while}'
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/zh_Hans.yaml b/content/quizzes/zh_Hans.yaml
index 0163cde301c..5e644eaea20 100644
--- a/content/quizzes/zh_Hans.yaml
+++ b/content/quizzes/zh_Hans.yaml
@@ -2828,7 +2828,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2909,7 +2909,7 @@ levels:
question_score: '10'
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2918,7 +2918,7 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
@@ -2931,9 +2931,159 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
- feedback: No it's not, one player has a higher score
correct_answer: B
hint: You win the game by having the most points
question_score: '10'
+ 15:
+ 1:
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - feedback: That is not right.
+ option: '`=!`'
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ correct_answer: C
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ correct_answer: C
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - feedback: You are correct
+ option: In line 5 != should have been used instead of ==
+ correct_answer: D
+ hint: There is something wrong in line 5
+ question_score: '10'
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/quizzes/zh_Hant.yaml b/content/quizzes/zh_Hant.yaml
index 7f2b90f8cb0..3e84795bf9c 100644
--- a/content/quizzes/zh_Hant.yaml
+++ b/content/quizzes/zh_Hant.yaml
@@ -1158,7 +1158,7 @@ levels:
question_score: '10'
9:
question_text: What line(s) in this code should start with 4 spaces?
- code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '\U0001F918'\n4 {else}\n5 {print} '\U0001F44E'"
+ code: "1 music = {ask} 'What is your favorite music genre?'\n2 {if} music {is} rock\n3 {print} '🤘'\n4 {else}\n5 {print} '👎'"
mp_choice_options:
- option: Line 2 and 4
feedback: The lines after the `{if}` and `{else}` command should start with 4 spaces
@@ -2024,7 +2024,7 @@ levels:
- option: In line 4 = should have been used instead of ==
feedback: No that's not it
- option: In line 4 <= should have been used instead of >=
- feedback: No that's not it
+ feedback: No that's not it
correct_answer: B
hint: The symbols are right
question_score: '10'
@@ -2067,10 +2067,10 @@ levels:
- option: "'player 2 loses'"
feedback: Look at who has the highest score!
- option: "'It is a tie'"
+ feedback: No it's not, one player has a higher score
question_text: What should be filled in in the blanks?
code: "{print} 'Whoever gets the most points wins!'\n{if} points_player_1 < points_player_2\n {print} _\n"
correct_answer: B
- feedback: No it's not, one player has a higher score
hint: You win the game by having the most points
question_score: '10'
5:
@@ -2105,7 +2105,7 @@ levels:
hint: The last one should say you win.
8:
question_text: Which statement is true about this roller coaster?
- code: "length = {ask} 'Please fill in your length in cm'\n{if} length > 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
+ code: "length = {ask} 'Please fill in your length in cm'\n{if} length < 120\n {print} 'Sorry, you cannot go on this roller coaster.'\n{else}\n {print} 'Enjoy the ride'\n"
mp_choice_options:
- option: You must be taller than 120 cm to go on the roller coaster
feedback: True!
@@ -2114,7 +2114,157 @@ levels:
- option: You must be shorter than 120 cm to go on the roller coaster
feedback: '> means greater than'
- option: There are no length restrictions to go on the roller coaster
- feedback: There are.
+ feedback: There are.
correct_answer: A
hint: '> means greater than'
question_score: '10'
+ 15:
+ 1:
+ code: "answer = 0\nwhile answer _ 'Amsterdam'\n answer = ask 'What is the capital city of the Netherlands?'\nprint 'You have given the correct answer'\n"
+ mp_choice_options:
+ - feedback: That is not right.
+ option: '`=!`'
+ - option: '`==`'
+ feedback: You don't have to keep guessing if you've given the right answer.
+ - option: '`!=`'
+ feedback: Correct
+ - option: '`=`'
+ feedback: That's not it
+ correct_answer: C
+ hint: Keep guessing until you say Amsterdam
+ question_score: '10'
+ question_text: 'Which symbol should be used on the blank? Tip: You must keep guessing until you get it right.'
+ 2:
+ question_text: Which of these codes has used the correct symbol(s)?
+ mp_choice_options:
+ - option: "```\n{while} name = Hedy\n```\n"
+ feedback: No
+ - option: "```\n{while} age = 24\n```\n"
+ feedback: No
+ - option: "```\n{while} time > 0\n```\n"
+ feedback: Yes!
+ - option: "```\n{while} answer == yes'\n```\n"
+ feedback: A quotation mark is missing
+ correct_answer: C
+ hint: When you are comparing two answers you should use ==
+ question_score: '10'
+ 3:
+ question_text: Which command should be filled in on the two blanks?
+ code: "_ age >= 18\n print 'you are not allowed in this bar'\n"
+ mp_choice_options:
+ - option: '`{in}`'
+ feedback: That's not it
+ - option: '`{while}`'
+ feedback: You are right
+ - option: '`{for}`'
+ feedback: That's not it
+ - option: '`{range}`'
+ feedback: That's not it
+ correct_answer: B
+ hint: You are not allowed in the bar as long as you are 17 or younger
+ question_score: '10'
+ 4:
+ question_text: What's wrong with this code?
+ code: "options = 1, 2, 3, 4, 5, 6\nprint 'Throw 6 as fast as you can!'\nthrown = 0\ntries = 0\nwhile thrown == 6\n thrown = options at random\n print 'You threw ' thrown\n tries = tries + 1\nprint 'Yes! You have thrown 6 in ' tries ' tries.'\n"
+ mp_choice_options:
+ - option: In line 1 == should be used instead of =
+ feedback: No that's not it
+ - option: Line 2 misses quotation marks
+ feedback: That's not right
+ - option: In line 5 if should have been used instead of while
+ feedback: That's not it
+ - option: In line 5 != should have been used instead of ==
+ feedback: You are correct
+ hint: There is something wrong in line 5
+ question_score: '10'
+ correct_answer: D
+ 5:
+ question_text: What should be placed on the blank to make this program work correctly?
+ code: "wetness = 10\nwhile wetness != 0\n print 'Your hair is still wet, hair dryer on!'\n sleep 1\n clear\n wetness _\n\nprint 'All dry!'\n"
+ mp_choice_options:
+ - option: = wetness
+ feedback: That will not change anything
+ - option: = wetness = 1
+ feedback: You can't have two times = in one line
+ - option: = wetness - 1
+ feedback: You are correct!
+ - option: = wetness + 1
+ feedback: The program should count down
+ correct_answer: C
+ hint: wetness should get less each time
+ question_score: '10'
+ 6:
+ question_text: what is wrong with this code?
+ code: "lives = 100\n {while} lives != 0\n answer = {ask} 'Are you annoyed yet?'\n{if} answer == 'yes'\n lives = lives - 1\n"
+ mp_choice_options:
+ - option: while should be if
+ feedback: No that is not right
+ - option: if should be while
+ feedback: No that is not right
+ - option: Line 3 should start with more indentation
+ feedback: No that's not right
+ - option: Line 2 should start with less indentation
+ feedback: That is correct
+ correct_answer: D
+ hint: Look closely at the indentation
+ question_score: '10'
+ 7:
+ question_text: How should this program be changed to that it works?
+ code: "{print} 'Guess which number'\nnumbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10\nnumber = numbers {at} {random}\ngame = 'on'\n{if} game == 'on'\n guess = {ask} 'Which number do you think it is?'\n {if} guess < number\n {print} _\n {if} guess > number\n {print} _\n {if} guess == number\n {print} _\n game = 'over'\n"
+ mp_choice_options:
+ - option: '... change the first {if} into a {while}'
+ feedback: Perfect!
+ - option: '... change the second {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the third {if} into a {while}'
+ feedback: That's not quite right.
+ - option: '... change the fourth {if} into a {while}'
+ feedback: That's not quite right.
+ correct_answer: A
+ hint: The last one should say you win.
+ question_score: '10'
+ 8:
+ question_text: Which statement is true about this automated toilet system?
+ code: "while toilet == 'occupied'\n lights = 'on'\n air_freshener_sprays = 'yes'\n sleep 60\nelse\n lights = 'off'\n"
+ mp_choice_options:
+ - option: The lights and air freshener will turn off after 1 minute
+ feedback: False!
+ - option: The air freshener sprays once every minute and the lights stay on the whole time while you are on the toilet
+ feedback: Great job
+ - option: The air freshener sprays once you leave the toilet.
+ feedback: It only sprays when you're in there.
+ - option: The lights will always stay on.
+ feedback: That wouldn't be right.
+ correct_answer: B
+ hint: The block after the while command keeps happening while the toilet is occupied.
+ question_score: '10'
+ 9:
+ question_text: What will the diet app say if you have eaten 1600 calories today?
+ code: "chocolate = {ask} 'How many calories have you eaten today?'\n {while} calories <= 1000\n {print} 'You could eat some more'\n {while} calories > 1000 and calories =< 2000\n {print} 'That is alright'\n {while} calories > 2000\n {print} 'You have had enough for today'\n"
+ mp_choice_options:
+ - option: Nothing. 1600 is not programmed into the app.
+ feedback: No
+ - option: you could eat some more
+ feedback: No
+ - option: That is alright
+ feedback: Yes!
+ - option: You have eaten enough for today
+ feedback: No
+ correct_answer: C
+ hint: 1600 is between 1000 and 2000
+ question_score: '10'
+ 10:
+ question_text: 'What should be filled in in the blanks? Tip: the player with the most points is in the lead.'
+ code: "name_player_1 = {ask} 'Name player 1:'\nname_player_2 = {ask} 'Name player 2:'\n{while} points_player_1 > points_player_2\n {print} _ ' is in the lead right now!'\n"
+ mp_choice_options:
+ - option: name_player_1
+ feedback: You are right!
+ - option: name_player_2
+ feedback: No they are losing!
+ - option: points_player_1
+ feedback: You should fill in a name, not a number
+ - option: points_player_2
+ feedback: You should fill in a name, not a number
+ correct_answer: A
+ hint: You win the game by having the most points. Your name should appear on the screen
+ question_score: '10'
diff --git a/content/slides/ar.yaml b/content/slides/ar.yaml
index c6479cde7bb..cc4bb66e9aa 100644
--- a/content/slides/ar.yaml
+++ b/content/slides/ar.yaml
@@ -130,6 +130,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
10:
4:
text: "Enjoy the adventures in level 10!\n"
diff --git a/content/slides/bg.yaml b/content/slides/bg.yaml
index e9892077901..ad1640886ef 100644
--- a/content/slides/bg.yaml
+++ b/content/slides/bg.yaml
@@ -359,6 +359,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
16:
2:
editor: "\n"
diff --git a/content/slides/bn.yaml b/content/slides/bn.yaml
index 6744940de9b..6d76a7413e5 100644
--- a/content/slides/bn.yaml
+++ b/content/slides/bn.yaml
@@ -130,6 +130,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
6:
5:
text: "You can use the slash for division.\n"
diff --git a/content/slides/ca.yaml b/content/slides/ca.yaml
index d6abeda37fb..56cd9a33788 100644
--- a/content/slides/ca.yaml
+++ b/content/slides/ca.yaml
@@ -389,6 +389,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
10:
1:
header: Welcome to level 10
diff --git a/content/slides/cs.yaml b/content/slides/cs.yaml
index d94be4059a3..4464221c057 100644
--- a/content/slides/cs.yaml
+++ b/content/slides/cs.yaml
@@ -72,6 +72,7 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
6:
text: "You do not want variable names to be printed on the screen.\nThis is why variables should be left out of the quotation marks, like this:\n"
header: Quotation marks and variables
@@ -103,6 +104,9 @@ levels:
header: Quotation marks and contractions
text: "Be careful! Now that you are using quotation marks, you can't use apostrophes in contractions.\n\nPlease try to print a contraction like \"you're\" or \"I'm\" in the screen below and see what happens....\n"
editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
6:
9:
header: Let's get to work!
diff --git a/content/slides/cy.yaml b/content/slides/cy.yaml
index ca59f09e237..8284902b296 100644
--- a/content/slides/cy.yaml
+++ b/content/slides/cy.yaml
@@ -389,6 +389,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
12:
1:
header: Welcome to level 12
diff --git a/content/slides/da.yaml b/content/slides/da.yaml
index 9029c63db73..4d31547fde8 100644
--- a/content/slides/da.yaml
+++ b/content/slides/da.yaml
@@ -215,6 +215,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
14:
2:
editor: "\n"
diff --git a/content/slides/de.yaml b/content/slides/de.yaml
index 6d5c45aac9c..8cf75b5e9f6 100644
--- a/content/slides/de.yaml
+++ b/content/slides/de.yaml
@@ -378,6 +378,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
15:
1:
header: Welcome to level 15
diff --git a/content/slides/el.yaml b/content/slides/el.yaml
index 9dad789cf8c..242bdc988d2 100644
--- a/content/slides/el.yaml
+++ b/content/slides/el.yaml
@@ -199,6 +199,7 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
1:
header: Welcome to level 4
text: "In this level you will learn how to use quotation marks.\n"
@@ -230,6 +231,9 @@ levels:
header: Quotation marks and contractions
text: "Be careful! Now that you are using quotation marks, you can't use apostrophes in contractions.\n\nPlease try to print a contraction like \"you're\" or \"I'm\" in the screen below and see what happens....\n"
editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
6:
8:
header: Calculations with variables
diff --git a/content/slides/en.yaml b/content/slides/en.yaml
index 19258ef1edb..82306b22fb6 100644
--- a/content/slides/en.yaml
+++ b/content/slides/en.yaml
@@ -278,6 +278,16 @@ levels:
editor: |
9:
+ header: "Clear"
+ text: |
+ In this level you'll also learn the {clear} command.
+ With this command you can wipe all the text from your output screen.
+
+ Be careful that you always use a sleep command too. If you don't the computer will wipe all the text before you can read it!
+
+ editor: |
+
+ 10:
header: "Ready, Set, Go!"
text: |
Enjoy the adventures in level 4!
diff --git a/content/slides/eo.yaml b/content/slides/eo.yaml
index 27052f28ec4..8931a1d62d7 100644
--- a/content/slides/eo.yaml
+++ b/content/slides/eo.yaml
@@ -370,6 +370,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
12:
1:
header: Welcome to level 12
diff --git a/content/slides/es.yaml b/content/slides/es.yaml
index 986f1e7cd7e..fcf7bb18c42 100644
--- a/content/slides/es.yaml
+++ b/content/slides/es.yaml
@@ -23,406 +23,410 @@ levels:
text: "Iniciamos el código con el botón Ejecutar código debajo del código.\n.\n"
8:
header: Programar en Hedy
- text: "La salida aparece en el lado izquierdo.\n\n"
+ text: "El resultado aparece en el lado derecho.\n\n"
9:
header: Programar en Hedy
text: "La salida también puede ser un dibujo.\n\n"
1:
7:
header: ¡Programando!
- text: "Los botones de flecha amarillos se pueden utilizar para copiar ejemplos.\n\n"
+ text: "Las aventuras se muestran en pestañas.\n"
editor: "\n"
1:
header: ¡Bienvenido al nivel 1!
text: "¡Empezaremos el nivel 1 creando historias en Hedy!\n\nNecesitamos tres códigos de texto para crear historias interactivas.\n"
2:
- header: 'Hedy nivel 1: {print}'
+ header: '{print}'
text: "El primer código que puede utilizar en el nivel 1 es `{print}`.\n\n`{print}` se utiliza para mostrar texto en la pantalla.\n"
- editor: "\n"
+ editor: "\n"
3:
- header: 'Hedy nivel 1: {ask}'
- text: "El segundo código que puede utilizar en el nivel 1 es `{ask}`.\n\n`{ask}` se utiliza para hacer una pregunta que puede ser respondida.\n"
- editor: "\n"
+ header: 'El comando {print}'
+ text: "Puedes cambiar el texto después del comando imprimir al que tu quieras.\n\nO puedes imprimir varias líneas añadiendo otra línea de código que también empiece con `{print}`.\n"
+ editor: "\n"
4:
- header: 'Hedy nivel 1: {echo}'
- text: "El código de texto final que puede usar en el nivel 1 es `{echo}`.\n\n`{echo}` se usa para repetir la respuesta de una `{ask}`.\n"
- editor: "\n"
+ header: '{ask} '
+ text: "El segundo código que puedes usar en el nivel 1 es `{ask}`.\n\n`{ask}` se usa para hacer una pregunta que se puede responder.\n"
+ editor: "\n"
5:
- header: ¡Programando!
- text: "con `{print}`, `{ask}` y `{echo}` ya puedes crear una pequeña historia.\nEs un buen momento para probar las aventuras Loro, Cuento y Piedra, papel o tijera.\n"
+ header: '{echo}'
+ text: "Como puedes ver en el ejemplo anterior. Si usas el comando `{ask}`, puedes hacer una pregunta.\n\nEn cambio, la respuesta no se muestra en la pantalla de salida.\n\nSi quieres que la respuesta se muestre, puedes usar el último comando de este nivel: `{echo}`.\n\n`{echo}` se usa para repetir la respuesta de una `{ask}`.\n"
editor: "\n"
6:
header: ¡Programando!
- text: "Las aventuras se muestran en pestañas.\n"
+ text: "Con `{print}`, `{ask}` y `{echo}` ya puedes crear una pequeña historia.\nEste es un buen momento para probar las aventuras Loro, Cuento y Piedra, papel o tijera.\n"
8:
- header: Dibujar con la tortuga
- text: "Ahora que ya hemos visto los códigos de texto, veremos a continuación los códigos de dibujo.\n"
+ header: ¡Programación!
+ text: "Los botones de flecha amarillos se pueden utilizar para copiar ejemplos.\n\n"
9:
+ header: 'Dibuja con la tortuga'
+ text: "Ahora que ya hemos visto los códigos de texto, veremos a continuación los códigos de dibujo.\n"
+ 10:
header: 'Dibujando con la tortuga: {forward}'
text: "`{forward}` se utiliza para mover la tortuga hacia adelante.\n"
- 10:
- header: 'Dibujando con la tortuga: {turn}'
- text: "`{turn}` se utiliza para hacer que la tortuga gire a la izquierda o a la derecha.\n"
editor: "\n"
11:
- header: 'Drawing with the turtle: {turn}'
- text: "`{turn}` is used to make the turtle turn left or right.\n"
+ header: 'Dibuja con la tortuga: {turn}'
+ text: "`{turn}` se utiliza para hacer que la tortuga gire a la izquierda o a la derecha.\n"
editor: "\n"
7:
5:
- header: Ready Set Go!
- text: "Enjoy the adventures in level 7!\n"
+ header: ¡Preparado Listo Ya!
+ text: "¡Disfruta las aventuras en el nivel 7!\n"
1:
- text: "In this level you will learn how to repeat a line of code as many times a you'd like.\n"
- header: Welcome to level 7
+ text: "En este nivel aprenderás a cómo repetir una línea de código tantas veces como quieras.\n"
+ header: Bienvenido al nivel 7
2:
- header: repeat 3 times
- text: "If you want to repeat a line of code, you can use the `{repeat}` 3 `{times}` code.\nIf you want to repeat the line more times, simply change the number.\n\nFor example: If you are programming a story where your character shouts for help for 5 times, it could look like this:\n"
+ header: repetir 3 veces
+ text: "Si quieres repetir una línea de código, puedes usar el código `{repeat}` 3 `{times}`.\nSi quieres repetir la línea más veces, simplemente cambia el número.\n\nPor ejemplo: Si estás programando una historia donde tu personaje pide ayuda 5 veces, podría ser así:\n"
editor: "\n"
3:
- header: Don't forget the print command
- text: "When using the repeat command, do not forget the `{print}` command.\n"
+ header: No te olvides el comando imprimir
+ text: "Al usar el comando repetir, no te olvides el comando `{print}`.\n"
editor: "\n"
4:
- header: Repeat an ask command
- text: "You can also repeat an `{ask}`, `{if}` or `{else}` command multiple times.\n"
+ header: Repetir un comando preguntar
+ text: "También puedes repetir un comando `{ask}`, `{if}` or `{else}` varias veces.\n"
editor: "\n"
2:
1:
- text: "In this level you will learn to use variables.\n\nA variable is a word that can be used to store informatie.\n\nFor example: a name, age or favorite sports team.\n"
- header: Welcome to level 2
+ text: "En este nivel aprenderás a usar las variables.\n\nUna variable es una palabra que se usa para almacenar información.\n\nPor ejemplo: un nombre, edad o equipo de deportes favorito.\n"
+ header: Bienvenido al nivel 2
3:
- header: Interactive
- text: "We can also set a variable by asking questions.\n\nThe answer to the question is stored in the variable.\n\nThis way we don't need the `{echo}` command.\n"
+ header: Interactivo
+ text: "También podemos establecer una variable haciendo preguntas.\n\nLa respuesta a esta pregunta se guarda en la variable.\n\nDe esta manera no hace falta el comando `{echo}`.\n"
editor: "\n"
6:
- header: Sleep 5
- text: "You can add a number after the `{sleep}` command if you want the pause to be longer.\n\nIf you want, you could even use a variable instead of a number to decide the duration of the sleep command.\n"
+ header: Dormir 5
+ text: "Puedes añadir un número tras el comando `{sleep}` si quieres que la pausa sea más larga.\n\nSi quieres, incluso podrías usar una variable en vez de un número para decidir la duración del comando dormir.\n"
editor: "\n"
7:
- text: "Enjoy the adventures in level 3!\n"
- header: Let the programming fun begin!
+ text: "¡Disfruta las aventuras en el nivel 3!\n"
+ header: ¡Que empiece la diversión de programar!
2:
header: Variables
- text: "To make or 'set' a variable we use the `{is}` command\n"
+ text: "Para crear o 'establecer' una variable usamos el comando `{is}`\n"
editor: "\n"
4:
- header: Multiple variables
- text: "Now that we use variables, we can use multiple variables instead of just one `{echo}`command.\n"
+ header: Multiples variables
+ text: "Ahora que usamos variables, podemos usar varias variables en vez de sólo un comando `{echo}`.\n"
editor: "\n"
5:
- header: Sleep
- text: "You can also use the `{sleep}` command to pause the code for a while.\n"
+ header: Dormir
+ text: "También puedes usar el comando `{sleep}` para pausar el código durante un rato.\n"
editor: "\n"
6:
1:
- text: "In this level we are adding maths to our codes.\n"
- header: Welcome to level 6
+ text: "En este nivel añadimos las matemáticas a nuestros códigos.\n"
+ header: Bienvenido al nivel 6
2:
- header: Addition
- text: "If you want to calculate an addition, simply use the plus sign.\n"
+ header: Suma
+ text: "Si quieres calcular una suma, simplemente usa el signo más.\n"
editor: "\n"
5:
- text: "You can use the slash for division.\n"
+ text: "Puedes usar la barra para dividir.\n"
editor: "\n"
- header: Division
+ header: División
6:
- header: Summary
- text: "In summary, you can use +, -, * and / to do maths.\n"
+ header: Resumen
+ text: "En resumen, puedes usar +, -, * y / para hacer cálculos.\n"
editor: "\n"
7:
- header: The = symbol
- text: "From now on you can also use the = symbol instead of the `{is}` command.\nThis goes for both numbers and words, and it also goes after the `{if}` or `{else}` commands.\n"
+ header: El símbolo =
+ text: "Desde ahora puedes usar también el símbolo = en vez del comando `{is}`.\nEsto ocurre tanto para números y palabras, y también ocurre tras los comandos `{if}` o `{else}`.\n"
editor: "\n"
3:
- header: Subtraction
- text: "If you want to subtract, you can use the minus sign.\n"
+ header: Resta
+ text: "Si quieres restar, puedes usar el signo menos.\n"
editor: "\n"
4:
- header: Multiplication
- text: "If you want to do multiplications, you can use the asterisk.\n"
+ header: Multiplicación
+ text: "Si quieres hacer multiplicaciones, puedes usar el asterisco.\n"
editor: "\n"
8:
- header: Calculations with variables
- text: "You can use calculations with numbers, but you can also use variables to do calculations, like this:\n"
+ header: Cálculos con variables
+ text: "Puedes usar cálculos con números, pero también puedes usar variables para hacer cálculos, tal que así:\n"
editor: "\n"
9:
- header: Let's get to work!
- text: "Enjoy the adventures in level 6!\n"
+ header: ¡Manos a la obra!
+ text: "¡Disfruta las aventuras en el nivel 6!\n"
4:
6:
editor: "\n"
- header: Quotation marks and variables
- text: "You do not want variable names to be printed on the screen.\nThis is why variables should be left out of the quotation marks, like this:\n"
+ header: Comillas y variables
+ text: "No quieres que se impriman nombres de variables en la pantalla.\nEsto es por lo que las variables deben dejarse fuera de las comillas, tal que así:\n"
7:
- header: Quotation marks and variables
- text: "When variable names are used in the middle of a sentence, you have to leave the variables out of the quotation marks.\nThe rest of the sentence however, does need quotation marks. That looks like this:\n"
+ header: Comillas y variables
+ text: "Cuando los nombres de variables se usan en medio de una frase, tienes que dejar las variables fuera de las comillas.\nEl resto de la frase en cambio, necesita comillas. Que se parece a esto:\n"
editor: "\n"
1:
- header: Welcome to level 4
- text: "In this level you will learn how to use quotation marks.\n"
+ header: Bienvenido al nivel 4
+ text: "En este nivel aprenderás a cómo usar las comillas.\n"
editor: "\n"
2:
- header: Problem
- text: "In the previous levels, you might have come across this problem:\n"
+ header: Problema
+ text: "En los niveles anteriores, quizá te hayas encontrado este problema:\n"
editor: "\n"
3:
- header: Fixing it with quotation marks
- text: "In this level we will fix this problem by using quotation marks.\n\nThis also makes our code look more like 'real' Python code.\n"
+ header: Arreglarlo con comillas
+ text: "En este nivel arreglaremos este problema usando las comillas.\n\nEsto tambiém hace que nuestro código se parezca más a un código 'real' de Python.\n"
4:
- header: Quotation marks with print
- text: "Each time you use the `{print}` command you need to put the text that you want to appear on the screen in quotation marks.\n"
+ header: Comillas con imprimir
+ text: "Cada vez que uses el comando `{print}` necesitas poner el texto que quieras con comillas para que aparezca en la pantalla.\n"
editor: "\n"
5:
- header: Quotation marks with ask
- text: "This also goes for the `{ask}` command.\n"
+ header: Comillas con preguntar
+ text: "Esto también ocurre para el comando `{ask}`.\n"
editor: "\n"
8:
- header: Quotation marks and contractions
- text: "Be careful! Now that you are using quotation marks, you can't use apostrophes in contractions.\n\nPlease try to print a contraction like \"you're\" or \"I'm\" in the screen below and see what happens....\n"
+ header: Comillas y contracciones
+ text: "¡Cuidado! Ahora que estás usando comillas, no puedes usar apóstrofes en las abreviaturas.\n\nPor favor intenta imprimir una contracción como \"you're\" o \"I'm\" en la pantalla de abajo y verás que sucede....\n"
editor: "\n"
9:
- header: Ready, Set, Go!
- text: "Enjoy the adventures in level 4!\n"
+ header: Limpiar
+ text: "En este nivel también aprenderás el comando {clear}.\nCon este comando puedes limpiar todo el texto de tu pantalla de salida.\n\nTen cuidado si siempre también usas un comando dormir. Si no lo haces el ordenador ¡limpiará todo el texto antes de que lo puedas leer!\n"
+ editor: "\n"
+ 10:
+ header: ¡Preparados, Listos, Ya!
+ text: "¡Disfruta las aventuras en el nivel 4!\n"
15:
2:
editor: "\n"
header: '{while}'
- text: "We are going to learn a new loop, the while loop! The loop continues as long as the statement is true. So don't forget to change the value in the loop.\n\nIn the example code, we continue until a correct answer has been given. If the correct answer is never given, the loop will never end!\n"
+ text: "Vamos a aprender un nuevo bucle, ¡el bucle mientras! El bucle continua tanto que la sentencia sea verdadera. Así que no te olvides de cambiar el valor en el bucle.\n\nEn el código de ejemplo, continuamos hasta que se da una respuesta correcta. Si nunca se da la respuesta correcta, ¡el bucle nunca acabará!\n"
3:
- header: Let's try it out!
- text: "Enjoy the adventures in level 15!\n"
+ header: ¡Vamos a probarlo!
+ text: "¡Disfruta las aventuras en el nivel 15!\n"
1:
- header: Welcome to level 15
- text: "In this level you will learn about the `{while}` loop.\n"
+ header: Bienvenido al nivel 15
+ text: "En este nivel aprenderás sobre el bucle `{while}`.\n"
16:
1:
- header: Welcome to level 16
- text: "In this level you will learn about the [square brackets] and how to use them.\n"
+ header: Bienvenido al nivel 16
+ text: "En este nivel aprenderás sobre los [corchetes] y cómo se usan.\n"
2:
- header: Square brackets
- text: "We are going to make lists the Python way, with square brackets around the lists! We also keep the quotation marks around each item like we have learned in previous levels. We use square brackets to point out a place in a list. The at random command can not be used anymore.\n"
+ header: Corchetes
+ text: "Vamos a hacer listas a la manera de Python, ¡con corchetes alrededor de las listas! También mantendremos las comillas alrededor de cada objeto como hemos aprendido en los niveles anteriores. Usamos corchetes para apuntar a un lugar en una lista. El comando en aleatorio ya no se puede usar nunca más.\n"
editor: "\n"
3:
- header: Let's try it out!
- text: "Enjoy the adventures in level 16!\n"
+ header: ¡Vamos a probarlo!
+ text: "¡Disfruta las aventuras en el nivel 16!\n"
3:
1:
- header: Welcome to level 3
- text: "In this level you'll learn how to make a list, add and remove items form your lists and pick a random item off that list.\n"
+ header: Bienvenido al nivel 3
+ text: "En este nivel aprenderás como hacer un lista, añadir y eliminar objetos de tus listas y elegir un objeto al azar de esa lista.\n"
2:
- header: Making a list
- text: "You make a list with `{is}`.\n\nSeperate the items on your list with a comma.\n"
+ header: Hacer una lista
+ text: "Creas una lista con `{is}`.\n\nSepara tus objetos en tu lista con una coma.\n"
editor: "\n"
3:
- header: At random
- text: "You can use the list with the `{at}` `{random}` command.\nThe computer will randomly pick one item of the list.\nEvery time you run this code the output will differ.\n"
+ header: En aleatorio
+ text: "Puedes usar la lista con el comando `{at}` `{random}`.\nEl ordenador elegirá al azar un objeto de la lista.\nCada vez que ejecutes este código el resultado será diferente.\n"
editor: "\n"
4:
- header: At random in a sentence
- text: "You can use the `{at}` `{random}` command in a sentence as well.\n"
+ header: En aleatorio en una frase
+ text: "También puedes usar el comando `{at}` `{random}` en una frase.\n"
editor: "\n"
5:
- header: Add to
- text: "You can add items to a list with the `{add}` `{to}` command.\n\nYou can choose what to add to the list or you can use the `{add}` `{to}` command in combination with the `{ask}` command.\nThis way you can let the player decide what to add to the list.\n"
+ header: Añadir a
+ text: "Puedes añadir objetos a una lista con el comando `{add}` `{to}`.\n\nPuedes elegir qué añadir a la lista o puedes usar el comando `{add}` `{to}` en combinación con el comando `{ask}`.\nDe esta manera puedes dejar que el jugador elija qué añadir a la lista.\n"
editor: "\n"
6:
- header: Remove from
- text: "The opposite of the `{add}` `{to}` command is the `{remove}` `{from}` command.\nThis command removes an item from a list.\n"
+ header: Eliminar de
+ text: "Lo contrario del comando `{add}` `{to}` es el comando `{remove}` `{from}`.\nEste comando elimina un objeto de una lista.\n"
editor: "\n"
9:
- header: Let's get to work!
- text: "Enjoy the adventures in level 3!\n"
+ header: ¡Manos a la obra!
+ text: "¡Disfruta las aventuras en el nivel 3!\n"
8:
4:
editor: "\n"
- text: "If you want to, you can continue after the `{repeat}` command without indentation.\nThe lines that do not start with indentation will not be repeated.\n"
- header: '{repeat} commands now'
+ text: "Si quieres, puedes continur tras el comando `{repeat}` sin sangría.\nLas líneas que no empiecen con sangría no se repetirán.\n"
+ header: 'comandos {repeat} ahora'
5:
- header: if and else before
- text: "The same goes for the `{if}` and `{else}` commands.\nThese were the commands before:\n"
+ header: antes si y sino
+ text: "Lo mismo ocurre para los comandos `{if}` y `{else}`.\nAntes estos eran los comandos:\n"
editor: "\n"
6:
- text: "These are the `{if}` and `{else}` commands now.\nEach line after the `{if}` and `{else}` commands start with indentation.\n"
+ text: "Ahora estos son los comandos `{if}` y `{else}`.\nCada línea tras los comandos `{if}` y `{else}` empieza con sangría.\n"
editor:
- header: if and else now
+ header: ahora si y sino
7:
- header: stopping the indentation
- text: "Just like with the `{repeat}` command, you can stop using indentation and the lines will always be shown. Not just if the statement is true.\n"
+ header: detener la sangría
+ text: "Al igual que con el comando `{repeat}`, puedes dejar de usar sangría y las líneas siempre se mostrarán. No sólo si la sentencia es verdadera.\n"
editor: "\n"
8:
- header: if statements inside if statements
- text: "You might have thought of trying to put an if command inside a repeat command, or inside another if command.\nFor now, this is not possible yet. In the higher levels, it will be allowed, but for now let's focus on practising the `{if}` `{else}` and `{repeat}` commands with proper indentation first.\n"
+ header: sentencias si dentro de sentencias si
+ text: "Quizás hayas pensado en intentar poner un comando si dentro de un comando repetir, o dentro de otro comando si.\nPor ahora, esto todavía no es posible. En niveles superiores, esto se permitirá, pero por ahora centrémosnos primero en practicar los comandos `{if}` `{else}` y `{repeat}` con la sangría adecuada.\n"
3:
- text: "In this level you can repeat multiple lines of code. To do this you must tell the computer which lines belong together and should be repeated.\nYou do this by using indentation.\n\nUse 4 spaces (or one tab) at the beginning of each line that you want to repeat, like this:\n"
+ text: "En este nivel puedes repetir carias líneas de código. Para hacerlo debes decirle al ordenador que líneas van juntas y deberían repetirse.\nEsto lo haces usando la sangría.\n\nUsa 4 espacios (o una tabulación) al principio de cada línea que quieras repetir, tal que así:\n"
editor: "\n"
- header: '{repeat} commands now'
+ header: 'comandos {repeat} ahora'
1:
- header: Welcome to level 8
- text: "In this level you will learn to use indentation to make the `{repeat}`, `{if}` and `{else}` commands work for multiple lines of code.\n"
+ header: Bienvenido al nivel 8
+ text: "En este nivel aprenderás a usar la sangría para hacer funcionar los comandos `{repeat}`, `{if}` and `{else}` para varias líneas de código.\n"
2:
- header: '{repeat} commands before'
- text: "In the previous levels, the `{repeat}` command looked like this:\n\nYou could only repeat one line of code.\n"
+ header: 'comandos {repeat} antes'
+ text: "En los niveles anteriores, el comando `{repeat}` se parecía a esto:\n\nSólo podías repetir una línea de código.\n"
editor: "\n"
9:
- header: Let's check out the adventures!
- text: "Enjoy the adventures in level 8!\n"
+ header: ¡Vamos a ver las aventuras!
+ text: "¡Disfruta las aventuras en el nivel 8!\n"
17:
2:
- text: "Now we are going to change indentation a little bit. Every time that we need an indentation, we need : at the line before the indentation.\n"
+ text: "Ahora vamos a cambiar la sangría un poco. Cada vez que necesitemos una sangría, necesitamos : en la línea de antes de la sangría.\n"
editor: "\n"
- header: Colon
+ header: Dos puntos
3:
- header: Elif
- text: "In this level you can also use a new command: elif. elif is short for else if and you need it when you want to make 3 (or more!) options. Check it out!\n"
+ header: Sino
+ text: "En este nivel también puedes usar un nuevo comando: sino. sino es la abreviatura para si no si y lo necesitas cuando quieras hacer 3 ('o más!) opciones. ¡Compruébalo!\n"
editor: "\n"
1:
- header: Welcome to level 17
- text: "in this level you will learn how to use a colon and you will learn the elif command.\n"
+ header: Bienvenido al nivel 17
+ text: "en este nivel aprenderás a como usar los dos puntos y aprenderás el comando sino.\n"
4:
- header: Let's try it out!
- text: "Enjoy the adventures in level 17!\n"
+ header: ¡Vamos a probarlo!
+ text: "¡Disfruta las aventuras en el nivel 17!\n"
14:
1:
- header: Welcome to level 14
- text: "In this level you'll learn some new symbols that can help you improve your programs, like >.\n"
+ header: Bienvenido al nivel 14
+ text: "En este nivel aprenderás algunos símbolos nuevos que pueden ayudarte a mejorar tus programas, como >.\n"
2:
- header: Symbols
- text: "These are the new symbols you can use:\n\n The > means bigger than...\n\n The >= means bigger than or the same as...\n\n The < means smaller than...\n\n The <= means smaller than or the same as...\n\nYou can use them like this:\n"
+ header: Símbolos
+ text: "Estos son los nuevos símbolos que puedes usar:\n\n El > significa mayor que...\n\n El >= significa mayor o igual que...\n\n El < significa menor que...\n\n El <= significa menor o igual que...\n\nPuedes usarlos así:\n"
editor: "\n"
3:
- header: Symbols
- text: "You can also use:\n\n== is the same as.\n\n!= is not\n\n== is used in `{if}` statements.\n"
+ header: Símbolos
+ text: "También puedes usar:\n\n== is igual que.\n\n!= no es\n\n== se usa en sentencias `{if}`.\n"
editor: "\n"
4:
- header: Let's get to work!
- text: "Enjoy the adventures in level 14!\n"
+ header: ¡Manos a la obra!
+ text: "¡Disfruta las aventuras en el nivel 14!\n"
9:
7:
editor: "\n"
- header: Mind the indentation
- text: "Mind that the fourth and sixth line of this code starts with 8 spaces of indentation.\n"
+ header: Cuidado con la sangría
+ text: "Cuidado que la cuarta y sexta línea de este código empieza con 8 espacios de sangría.\n"
8:
- header: Let's go!
- text: "Enjoy the adventures in level 9!\n"
+ header: ¡Vamos!
+ text: "¡Disfruta las aventuras en el nivel 9!\n"
1:
- header: Welcome to level 9
- text: "In this level you can use multiple lines of code after an `{if}` or after a `{repeat}` command.\n\nYou can even put a `{repeat}` command within another `{repeat}` command.\n"
+ header: Bienvenido al nivel 9
+ text: "En este nivel puedes usar varias líneas de código tras un comando `{if}` o tras un `{repeat}`.\n\nIncluso puedes poner un comando `{repeat}` dentro de otro comando `{repeat}`.\n"
2:
- header: Multiple lines after `{repeat}`
- text: "You are allowed to use multiple lines after `{repeat}`.\n"
+ header: Varias líneas después de `{repeat}`
+ text: "Tienes permitido usar varias líneas después de `{repeat}`.\n"
editor: "\n"
3:
- header: Indentation matters!
- text: "Indentation is very important to tell the computer which lines should be repeated and which lines should only be ran once.\n"
+ header: ¡La sangría importa!
+ text: "La sangría es muy importante para decirle al ordenador qué líneas deberían repetirse y qué líneas deberían ejecutarse una vez.\n"
editor: "\n"
4:
- header: Multipe lines after `{if}`
- text: "You can also use multiple lines after `{if}`\n"
+ header: Varias líneas después de `{if}`
+ text: "Puedes usar varias líneas después de `{if}`\n"
editor: "\n"
5:
- header: Indentation matters
- text: "Again, indentation is still very important and can make a big difference in the code.\n"
+ header: La sangría importa
+ text: "De nuevo, la sangría es todavía muy importante y puede hacer una gran diferencia en el código.\n"
editor: "\n"
6:
- header: An `{if}` inside a `{repeat}`
- text: "Now that you can use multiple lines of code after these command, you can also put them within each other.\nCheck it out:\n"
+ header: Un `{if}` dentro de un `{repeat}`
+ text: "Ahora que puedes usar varias líneas de código tras estos comandos, también puedes ponerlos dentro de otros.\nCompruébalo:\n"
editor: "\n"
10:
1:
- header: Welcome to level 10
- text: "In this level you will learn a new command: `{for}`.\n"
+ header: Bienvenido al nivel 10
+ text: "En este nivel aprenderás un nuevo comando: `{for}`.\n"
2:
- header: The for command
- text: "With for you can make a list and use all items on that list. `{for}` creates a block, like repeat and if so all lines in the block need to start with indentation (4 spaces).\n"
+ header: El comando para
+ text: "Con para puedes hacer una lista y usar todos los objectos de esa lista. `{for}` crea un bloque, como repetir y si así que todas las líneas del bloque tienen que empezar con sangría (4 espacios).\n"
editor: "\n"
3:
- header: The for command
- text: "Here you see another example of the `{for}` command:\n"
+ header: El comando para
+ text: "Aquí puedes ver otro ejemplo del comando `{for}`:\n"
editor: "\n"
4:
- header: Time to program!
- text: "Enjoy the adventures in level 10!\n"
+ header: ¡Hora de programar!
+ text: "¡Disfruta las aventuras en el nivel 10!\n"
5:
1:
- header: Welcome to level 5
- text: "In this level you will learn to use 3 new commands: `{if}`, `{else}` and `{in}`.\n"
+ header: Bienvenido al nivel 5
+ text: "En este nivel aprenderás a usar 3 comandos nuevos: `{if}`, `{else}` y `{in}`.\n"
2:
- header: if
- text: "The `{if}` command allows you to choose between two options.\nIn this example the computer will print 'nice' if the given answer is Hedy.\nIf the answer is not Hedy, the computer will do nothing.\n"
+ header: si
+ text: "El comando `{if}` permite elegir entre dos opciones.\nEn este ejemplo el ordenador imprimirá 'bien' si la respuesta dad es Hedy.\nSi la respuesta no es Hedy, el ordenador no hará nada.\n"
editor: "\n"
3:
- header: Don't forget to print
- text: "When using the `{if}` command, don't forget to use the `{print}` command.\n"
+ header: No te olvides imprimir
+ text: "Al usar el comando `{if}`, no te olvides de usar el comando `{print}`.\n"
editor: "\n"
4:
- header: else
- text: "When using an `{if}` command, you can also add an `{else}` command.\nIf the answer is Hedy, the computer will print 'nice'.\nBut if the answer is something else the computer will print 'boo'\n"
+ header: sino
+ text: "Al usar el comando `{if}`, también puedes añadir el comando `{else}`.\nSi la respuesta es Hedy, el ordenador imprimirá 'bien'.\nPero si la respuesta es otra cosa el ordenador imprimirá 'boo'\n"
editor: "\n"
5:
- header: Long lines
- text: "You might have noticed that your lines can get very long when you have both an `{if}` and an `{else}` command.\n\nYou can choose to seperate commands and put them on 2 lines, like this:\n"
+ header: Líneas largas
+ text: "Quizás te hayas dado cuenta que tus líneas pueden hacerse muy largas cuando tienes ambos comandos `{if}` y `{else}`.\n\nPuedes elegir separar los comandos y ponerlos en 2 líneas, tal que así:\n"
editor: "\n"
6:
- header: Another new command
- text: "If you have practised with the `{if}` and `{else}` commands, you can also try the `{in}` command.\n\nWith `{in}` you can let the computer check if an item is in a list, for example:\n\nPlease note that Hedy is case sensitive. This means that if you answer \"Green\" instead of \"green\", Hedy will print \"meh\".\n"
+ header: Otro comando nuevo
+ text: "Si has practicado con los comandos `{if}` y `{else}`, también puedes intentar el comando `{in}`.\n\nCon `{in}` puedes dejar que el ordenador compruebe si un objeto está en una lista, por ejemplo:\n\nPor favor ten en cuenta que Hedy distingue entre mayúsculas y minúsculas. Esto significa que tu respuesta \"Verde\" en vez de \"verde\", Hedy imprimirá \"meh\".\n"
editor: "\n"
7:
- header: Let's go!
- text: "Enjoy the adventures in level 5!\n"
+ header: ¡Vamos!
+ text: "¡Disfruta las aventuras en el nivel 5!\n"
11:
1:
- header: Welcome to level 11
- text: "In this level, we add a new form of the `{for}` command. In earlier levels, we used for with a list, but we can also use for with numbers.\n\nThis way we don't need the `{repeat}` command anymore.\n"
+ header: Bienvenido al nivel 11
+ text: "En este nivel, añadimos una nueva forma del comando `{for}`. En niveles anteriores, usamos para con una lista, pero también podemos usar para con números.\n\nDe esta manera no necesitamos el comando `{repeat}` nunca más.\n"
2:
- header: The for command
- text: "This is what the new for command looks like:\n"
+ header: El comando para
+ text: "Así es el nuevo comando para:\n"
editor: "\n"
3:
- header: the variable i
- text: "In the previous slide the variable was named 'counter', because it was counting down.\nYou can of course use any name for the variable you want.\nThe standard name for variables in this situation that is used in programming languages like Python is 'i'.\nThat looks like this:\n"
+ header: la variable i
+ text: "En la diapositiva anterior la variable se llamó 'contador', porque because era la cuenta atrás.\nPor supuesto puedes usar cualquier nombre que quieras para la variable.\nEn esta situación el nombre estándar para las variables que se usan en lenguajes de programación como Python es 'i'.\nSe parece a esto:\n"
editor: "\n"
4:
- header: Let's start programming!
- text: "Enjoy the adventures in level 11!\n"
+ header: ¡Comencemos a programar!
+ text: "¡Disfruta las aventuras en el nivel 11!\n"
12:
1:
- header: Welcome to level 12
- text: "From this level on you are allowed to use decimal numbers and there are some changes to the quotation marks.\n"
+ header: Bienvenido al nivel 12
+ text: "Desde este nivel en adelante se permite que uses números decimales y hay algunos cambios a las comillas.\n"
2:
- header: Quotation marks
- text: "This level makes some changes to the usage of quotation marks.\nFrom now on, **all texts** need to be in quotation marks. This includes values of variables, items on lists and text after {if} commands.\n"
+ header: Comillas
+ text: "Este nivel trae algunos cambios al uso de las comillas.\nDe ahora en adelante, **todos los textos** tienen que tener comillas. Esto incluye los valores de las variables, objetos en listas y texto tras comandos {if}.\n"
editor: "\n"
3:
- header: Decimal numbers
- text: "From this level on you are also allowed to use decimal numbers. This can make programs like your restaurant even better!\n\nNumbers do not quotation marks.\n"
+ header: Números decimales
+ text: "Desde este nivel en adelante también se permite que uses números decimales. ¡Esto puede hacer programas como tu restaurante incluso mejor!\n\nLos números no llevan comillas.\n"
editor: "\n"
4:
- header: Ready to try it out?
- text: "Enjoy the adventures in level 12!\n"
+ header: ¿Preparado para probarlo?
+ text: "¡Disfruta las aventuras en el nivel 12!\n"
13:
1:
- header: Welcome to level 13
- text: "We are now going to learn `{and}` and `{or}`! If you want to check two statements, you don't have to use two ifs but can use and and or.\n"
+ header: Bienvenido al nivel 13
+ text: "¡Ahora vamos a aprender `{and}` y `{or}`! Si quieres comprobar dos sentencias, no tienes que usar dos si sino que se puede utilizar y y o.\n"
2:
- header: The and command
- text: "The `{and}` command is always used in a combination with the {if} command.\nThis way you can check if 2 statements are true. For example:\n"
+ header: El comando y
+ text: "El comando `{and}` siempre se usa en una combinación con el comando {if}.\nDe esta manera puedes comprobar si 2 sentencias son verdaderas. Por ejemplo:\n"
editor: "\n"
3:
- header: The or command
- text: "The `{or}` works in the same way as the `{and}` command, but only 1 of the two statements has to be true.\n\nLet's see what happens when you change the `{and}` for `{or}`.\n"
+ header: El comando o
+ text: "El `{or}` funciona de la misma manera que el comando `{and}`, pero sólo 1 de las dos sentencias tiene que ser verdadero.\n\nVeamos que ocurre cuando cambias el `{and}` por `{or}`.\n"
editor: "\n"
4:
- header: Let's go!
- text: "Enjoy the adventures in level 13!\n"
+ header: ¡Vamos!
+ text: "¡Disfruta las aventuras en el nivel 13!\n"
18:
1:
- header: Welcome to level 18
- text: "Congratulations! You have reached the last level of Hedy! The code you have created here can be copied to real Python environments like replit or PyCharm, and you can continue learning there! Note however that Python can only read English commands, so if you have been using other languages, you will need to switch to English now.\n"
+ header: Bienvenido al nivel 18
+ text: "¡Enhorabuena! ¡Has alcanzado el último nivel de Hedy! El código que has creado se puede copiar a un entorno de Python como replit o PyCharm, ¡y puedes continuar aprendiendo allí! Sin embargo ten en cuenta que Python sólo puede ller comandos en inglés, así que si has usado otros lenguajes, tendrás ahora que cambiar a inglés.\n"
2:
- header: The Python way
- text: "We arrived at real Python code! That means we need to use parentheses with print and range from now on.\n\nAlso, if you want to print more than one item, you need to separate them by commas.\n\nThe final change we will need to make to get Python code is changing ask into input.\n\nClick on the 'print' tab for all the examples.\n"
+ header: Al estilo Python
+ text: "¡Hemos llegado la código real de Python! Esto significa que tenemos que usar paréntesis con imprimir y rango de ahora en adelante.\n\nTambién, si quieres imprimir más de un objeto, necesitas separarlos por comas.\n\nEl cambio final que tenemos que hacer para conseguir el código Python es cambiar ask por entrada.\n\nHaz clic en la pestaña 'imprimir' para todos los ejemplos.\n"
editor: "\n"
3:
- header: The very last adventures!
- text: "Enjoy the very last adventures in level 18!\n"
+ header: ¡Las últimas aventuras!
+ text: "¡Disfruta las últimas aventuras en el nivel 18!\n"
diff --git a/content/slides/et.yaml b/content/slides/et.yaml
index 36a2c30388c..fa8feeee7cb 100644
--- a/content/slides/et.yaml
+++ b/content/slides/et.yaml
@@ -389,6 +389,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
12:
1:
header: Welcome to level 12
diff --git a/content/slides/fa.yaml b/content/slides/fa.yaml
index b27371e22e3..16dbb0e90e5 100644
--- a/content/slides/fa.yaml
+++ b/content/slides/fa.yaml
@@ -389,6 +389,10 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
16:
1:
header: Welcome to level 16
diff --git a/content/slides/fi.yaml b/content/slides/fi.yaml
index fde17ab7684..bfd98dfea35 100644
--- a/content/slides/fi.yaml
+++ b/content/slides/fi.yaml
@@ -115,6 +115,7 @@ levels:
9:
header: Ready, Set, Go!
text: "Enjoy the adventures in level 4!\n"
+ editor: "\n"
3:
header: Fixing it with quotation marks
text: "In this level we will fix this problem by using quotation marks.\n\nThis also makes our code look more like 'real' Python code.\n"
@@ -130,6 +131,9 @@ levels:
header: Quotation marks and variables
text: "When variable names are used in the middle of a sentence, you have to leave the variables out of the quotation marks.\nThe rest of the sentence however, does need quotation marks. That looks like this:\n"
editor: "\n"
+ 10:
+ header: Ready, Set, Go!
+ text: "Enjoy the adventures in level 4!\n"
5:
1:
header: Welcome to level 5
diff --git a/content/slides/fr.yaml b/content/slides/fr.yaml
index f8c55491e79..c1b87311d6c 100644
--- a/content/slides/fr.yaml
+++ b/content/slides/fr.yaml
@@ -2,7 +2,7 @@ levels:
0:
8:
header: Programmer en Hedy
- text: "Les sorties apparaissent sur le côté gauche.\n\n"
+ text: "Les sorties apparaissent sur le côté droit.\n\n"
1:
header: Bienvenue sur Hedy !
text: "Hedy est un langage de programmation.\n"
@@ -32,41 +32,41 @@ levels:
header: Bienvenue au niveau 1 !
text: "Commençons le niveau 1 en créant des histoires en Hedy !\n\nNous avons besoin de trois codes textuels pour créer des histoires interactives.\n"
2:
- header: 'Hedy niveau 1 : {print}'
+ header: '{print}'
text: "Le premier code que tu peux utiliser au niveau 1 est `{print}`.\n\n`{print}` permet d'afficher du texte à l'écran.\n"
- editor: "\n"
+ editor: "\n"
3:
- header: 'Hedy niveau 1 : {ask}'
- text: "Le second code que tu peux utiliser dans le niveau 1 est `{ask}`.\n\n`{ask}` crée une question qui peut être répondue.\n"
- editor: "\n"
+ header: 'La commande {print}'
+ text: "Tu peux changer le texte après la commande affiche par ce que tu veux.\n\nTu peux également imprimer plusieurs lignes en ajoutant une autre ligne de code qui commence également par `{print}`.\n"
+ editor: "\n"
4:
- header: 'Hedy niveau 1 : {echo}'
- text: "Le dernier code que tu peux utiliser au niveau 1 est `{echo}`.\n\n`{echo}` répète la réponse d'un `{ask}`.\n"
- editor: "\n"
+ header: '{ask} '
+ text: "Le deuxième code que tu peux utiliser au niveau 1 est `{ask}`.\n\n`{ask}` est utilisé pour poser une question à laquelle on peut répondre.\n"
+ editor: "\n"
5:
- header: Programmons !
- text: "Avec `{print}`, `{ask}` et `{echo}` tu peux déjà écrire une petite histoire.\nC'est le bon moment pour essayer les aventures Perroquet, Histoire et Pierre, feuille, ciseaux.\n"
+ header: '{echo}'
+ text: "Comme tu as pu le voir dans l'exemple précédent, si tu utilises la commande `{ask}`, tu peux poser une question.\n\nCependant, la réponse n'apparaît pas dans l'écran de sortie.\n\nSi tu veux que la réponse s'affiche, tu peux utiliser la commande finale de ce niveau: `{echo}`.\n\n`{echo}` est utilisée pour répéter la réponse d'un `{ask}`.\n"
editor: "\n"
6:
header: Programmons !
- text: "Les aventures sont sous la forme d'onglets.\n"
+ text: "Avec `{print}`, `{ask}` et `{echo}` tu peux déjà créer une petite histoire.\nIl est temps d'essayer l'histoire du Perroquet et les aventures \"Pierre, Feuille, Ciseaux\".\n"
7:
header: Programmons !
- text: "Les boutons de flèche jaune permettent de copier les exemples.\n\n"
+ text: "Les aventures sont affichées dans des onglets.\n"
editor: "\n"
8:
- header: Dessinons avec la tortue
- text: "Après avoir vu les codes textuels, voyons les codes de dessin.\n"
+ header: Programmons!
+ text: "Les boutons en forme de flèches jaunes peuvent être utilisés pour copier des exemples.\n