Skip to content

Commit

Permalink
Add backticks to programs for levels 8 & 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
fpereiro committed Apr 1, 2021
1 parent 418be88 commit 20fd570
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions coursedata/level-defaults/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,32 +140,32 @@
8:
start_code: "for i in range 1 to 10\n print i\nprint 'Ready or not, here I come!'"
intro_text:
"Print works just the same but the repeat is now replaced by for!
You use for i in range 1 to 5, instead of van repeat 5 times. You can also use i in your program!
Remember to use indentations after the for and if statements (That means starting a sentence with four spaces)"
"`print` works just the same but the `repeat` is now replaced by `for`!
You use `for i in range 1 to 5`, instead of `repeat 5 times`. You can also use `i` in your program!
Remember to use indentations after the `for` and `if` statements (That means starting a sentence with four spaces)"
commands:
-
name: "repeat"
explanation: "we replace repeat with for"
explanation: "we replace `repeat` with `for`"
example: "for i in range 1 to 10"
demo_code: |
for i in range 1 to 10
print i
print 'Ready or not, here I come!'
9:
start_code: "for i in range 1 to 10:\n print i\nprint 'Ready or not, here I come!'"
intro_text: "Now we are going to change a little bit with indentation. Every time that we need an indentation, we need : at the line before the indentation."
intro_text: "Now we are going to change a little bit with indentation. Every time that we need an indentation, we need `:` at the line before the indentation."
commands:
- name: "for with :"
explanation: "When we use a for, we need to put a : behind the for statement!"
explanation: "When we use a `for`, we need to put a `:` behind the `for` statement!"
example: "for i in range 1 to 10:"
demo_code: "for i in range 1 to 11:\n print i\nprint 'Ready or not, here I come!'"
- name: "if with :"
explanation: "We need to do the same with all of our if statements"
example: "Bijvoorbeeld: if colour is green:'"
explanation: "We need to do the same with all of our `if` statements"
example: "if colour is green:'"
demo_code: "colour is green\nif colour is green:\n print 'The colour is green'\nelse:\n print 'The colour is not green'"
- name: "(Optional) elif"
explanation: "We will show you a new command that you are allowed to use: elif. elif means else if. We start with checking if the if is correct, if that one is not true, we check the elif and if that one is also not true, we go to the else."
explanation: "We will show you a new command that you are allowed to use: `elif`. `elif` means \"else if\". We start with checking if the `if` is correct, if that one is not true, we check the `elif` and if that one is also not true, we go to the `else`."
example: "elif a is 5:"
demo_code: "a is 2\nif a is 1:\n print 'a is 1'\nelif a is 2:\n print 'a is 2'\nelse:\n print 'a is not 1 or 2'"

14 changes: 7 additions & 7 deletions coursedata/level-defaults/nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@
8:
start_code: "for i in range 1 to 10\n print i\nprint 'Wie niet weg is is gezien'"
intro_text:
"We gaan nu repeat veranderen in for!
Je typt nu for i in range 1 tot 5, in plaats van repeat 5 times. Het leuke is dat je die variabele i ook in je programma kan gebruiken!
"We gaan nu `repeat` veranderen in `for`!
Je typt nu for `i in range 1 tot 5`, in plaats van `repeat 5 times`. Het leuke is dat je die variabele `i` ook in je programma kan gebruiken!
Je moet nog steeds alle regels die herhaald worden inspringen (dat betekent dat ze moeten beginnen met vier spaties)"
commands:
-
name: "repeat vervangen met for"
explanation: "repeat vervangen"
explanation: "`repeat` vervangen"
example: "for i in range 1 to 10"
demo_code: |
for i in range 1 to 10
Expand All @@ -158,14 +158,14 @@
intro_text: "Nu veranderen we nog een klein stukje dat te maken heeft met het inspringen. Elke keer dat we gaan inspringen moeten we een : bij de regel er voor zetten."
commands:
- name: "for met :"
explanation: "Bij for moet je dus een : er achter zetten!"
explanation: "Bij `for` moet je dus een `:` er achter zetten!"
example: "for i in range 1 to 10:"
demo_code: "for i in range 1 to 10:\n print i\nprint 'wie niet weg is is gezien'"
- name: "if met :"
explanation: "We moeten hetzelfde doen met al onze if statements"
example: "Bijvoorbeeld: if kleur is groen:'"
explanation: "We moeten hetzelfde doen met al onze `if` statements"
example: "if kleur is groen:"
demo_code: "kleur is groen\nif kleur is groen:\n print 'De kleur is groen'\nelse:\n print 'De kleur is niet groen'"
- name: "(Optioneel) elif"
explanation: "Verder is er een nieuw commando die je mag gebruiken: elif. elif is eigenlijk else if. Je kijkt dus eerst naar if en als die niet waar is dan probeer je elif en als die niet waar is dan ga je naar de else."
explanation: "Verder is er een nieuw commando die je mag gebruiken: `elif`. `elif` is eigenlijk else if. Je kijkt dus eerst naar `if` en als die niet waar is dan probeer je `elif` en als die niet waar is dan ga je naar de `else`."
example: "elif a is 5:"
demo_code: "a is 2\nif a is 1:\n print 'a is 1'\nelif a is 2:\n print 'a is 2'\nelse:\n print 'a is niet 1 of 2'"

0 comments on commit 20fd570

Please sign in to comment.