Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Commit

Permalink
opinionated changes to level 11 (hedyorg#418)
Browse files Browse the repository at this point in the history
* typos
* haakjes bij input, niet bij ask
* polish English translation level 11
* use more descriptive variable names in level 11
* add whitespace to range() function
  • Loading branch information
dpprdan authored May 23, 2021
1 parent 355eed1 commit 397c367
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
30 changes: 14 additions & 16 deletions coursedata/level-defaults/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,26 +298,24 @@
start_code: |-
age is input('What is your age?')
print('So you have been these ages:')
for i in range(0,age):
for i in range(0, age):
print(i)
intro_text: "We are going to put round brackets and we are going to change ask! We change ask into input! At print, ask and for, we are going to put round brackets now."
intro_text: "We are going to use round brackets and we are going to change ask! We change ask into input! With print, input and for we will use round brackets now."
commands:
- explanation: "We are going to put brackets around print now!"
- explanation: "We are going to use brackets with print now!"
example: "For example: print('Hello World')"
demo_code: "print('Hello World')"
- explanation: "We remove ask and call it input now, also we are going to put brackets around it"
example: "For example: answer is input('What is your name?')"
- explanation: "We remove ask and call it input now. Also we are going to use brackets."
example: "For example: name is input('What is your name?')"
demo_code: |-
answer = input('What is your name?')
print('So your name is ' answer)
- explanation: "We are now putting brackets around the numbers in the for loop. for i in range (0,10):"
example: "For example: for i in range(0,10):"
name is input('What is your name?')
print('So your name is ' name)
- explanation: "We are now putting brackets around the numbers in the for loop. for i in range (0, 10):"
example: "For example: for i in range(0, 10):"
demo_code: |-
for i in range(0,10):
for i in range(0, 10):
print(i)
print('Ready or not, here I come')
12:
start_code: |-
fruit is ['apple', 'banana', 'cherry']
Expand All @@ -336,7 +334,7 @@
fruit is ['banana', 'apple', 'cherry']
firstfruit is fruit[1]
print(firstfruit)
- name: "Get an random item from a list"
- name: "Get a random item from a list"
explanation: "To get a random item from a list we use [random] so fruit[random] means, get a random fruit from the list!"
example: "For example: randomfruit is fruit[random]"
demo_code: |-
Expand All @@ -359,7 +357,7 @@
explanation: "In this example, we use `True` and `False` to keep track of the answer of a question. You can answer 5 times. If the answer is correct, good_answer will be `True`."
example: "good_answer is `False`"
demo_code: |-
for i in range(1,5):
for i in range(1, 5):
good_answer is False
answer is input('What is 5*5')
if answer is 25:
Expand Down Expand Up @@ -404,7 +402,7 @@
15:
start_code: |-
# This is a program that is going to ask a couple of math questions
for i in range(1,10):
for i in range(1, 10):
# We are going to ask the multiplication table of 5
answer is input('What is ' i ' times 5?')
# We check if the answer is the same as our sum
Expand Down Expand Up @@ -440,7 +438,7 @@
if age < 12:
print('You are younger than me!')
- name: "Bigger"
explanation: "We use the `>` to check if the first number is bigger than the second number. For example if we want to see if a variable is bigger than 15, we use `variable > 15`"
explanation: "We use the `>` to check if the first number is bigger than the second number. For example if we want to see if a variable is bigger than 15, we use `variable > 15`."
example: "For example: age > 12"
demo_code: |-
age is input('How old are you?')
Expand Down
20 changes: 10 additions & 10 deletions coursedata/level-defaults/nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,25 +331,25 @@
start_code: |-
leeftijd is input('Hoe oud ben jij?')
print('Dus jij hebt zo veel verjaardagen gehad:')
for i in range(0,leeftijd):
for i in range(0, leeftijd):
print(i)
intro_text: "We gaan nu ronde haakjes toevoegen en ask veranderen! Ask noemen we nu input! Bij print, ask en for gaan we nu haakjes zetten!"
intro_text: "We gaan nu ronde haakjes toevoegen en ask veranderen! Ask noemen we nu input! Bij print, input en for gaan we nu haakjes zetten!"
commands:
- name: "Print"
explanation: "We gaan nu haakjes om print heen zetten!"
example: "Bijvoorbeeld: print('Hallo Wereld')"
demo_code: "print('Hallo Wereld')"
- name: "Ask naar input!"
explanation: "We zetten ask om en noemen het nu input, ook zetten we haakjes er omheen"
example: "Bijvoorbeeld: antwoord is input('Hoe heet jij?')"
example: "Bijvoorbeeld: naam is input('Hoe heet jij?')"
demo_code: |-
antwoord is input('Hoe heet jij?')
print('Dus jij heet ' antwoord)
naam is input('Hoe heet jij?')
print('Dus jij heet ' naam)
- name: "For met haakjes"
explanation: "We gaan nu in plaats van for i in range 1 to 10, haakjes zetten om de getallen. for i in range(0,10):"
example: "Bijvoorbeeld: for i in range(0,10):"
explanation: "We gaan nu in plaats van for i in range 1 to 10, haakjes zetten om de getallen. for i in range(0, 10):"
example: "Bijvoorbeeld: for i in range(0, 10):"
demo_code: |-
for i in range(0,10):
for i in range(0, 10):
print(i)
print('Wie niet weg is is gezien')
12:
Expand Down Expand Up @@ -394,7 +394,7 @@
explanation: "Hierbij een voorbeeldje van een vraag om een rekensom te beantwoorden. Je mag 5 keer antwoord geven. Als het goed is, maakt het goed_antwoord `True` (dus waar)"
example: "goed_antwoord is `False`"
demo_code: |-
for i in range(0,5):
for i in range(0, 5):
goed_antwoord is False
antwoord is input('Wat is 5*5')
if antwoord is 25:
Expand Down Expand Up @@ -439,7 +439,7 @@
15:
start_code: |-
# Dit is een programma die een aantal sommen gaat vragen
for i in range(1,10):
for i in range(1, 10):
# We gaan de van de tafel van 5 vragen
antwoord is input('Hoeveel is ' i ' keer 5?')
# We kijken of de som gelijk is aan het antwoord
Expand Down

0 comments on commit 397c367

Please sign in to comment.