Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 19, 2023
1 parent 1dfa165 commit 2c579e8
Show file tree
Hide file tree
Showing 8 changed files with 336 additions and 270 deletions.
96 changes: 52 additions & 44 deletions content/adventures/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ adventures:
```
start_code: '# place your code here'
9:
story_text: "In this level you can use `{if}` and `{repeat}` commands inside other `{if}` and `{repeat}` commands. \nThis gives you many options and really helps you to make your story interactive.\n\n### Exercise 1\nFinish the code so the `{if}` works correctly.\n\n### Exercise 2\nAdd an `{if}` and `{else}` for the part of the story where Robin goes home too.\n\n### Exercise 3\nGo back to your level 8 story and use at least two `{if}`s inside another `{if}`.\n"
story_text: "In this level you can use `{if}` and `{repeat}` commands inside other `{if}` and `{repeat}` commands. \nThis gives you many options and really helps you to make your story interactive.\n\n### Exercise 1\nFinish the code so the `{if}` works correctly.\n\n### Exercise 2\nAdd\
\ an `{if}` and `{else}` for the part of the story where Robin goes home too.\n\n### Exercise 3\nGo back to your level 8 story and use at least two `{if}`s inside another `{if}`.\n"
example_code: |
```
{print} 'Robin is walking downtown'
Expand Down Expand Up @@ -1420,35 +1421,35 @@ adventures:
print 'Thanks for ordering!'
```
start_code: |2
start_code: |4
define food_order
toppings = ask 'pepperoni, tuna, veggie or cheese?'
size = ask 'big, medium or small?'
number_of_pizza = ask 'How many these pizzas would you like?'
define food_order
toppings = ask 'pepperoni, tuna, veggie or cheese?'
size = ask 'big, medium or small?'
number_of_pizza = ask 'How many these pizzas would you like?'
print 'YOU ORDERED'
print number_of_pizzas ' size ' topping ' pizza'
print 'YOU ORDERED'
print number_of_pizzas ' size ' topping ' pizza'
define drinks_order
drink = ask 'water, coke, icetea, lemonade or coffee?'
number_of_drinks = ask 'How many of these drinks would you like?'
define drinks_order
drink = ask 'water, coke, icetea, lemonade or coffee?'
number_of_drinks = ask 'How many of these drinks would you like?'
print 'YOU ORDERED'
print number_of_drinks ' ' drink
print 'YOU ORDERED'
print number_of_drinks ' ' drink
'Welcome to Hedy pizza'
more_food = ask 'Would you like to order a pizza?'
while more_food = 'yes'
return food_order
more_food = ask 'Would you like to order a pizza?'
more_drinks = ask 'Would you like to order some drinks?'
while more_drinks == 'yes'
call drink_order
more_drinks == ask 'Would you like to order more drinks?'
'Welcome to Hedy pizza'
more_food = ask 'Would you like to order a pizza?'
while more_food = 'yes'
return food_order
more_food = ask 'Would you like to order a pizza?'
more_drinks = ask 'Would you like to order some drinks?'
while more_drinks == 'yes'
call drink_order
more_drinks == ask 'Would you like to order more drinks?'
print 'Thanks for ordering!'
print 'Thanks for ordering!'
18:
story_text: |-
### Exercise
Expand All @@ -1471,22 +1472,22 @@ adventures:
print 'there a ' sound
print 'everywhere a ' sound sound
```
start_code: |2
animals = ['pig', 'dog', 'cow']
sounds = ['oink', 'woof', 'moo']
for i in range 1 to 3
animal = animals[i]
sound = sounds[i]
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
start_code: |4
animals = ['pig', 'dog', 'cow']
sounds = ['oink', 'woof', 'moo']
for i in range 1 to 3
animal = animals[i]
sound = sounds[i]
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
default:
name: Introduction
default_save_name: intro
Expand Down Expand Up @@ -2554,7 +2555,8 @@ adventures:
```
start_code: '# place your code here'
9:
story_text: "In this level you can use nesting, which allows you to make the haunted house even more interactive!\n\n### Exercise\nNow it's very hard to win this game, can you make it easier to win?\nChange your code so it only has one wrong door and two correct doors instead of one correct door and two wrong ones? \nTip: This means changing the variable correct_door into wrong_door, and switching the `{if}` and `{else}` code.\nAnd of course you may also change the story and make it your own. Change the monsters or make it a happy game show where you get a gift!\n"
story_text: "In this level you can use nesting, which allows you to make the haunted house even more interactive!\n\n### Exercise\nNow it's very hard to win this game, can you make it easier to win?\nChange your code so it only has one wrong door and two correct doors instead of one correct\
\ door and two wrong ones? \nTip: This means changing the variable correct_door into wrong_door, and switching the `{if}` and `{else}` code.\nAnd of course you may also change the story and make it your own. Change the monsters or make it a happy game show where you get a gift!\n"
example_code: |
```
{print} 'Escape from the Haunted House!'
Expand All @@ -2578,7 +2580,9 @@ adventures:
```
start_code: '{print} ''Escape from the haunted house!'''
11:
story_text: "In this level we've changed the `{for}` command so we can tell the player where they are. \n\n### Exercise 1\nFinish the program so the player knows which room they are in.\n\n### Exercise 2\nMake the program into an adventure by following these steps:\n\n1. Make a list of choices (like: fight or flight)\n2. Make sure the player can choose an option with `{ask}`\n3. Is answer correct? Then they may proceed to the next monster. Do they give a wrong answer? Let the player know with a `{print}`. \n\n**Extra** If you make a wrong choice, a monster is still shown! How could you change that?\n"
story_text: "In this level we've changed the `{for}` command so we can tell the player where they are. \n\n### Exercise 1\nFinish the program so the player knows which room they are in.\n\n### Exercise 2\nMake the program into an adventure by following these steps:\n\n1. Make a list of\
\ choices (like: fight or flight)\n2. Make sure the player can choose an option with `{ask}`\n3. Is answer correct? Then they may proceed to the next monster. Do they give a wrong answer? Let the player know with a `{print}`. \n\n**Extra** If you make a wrong choice, a monster is still\
\ shown! How could you change that?\n"
example_code: |
```
{print} 'Escape from the Haunted House!'
Expand Down Expand Up @@ -3687,7 +3691,9 @@ adventures:
**Extra** Add even more items, as many options as you like!
start_code: '# place your code here'
9:
story_text: "In this level you can use nesting to make your restaurant more realistic and more fun!\n\n### Exercise\nThe indentation was removed in the example code. \nCan you figure out how much indentation each line needs in order for the code to work properly?\nIf the customer orders pizza, Hedy shouldn't ask what sauce the costumer wants.\n\n**Extra** A restaurant does not stock all sauces. Make a list of available sauces and give a reply with each order whether you sell it. <br>\n**Extra** Pizzas have toppings. Ask customers what they want.<br>\n**Extra** Do customers want a drink? Ask them too! <br>\n"
story_text: "In this level you can use nesting to make your restaurant more realistic and more fun!\n\n### Exercise\nThe indentation was removed in the example code. \nCan you figure out how much indentation each line needs in order for the code to work properly?\nIf the customer orders\
\ pizza, Hedy shouldn't ask what sauce the costumer wants.\n\n**Extra** A restaurant does not stock all sauces. Make a list of available sauces and give a reply with each order whether you sell it. <br>\n**Extra** Pizzas have toppings. Ask customers what they want.<br>\n**Extra** Do\
\ customers want a drink? Ask them too! <br>\n"
example_code: |
```
{print} 'Welcome to Restaurant Chez Hedy!'
Expand Down Expand Up @@ -3900,7 +3906,8 @@ adventures:
Fill in the correct code on the blanks to see if it is a draw.
start_code: '{print} ''Welcome to your own rock scissors paper!'''
9:
story_text: "In this level you can program the whole rock, paper, scissors game by nesting the `{if}` commands. \n\n### Exercise\nCan you finish the code? The program must tell who has won for every combination.\n\n**Extra** Want to play more than one game? Expand the code so that you can play multiple rounds. You can even use an `{ask}` to ask the user how many rounds they want to play.\n"
story_text: "In this level you can program the whole rock, paper, scissors game by nesting the `{if}` commands. \n\n### Exercise\nCan you finish the code? The program must tell who has won for every combination.\n\n**Extra** Want to play more than one game? Expand the code so that you\
\ can play multiple rounds. You can even use an `{ask}` to ask the user how many rounds they want to play.\n"
example_code: |
```
choices = rock, paper, scissors
Expand Down Expand Up @@ -4712,7 +4719,8 @@ adventures:
```
start_code: '{print} ''Drawing figures'''
8:
story_text: "Now that we can repeat several lines, we can make figures more easily.\nWe only have to set the angle once and then use that variable in the `{repeat}`.\n\n### Exercise 1\nThe example code creates a square. Change the code so that it create another figure, such as a triangle or a hexagon. \nThis requires a change to two lines of code.\nTip: An entire circle is 360 degrees.\n\n### Exercise 2\nNow create a drawing consisting of at least two polygons.\n"
story_text: "Now that we can repeat several lines, we can make figures more easily.\nWe only have to set the angle once and then use that variable in the `{repeat}`.\n\n### Exercise 1\nThe example code creates a square. Change the code so that it create another figure, such as a triangle\
\ or a hexagon. \nThis requires a change to two lines of code.\nTip: An entire circle is 360 degrees.\n\n### Exercise 2\nNow create a drawing consisting of at least two polygons.\n"
example_code: |
```
angle = 90
Expand Down
Loading

0 comments on commit 2c579e8

Please sign in to comment.