Skip to content

Commit

Permalink
Merge branch 'main' into workbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
boryanagoncharenko authored Feb 23, 2025
2 parents 50bac60 + 6fa92a3 commit 8210620
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions content/adventures/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ adventures:
levels:
1:
story_text: |
## The ask command
## The `{ask}` command
Now 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:
example_code: |
```
Expand All @@ -342,7 +342,7 @@ adventures:
```
2:
story_text: |
## The ask command
## The `{ask}` command
Now that we can use **variables** in our codes, we no longer need the `{echo}` command.
We can use variables to store the answers to our questions and this way we can use the answer to multiple questions in our codes.
Check it out:
Expand Down Expand Up @@ -1057,7 +1057,7 @@ adventures:
{print} 'Welcome to our restaurant'
people = {ask} 'How many people are in your party tonight?'
{for} i {in} {range} 0 {to} people
{call} greet_costumer
{call} greet_customer
```
13:
story_text: |-
Expand Down Expand Up @@ -1256,8 +1256,8 @@ adventures:
2:
story_text: |
Congratulations! You've reached level 2. Hopefully you've already made some awesome codes!
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.
In the first level you might have noticed 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 customer wanted to eat, or what they wanted to drink, but not both in one sentence.
That changes in level 2. In level 2 you'll learn to work with variables, that allow you to save multiple pieces of information and print them in any place you want.
So let's go to the next adventure!
Expand Down Expand Up @@ -1398,7 +1398,7 @@ adventures:
```
13:
story_text: |
In the previous levels you've learned how to put two `{if}`commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
In the previous levels you've learned how to put two `{if}` commands inside each other. This works fine, but it does give you very long and unhandy codes like this one:
In this system you have to give both the correct username and the correct password.
In this level you will learn the `{and}` command that will make this code a lot shorter and more understandable!
Expand Down Expand Up @@ -1916,7 +1916,7 @@ adventures:
In this level you'll learn how to program the game MASH (mansion, apartment, shack, house). In this game you can predict for all the players at once, what their future will look like.
### Exercise
Fil in the blanks by using the new command that you've learned this level.
Fill in the blanks by using the new command that you've learned this level.
example_code: |
```
houses = mansion, apartment, shack, house
Expand Down Expand Up @@ -2880,7 +2880,7 @@ adventures:
Using the `{repeat}` command can make your codes for melodies a lot shorter!
### Exercise
Finish the code for Twinkle Twinkle Little Star by using the `{repeat}`command.
Finish the code for Twinkle Twinkle Little Star by using the `{repeat}` command.
Then go back to the songs you've made in the previous levels. Can you shorten those codes too?
example_code: |
```
Expand Down Expand Up @@ -3492,14 +3492,14 @@ adventures:
```
story_text_3: |
### Exercise
Try 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!
Try 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 prize!
Can you do it? We have already put the first lines into the example code.
example_code_3: |
```
{print} The big gameshow!
{print} There are 3 suitcases in front of you...
chosen {is} {ask} Which suitcase do you choose?
prices {is} _
prizes {is} _
_
```
16:
Expand Down Expand Up @@ -3626,8 +3626,8 @@ adventures:
Copy the example code into your input screen by clicking the yellow button.
Firstly, fill in the correct command on the blanks to make to code work properly.
Then add at least 4 more lines of code to the restaurant program.
Ask the costumer what they would like to drink and ask if they want to pay with cash or card.
Lastly, think of a nice way to say goodbye to your costumer.
Ask the customer what they would like to drink and ask if they want to pay with cash or card.
Lastly, think of a nice way to say goodbye to your customer.
example_code_2: |
```
{print} Welcome to Hedy's restaurant 🍟
Expand Down Expand Up @@ -3676,7 +3676,7 @@ adventures:
### Exercise
Now make your own version of the random restaurant.
Make a list of starts, mains, desserts, drinks and prices yourself.
Then use `{print}` and `{at} {random}` commands to tell the costumer what will be on their menu tonight.
Then use `{print}` and `{at} {random}` commands to tell the customer what will be on their menu tonight.
example_code_2: |
```
{print} Welcome to your own random restaurant!
Expand Down Expand Up @@ -3785,7 +3785,7 @@ adventures:
{print} 'Enjoy your meal!'
```
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 customer 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 @@ -3891,7 +3891,7 @@ adventures:
```
15:
story_text: |
With the `{while}` you can make sure your costumers can keep adding orders until they are done.
With the `{while}` you can make sure your customers can keep adding orders until they are done.
### Exercise
Correctly add the `{while}` command to this code.
Expand Down Expand Up @@ -4354,7 +4354,7 @@ adventures:
example_code: "```\nfamily = baby, mammy, daddy, grandma, grandpa\n_ _ _ _ \n {print} _\n```\n"
story_text_2: |
### Exercise 2
Print the song Five little moneys jumping on the bed. Look up the text if you don't remember.
Print the song Five little monkeys jumping on the bed. Look up the text if you don't remember.
**Extra** Print the song Old MacDonald had a farm, and make sure all animals make a different sound, using an `{if}`.
example_code_2: |
Expand Down

0 comments on commit 8210620

Please sign in to comment.