Skip to content

Commit

Permalink
Merge branch 'commands-optimizer' of https://github.com/hedyorg/hedy
Browse files Browse the repository at this point in the history
…into commands-optimizer
  • Loading branch information
Felienne committed Sep 27, 2023
2 parents 3f7bfc7 + f4827a8 commit 575548d
Show file tree
Hide file tree
Showing 16 changed files with 315 additions and 344 deletions.
12 changes: 6 additions & 6 deletions content/achievements/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ achievements:
text: |
Ejecuta un programa exitoso después de un error
did_you_say_please:
title: "Lo has pedido por favor?"
title: "¿Lo has pedido por favor?"
text: |
Crea un programa con el comando 'ask'
error_or_empty:
Expand All @@ -32,7 +32,7 @@ achievements:
text: |
Comparte un programa guardado
do_you_have_copy:
title: "Tienes una copia?"
title: "¿Tienes una copia?"
text: |
Elimina un programa guardado
epic_education:
Expand Down Expand Up @@ -128,7 +128,7 @@ achievements:
text: |
Finaliza el tutorial para profesores
ready_set_education:
title: "Preparados, Listos, Educación!"
title: "¡Preparados, Listos, Educación!"
text: |
Crear una clase
end_of_semester:
Expand All @@ -152,15 +152,15 @@ achievements:
text: |
Retirar a un alumno de una clase
hedy-ious:
title: "Hedy-ious"
title: "Hedy-cioso"
text: |
Imprimir 10 veces la misma cadena sin utilizar un bucle
talk-talk-talk:
title: "Blablabla"
text: |
Crear un programa con al menos 5 palabras clave
hedy_hacking:
title: "Hedy Hacking"
title: "Tramposo Hedy"
text: |
Crear un tiempo de espera debido a que su programa se ejecuta demasiado tiempo
hedy_honor:
Expand All @@ -172,7 +172,7 @@ achievements:
text: |
Intenta ejecutar un programa defectuoso 3 veces seguidas
watch_out:
title: "Cuidado!"
title: "¡Cuidado!"
text: |
Crear un programa que dé como resultado un aviso (no vacío)
one_for_money:
Expand Down
9 changes: 5 additions & 4 deletions content/adventures/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ adventures:
In this level we will grow a bit more towards real Python code. You will also learn how to match two lists together.
This way you can program a code in which the correct animal is matched to the right sound.
Because the two codes below... Are obviously nonsense!
example_code: |
example_code: |-
```
animals = 'chicken', 'horse', 'cow'
sounds = 'cluck', 'neigh', 'moo'
Expand All @@ -250,6 +250,7 @@ adventures:
{for} sound {in} sounds
{print} 'A ' animal ' says ' sound
```
Note: These codes will not work like this in this level. Head to the next tab to see which parts you need to correct.
start_code: "{print} 'Lets go to the next tab!'"
17:
story_text: |
Expand Down Expand Up @@ -2059,7 +2060,7 @@ adventures:
{print} 'those are ' points ' points'
```
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!
Did you manage to calculate the score for 8 dice? That required a lot of cutting and pasting, right? We are going to make that easier in level 7!
start_code: "{print} 'What will the die indicate this time?'"
7:
story_text: |
Expand Down Expand Up @@ -2386,7 +2387,7 @@ adventures:
```
story_text_3: |
**Extra** You can also let the computer do random sums on its own using random.
This is how you choose a number of tables to practice, and from that you always get a different sum:
start_code: "{print} 'Welcome to this calculator!'"
9:
Expand Down Expand Up @@ -2473,7 +2474,7 @@ adventures:
story_text: |
### Exercise 1
Let's make the practice program a bit harder. The player now has to answers two questions correctly. Fill out the blanks to complete the program.
### Exercise 2 Extra
Sometimes, calculations have multiple correct answers. For example, 10 can be divided by 5 and by 2. So the question 'What number divides 10?' can be answered by 2 and by 5.
Ask for a calculation that has multiple correct answers, ask the player to answer it, and determine if it is correct using `{or}`.
Expand Down
2 changes: 1 addition & 1 deletion content/adventures/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ adventures:
16:
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... !Obviamente 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```\nTambién 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 ' sonido\n```\n"
example_code: "```\nanimales = 'gallina', 'caballo', 'vaca'\nsonidos = 'cluck', 'neigh', 'moo'\n{for} animal {in} animales\n {print} 'Un ' animal ' dice ' sonidos {at} {random}\n```\nTambién puedes intentar que funcione así, pero....\n```\nanimales = 'gallina', 'caballo', 'vaca'\nsonidos = 'cluck', 'neigh', 'moo'\n{for} animal {in} animales\n {for} sonido {in} sonidos\n {print} 'Un ' animal ' dice ' sonido\n```\nNota: Estos códigos no funcionarán así en este nivel. Dirígete a la siguiente pestaña para ver qué partes necesitas corregir."
17:
start_code: "{print} '¡Vayamos al siguiente nivel!'"
story_text: "Ahora vamos a cambiar un poco la indentación. Cada vez que necesitemos una sangría, necesitaremos `:` en la línea anterior a la sangría.\n\nEn este nivel también se puede utilizar un nuevo comando: `{ elif }`. `{elif}` es la abreviatura de {else} {if} y lo necesitas cuando quieres hacer 3 (¡o más!) opciones.\n¡Compruébalo!\n"
Expand Down
9 changes: 5 additions & 4 deletions content/adventures/tr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,21 +238,22 @@ adventures:
Bu seviyede gerçek Python koduna doğru biraz daha yakınlaşacağız. Ayrıca iki listeyi nasıl eşleştireceğinizi de öğreneceksiniz.
Bu şekilde, doğru hayvanın doğru sesle eşleştirildiği bir kod programlayabilirsiniz.
Çünkü aşağıdaki iki kod... açıkça saçmalıyorlar!
example_code: |
example_code: |-
```
hayvanlar = 'tavuk', 'köpek', 'inek'
sesler = 'gıtgıdak, 'havhav, 'möö'
sesler = 'gıtgıdak', 'havhav', 'möö'
{for} hayvan {in} hayvanlar
{print} 'Bir ' hayvan ' ses çıkarıyor ' sesler {at} {random}
```
You could also try to make it work this way, but....
Bu şu şekilde de deneyebilirdiniz, ama...
```
hayvanlar = 'tavuk', 'köpek', 'inek'
sesler = 'gıtgıdak, 'havhav, 'möö'
sesler = 'gıtgıdak', 'havhav', 'möö'
{for} hayvan {in} hayvanlar
{for} ses {in} sesler
{print} 'Bir ' hayvan ' ses çıkarıyor ' ses
```
Not: Bu kodlar, bu bölümde bu haldeyken çalışmaz. Neresini düzelteceğinizi görmek için sonraki sekmeye gidin.
17:
start_code: |-
{print} 'Hadi bir sonraki seviyeye geçelim!'
Expand Down
Loading

0 comments on commit 575548d

Please sign in to comment.