diff --git a/ar-SA/images/add-friend-projects.png b/ar-SA/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/ar-SA/images/add-friend-projects.png differ diff --git a/ar-SA/images/add-sound.png b/ar-SA/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/ar-SA/images/add-sound.png differ diff --git a/ar-SA/images/add-your-projects.png b/ar-SA/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/ar-SA/images/add-your-projects.png differ diff --git a/ar-SA/images/banner.png b/ar-SA/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/ar-SA/images/banner.png differ diff --git a/ar-SA/images/choose-backdrop-icon.png b/ar-SA/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/ar-SA/images/choose-backdrop-icon.png differ diff --git a/ar-SA/images/choose-sprite-icon.png b/ar-SA/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/ar-SA/images/choose-sprite-icon.png differ diff --git a/ar-SA/images/create-studio.png b/ar-SA/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/ar-SA/images/create-studio.png differ diff --git a/ar-SA/images/customer-count.png b/ar-SA/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/ar-SA/images/customer-count.png differ diff --git a/ar-SA/images/dont-fall-in-project.png b/ar-SA/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/ar-SA/images/dont-fall-in-project.png differ diff --git a/ar-SA/images/example-strip.png b/ar-SA/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/ar-SA/images/example-strip.png differ diff --git a/ar-SA/images/fruit.png b/ar-SA/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/ar-SA/images/fruit.png differ diff --git a/ar-SA/images/icecream.png b/ar-SA/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/ar-SA/images/icecream.png differ diff --git a/ar-SA/images/item-amounts.png b/ar-SA/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/ar-SA/images/item-amounts.png differ diff --git a/ar-SA/images/large-readout.png b/ar-SA/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/ar-SA/images/large-readout.png differ diff --git a/ar-SA/images/my-stuff-menu.png b/ar-SA/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/ar-SA/images/my-stuff-menu.png differ diff --git a/ar-SA/images/naming-studio.png b/ar-SA/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/ar-SA/images/naming-studio.png differ diff --git a/ar-SA/images/new-variable.png b/ar-SA/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/ar-SA/images/new-variable.png differ diff --git a/ar-SA/images/quiz2.png b/ar-SA/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/ar-SA/images/quiz2.png differ diff --git a/ar-SA/images/sprite-pane-size.png b/ar-SA/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/ar-SA/images/sprite-pane-size.png differ diff --git a/ar-SA/images/step2-image.png b/ar-SA/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/ar-SA/images/step2-image.png differ diff --git a/ar-SA/images/step3-image.png b/ar-SA/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/ar-SA/images/step3-image.png differ diff --git a/ar-SA/images/step4-image.png b/ar-SA/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/ar-SA/images/step4-image.png differ diff --git a/ar-SA/images/studio-example.png b/ar-SA/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/ar-SA/images/studio-example.png differ diff --git a/ar-SA/images/tshirt.png b/ar-SA/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/ar-SA/images/tshirt.png differ diff --git a/ar-SA/images/upgrade-image.png b/ar-SA/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/ar-SA/images/upgrade-image.png differ diff --git a/ar-SA/images/vending.png b/ar-SA/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/ar-SA/images/vending.png differ diff --git a/ar-SA/meta.yml b/ar-SA/meta.yml new file mode 100644 index 000000000..c4b851a15 --- /dev/null +++ b/ar-SA/meta.yml @@ -0,0 +1,39 @@ +--- +title: الزبون التالي +hero_image: images/banner.png +description: مشروع محاكاة متجر حيث يستطيع العميل شراء السلع. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: عينات للبيع + completion: + - engaged + - + title: عمليات الشراء + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/ar-SA/quiz1/question_1.md b/ar-SA/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/ar-SA/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ar-SA/quiz1/question_2.md b/ar-SA/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/ar-SA/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ar-SA/quiz1/question_3.md b/ar-SA/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/ar-SA/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ar-SA/scratch-comments.txt b/ar-SA/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/ar-SA/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/ar-SA/scratch-translatable.txt b/ar-SA/scratch-translatable.txt new file mode 100644 index 000000000..d4a85c815 --- /dev/null +++ b/ar-SA/scratch-translatable.txt @@ -0,0 +1,49 @@ +الاسم + +متجري + +زبون جديد + +الزبون التالي! + +المجموع + +هذا سيكون + +Thanks for shopping at + +هل ترغب في الدفع أو الإلغاء؟ + +pay + +cancel + +Ok. لا مشكلة + +انقر فوق العناصر التي تريدها + +هل وجدت كل ما تريده اليوم؟ + +نعم + +هذا رائع! + +ربما يجب علي إضافة المزيد من العناصر إلى متجري + +حقيبة + +1 scoop + +cone + +متجر + +true + +خاطئ + +كيف حالك اليوم؟ + +good + +آسف لسماع ذلك. diff --git a/ar-SA/solutions/Cool Shirts.sb3 b/ar-SA/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/ar-SA/solutions/Cool Shirts.sb3 differ diff --git a/ar-SA/solutions/Fresh Space Fruit.sb3 b/ar-SA/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/ar-SA/solutions/Fresh Space Fruit.sb3 differ diff --git a/ar-SA/solutions/Vending machine.sb3 b/ar-SA/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/ar-SA/solutions/Vending machine.sb3 differ diff --git a/ar-SA/solutions/ice cream shop.sb3 b/ar-SA/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/ar-SA/solutions/ice cream shop.sb3 differ diff --git a/ar-SA/step_1.md b/ar-SA/step_1.md new file mode 100644 index 000000000..7b763d63c --- /dev/null +++ b/ar-SA/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +أنشئ تطبيق متجر حيث يمكن للعميل شراء سلع من متجرك. سيكون المشروع من منظور الشخص الأول حيث يكون اللاعب عميلاً. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/ar-SA/step_2.md b/ar-SA/step_2.md new file mode 100644 index 000000000..b75070531 --- /dev/null +++ b/ar-SA/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? يمكن أن يكون شيئًا واقعيًا ، أو شيئًا من كتاب أو فيلم تحبه ، أو شيئًا سخيفًا تمامًا. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ رف أو خزانة كتب لوضع الأشياء عليها - يمكنك رسم هذا على الخلفية + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/ar-SA/step_3.md b/ar-SA/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/ar-SA/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/ar-SA/step_4.md b/ar-SA/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/ar-SA/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/ar-SA/step_5.md b/ar-SA/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/ar-SA/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/ar-SA/step_6.md b/ar-SA/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/ar-SA/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/ar-SA/step_7.md b/ar-SA/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/ar-SA/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/ar-SA/step_8.md b/ar-SA/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/ar-SA/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/ar-SA/step_9.md b/ar-SA/step_9.md new file mode 100644 index 000000000..cfdce60e9 --- /dev/null +++ b/ar-SA/step_9.md @@ -0,0 +1,21 @@ +## ما هي الخطوة التالية؟ + +إذا كنت تتبع مسار [المزيد من Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) ، فيمكنك الانتقال إلى مشروع [لا تقع في](https://projects.raspberrypi.org/en/projects/dont-fall-in). في هذا المشروع ، ستنشئ لعبة من أعلى إلى أسفل حيث يتعين عليك القفز من منصة إلى أخرى وعدم الوقوع فيها. + +--- print-only --- + +![لا تقع في المشروع](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**تعليمات:** اضغط على مسافة أو اضغط على المرحلة للقفز. + +--- /no-print --- + +إذا كنت ترغب في الحصول على مزيد من المتعة في استكشاف Scratch ، فيمكنك تجربة أي من [هذه المشاريع](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/cs-CZ/images/add-friend-projects.png b/cs-CZ/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/cs-CZ/images/add-friend-projects.png differ diff --git a/cs-CZ/images/add-sound.png b/cs-CZ/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/cs-CZ/images/add-sound.png differ diff --git a/cs-CZ/images/add-your-projects.png b/cs-CZ/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/cs-CZ/images/add-your-projects.png differ diff --git a/cs-CZ/images/banner.png b/cs-CZ/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/cs-CZ/images/banner.png differ diff --git a/cs-CZ/images/choose-backdrop-icon.png b/cs-CZ/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/cs-CZ/images/choose-backdrop-icon.png differ diff --git a/cs-CZ/images/choose-sprite-icon.png b/cs-CZ/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/cs-CZ/images/choose-sprite-icon.png differ diff --git a/cs-CZ/images/create-studio.png b/cs-CZ/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/cs-CZ/images/create-studio.png differ diff --git a/cs-CZ/images/customer-count.png b/cs-CZ/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/cs-CZ/images/customer-count.png differ diff --git a/cs-CZ/images/dont-fall-in-project.png b/cs-CZ/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/cs-CZ/images/dont-fall-in-project.png differ diff --git a/cs-CZ/images/example-strip.png b/cs-CZ/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/cs-CZ/images/example-strip.png differ diff --git a/cs-CZ/images/fruit.png b/cs-CZ/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/cs-CZ/images/fruit.png differ diff --git a/cs-CZ/images/icecream.png b/cs-CZ/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/cs-CZ/images/icecream.png differ diff --git a/cs-CZ/images/item-amounts.png b/cs-CZ/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/cs-CZ/images/item-amounts.png differ diff --git a/cs-CZ/images/large-readout.png b/cs-CZ/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/cs-CZ/images/large-readout.png differ diff --git a/cs-CZ/images/my-stuff-menu.png b/cs-CZ/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/cs-CZ/images/my-stuff-menu.png differ diff --git a/cs-CZ/images/naming-studio.png b/cs-CZ/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/cs-CZ/images/naming-studio.png differ diff --git a/cs-CZ/images/new-variable.png b/cs-CZ/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/cs-CZ/images/new-variable.png differ diff --git a/cs-CZ/images/quiz2.png b/cs-CZ/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/cs-CZ/images/quiz2.png differ diff --git a/cs-CZ/images/sprite-pane-size.png b/cs-CZ/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/cs-CZ/images/sprite-pane-size.png differ diff --git a/cs-CZ/images/step2-image.png b/cs-CZ/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/cs-CZ/images/step2-image.png differ diff --git a/cs-CZ/images/step3-image.png b/cs-CZ/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/cs-CZ/images/step3-image.png differ diff --git a/cs-CZ/images/step4-image.png b/cs-CZ/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/cs-CZ/images/step4-image.png differ diff --git a/cs-CZ/images/studio-example.png b/cs-CZ/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/cs-CZ/images/studio-example.png differ diff --git a/cs-CZ/images/tshirt.png b/cs-CZ/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/cs-CZ/images/tshirt.png differ diff --git a/cs-CZ/images/upgrade-image.png b/cs-CZ/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/cs-CZ/images/upgrade-image.png differ diff --git a/cs-CZ/images/vending.png b/cs-CZ/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/cs-CZ/images/vending.png differ diff --git a/cs-CZ/meta.yml b/cs-CZ/meta.yml new file mode 100644 index 000000000..8df1f3d0d --- /dev/null +++ b/cs-CZ/meta.yml @@ -0,0 +1,39 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Items for sale + completion: + - engaged + - + title: Purchases + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/cs-CZ/quiz1/question_1.md b/cs-CZ/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/cs-CZ/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/cs-CZ/quiz1/question_2.md b/cs-CZ/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/cs-CZ/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/cs-CZ/quiz1/question_3.md b/cs-CZ/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/cs-CZ/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/cs-CZ/scratch-comments.txt b/cs-CZ/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/cs-CZ/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/cs-CZ/scratch-translatable.txt b/cs-CZ/scratch-translatable.txt new file mode 100644 index 000000000..06cc175a3 --- /dev/null +++ b/cs-CZ/scratch-translatable.txt @@ -0,0 +1,49 @@ +name + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +yes + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +true + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/cs-CZ/solutions/Cool Shirts.sb3 b/cs-CZ/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/cs-CZ/solutions/Cool Shirts.sb3 differ diff --git a/cs-CZ/solutions/Fresh Space Fruit.sb3 b/cs-CZ/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/cs-CZ/solutions/Fresh Space Fruit.sb3 differ diff --git a/cs-CZ/solutions/Vending machine.sb3 b/cs-CZ/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/cs-CZ/solutions/Vending machine.sb3 differ diff --git a/cs-CZ/solutions/ice cream shop.sb3 b/cs-CZ/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/cs-CZ/solutions/ice cream shop.sb3 differ diff --git a/cs-CZ/step_1.md b/cs-CZ/step_1.md new file mode 100644 index 000000000..e41514d8a --- /dev/null +++ b/cs-CZ/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/cs-CZ/step_2.md b/cs-CZ/step_2.md new file mode 100644 index 000000000..fb48837ea --- /dev/null +++ b/cs-CZ/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/cs-CZ/step_3.md b/cs-CZ/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/cs-CZ/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/cs-CZ/step_4.md b/cs-CZ/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/cs-CZ/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/cs-CZ/step_5.md b/cs-CZ/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/cs-CZ/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/cs-CZ/step_6.md b/cs-CZ/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/cs-CZ/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/cs-CZ/step_7.md b/cs-CZ/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/cs-CZ/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/cs-CZ/step_8.md b/cs-CZ/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/cs-CZ/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/cs-CZ/step_9.md b/cs-CZ/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/cs-CZ/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/cy-GB/images/add-friend-projects.png b/cy-GB/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/cy-GB/images/add-friend-projects.png differ diff --git a/cy-GB/images/add-sound.png b/cy-GB/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/cy-GB/images/add-sound.png differ diff --git a/cy-GB/images/add-your-projects.png b/cy-GB/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/cy-GB/images/add-your-projects.png differ diff --git a/cy-GB/images/banner.png b/cy-GB/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/cy-GB/images/banner.png differ diff --git a/cy-GB/images/choose-backdrop-icon.png b/cy-GB/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/cy-GB/images/choose-backdrop-icon.png differ diff --git a/cy-GB/images/choose-sprite-icon.png b/cy-GB/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/cy-GB/images/choose-sprite-icon.png differ diff --git a/cy-GB/images/create-studio.png b/cy-GB/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/cy-GB/images/create-studio.png differ diff --git a/cy-GB/images/customer-count.png b/cy-GB/images/customer-count.png new file mode 100644 index 000000000..72efa57e4 Binary files /dev/null and b/cy-GB/images/customer-count.png differ diff --git a/cy-GB/images/dont-fall-in-project.png b/cy-GB/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/cy-GB/images/dont-fall-in-project.png differ diff --git a/cy-GB/images/example-strip.png b/cy-GB/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/cy-GB/images/example-strip.png differ diff --git a/cy-GB/images/fruit.png b/cy-GB/images/fruit.png new file mode 100644 index 000000000..a9506262c Binary files /dev/null and b/cy-GB/images/fruit.png differ diff --git a/cy-GB/images/icecream.png b/cy-GB/images/icecream.png new file mode 100644 index 000000000..3a3ebc7a1 Binary files /dev/null and b/cy-GB/images/icecream.png differ diff --git a/cy-GB/images/item-amounts.png b/cy-GB/images/item-amounts.png new file mode 100644 index 000000000..8f092c605 Binary files /dev/null and b/cy-GB/images/item-amounts.png differ diff --git a/cy-GB/images/large-readout.png b/cy-GB/images/large-readout.png new file mode 100644 index 000000000..478c9c791 Binary files /dev/null and b/cy-GB/images/large-readout.png differ diff --git a/cy-GB/images/my-stuff-menu.png b/cy-GB/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/cy-GB/images/my-stuff-menu.png differ diff --git a/cy-GB/images/naming-studio.png b/cy-GB/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/cy-GB/images/naming-studio.png differ diff --git a/cy-GB/images/new-variable.png b/cy-GB/images/new-variable.png new file mode 100644 index 000000000..19053917d Binary files /dev/null and b/cy-GB/images/new-variable.png differ diff --git a/cy-GB/images/quiz2.png b/cy-GB/images/quiz2.png new file mode 100644 index 000000000..280bebdc5 Binary files /dev/null and b/cy-GB/images/quiz2.png differ diff --git a/cy-GB/images/sprite-pane-size.png b/cy-GB/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/cy-GB/images/sprite-pane-size.png differ diff --git a/cy-GB/images/step2-image.png b/cy-GB/images/step2-image.png new file mode 100644 index 000000000..6bf790fea Binary files /dev/null and b/cy-GB/images/step2-image.png differ diff --git a/cy-GB/images/step3-image.png b/cy-GB/images/step3-image.png new file mode 100644 index 000000000..3f1385a58 Binary files /dev/null and b/cy-GB/images/step3-image.png differ diff --git a/cy-GB/images/step4-image.png b/cy-GB/images/step4-image.png new file mode 100644 index 000000000..0b8cf4dc8 Binary files /dev/null and b/cy-GB/images/step4-image.png differ diff --git a/cy-GB/images/studio-example.png b/cy-GB/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/cy-GB/images/studio-example.png differ diff --git a/cy-GB/images/tshirt.png b/cy-GB/images/tshirt.png new file mode 100644 index 000000000..a565015d8 Binary files /dev/null and b/cy-GB/images/tshirt.png differ diff --git a/cy-GB/images/upgrade-image.png b/cy-GB/images/upgrade-image.png new file mode 100644 index 000000000..bd5bbf32c Binary files /dev/null and b/cy-GB/images/upgrade-image.png differ diff --git a/cy-GB/images/vending.png b/cy-GB/images/vending.png new file mode 100644 index 000000000..622e57df7 Binary files /dev/null and b/cy-GB/images/vending.png differ diff --git a/cy-GB/meta.yml b/cy-GB/meta.yml new file mode 100644 index 000000000..7c77a2619 --- /dev/null +++ b/cy-GB/meta.yml @@ -0,0 +1,39 @@ +--- +title: Cwsmer nesaf plîs +hero_image: images/banner.png +description: Prosiect sy'n creu efelychiad o siop lle mae cwsmeriaid yn gallu prynu eitemau. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Eitemau ar werth + completion: + - external + - + title: Prynwyd + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/cy-GB/quiz1/question_1.md b/cy-GB/quiz1/question_1.md new file mode 100644 index 000000000..7302e10dc --- /dev/null +++ b/cy-GB/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Cwis cyflym + +Ateba'r tri chwestiwn. Mae yna awgrymiadau i dy helpu i gael yr ateb cywir. + +Pan fyddi di wedi ateb bob cwestiwn, clicia ar **Gwirio fy ateb**. + +Mwynha! + +--- question --- + +--- +legend: Cwestiwn 1 o 3 +--- + +Mae prosiect siop yn defnyddio newidyn `cyfanswm`{:class="block3variables"} i storio'r cyfanswm ar gyfer pob cwsmer. + ++ Mae cwsmer yn ychwanegu eitemau sy'n dod i gyfanswm o `50` ac yn talu ++ Mae cwsmer newydd yn ychwanegu eitemau sy'n dod i gyfanswm o `40` ond mae'r `cyfanswm`{:class="block3variables"} bellach yn ymddangos fel `90` ar gyfer yr ail gwsmer + +Pa floc fyddai angen i ti ei ychwanegu at y sgript talu i wneud i'r cyfanswm fynd yn ôl i `0` pan fydd pob cwsmer yn talu? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Anghywir, dylai'r `cyfanswm`{:class="block3variables"} fod yn `0` ar ôl i gwsmer dalu, ond nid y bloc `newid`{:class="block3variables"} sydd ei angen arnat ti. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Anghywir, byddai hyn yn gweithio i'r ail gwsmer ond byddai'r `cyfanswm`{:class="block3variables"} yn anghywir i gwsmeriaid eraill. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Cywir. Mae angen `gosod`{:class="block3variables"} y `cyfanswm`{:class="block3variables"} i `0` ar ôl i bob cwsmer dalu. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +Byddai hynny'n gweithio ar gyfer yr enghraifft hon, ond beth petai'r cwsmer cyntaf yn gwario swm gwahanol? Mae angen i dy ddatrysiad weithio pan fydd y cwsmer blaenorol yn gwario symiau gwahanol. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/cy-GB/quiz1/question_2.md b/cy-GB/quiz1/question_2.md new file mode 100644 index 000000000..ae8e3feaa --- /dev/null +++ b/cy-GB/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- cwestiwn --- + +--- +legend: Cwestiwn 2 o 3 +--- + +Mewn siop, mae gan y **gwerthwr** y cod yma yn y sgript talu: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +Pan fydd y cod yn rhedeg, mae'r defnyddiwr yn teipio'r ateb 'grêt'. Beth fydd corlun y **gwerthwr** yn dweud? + +![Blwch 'ask' gyda'r gair 'great' wedi'i deipio i mewn.](images/quiz2.png) + +--- dewisiadau --- + +- (x) Bydd y **Gwerthwr** yn dweud `Ddrwg gen i glywed hynny.` + + --- feedback --- + + Cywir. Mae pobl yn gwybod bod 'grêt' yn golygu'r un peth â 'da', ond mae'r '=' yn gwirio a yw'r llythrennau yr un peth. + + Mae'r **amod** `ateb`{:class="block3sensing"} = `da` yn 'anwir' felly bydd y bloc `dweud`{:class="block3looks"} yn y rhan `fel arall`{:class="block3control"} yn rhedeg. + + --- /feedback --- + +- ( ) Bydd y **gwerthwr** yn dweud `Mae hynny'n ffantastig!` + + --- feedback --- + +Na, dim ond yr union ateb `da` fydd yn gwneud i'r **gwerthwr** ddweud `Mae hynny'n ffantastig!`. Edrycha ar y cod eto i weld pa neges y bydd y **gwerthwr** yn ei ddweud ar gyfer pob ateb sydd ddim yn `da`. + +**Awgrym:** Byddai 'Da' neu 'DA' yn cyfateb i 'da'. + + --- /feedback --- + +- ( ) Fydd y **gwerthwr** ddim yn dweud unrhyw beth. + + --- feedback --- + +Na, bydd y **gwerthwr** bob amser yn dweud rhywbeth. Edrycha yn ofalus ar y cod i weld beth fydd y neges. + + --- /feedback --- + +- ( ) Bydd y **gwerthwr** yn dweud `grêt`. + + --- feedback --- + +Na, teipiodd y **cwsmer** yr ateb 'grêt' ond dydy'r **gwerthwr** ddim yn dweud yr ateb. Edrycha yn ofalus ar y cod i weld beth fydd y neges. + + --- /feedback --- + +--- /dewisiadau --- + +--- /cwestiwn --- diff --git a/cy-GB/quiz1/question_3.md b/cy-GB/quiz1/question_3.md new file mode 100644 index 000000000..ebeb42406 --- /dev/null +++ b/cy-GB/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- cwestiwn --- + +--- +legend: Cwestiwn 3 o 3 +--- + +Your project is not working. What should you do? + +--- dewisiadau --- + +- ( ) Cynhyrfu! + + --- feedback --- + + Dydy hynny ddim yn mynd i helpu. Mae angen meddwl yn glir i drwsio problemau codio. + + --- /feedback --- + +- ( ) Rhoi'r ffidil yn y to + + --- feedback --- + + There are lots of things you could try. Mae codwyr gwych yn aml yn gwneud pethau'n anghywir y tro cyntaf ac yn dysgu llawer o'u camgymeriadau. + + --- /feedback --- + +- (x) Darllen y cod yn ofalus a cheisio difa'r chwilod. + + --- feedback --- + + Cywir. Mae difa chwilod yn rhan o godio. Po fwyaf y byddi di'n ymarfer y mwyaf o brofiad a gei, a'r hawsaf y bydd hi i ddod o hyd i chwilod a'u difa. + + --- /feedback --- + +- ( ) Gwylltio gyda'r cyfrifiadur + + --- feedback --- + +Mae cyfrifiadur yn gwneud dim ond beth rydan ni'n dweud iddo wneud, felly dydy gwylltio ddim yn rhesymegol. + +Fydd bod yn flin ddim yn helpu i ddatrys y broblem, gan y bydd yn ei gwneud yn anoddach meddwl yn glir. + + --- /feedback --- + +--- /dewisiadau --- + +--- /cwestiwn --- diff --git a/cy-GB/resources/.keep b/cy-GB/resources/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/cy-GB/scratch-comments.txt b/cy-GB/scratch-comments.txt new file mode 100644 index 000000000..da7c75dd3 --- /dev/null +++ b/cy-GB/scratch-comments.txt @@ -0,0 +1,9 @@ +teipia enw dy fusnes + +enw dy fusnes + +defnyddia enw dy gorlun Container + +safle cychwyn + +cwsmer blaenorol yn cymryd y bag diff --git a/cy-GB/scratch-translatable.txt b/cy-GB/scratch-translatable.txt new file mode 100644 index 000000000..320d9d9a3 --- /dev/null +++ b/cy-GB/scratch-translatable.txt @@ -0,0 +1,49 @@ +enw + +fy siop + +cwsmer nesaf + +Cwsmer nesaf plîs! + +cyfanswm + +Bydd hynny'n + +Diolch am siopa yn + +Hoffech chi dalu neu ganslo? + +talu + +canslo + +Iawn. Dim problem + +Clicia ar yr eitemau yr hoffet ti + +Ddes di o hyd i bob dim roeddet ti eisiau heddiw? + +do + +Mae hynny'n wych! + +Falle ddylwn i ychwanegu mwy o eitemau i fy siop + +Bag + +1 sgŵp + +côn + +siop + +gwir + +anwir + +Sut wyt ti heddiw? + +da + +Mae'n ddrwg gen i glywed hynny. diff --git a/cy-GB/solutions/Cool Shirts.sb3 b/cy-GB/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..3b1e7e9f5 Binary files /dev/null and b/cy-GB/solutions/Cool Shirts.sb3 differ diff --git a/cy-GB/solutions/Fresh Space Fruit.sb3 b/cy-GB/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..b02aea0b7 Binary files /dev/null and b/cy-GB/solutions/Fresh Space Fruit.sb3 differ diff --git a/cy-GB/solutions/Vending machine.sb3 b/cy-GB/solutions/Vending machine.sb3 new file mode 100644 index 000000000..a0468f76d Binary files /dev/null and b/cy-GB/solutions/Vending machine.sb3 differ diff --git a/cy-GB/solutions/ice cream shop.sb3 b/cy-GB/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..6309fced1 Binary files /dev/null and b/cy-GB/solutions/ice cream shop.sb3 differ diff --git a/cy-GB/step_1.md b/cy-GB/step_1.md new file mode 100644 index 000000000..be17850cc --- /dev/null +++ b/cy-GB/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Byddi di'n creu ap siop lle gall y cwsmer brynu eitemau o dy siop. Bydd y prosiect o berspectif person cyntaf lle mae'r chwaraewr yn gwsmer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. Pan fyddi di'n barod, clicia ar Kiran i dalu. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Cael ysbrydoliaeth 💭 + +Clicia ar y corlun **Gwerthwr** i brynu eitemau: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Piniau balchder** (prosiect cymunedol dan sylw) + +Cliciwch ar y piniau balchder i’w hychwanegu i’ch bag siopa: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Cael ysbrydoliaeth + +Rwyt ti'n mynd i wneud rhai penderfyniadau dylunio i greu dy gymeriad. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Prosiect enghreifftiol](images/fruit.png) ![Prosiect enghreifftiol](images/tshirt.png) ![Prosiect enghreifftiol](images/icecream.png) ![Prosiect enghreifftiol](images/vending.png) + +--- /print-only --- + diff --git a/cy-GB/step_2.md b/cy-GB/step_2.md new file mode 100644 index 000000000..f4689d107 --- /dev/null +++ b/cy-GB/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? Gallai fod yn rhywbeth realistig, fel rhywbeth o lyfr neu ffilm rwyt ti'n ei hoffi, neu'n rhywbeth hollol wirion. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Agora [brosiect Scratch newydd](http://rpf.io/scratch-new){:target="_blank"} a tharo golwg ar yr amrywiaeth o gorluniau a chefnlenni y galli di eu defnyddio. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ Silff neu gwpwrdd llyfrau i roi eitemau arno - fe allech chi Beintio hwn ar y gefnlen + +--- /task --- + +--- task --- + +Ychwanega gorlun i gynrychioli'r gwerthwr. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- cadw --- diff --git a/cy-GB/step_3.md b/cy-GB/step_3.md new file mode 100644 index 000000000..82d47dc0e --- /dev/null +++ b/cy-GB/step_3.md @@ -0,0 +1,128 @@ +## Eitemau ar werth + +
+
+Mae angen eitemau ar werth ar dy siop. Bydd gan bob eitem bris a fydd yn cael ei ychwanegu at newidyn `cyfanswm`{:class="block3variables"}. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +Bydd angen i ti gadw golwg ar faint mae dy gwsmer yn ei wario. + +--- task --- + +Ychwanegu newidyn newydd o'r enw `cyfanswm`{:class="block3variables"} ar gyfer pob corlun. + +Cliciwch ar dy gorlun **gwerthwr** ac ychwanegwch sgript i `osod`{:class="block3variables"} y `cyfanswm`{:class="block3variables"} i `0` pan fydd y prosiect yn dechrau. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +Pa **eitem** fydd dy gwsmer(iaid) yn ei brynu? ++ Rhyw fath o fwyd neu ddiod ++ Offer chwaraeon, teganau neu declynnau ++ Ffyn hud, diodydd hud, neu lyfrau swyn ++ Dillad neu eitemau ffasiwn eraill ++ Your own idea + +--- task --- + +Ychwanega gorlun ar gyfer yr **eitem** gyntaf rwyt ti'n mynd i'w gwerthu yn dy siop. + +Os wyt ti'n dymuno, galli di ychwanegu pris at y wisg drwy ddefnyddio'r offeryn testun yn y Golygydd Paent. Neu ychwanega bris i'r gefnlen a gosod yr eitem wrth ei ymyl. + +![Enghreifftiau o eitemau gyda symiau wedi'u hysgrifennu wrth eu hymyl.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Ychwanega sgript i `newid`{:class="block3variables"} y ` cyfanswm`{:class="block3variables"} yn ôl pris dy eitem pan fydd y cwsmer yn clicio ar y corlun. + +--- collapse --- +--- +title: Clicio i ychwanegu eitem +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +Mae hefyd yn syniad da `chwarae sain`{:class="block3sound"} i roi adborth i'r cwsmer eu bod wedi ychwanegu eitem. + +![Yr eicon ychwanegu sain](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Prawf:** Clicia ar dy eitem a gwneud yn siŵr fod gwerth y newidyn `cyfanswm`{:class="block3variables"} yn cynyddu yn ôl pris yr eitem, a dy fod yn clywed yr effaith sain. Clicia mwy o weithiau i weld y cyfanswm yn codi. + +Clicia'r faner werdd i gychwyn dy brosiect a gwna'n siŵr bod y `cyfanswm`{:class="block3variables"} yn dechrau ar `0`. + +--- /task --- + +--- task --- + +Ychwanega mwy o eitemau i dy siop. + +Galli di naill ai: ++ Ddyblygu'r eitem gyntaf ac yna ychwanegu gwisg newydd yn y Golygydd Paent ++ Ychwanegu corlun ac yna llusgo'r sgript `pan fydd y faner wedi'i chlicio`{:class="block3events"} o'r eitem gyntaf i dy eitem newydd + +Ychwanega label pris at y wisg neu'r gefnlen os wyt ti'n eu defnyddio. + +--- /task --- + +--- task --- + +Cliciwch ar dy gorlun **Item** newydd yn y rhestr Corluniau ac yna clicia ar y tab **Cod**. + +Newidia faint mae'r `cyfanswm`{:class="block3variables"} yn ei newid i bris dy eitem newydd. + +--- /task --- + +--- task --- + +**Profi:** Clicia'r faner werdd i gychwyn dy brosiect a chlicio ar eitemau i'w hychwanegu. Gwna'n siŵr fod y cyfanswm yn cynyddu yn ôl y swm cywir bob tro y byddi di'n clicio ar eitem. + +Os wyt ti'n ychwanegu labeli prisiau, gwna'n siŵr eu bod yn cyfateb i'r swm sy'n cael ei ychwanegu at y `cyfanswm`{:class="block3variables"}, neu bydd dy gwsmeriaid yn drysu! + +--- /task --- + +--- task --- + +**Difa chwilod:** Efallai bydd angen i ti drwsio chwilod yn dy brosiect. Dyma rai chwilod cyffredin. + +---collapse--- +--- +title: Dydy'r cyfanswm ddim yn mynd i 0 pan fydda i'n clicio ar y faner werdd +--- + +Gwna'n siŵr dy fod wedi gosod gwerth cychwynnol y newidyn `cyfanswm`{:class="block3variables"} yn y sgript `pan fydd y faner wedi'i chlicio`{:class="block3events"} ar dy gorlun **gwerthwr**. + +--- /collapse --- + +--- collapse --- +--- +title: Dydy'r cyfanswm ddim yn cynyddu yn ôl y swm cywir pan fydda i'n clicio ar eitem +--- + +Gwna'n siŵr fod gan bob eitem sgript `pan gaiff y corlun hwn ei glicio`{:class="block3events"} sy'n newid y `cyfanswm`{:class="block3variables"} yn ôl y swm cywir ar gyfer yr eitem honno - efallai dy fod ti wedi newid y pris ar gyfer y corlun anghywir. + +Gwna'n siŵr dy fod ti wedi defnyddio'r bloc `newid`{:class="block3variables"} ac nid y bloc `gosod`{:class="block3variables"} i newid y `cyfanswm`{:class="block3variables"}. Mae angen i ti ddefnyddio `newid`{:class="block3variables"} i ychwanegu'r pris at y cyfanswm, ond mae angen gosod y cyfanswm i bris yr eitem sydd newydd ei ychwanegu. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/cy-GB/step_4.md b/cy-GB/step_4.md new file mode 100644 index 000000000..1baa900f2 --- /dev/null +++ b/cy-GB/step_4.md @@ -0,0 +1,141 @@ +## Prynwyd + +
+
+ +Mae angen i'r corlun **gwerthwr**: +- ofyn a ydy'r cwsmer yn barod i dalu am yr eitemau +- cymryd taliad +- paratoi ar gyfer y cwsmer nesaf +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +Pan fydd wedi gorffen dewis eitemau, bydd y cwsmer yn clicio ar y corlun **gwerthwr** i dalu. + +--- task --- + + Dyweda wrth y cwsmer faint fydd ei eitemau yn costio. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Ychwanega sain talu at dy gorlun **gwerthwr** fel bod y cwsmer yn gwybod bod taliad yn digwydd. + +![Yr eicon ychwanegu sain](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Ychwanega floc `chwarae sain tan y diwedd`{:class="block3sound"} i dy sgript. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Gorffena'r broses talu. Gosoda'r `cyfanswm`{:class="block3variables"} yn ôl i `0` ar ôl talu, `dweud`{:class="block3looks"} hwyl fawr a `darlledu`{:class="block3control"} `cwsmer nesaf`{: class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Profi:** Profa dy brosiect a gwneud yn siŵr: +- Bod y cwsmer yn gallu talu gyda'r effeithiau sain cywir +- Bod y `cyfanswm`{:class="block3variables"} yn cael ei osod yn ôl i `0` ar ôl i gwsmer dalu neu ganslo. + +--- /task --- + + +--- task --- + +**Difa chwilod:** Efallai bydd angen i ti drwsio chwilod yn dy brosiect. + +Dyma rai chwilod cyffredin: + +---collapse--- +--- +title: Dydy'r gwerthwr ddim yn gwneud unrhyw beth pan dw i'n clicio arno +--- + +Mae gen ti gryn dipyn o gorluniau yn dy brosiect. Gwna'n siŵr fod y sgript `pan gaiff y corlun ei glicio`{:class="block3events"} ar dy gorlun **gwerthwr**. + +**Awgrym:** Os wyt ti wedi ei ychwanegu at y corlun anghywir, galli di lusgo'r cod i'r corlun **gwerthwr**, yna ei ddileu o'r corlun arall. + +--- /collapse --- + +--- collapse --- +--- +title: Mae'r geiriau yn y blociau dweud yn uno +--- + +Pan fyddi di'n `uno`{:class="block3operators"} dau ddarn at ei gilydd, mae angen ychwanegu bwlch ar ddiwedd dy ddarn cyntaf o destun neu ar ddechrau dy ail ddarn o destun. + +Mae gan y rhain fwlch ar ddiwedd rhan gyntaf yr uniad: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +---collapse--- +--- +title: Dydy'r cyfanswm ddim yn ailosod ar ôl gwerthu +--- + +Gwna'n siŵr dy fod ti wedi defnyddio: + +```blocks3 +set [total v] to (0) +``` + +**nid**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +teitl: Dydy'r gwerthwr ddim yn ymateb +--- + +Gwna'n siŵr mai'r `gweithredwr`{:class="block3operators"} yn yr amod `os`{:class="block3control"} yw'r symbol "mwy na" `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Awgrym:** Cymhara dy god gyda'r enghreifftiau cod. Oes unrhyw wahaniaethau na ddylai fod yno? + +--- /task --- + +--- save --- diff --git a/cy-GB/step_5.md b/cy-GB/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/cy-GB/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/cy-GB/step_6.md b/cy-GB/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/cy-GB/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/cy-GB/step_7.md b/cy-GB/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/cy-GB/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/cy-GB/step_8.md b/cy-GB/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/cy-GB/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/cy-GB/step_9.md b/cy-GB/step_9.md new file mode 100644 index 000000000..fc81c758f --- /dev/null +++ b/cy-GB/step_9.md @@ -0,0 +1,21 @@ +## Beth nesaf? + +Os wyt ti'n dilyn y llwybr [Mwy o Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch), galli di symud ymlaen i'r prosiect [Paid disgyn i mewn](https://projects.raspberrypi.org/en/projects/dont-fall-in). Yn y prosiect yma, byddi di'n creu gêm o'r brig i lawr lle mae'n rhaid i ti neidio o blatfform i blatfform a pheidio disgyn i mewn. + +--- print-only --- + +![Prosiect Paid disgyn i mewn](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Cyfarwyddiadau:** Pwysa space neu daro'r Llwyfan i neidio. + +--- /no-print --- + +Os wyt ti am gael mwy o hwyl wrth ddysgu Scratch, gallet ti roi cynnig ar unrhyw un o'r [prosiectau hyn](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/el-GR/images/add-friend-projects.png b/el-GR/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/el-GR/images/add-friend-projects.png differ diff --git a/el-GR/images/add-sound.png b/el-GR/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/el-GR/images/add-sound.png differ diff --git a/el-GR/images/add-your-projects.png b/el-GR/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/el-GR/images/add-your-projects.png differ diff --git a/el-GR/images/banner.png b/el-GR/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/el-GR/images/banner.png differ diff --git a/el-GR/images/choose-backdrop-icon.png b/el-GR/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/el-GR/images/choose-backdrop-icon.png differ diff --git a/el-GR/images/choose-sprite-icon.png b/el-GR/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/el-GR/images/choose-sprite-icon.png differ diff --git a/el-GR/images/create-studio.png b/el-GR/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/el-GR/images/create-studio.png differ diff --git a/el-GR/images/customer-count.png b/el-GR/images/customer-count.png new file mode 100644 index 000000000..329be5f4f Binary files /dev/null and b/el-GR/images/customer-count.png differ diff --git a/el-GR/images/dont-fall-in-project.png b/el-GR/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/el-GR/images/dont-fall-in-project.png differ diff --git a/el-GR/images/example-strip.png b/el-GR/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/el-GR/images/example-strip.png differ diff --git a/el-GR/images/fruit.png b/el-GR/images/fruit.png new file mode 100644 index 000000000..84b92da2e Binary files /dev/null and b/el-GR/images/fruit.png differ diff --git a/el-GR/images/icecream.png b/el-GR/images/icecream.png new file mode 100644 index 000000000..d1a62eb7a Binary files /dev/null and b/el-GR/images/icecream.png differ diff --git a/el-GR/images/item-amounts.png b/el-GR/images/item-amounts.png new file mode 100644 index 000000000..e442782ca Binary files /dev/null and b/el-GR/images/item-amounts.png differ diff --git a/el-GR/images/large-readout.png b/el-GR/images/large-readout.png new file mode 100644 index 000000000..f60fd4094 Binary files /dev/null and b/el-GR/images/large-readout.png differ diff --git a/el-GR/images/my-stuff-menu.png b/el-GR/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/el-GR/images/my-stuff-menu.png differ diff --git a/el-GR/images/naming-studio.png b/el-GR/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/el-GR/images/naming-studio.png differ diff --git a/el-GR/images/new-variable.png b/el-GR/images/new-variable.png new file mode 100644 index 000000000..20ad843db Binary files /dev/null and b/el-GR/images/new-variable.png differ diff --git a/el-GR/images/quiz2.png b/el-GR/images/quiz2.png new file mode 100644 index 000000000..f97d14c0f Binary files /dev/null and b/el-GR/images/quiz2.png differ diff --git a/el-GR/images/sprite-pane-size.png b/el-GR/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/el-GR/images/sprite-pane-size.png differ diff --git a/el-GR/images/step2-image.png b/el-GR/images/step2-image.png new file mode 100644 index 000000000..dc33b1714 Binary files /dev/null and b/el-GR/images/step2-image.png differ diff --git a/el-GR/images/step3-image.png b/el-GR/images/step3-image.png new file mode 100644 index 000000000..f78776593 Binary files /dev/null and b/el-GR/images/step3-image.png differ diff --git a/el-GR/images/step4-image.png b/el-GR/images/step4-image.png new file mode 100644 index 000000000..4355d9449 Binary files /dev/null and b/el-GR/images/step4-image.png differ diff --git a/el-GR/images/studio-example.png b/el-GR/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/el-GR/images/studio-example.png differ diff --git a/el-GR/images/tshirt.png b/el-GR/images/tshirt.png new file mode 100644 index 000000000..a737c81ec Binary files /dev/null and b/el-GR/images/tshirt.png differ diff --git a/el-GR/images/upgrade-image.png b/el-GR/images/upgrade-image.png new file mode 100644 index 000000000..faa5d1f4c Binary files /dev/null and b/el-GR/images/upgrade-image.png differ diff --git a/el-GR/images/vending.png b/el-GR/images/vending.png new file mode 100644 index 000000000..216113f01 Binary files /dev/null and b/el-GR/images/vending.png differ diff --git a/el-GR/meta.yml b/el-GR/meta.yml new file mode 100644 index 000000000..d9987e1b8 --- /dev/null +++ b/el-GR/meta.yml @@ -0,0 +1,39 @@ +--- +title: Επόμενος πελάτης παρακαλώ +hero_image: images/banner.png +description: Ένα έργο προσομοίωσης καταστήματος όπου ο πελάτης μπορεί να αγοράσει αντικείμενα. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Αντικείμενα προς πώληση + completion: + - engaged + - + title: Αγορές + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/el-GR/quiz1/question_1.md b/el-GR/quiz1/question_1.md new file mode 100644 index 000000000..5bf1a3cd8 --- /dev/null +++ b/el-GR/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Ερώτηση 1 από 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ Ένας πελάτης προσθέτει αντικείμενα που συνολικά κοστίζουν `50` και πληρώνει ++ Ένας νέος πελάτης προσθέτει αντικείμενα που συνολικά κοστίζουν `40`, αλλά το `σύνολο`{:class="block3variables"} εμφανίζεται τώρα ως `90` για τον δεύτερο πελάτη + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/el-GR/quiz1/question_2.md b/el-GR/quiz1/question_2.md new file mode 100644 index 000000000..a29471e0d --- /dev/null +++ b/el-GR/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Ερώτηση 2 από 3 +--- + +Σε ένα κατάστημα, ο **πωλητής** έχει αυτόν τον κώδικα στο script ολοκλήρωσης της αγοράς: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +Όταν εκτελείται ο κώδικας, ο χρήστης πληκτρολογεί την απάντηση «υπέροχο». Τι θα πει το αντικείμενο του **πωλητή**; + +![Ένα πλαίσιο «ρώτησε» με πληκτρολογημένη τη λέξη «υπέροχο».](images/quiz2.png) + +--- choices --- + +- (x) Ο **Πωλητής** θα πει `Λυπάμαι που το ακούω αυτό.` + + --- feedback --- + + Ναι. Οι άνθρωποι γνωρίζουν ότι το «υπέροχο» σημαίνει το ίδιο με το «καλό», αλλά το «=» ελέγχει αν τα γράμματα είναι τα ίδια. + + Η **συνθήκη** `απάντηση`{:class="block3sensing"} = `καλό` είναι "ψευδής", οπότε τα μπλοκ `πες`{:class="block3looks"} στο τμήμα `αλλιώς`{:class="block3control"} θα τρέξει. + + --- /feedback --- + +- (x) Ο **Πωλητής** θα πει `Αυτό είναι φανταστικό!` + + --- feedback --- + +Όχι, μόνο η ακριβής απάντηση `καλό` θα κάνει τον **πωλητή** να πει `Αυτό είναι φανταστικό!`. Κοίταξε ξανά τον κώδικα για να δεις τι μήνυμα θα πει ο **πωλητής** για όλες τις απαντήσεις που δεν είναι `καλό`. + +**Συμβουλή:** Και το «Καλό» και το «ΚΑΛΟ» θα ταιριάζει με το «καλό». + + --- /feedback --- + +- ( ) Ο **πωλητής** δεν θα πει τίποτα. + + --- feedback --- + +Όχι, ο **πωλητής** θα λέει πάντα κάτι. Κοίταξε προσεκτικά τον κώδικα για να δεις ποιο θα είναι το μήνυμα. + + --- /feedback --- + +- (x) Ο **πωλητής** θα πει `υπέροχο`. + + --- feedback --- + +Όχι, ο **πελάτης** πληκτρολόγησε την απάντηση «υπέροχο», αλλά ο **πωλητής** δεν λέει την απάντηση. Κοίταξε προσεκτικά τον κώδικα για να δεις ποιο θα είναι το μήνυμα. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/el-GR/quiz1/question_3.md b/el-GR/quiz1/question_3.md new file mode 100644 index 000000000..45b44bdc8 --- /dev/null +++ b/el-GR/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Ερώτηση 3 από 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- () Να πανικοβληθεί! + + --- feedback --- + + Αυτό δεν πρόκειται να βοηθήσει. Πρέπει να σκεφτείς καθαρά για να διορθώσεις προβλήματα προγραμματισμού. + + --- /feedback --- + +- () Να τα παρατήσει + + --- feedback --- + + There are lots of things you could try. Οι σπουδαίοι/ες προγραμματιστές/τριες συχνά κάνουν λάθη την πρώτη φορά και μαθαίνουν πολλά από τα λάθη τους. + + --- /feedback --- + +- (x) Να διαβάσει προσεκτικά τον κώδικα και να προσπαθήσει να τον διορθώσει. + + --- feedback --- + + Ναι. Η διόρθωση σφαλμάτων είναι μέρος του προγραμματισμού. Όσο περισσότερο εξασκείσαι, τόση περισσότερη εμπειρία αποκτάς και τόσο πιο εύκολο γίνεται να βρεις και να διορθώσεις σφάλματα. + + --- /feedback --- + +- () Να εκνευριστεί με τον υπολογιστή + + --- feedback --- + +Ένας υπολογιστής κάνει μόνο ό, τι του λέμε να κάνει, επομένως δεν είναι λογικό να εκνευριζόμαστε μαζί του. + +Ο εκνευρισμός δεν θα βοηθήσει στην επίλυση του προβλήματος, καθώς θα δυσκολέψει την καθαρή σκέψη. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/el-GR/scratch-comments.txt b/el-GR/scratch-comments.txt new file mode 100644 index 000000000..129940ef4 --- /dev/null +++ b/el-GR/scratch-comments.txt @@ -0,0 +1,9 @@ +πληκτρολόγησε το όνομα της επιχείρησής σου + +το όνομα της επιχείρησής σου + +χρησιμοποίησε το όνομα του αντικειμένου σου για το Δοχείο + +αρχική θέση + +ο προηγούμενος πελάτης παίρνει την τσάντα diff --git a/el-GR/scratch-translatable.txt b/el-GR/scratch-translatable.txt new file mode 100644 index 000000000..a8cf177ce --- /dev/null +++ b/el-GR/scratch-translatable.txt @@ -0,0 +1,49 @@ +όνομα + +το κατάστημά μου + +επόμενος πελάτης + +Επόμενος πελάτης παρακαλώ! + +σύνολο + +Αυτό θα είναι + +Ευχαριστώ για τις αγορές σου στο + +Θέλεις να πληρώσεις ή να ακυρώσεις; + +πληρωμή + +ακύρωση + +Εντάξει. Κανένα πρόβλημα + +Κάνε κλικ στα προϊόντα που θέλεις + +Βρήκες όλα όσα ήθελες σήμερα; + +ναι + +Αυτό είναι φανταστικό! + +Ίσως θα έπρεπε να προσθέσω περισσότερα προϊ'όντα στο κατάστημά μου + +Τσάντα + +1 μεζούρα + +κώνος + +κατάστημα + +αληθής + +ψευδές + +Πώς είσαι σήμερα; + +καλά + +Λυπάμαι που το ακούω αυτό. diff --git a/el-GR/solutions/Cool Shirts.sb3 b/el-GR/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..4254ea921 Binary files /dev/null and b/el-GR/solutions/Cool Shirts.sb3 differ diff --git a/el-GR/solutions/Fresh Space Fruit.sb3 b/el-GR/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..47f5980fd Binary files /dev/null and b/el-GR/solutions/Fresh Space Fruit.sb3 differ diff --git a/el-GR/solutions/Vending machine.sb3 b/el-GR/solutions/Vending machine.sb3 new file mode 100644 index 000000000..f253c287e Binary files /dev/null and b/el-GR/solutions/Vending machine.sb3 differ diff --git a/el-GR/solutions/ice cream shop.sb3 b/el-GR/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..e7c942e90 Binary files /dev/null and b/el-GR/solutions/ice cream shop.sb3 differ diff --git a/el-GR/step_1.md b/el-GR/step_1.md new file mode 100644 index 000000000..4e16d4a49 --- /dev/null +++ b/el-GR/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Δημιούργησε μια εφαρμογή καταστήματος όπου ο πελάτης μπορεί να αγοράσει προϊόντα από το κατάστημά σου. Το έργο θα είναι σε προβολή πρώτου προσώπου όπου ο παίκτης είναι πελάτης. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. Όταν είσαι έτοιμος/η, κάνε κλικ στο Kiran για να το πας στο ταμείο. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/el-GR/step_2.md b/el-GR/step_2.md new file mode 100644 index 000000000..d3bb5f3cf --- /dev/null +++ b/el-GR/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? Θα μπορούσε να είναι κάτι ρεαλιστικό, κάτι από βιβλίο ή ταινία που σου αρέσει ή κάτι εντελώς τρελό. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Άνοιξε ένα [νέο έργο Scratch](http://rpf.io/scratch-new){:target="_ blank"} και δες την ποικιλία των αντικειμένων και υποβάθρων που μπορείς να χρησιμοποιήσεις. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ Ένα ράφι ή βιβλιοθήκη για να τοποθετήσεις προϊόντα — μπορείς να το δημιουργήσεις με τη Ζωγραφική στο υπόβαθρο + +--- /task --- + +--- task --- + +Πρόσθεσε ένα αντικείμενο που θα παίξει τον ρόλο του πωλητή. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/el-GR/step_3.md b/el-GR/step_3.md new file mode 100644 index 000000000..4b4c539e1 --- /dev/null +++ b/el-GR/step_3.md @@ -0,0 +1,128 @@ +## Αντικείμενα προς πώληση + +
+
+Το κατάστημά σου χρειάζεται αντικείμενα προς πώληση. Κάθε αντικείμενο θα έχει μια τιμή που θα προστεθεί σε μια μεταβλητή `σύνολο`{:class="block3variables"}. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +Θα πρέπει να παρακολουθείς πόσα ξοδεύει ο πελάτης σου. + +--- task --- + +Πρόσθεσε μια νέα μεταβλητή με το όνομα `σύνολο`{:class="block3variables"} για όλα τα αντικείμενα. + +Κάνε κλικ στο αντικείμενο **πωλητή** και πρόσθεσε ένα script για να `ορίσεις`{:class="block3variables"} το `σύνολο`{:class="block3variables"} σε `0` όταν ξεκινά το έργο. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +Ποια **αντικείμενα** θα αγοράσουν οι πελάτες σου; ++ Κάποιο είδος φαγητού ή ποτού ++ Αθλητικός εξοπλισμός, παιχνίδια ή gadget ++ Μαγικά ραβδιά, φίλτρα ή βιβλία με ξόρκια ++ Ρούχα ή άλλα είδη μόδας ++ Your own idea + +--- task --- + +Πρόσθεσε ένα αντικείμενο για το πρώτο **προϊόν ** που πρόκειται να πουλήσεις στο κατάστημά σου. + +Εάν θέλεις, μπορείς να προσθέσεις μια τιμή στην ενδυμασία χρησιμοποιώντας το εργαλείο κειμένου στο πρόγραμμα επεξεργασίας Ζωγραφική. Ή να προσθέσεις μια τιμή στο υπόβαθρο και να τοποθετήσεις το αντικείμενο δίπλα της. + +![Παραδείγματα αντικειμένων με τα ποσά γραμμένα δίπλα τους.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Πρόσθεσε ένα script για να `αλλάξεις`{:class="block3variables"} το `σύνολο`{:class="block3variables"} με βάση την τιμή του προϊόντος σου όταν ο πελάτης κάνει κλικ στο αντικείμενο. + +--- collapse --- +--- +title: Κάνε κλικ για να προσθέσεις ένα αντικείμενο +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +Είναι επίσης καλή ιδέα να `παίξεις έναν ήχο`{:class="block3sound"} για να καταλάβει ο πελάτης ότι έχει προσθέσει ένα αντικείμενο. + +![Το εικονίδιο προσθήκης ήχου](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Δοκιμή:** Κάνε κλικ στο προϊόν σου και έλεγξε ότι η τιμή της μεταβλητής `σύνολο`{:class="block3variables"} αυξάνεται κατά την τιμή του προϊόντος και ακούς το ηχητικό εφέ. Κάνε κλικ περισσότερες φορές για να δεις το σύνολο να αυξάνεται. + +Κάνε κλικ στην πράσινη σημαία για να ξεκινήσεις το έργο σου και βεβαιώσου ότι το `σύνολο`{:class="block3variables"} ξεκινά από το `0`. + +--- /task --- + +--- task --- + +Πρόσθεσε επιπλέον προϊόντα στο κατάστημά σου. + +Μπορείς είτε: ++ Να διπλασιάσεις το πρώτο προϊόν και στη συνέχεια, να προσθέσεις μία νέα ενδυμασία στο πρόγραμμα επεξεργασίας Ζωγραφική ++ Να προσθέσεις ένα αντικείμενο και στη συνέχεια, να σύρεις το script του `όταν γίνει κλικ στη σημαία`{:class="block3events"} από το πρώτο προϊόν στο νέο σου προϊόν + +Πρόσθεσε μια ετικέτα τιμής στην ενδυμασία ή στο σκηνικό εάν τα χρησιμοποιείς. + +--- /task --- + +--- task --- + +Κάνε κλικ στο νέο σου αντικείμενο για το **Προϊόν** στη λίστα Αντικειμένων και στη συνέχεια, κάνε κλικ στην καρτέλα **Κώδικας**. + +Άλλαξε το ποσό στο `σύνολο `{:class="block3variables"} κατά την τιμή του νέου σου προϊόντος. + +--- /task --- + +--- task --- + +**Δοκιμή:** Κάνε κλικ στην πράσινη σημαία για να ξεκινήσεις το έργο σου και κάνε κλικ στα προϊόντα για να τα προσθέσεις. Έλεγξε ότι το σύνολο αυξάνεται κατά το σωστό ποσό κάθε φορά που κάνεις κλικ σε ένα προϊόν. + +Εάν έχεις προσθέσει ετικέτες τιμών, βεβαιώσου ότι ταιριάζουν με το ποσό που προστίθεται στο `σύνολο`{:class="block3variables"}, διαφορετικά οι πελάτες σου θα μπερδευτούν! + +--- /task --- + +--- task --- + +**Εντοπισμός σφαλμάτων:** Ενδέχεται να βρεις κάποια σφάλματα στο έργο σου που πρέπει να διορθώσεις. Εδώ είναι μερικά συνηθισμένα σφάλματα. + +--- collapse --- +--- +title: Το σύνολο δεν πηγαίνει στο 0 όταν κάνω κλικ στην πράσινη σημαία +--- + +Βεβαιώσου ότι έχεις ορίσει την τιμή έναρξης της μεταβλητής `σύνολο`{:class="block3variables"} στο script `όταν γίνει κλικ στη σημαία`{:class="block3events"} στο αντικείμενο του **πωλητή** σου. + +--- /collapse --- + +--- collapse --- +--- +title: Το σύνολο δεν αυξάνεται κατά το σωστό ποσό όταν κάνω κλικ σε ένα προϊόν +--- + +Βεβαιώσου ότι κάθε προϊόν έχει ένα script `όταν γίνει κλικ σε αυτό το αντικείμενο`{:class="block3events"} που αλλάζει το `σύνολο`{:class="block3variables"} κατά το σωστό ποσό για αυτό το προϊόν— ίσως έχεις αλλάξει την τιμή για το λάθος αντικείμενο. + +Έλεγξε ότι έχεις χρησιμοποιήσει το μπλοκ `άλλαξε`{:class="block3variables"} και όχι το μπλοκ `όρισε`{:class="block3variables"} για να αλλάξεις το `σύνολο`{:class="block3variables"}. Πρέπει να χρησιμοποιήσεις το `άλλαξε`{:class="block3variables"} για να προσθέσεις την τιμή στο σύνολο, δεν θέλεις να ορίσεις το σύνολο στην τιμή του προϊόντος που μόλις προστέθηκε. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/el-GR/step_4.md b/el-GR/step_4.md new file mode 100644 index 000000000..f7c974bfd --- /dev/null +++ b/el-GR/step_4.md @@ -0,0 +1,141 @@ +## Αγορές + +
+
+ +Το αντικείμενο **πωλητής** πρέπει: +- να ρωτήσει αν ο πελάτης είναι έτοιμος να πληρώσει για τα προϊόντα +- να λάβει την πληρωμή +- να ετοιμαστεί για τον επόμενο πελάτη +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +Όταν ολοκληρώσει την επιλογή των προϊόντων, ο πελάτης θα κάνει κλικ στο αντικείμενο του **πωλητή** για να πληρώσει. + +--- task --- + + Πες στον πελάτη πόσο θα κοστίσουν τα προϊόντα του. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Πρόσθεσε έναν ήχο πληρωμής στο αντικείμενο του **πωλητή** σου, ώστε ο πελάτης να γνωρίζει ότι η πληρωμή πραγματοποιείται. + +![Το εικονίδιο προσθήκης ήχου](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Πρόσθεσε το μπλοκ `παίξε τον ήχο μέχρι τέλους`{:class="block3sound"} στο script σου. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Ολοκλήρωσε την πώληση. Όρισε το `σύνολο`{:class="block3variables"} πάλι σε `0` μετά την πληρωμή, `πες`{:class="block3looks"} αντίο και `μετάδωσε`{:class="block3control"} `επόμενος πελάτης`{: class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Δοκιμή:** Δοκίμασε το έργο σου και βεβαιώσου: +- Ο πελάτης μπορεί να πληρώσει με τα σωστά ηχητικά εφέ +- Το `σύνολο`{:class="block3variables"} επανέρχεται σε `0` αφού ένας πελάτης πληρώσει ή ακυρώσει. + +--- /task --- + + +--- task --- + +**Εντοπισμός σφαλμάτων:** Ενδέχεται να βρεις κάποια σφάλματα στο έργο σου που πρέπει να διορθώσεις. + +Εδώ είναι μερικά συνηθισμένα σφάλματα: + +--- collapse --- +--- +title: Ο πωλητής δεν κάνει τίποτα όταν κάνω κλικ πάνω του +--- + +Έχεις πολλά αντικείμενα στο έργο σου. Βεβαιώσου ότι το script `όταν γίνει κλικ σε αυτό το αντικείμενο`{: class = "block3events"} βρίσκεται στο αντικείμενό σου **πωλητής**. + +**Συμβουλή:** Εάν το έχεις προσθέσει σε λάθος αντικείμενο, μπορείς να σύρεις τον κώδικα στο αντικείμενο **πωλητής** και μετά να το διαγράψεις από το άλλο αντικείμενο. + +--- /collapse --- + +--- collapse --- +--- +title: Οι λέξεις στα μπλοκ "πες" συγχωνεύονται μεταξύ τους +--- + +Όταν `ενώνεις`{:class="block3operators"} δύο κείμενα μαζί, πρέπει να προσθέτεις ένα κενό στο τέλος του πρώτου σου κειμένου ή στην αρχή του δεύτερου κειμένου. + +Αυτά έχουν ένα κενό στο τέλος του πρώτου μέρους της ένωσης: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: Το σύνολο δεν επανέρχεται στην αρχική τιμή μετά την πώληση +--- + +Έλεγξε ότι έχεις χρησιμοποιήσει: + +```blocks3 +set [total v] to (0) +``` + +**όχι**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: Ο πωλητής δεν ανταποκρίνεται +--- + +Βεβαιώσου ότι ο `τελεστής`{:class="block3operators"} στη συνθήκη `εάν`{:class="block3control"} είναι το σύμβολο μεγαλύτερο από `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Συμβουλή:** Σύγκρινε τον κώδικά σου με τα παραδείγματα κώδικα. Υπάρχουν διαφορές που δεν θα έπρεπε να υπάρχουν; + +--- /task --- + +--- save --- diff --git a/el-GR/step_5.md b/el-GR/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/el-GR/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/el-GR/step_6.md b/el-GR/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/el-GR/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/el-GR/step_7.md b/el-GR/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/el-GR/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/el-GR/step_8.md b/el-GR/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/el-GR/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/el-GR/step_9.md b/el-GR/step_9.md new file mode 100644 index 000000000..11fd023ab --- /dev/null +++ b/el-GR/step_9.md @@ -0,0 +1,21 @@ +## Και τώρα; + +Εάν ακολουθείς το μονοπάτι [Περισσότερη Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch), μπορείς να προχωρήσεις στο έργο [Μην πέσεις](https://projects.raspberrypi.org/en/projects/dont-fall-in). Σε αυτό το έργο, θα δημιουργήσεις ένα παιχνίδι με οπτική γωνία από ψηλά όπου πρέπει να πηδάς από πλατφόρμα σε πλατφόρμα και να μην πέσεις μέσα. + +--- print-only --- + +![Έργο "Μην πέσεις"](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Οδηγίες:** Πάτα το πλήκτρο του διαστήματος ή πάτα στο Σκηνικό για να πηδήξεις. + +--- /no-print --- + +Αν θέλεις να διασκεδάσεις περισσότερο εξερευνώντας το Scratch, τότε μπορείς να δοκιμάσεις οποιοδήποτε από [αυτά τα έργα](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/en-US/images/add-friend-projects.png b/en-US/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/en-US/images/add-friend-projects.png differ diff --git a/en-US/images/add-sound.png b/en-US/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/en-US/images/add-sound.png differ diff --git a/en-US/images/add-your-projects.png b/en-US/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/en-US/images/add-your-projects.png differ diff --git a/en-US/images/banner.png b/en-US/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/en-US/images/banner.png differ diff --git a/en-US/images/choose-backdrop-icon.png b/en-US/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/en-US/images/choose-backdrop-icon.png differ diff --git a/en-US/images/choose-sprite-icon.png b/en-US/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/en-US/images/choose-sprite-icon.png differ diff --git a/en-US/images/create-studio.png b/en-US/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/en-US/images/create-studio.png differ diff --git a/en-US/images/customer-count.png b/en-US/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/en-US/images/customer-count.png differ diff --git a/en-US/images/dont-fall-in-project.png b/en-US/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/en-US/images/dont-fall-in-project.png differ diff --git a/en-US/images/example-strip.png b/en-US/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/en-US/images/example-strip.png differ diff --git a/en-US/images/fruit.png b/en-US/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/en-US/images/fruit.png differ diff --git a/en-US/images/icecream.png b/en-US/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/en-US/images/icecream.png differ diff --git a/en-US/images/item-amounts.png b/en-US/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/en-US/images/item-amounts.png differ diff --git a/en-US/images/large-readout.png b/en-US/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/en-US/images/large-readout.png differ diff --git a/en-US/images/my-stuff-menu.png b/en-US/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/en-US/images/my-stuff-menu.png differ diff --git a/en-US/images/naming-studio.png b/en-US/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/en-US/images/naming-studio.png differ diff --git a/en-US/images/new-variable.png b/en-US/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/en-US/images/new-variable.png differ diff --git a/en-US/images/quiz2.png b/en-US/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/en-US/images/quiz2.png differ diff --git a/en-US/images/sprite-pane-size.png b/en-US/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/en-US/images/sprite-pane-size.png differ diff --git a/en-US/images/step2-image.png b/en-US/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/en-US/images/step2-image.png differ diff --git a/en-US/images/step3-image.png b/en-US/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/en-US/images/step3-image.png differ diff --git a/en-US/images/step4-image.png b/en-US/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/en-US/images/step4-image.png differ diff --git a/en-US/images/studio-example.png b/en-US/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/en-US/images/studio-example.png differ diff --git a/en-US/images/tshirt.png b/en-US/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/en-US/images/tshirt.png differ diff --git a/en-US/images/upgrade-image.png b/en-US/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/en-US/images/upgrade-image.png differ diff --git a/en-US/images/vending.png b/en-US/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/en-US/images/vending.png differ diff --git a/en-US/meta.yml b/en-US/meta.yml new file mode 100644 index 000000000..8df1f3d0d --- /dev/null +++ b/en-US/meta.yml @@ -0,0 +1,39 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Items for sale + completion: + - engaged + - + title: Purchases + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/en-US/quiz1/question_1.md b/en-US/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/en-US/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/en-US/quiz1/question_2.md b/en-US/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/en-US/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/en-US/quiz1/question_3.md b/en-US/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/en-US/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/en-US/scratch-comments.txt b/en-US/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/en-US/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/en-US/scratch-translatable.txt b/en-US/scratch-translatable.txt new file mode 100644 index 000000000..06cc175a3 --- /dev/null +++ b/en-US/scratch-translatable.txt @@ -0,0 +1,49 @@ +name + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +yes + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +true + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/en-US/solutions/Cool Shirts.sb3 b/en-US/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/en-US/solutions/Cool Shirts.sb3 differ diff --git a/en-US/solutions/Fresh Space Fruit.sb3 b/en-US/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/en-US/solutions/Fresh Space Fruit.sb3 differ diff --git a/en-US/solutions/Vending machine.sb3 b/en-US/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/en-US/solutions/Vending machine.sb3 differ diff --git a/en-US/solutions/ice cream shop.sb3 b/en-US/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/en-US/solutions/ice cream shop.sb3 differ diff --git a/en-US/step_1.md b/en-US/step_1.md new file mode 100644 index 000000000..e41514d8a --- /dev/null +++ b/en-US/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/en-US/step_2.md b/en-US/step_2.md new file mode 100644 index 000000000..fb48837ea --- /dev/null +++ b/en-US/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/en-US/step_3.md b/en-US/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/en-US/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/en-US/step_4.md b/en-US/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/en-US/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/en-US/step_5.md b/en-US/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/en-US/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/en-US/step_6.md b/en-US/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/en-US/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/en-US/step_7.md b/en-US/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/en-US/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/en-US/step_8.md b/en-US/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/en-US/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/en-US/step_9.md b/en-US/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/en-US/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/es-419/images/add-friend-projects.png b/es-419/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/es-419/images/add-friend-projects.png differ diff --git a/es-419/images/add-sound.png b/es-419/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/es-419/images/add-sound.png differ diff --git a/es-419/images/add-your-projects.png b/es-419/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/es-419/images/add-your-projects.png differ diff --git a/es-419/images/banner.png b/es-419/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/es-419/images/banner.png differ diff --git a/es-419/images/choose-backdrop-icon.png b/es-419/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/es-419/images/choose-backdrop-icon.png differ diff --git a/es-419/images/choose-sprite-icon.png b/es-419/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/es-419/images/choose-sprite-icon.png differ diff --git a/es-419/images/create-studio.png b/es-419/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/es-419/images/create-studio.png differ diff --git a/es-419/images/customer-count.png b/es-419/images/customer-count.png new file mode 100644 index 000000000..80dcafcd6 Binary files /dev/null and b/es-419/images/customer-count.png differ diff --git a/es-419/images/dont-fall-in-project.png b/es-419/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/es-419/images/dont-fall-in-project.png differ diff --git a/es-419/images/example-strip.png b/es-419/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/es-419/images/example-strip.png differ diff --git a/es-419/images/fruit.png b/es-419/images/fruit.png new file mode 100644 index 000000000..d90edabce Binary files /dev/null and b/es-419/images/fruit.png differ diff --git a/es-419/images/icecream.png b/es-419/images/icecream.png new file mode 100644 index 000000000..a45c8791c Binary files /dev/null and b/es-419/images/icecream.png differ diff --git a/es-419/images/item-amounts.png b/es-419/images/item-amounts.png new file mode 100644 index 000000000..a9d44e807 Binary files /dev/null and b/es-419/images/item-amounts.png differ diff --git a/es-419/images/large-readout.png b/es-419/images/large-readout.png new file mode 100644 index 000000000..27000552a Binary files /dev/null and b/es-419/images/large-readout.png differ diff --git a/es-419/images/my-stuff-menu.png b/es-419/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/es-419/images/my-stuff-menu.png differ diff --git a/es-419/images/naming-studio.png b/es-419/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/es-419/images/naming-studio.png differ diff --git a/es-419/images/new-variable.png b/es-419/images/new-variable.png new file mode 100644 index 000000000..5e017fb27 Binary files /dev/null and b/es-419/images/new-variable.png differ diff --git a/es-419/images/quiz2.png b/es-419/images/quiz2.png new file mode 100644 index 000000000..557a289f9 Binary files /dev/null and b/es-419/images/quiz2.png differ diff --git a/es-419/images/sprite-pane-size.png b/es-419/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/es-419/images/sprite-pane-size.png differ diff --git a/es-419/images/step2-image.png b/es-419/images/step2-image.png new file mode 100644 index 000000000..13f4abf61 Binary files /dev/null and b/es-419/images/step2-image.png differ diff --git a/es-419/images/step3-image.png b/es-419/images/step3-image.png new file mode 100644 index 000000000..08375a6d5 Binary files /dev/null and b/es-419/images/step3-image.png differ diff --git a/es-419/images/step4-image.png b/es-419/images/step4-image.png new file mode 100644 index 000000000..46a0e9a49 Binary files /dev/null and b/es-419/images/step4-image.png differ diff --git a/es-419/images/studio-example.png b/es-419/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/es-419/images/studio-example.png differ diff --git a/es-419/images/tshirt.png b/es-419/images/tshirt.png new file mode 100644 index 000000000..09629879f Binary files /dev/null and b/es-419/images/tshirt.png differ diff --git a/es-419/images/upgrade-image.png b/es-419/images/upgrade-image.png new file mode 100644 index 000000000..7a3f3ad89 Binary files /dev/null and b/es-419/images/upgrade-image.png differ diff --git a/es-419/images/vending.png b/es-419/images/vending.png new file mode 100644 index 000000000..269b1dcc4 Binary files /dev/null and b/es-419/images/vending.png differ diff --git a/es-419/meta.yml b/es-419/meta.yml new file mode 100644 index 000000000..4bcd0c910 --- /dev/null +++ b/es-419/meta.yml @@ -0,0 +1,39 @@ +--- +title: Siguiente cliente por favor +hero_image: images/banner.png +description: Un proyecto de simulación de tienda donde el cliente puede comprar artículos. +meta_title: Proyectos de codificación de Scratch para niños y adolescentes | Próximo cliente por favor +meta_description: Aprende Scratch con los proyectos de codificación de la Fundación Raspberry Pi para niños y adolescentes. Cree una aplicación Scratch donde el cliente pueda comprar artículos de su tienda. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Productos en venta + completion: + - engaged + - + title: Compras + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/es-419/quiz1/question_1.md b/es-419/quiz1/question_1.md new file mode 100644 index 000000000..70a1d430c --- /dev/null +++ b/es-419/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Test rápido + +Contesta las tres preguntas. Hay sugerencias para guiarlo a la respuesta correcta. + +Cuando haya respondido a cada pregunta, haga clic en **Verificar mi respuesta**. + +¡Diviértete! + +--- question --- + +--- +legend: Pregunta 1 de 3 +--- + +Un proyecto de tienda utiliza una variable `total`{:class="block3variables"} para almacenar el total de cada cliente. + ++ Un cliente agrega artículos que suman `50` y paga ++ Un nuevo cliente agrega elementos que suman `40`, pero el `total`{:class="block3variables"} ahora se muestra como `90` para el segundo cliente + +¿Qué bloque necesitarías agregar al script de pago para que el total vuelva a `0` cuando cada cliente pague? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +No del todo. `total`{:class="block3variables"} debería ser `0` después de que un cliente paga, pero no es el bloque `cambiar`{:class="block3variables"} que necesitas. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + No del todo; esto funcionaría para el segundo cliente, pero el `total`{:class="block3variables"} sería incorrecto para otros clientes. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Sí, correcto. Debes `fijar`{:class="block3variables"} el `total`{:class="block3variables"} a `0` después de que cada cliente pague. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +Eso funcionaría para este ejemplo, pero ¿qué pasa si el primer cliente gastó una cantidad diferente? Tu solución debe funcionar cuando el cliente anterior gasta cantidades diferentes. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/es-419/quiz1/question_2.md b/es-419/quiz1/question_2.md new file mode 100644 index 000000000..0b977e49a --- /dev/null +++ b/es-419/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Pregunta 2 de 3 +--- + +En una tienda, el **vendedor** tiene este código en el script de pago: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +Cuando se ejecuta el código, el usuario escribe la respuesta "excelente". ¿Qué dirá el objeto **vendedor**? + +![Un cuadro de 'preguntar' con la palabra 'genial' escrita.](images/quiz2.png) + +--- choices --- + +- (x) El **Vendedor** dirá `Lamento escuchar eso.` + + --- feedback --- + + Sí. Los humanos saben que 'genial' es lo mismo que 'bueno', pero el '=' comprueba si las letras son iguales. + + La **condición** `respuesta`{:class="block3sensing"} = `bueno` es 'falso' entonces se ejecutará el bloque `decir`{:class="block3looks"} en la parte `entonces`{:class="block3control"}. + + --- /feedback --- + +- ( ) El **vendedor** dirá `¡Eso es fantástico!` + + --- feedback --- + +No, solo la respuesta exacta `buena` hará que el **vendedor** diga `¡Eso es fantástico!`. Vuelve a ver el código para ver qué mensaje dirá el **vendedor** para todas las respuestas que no sean `buenas`. + +**Sugerencia:** 'Bueno' o 'BUENO' coincidiría con 'bueno'. + + --- /feedback --- + +- ( ) El **vendedor** no dirá nada. + + --- feedback --- + +No, el **vendedor** siempre dirá algo. Mira cuidadosamente el código para ver cuál será el mensaje. + + --- /feedback --- + +- ( ) El **vendedor** dirá `genial`. + + --- feedback --- + +No, el **cliente** escribió la respuesta 'genial' pero el **vendedor** no dice la respuesta. Mira cuidadosamente el código para ver cuál será el mensaje. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/es-419/quiz1/question_3.md b/es-419/quiz1/question_3.md new file mode 100644 index 000000000..ebfd9f047 --- /dev/null +++ b/es-419/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Pregunta 3 de 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) ¡Pánico! + + --- feedback --- + + Eso no va a ayudar. Debes pensar con claridad para solucionar los problemas de codificación. + + --- /feedback --- + +- ( ) Abandonar + + --- feedback --- + + There are lots of things you could try. Los grandes codificadores a menudo se equivocan la primera vez y aprenden mucho de sus errores. + + --- /feedback --- + +- (x) Lee el código detenidamente e intenta depurarlo. + + --- feedback --- + + Sí. La corrección de errores es parte de la codificación. Cuanto más practiques, más experiencia obtendrás y más fácil será encontrar y corregir errores. + + --- /feedback --- + +- ( ) Enojarse con la computadora + + --- feedback --- + +Una computadora solo hace lo que le decimos que haga, por lo que enojarse con ella no es lógico. + +Estar molesto no ayudará a resolver el problema, ya que hará que sea más difícil pensar con claridad. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/es-419/scratch-comments.txt b/es-419/scratch-comments.txt new file mode 100644 index 000000000..44a964074 --- /dev/null +++ b/es-419/scratch-comments.txt @@ -0,0 +1,9 @@ +escribe el nombre de tu negocio + +el nombre de tu negocio + +usa el nombre de tu objeto Contenedor + +posición de salida + +el cliente anterior toma la bolsa diff --git a/es-419/scratch-translatable.txt b/es-419/scratch-translatable.txt new file mode 100644 index 000000000..ce7fc4066 --- /dev/null +++ b/es-419/scratch-translatable.txt @@ -0,0 +1,49 @@ +nombre + +mi tienda + +siguiente cliente + +¡Siguiente cliente por favor! + +total + +Son + +Gracias por comprar en + +¿Quieres pagar o cancelar? + +pagar + +cancelar + +Está bien. No hay problema + +Haz clic en los elementos que quieras + +¿Encontraste todo lo que querías? + +sí + +¡Eso es fantástico! + +Tal vez debería agregar más artículos a mi tienda + +Bolsa + +1 cucharada + +cono + +tienda + +verdadero + +falso + +¿Cómo estás hoy? + +bien + +Lamento escuchar eso. diff --git a/es-419/solutions/Cool Shirts.sb3 b/es-419/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..ff0e30b75 Binary files /dev/null and b/es-419/solutions/Cool Shirts.sb3 differ diff --git a/es-419/solutions/Fresh Space Fruit.sb3 b/es-419/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..f38b06841 Binary files /dev/null and b/es-419/solutions/Fresh Space Fruit.sb3 differ diff --git a/es-419/solutions/Vending machine.sb3 b/es-419/solutions/Vending machine.sb3 new file mode 100644 index 000000000..225e75cee Binary files /dev/null and b/es-419/solutions/Vending machine.sb3 differ diff --git a/es-419/solutions/ice cream shop.sb3 b/es-419/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..bd1f9a3d0 Binary files /dev/null and b/es-419/solutions/ice cream shop.sb3 differ diff --git a/es-419/step_1.md b/es-419/step_1.md new file mode 100644 index 000000000..9a365c49f --- /dev/null +++ b/es-419/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Crea una aplicación para tiendas donde el cliente pueda comprar artículos de tu tienda. El proyecto estará en primera persona donde el jugador es un cliente. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. Cuando estés listo, haz clic en Kiran para pagar. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Obtén ideas 💭 + +Haz clic en el objeto de **vendedor** para comprar artículos: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (Proyecto destacado de la comunidad) + +Haga clic en las insignias del pin del orgullo para agregarlas a su bolsa de compras: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Obtén ideas 💭 + +Vas a tomar algunas decisiones de diseño para crear tu personaje. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Proyecto de ejemplo](images/fruit.png) ![Proyecto de ejemplo](images/tshirt.png) ![Proyecto de ejemplo](images/icecream.png) ![Proyecto de ejemplo](images/vending.png) + +--- /print-only --- + diff --git a/es-419/step_2.md b/es-419/step_2.md new file mode 100644 index 000000000..51bd433a0 --- /dev/null +++ b/es-419/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? Podría ser algo realista, algo de un libro o una película que te guste, o algo completamente absurdo. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Abre un [nuevo proyecto de Scratch](http://rpf.io/scratch-new){:target="_blank"} y observa la variedad de objetos y fondos que puedes usar. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ Un estante o una librería para poner artículos; podrías pintar esto en el fondo + +--- /task --- + +--- task --- + +Agrega un objeto para representar al vendedor. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/es-419/step_3.md b/es-419/step_3.md new file mode 100644 index 000000000..dc9b3e7f5 --- /dev/null +++ b/es-419/step_3.md @@ -0,0 +1,128 @@ +## Productos en venta + +
+
+Tu tienda necesita artículos para vender. Cada artículo tendrá un precio que se agregará a una variable `total`{:class="block3variables"}. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +Deberás realizar un seguimiento de cuánto gasta tu cliente. + +--- task --- + +Agrega una nueva variable llamada `total`{:class="block3variables"} para todos los objetos. + +Haz clic en tu objeto **vendedor** y agrega un script para `establecer`{:class="block3variables"} los `totales`{:class="block3variables"} a `0` cuando comience el proyecto. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +¿Qué **artículos** comprarán tus clientes? ++ Algún tipo de comida o bebida ++ Equipo deportivo, juguetes o aparatos ++ Varitas mágicas, pociones o libros de hechizos ++ Ropa u otros artículos de moda ++ Your own idea + +--- task --- + +Agrega un objeto para los primeros **artículos** que vas a vender en tu tienda. + +Si quieres puedes agregar un precio al disfraz usando la herramienta de texto en el editor de Paint. O agrega un precio al fondo y coloca el artículo junto a él. + +![Ejemplos de artículos con cantidades escritas junto a ellos.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Agrega un script a `cambiar`{:class="block3variables"} el `total`{:class="block3variables"} por el precio de tu artículo cuando el cliente hace clic en el objeto. + +--- collapse --- +--- +title: Haz clic para agregar un elemento +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +También es una buena idea `reproducir un sonido`{:class="block3sound"} para informar al cliente de que ha agregado un artículo. + +![El icono para agregar un sonido](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Prueba:** Haz clic en tu artículo y comprueba que el valor de la variable `total`{:class="block3variables"} aumenta según el precio del artículo, y que escuchas el efecto de sonido. Haz clic más veces para ver cómo sube el total. + +Haz clic en la bandera verde para iniciar tu proyecto y asegúrate de que el `total`{:class="block3variables"} comience en `0`. + +--- /task --- + +--- task --- + +Añade más artículos a tu tienda. + +También puedes: ++ Duplica el primer elemento y luego agrega un nuevo disfraz en el editor de Paint ++ Agrega un objeto y luego arrastra el `cuando la bandera haga clic en` {:class="block3events"} el script desde el primer artículo hasta tu nuevo elemento + +Agrega una etiqueta de precio al disfraz o al telón de fondo, si los estás usando. + +--- /task --- + +--- task --- + +Haz clic en su nuevo articulo **artículo** en la lista de Sprites y luego haz clic en la pestaña **Code**. + +Cambia la cantidad que cambia el `total`{:class="block3variables"} por el precio de tu nuevo artículo. + +--- /task --- + +--- task --- + +**Prueba:** Haz clic en la bandera verde para iniciar tu proyecto y haz clic en los elementos para agregarlos. Comprueba que el total aumenta en la cantidad correcta cada vez que haces clic en un elemento. + +Si agregaste etiquetas de precios, asegúrate de que coincidan con la cantidad que se agrega al `total`{:class="block3variables"}, o tus clientes se confundirán. + +--- /task --- + +--- task --- + +**Depuración:** Es posible que encuentres algunos errores en tu proyecto que necesite corregir. Aquí hay algunos errores comunes. + +--- collapse --- +--- +title: El total no llega a 0 cuando hago clic en la bandera verde +--- + +Comprueba que hayas establecido el valor inicial de la variable `total`{:class="block3variables"} en el script `al presionar Bandera verde`{:class="block3events"} en tu objeto **vendedor**. + +--- /collapse --- + +--- collapse --- +--- +title: El total no aumenta en la cantidad correcta cuando hago clic en un elemento +--- + +Verifica que cada `al hacer clic en este objeto`{:class="block3events"} tenga una secuencia de comandos que cambia el total de `0`{:class="block3variables"} por la cantidad correcta para ese elemento; es posible que hayas cambiado el precio del objeto equivocado. + +Comprueba que hayas utilizado el bloque `cambiar`{:class="block3variables"} y no el bloque `establecer`{:class="block3variables"} para cambiar el `total`{:class="block3variables"}. Debes usar `cambiar`{:class="block3variables"} para agregar el precio al total, no quieres establecer el total en el precio del artículo que se acaba de agregar. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/es-419/step_4.md b/es-419/step_4.md new file mode 100644 index 000000000..d0eff6fbb --- /dev/null +++ b/es-419/step_4.md @@ -0,0 +1,141 @@ +## Compras + +
+
+ +El objeto**vendedor** necesita: +- preguntar si el cliente está listo para pagar los artículos +- aceptar el pago +- prepararse para el próximo cliente +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +Cuando hayas terminado de elegir artículos, el cliente hará clic en el sprite **vendedor** para pagar. + +--- task --- + + Dile al cliente cuánto costarán sus artículos. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Agrega un sonido de pago a su sprite **vendedor** para que el cliente sepa que se está realizando el pago. + +![El icono para agregar un sonido](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Agrega el sonido de reproducción `hasta que termine el bloque`{:class="block3sound"} a su script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Termina la venta. Establece `total`{:class="block3variables"} volver a `0` después del pago, `decir`{:class="block3looks"} adiós y `transmitir`{:class="block3control"} `próximo cliente`{: clase="bloque3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Prueba:** Prueba tu proyecto y asegúrate de: lo siguiente: +- El cliente puede pagar con los efectos de sonido correctos +- El `total`{:class="block3variables"} se regresa a `0` después de que un cliente paga o cancela. + +--- /task --- + + +--- task --- + +**Depuración:** Es posible que encuentres algunos errores en tu proyecto que necesites corregir. + +Estos son algunos errores comunes: + +--- collapse --- +--- +title: El vendedor no hace nada cuando hago clic en él +--- + +Tienes bastantes objetos en tu proyecto. Asegúrate de que el script `al hacer clic en este objeto `{:class="block3events"} esté en tu objeto **vendedor**. + +**Sugerencia:** Si lo agregaste al objeto incorrecto, puedes arrastrar el código al objeto **vendedor** y luego eliminarlo del otro objeto. + +--- /collapse --- + +--- collapse --- +--- +title: Las palabras en los bloques de hablar se fusionan +--- + +Cuando `unes `{:class="block3operators"} dos piezas, debes agregar un espacio al final de tu primera pieza de texto o al comienzo de tu segunda pieza de texto. + +Estos tienen un espacio al final de la primera parte de la unión: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: El total no se reinicia después de una venta +--- + +Comprueba que has utilizado: + +```blocks3 +set [total v] to (0) +``` + +**no**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: El vendedor no responde +--- + +Asegúrate de que el `operador`{:class="block3operators"} en la condición `if`{:class="block3control"} sea el símbolo mayor que `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Sugerencia:** Compara tu código con los ejemplos de código. ¿Hay alguna diferencia que no debería estar ahí? + +--- /task --- + +--- save --- diff --git a/es-419/step_5.md b/es-419/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/es-419/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/es-419/step_6.md b/es-419/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/es-419/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/es-419/step_7.md b/es-419/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/es-419/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/es-419/step_8.md b/es-419/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/es-419/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/es-419/step_9.md b/es-419/step_9.md new file mode 100644 index 000000000..576c052c8 --- /dev/null +++ b/es-419/step_9.md @@ -0,0 +1,21 @@ +## ¿Qué sigue? + +Si sigues el camino [Más scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch), puedes pasar al proyecto [No te caigas](https://projects.raspberrypi.org/en/projects/dont-fall-in). En este proyecto, harás un juego de arriba hacia abajo en el que tienes que saltar de plataforma en plataforma y no caerte. + +--- print-only --- + +![Proyecto No te caigas](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instrucciones:** Presiona espacio o toca el escenario para saltar. + +--- /no-print --- + +Si quieres divertirte más explorando Scratch, puedes probar cualquiera de [estos proyectos](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/es-LA/images/add-friend-projects.png b/es-LA/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/es-LA/images/add-friend-projects.png differ diff --git a/es-LA/images/add-sound.png b/es-LA/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/es-LA/images/add-sound.png differ diff --git a/es-LA/images/add-your-projects.png b/es-LA/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/es-LA/images/add-your-projects.png differ diff --git a/es-LA/images/banner.png b/es-LA/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/es-LA/images/banner.png differ diff --git a/es-LA/images/choose-backdrop-icon.png b/es-LA/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/es-LA/images/choose-backdrop-icon.png differ diff --git a/es-LA/images/choose-sprite-icon.png b/es-LA/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/es-LA/images/choose-sprite-icon.png differ diff --git a/es-LA/images/create-studio.png b/es-LA/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/es-LA/images/create-studio.png differ diff --git a/es-LA/images/customer-count.png b/es-LA/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/es-LA/images/customer-count.png differ diff --git a/es-LA/images/example-strip.png b/es-LA/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/es-LA/images/example-strip.png differ diff --git a/es-LA/images/fruit.png b/es-LA/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/es-LA/images/fruit.png differ diff --git a/es-LA/images/icecream.png b/es-LA/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/es-LA/images/icecream.png differ diff --git a/es-LA/images/item-amounts.png b/es-LA/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/es-LA/images/item-amounts.png differ diff --git a/es-LA/images/large-readout.png b/es-LA/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/es-LA/images/large-readout.png differ diff --git a/es-LA/images/my-stuff-menu.png b/es-LA/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/es-LA/images/my-stuff-menu.png differ diff --git a/es-LA/images/naming-studio.png b/es-LA/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/es-LA/images/naming-studio.png differ diff --git a/es-LA/images/new-variable.png b/es-LA/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/es-LA/images/new-variable.png differ diff --git a/es-LA/images/quiz2.png b/es-LA/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/es-LA/images/quiz2.png differ diff --git a/es-LA/images/sprite-pane-size.png b/es-LA/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/es-LA/images/sprite-pane-size.png differ diff --git a/es-LA/images/step2-image.png b/es-LA/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/es-LA/images/step2-image.png differ diff --git a/es-LA/images/step3-image.png b/es-LA/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/es-LA/images/step3-image.png differ diff --git a/es-LA/images/step4-image.png b/es-LA/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/es-LA/images/step4-image.png differ diff --git a/es-LA/images/studio-example.png b/es-LA/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/es-LA/images/studio-example.png differ diff --git a/es-LA/images/tshirt.png b/es-LA/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/es-LA/images/tshirt.png differ diff --git a/es-LA/images/upgrade-image.png b/es-LA/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/es-LA/images/upgrade-image.png differ diff --git a/es-LA/images/vending.png b/es-LA/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/es-LA/images/vending.png differ diff --git a/es-LA/meta.yml b/es-LA/meta.yml new file mode 100644 index 000000000..4d41bbf62 --- /dev/null +++ b/es-LA/meta.yml @@ -0,0 +1,35 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: Introduction + - + title: Your business idea + - + title: Items for sale + completion: engaged + - + title: Purchases + - + title: Additional features + completion: internal + - + title: Reflection + completion: external + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + - + title: Upgrade your project + - + title: Share + - + title: What next? diff --git a/es-LA/quiz1/question_1.md b/es-LA/quiz1/question_1.md new file mode 100644 index 000000000..df0a69573 --- /dev/null +++ b/es-LA/quiz1/question_1.md @@ -0,0 +1,89 @@ +## Reflection + +Well done, you used your skills to design and build a shop app! + +You used `Events`{:class="block3events"}, `Control`{:class="block3control"}, `Sensing`{:class="block3sensing"}, `Operators`{:class="block3operators"}, `Variables`{:class="block3variables"}, `Looks`{:class="block3looks"} and `Sound`{:class="block3sound"} blocks! + +Now it's time to reflect — reflecting is an important part of learning because it helps make new connections in your brain. + +Answer the three questions below to reflect on what you've learned. + +After each question, press submit. You will be guided towards the correct answer. You can do this activity as many times as you want to. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +```blocks3 +when this sprite clicked +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +say (join [That will be ] (total)) for (2) seconds +play sound [coin v] until done +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/es-LA/quiz1/question_2.md b/es-LA/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/es-LA/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/es-LA/quiz1/question_3.md b/es-LA/quiz1/question_3.md new file mode 100644 index 000000000..7e14dd975 --- /dev/null +++ b/es-LA/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Jay's project is not working. What should they do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things Jay could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/es-LA/solutions/Cool Shirts.sb3 b/es-LA/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/es-LA/solutions/Cool Shirts.sb3 differ diff --git a/es-LA/solutions/Fresh Space Fruit.sb3 b/es-LA/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/es-LA/solutions/Fresh Space Fruit.sb3 differ diff --git a/es-LA/solutions/Vending machine.sb3 b/es-LA/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/es-LA/solutions/Vending machine.sb3 differ diff --git a/es-LA/solutions/ice cream shop.sb3 b/es-LA/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/es-LA/solutions/ice cream shop.sb3 differ diff --git a/es-LA/step_1.md b/es-LA/step_1.md new file mode 100644 index 000000000..cd46d4085 --- /dev/null +++ b/es-LA/step_1.md @@ -0,0 +1,78 @@ +## Introduction + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +

+**First-person view** means that you don't see your character on the screen, instead you see what they see. +

+ +You will: ++ Create a shop app with items to buy and a checkout ++ Plan your time to get a simple version working quickly ++ Try shops made by others and share your shop so others can try it + +![](images/example-strip.png) + +--- no-print --- + +--- task --- + +
+
+ +### Try it + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +--- /task --- + +### Get inspiration + +You are going to make some design decisions to choose what items your business will offer and how the customer will check out. + +--- task --- + +Explore these example shops to get more ideas. Which projects allow you to buy multiple items at once? Which allow you to buy items one at a time? + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} +
+ +
+ +--- /task --- + +--- /no-print --- + +--- print-only --- + +### Get inspiration + +You are going to make some design decisions to create your character. See inside example projects in [Scratch 2: Next customer please! - Examples](https://scratch.mit.edu/studios/29611454/){:target="_blank"} Scratch studio. + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/es-LA/step_2.md b/es-LA/step_2.md new file mode 100644 index 000000000..3733516ca --- /dev/null +++ b/es-LA/step_2.md @@ -0,0 +1,160 @@ +## Your business idea + +
+
+What is your business idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your business idea. + +[[[working-offline]]] + +--- /task --- + +What backdrop and extra scenery sprites will you need? ++ A backdrop from the Scratch library, or a plain coloured backdrop? ++ A desk, counter, or window to sell from? ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- task --- + +Click **Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + +Click **Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +You can always add more scenery later if you find that you need it. + +--- /task --- + +What will the **seller** sprite look like? ++ A person or non-player character such as a shopkeeper, farmer, or librarian? ++ A machine such as a vending machine, jukebox, or cash register? + +

+An **NPC** is a non-player character that you can interact with in a game or interactive story. Can you think of games you have played that have NPCs? Next time you play, think about how it was someone's job to make that character. +

+ +--- task --- + +Add a sprite to represent the seller. + +![](images/choose-sprite-icon.png) + +--- /task --- + +What is the name of your business? + +--- task --- + +Create a `variable`{:class="block3variables"} called `name`: + +--- collapse --- + +--- + +title: Create a variable + +--- + +From the `Variables`{:class="block3variables"} blocks menu click the **Make a Variable** button. + +Call your new variable `name`: + +![The New Variable pop up window with text input 'name'.](images/new-variable.png) + +**Notice:** The new `name` variable appears on the Stage and can now be used in the `Variable`{:class="block3variables"} blocks. + +--- /collapse --- + +Click on your **seller** sprite and add code to set the variable to the name of your business: + +```blocks3 +when flag clicked +set [name v] to () //type the name of your business +``` + +Create a sign on the Stage with your variable: + +--- collapse --- + +--- + +title: Change the appearance and position of variables + +--- + +Right-click on the `variable`{:class="block3variables"} on the Stage and choose large readout: + +![Pop up menu showing format options with 'large readout' selected.](images/large-readout.png) + +Drag your `variable`{:class="block3variables"} to position it on the Stage as part of the shop scenery. + +--- /collapse --- + +--- /task --- + +--- task --- + +**Test:** Make sure you can see your business name as the value of the variable on the Stage. + +--- /task --- + +Get ready to welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3control"} block. Creat a new message called `next customer`. + +```blocks3 +when flag clicked +set [name v] to [my shop] // your business name ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here is a common bug. + +--- collapse --- + +--- + +title: Variable shows `0` + +--- + +You should use the `set [name v] to ()`{:class="block3variables"} block to set the variable to your name. If you have already added a script, check that you have typed your business name into the value and clicked the green flag. + +```blocks3 +when flag clicked +set [name v] to [my shop] // your business name +``` + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/es-LA/step_3.md b/es-LA/step_3.md new file mode 100644 index 000000000..70d9fcfc9 --- /dev/null +++ b/es-LA/step_3.md @@ -0,0 +1,127 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- + +--- + +title: Click to add an item + +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- **Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. --- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- **Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- + +--- + +title: The total doesn't go to 0 when I click the green flag + +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- + +--- + +title: The total doesn't increase by the correct amount when I click on an item + +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/es-LA/step_4.md b/es-LA/step_4.md new file mode 100644 index 000000000..8bcd280ea --- /dev/null +++ b/es-LA/step_4.md @@ -0,0 +1,255 @@ +## Purchases + +
+
+The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +You might want to give the customer the option to cancel their shopping. + +--- collapse --- + +--- + +title: Set up pay and cancel options + +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +--- task --- + +To make sure your customer has items in their basket before paying, you can insert an `if...else`{:class="block3control"} block. + +--- collapse --- + +--- + +title: Check total amount + +--- + +`If`{:class="block3control"} `total`{:class="block3variables"} `>`{:class="block3operators"} `0` then insert your existing script. + +`Else`{:class="block3control"} `say`{:class="block3looks"} a helpful message. + +```blocks3 +when this sprite clicked ++ if <(total) > [0]>then +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +else +say [Click on the items you'd like] for (2) seconds +end +``` + +--- /collapse --- + +--- /task --- + +--- task --- **Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. --- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- + +--- + +title: The seller doesn't do anything when I click on them + +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- + +--- + +title: The seller says 'total' not the total amount + +--- + +Make sure your `say`{:class="block3looks"} block has the `total`{:class="block3variables"} variable block, not the word `total`. + +```blocks3 + when this sprite clicked + say {join [That will be ](total)} for (2) seconds + ``` + +--- /collapse --- + +--- collapse --- + +--- + +title: The words in the say blocks merge together + +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- + +--- + +title: The total doesn't reset after a sale + +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- + +--- + +title: The seller isn't responding + +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/es-LA/step_5.md b/es-LA/step_5.md new file mode 100644 index 000000000..afe395fca --- /dev/null +++ b/es-LA/step_5.md @@ -0,0 +1,200 @@ +## Additional features + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. + +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +--- task --- + +Do you think your checkout person (or machine) should ask more questions? + +You can add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +You could ask whether the service was good, or if they're having a nice day. Or something specific to your shop, like "What are you going to cook?" + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +Do you want something else to happen when you add an item? + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +The Ice cream project shows the ice cream as the customer chooses their options. + +--- collapse --- + +--- + +title: Customise and show a sprite + +--- + +Each item needs to `broadcast`{:class="block3events"} in its `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++broadcast (1 scoop v) +``` + +Then the sprite you want to show or change needs to respond to that message: + +```blocks3 +when I receive [1 scoop v] +play sound (Chomp v) until done +switch costume to (1 scoop v) +``` + +You may also want to change or hide the sprite for a new customer: + +```blocks3 +when I receive [next customer v] +switch costume to (cone v) +``` + +If you have multiple items, then you will need to add more messages and scripts to to receive them. + +--- /collapse --- + +--- /task --- + +Have you noticed that your customer can add items after they have started to check out? + +--- task --- + +If you want to stop the customer adding items when they are at the checkout, you can add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Only allow purchases when the customer isn't at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` + +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- save --- + diff --git a/es-LA/step_6.md b/es-LA/step_6.md new file mode 100644 index 000000000..d7bab7933 --- /dev/null +++ b/es-LA/step_6.md @@ -0,0 +1 @@ +## Reflection \ No newline at end of file diff --git a/es-LA/step_7.md b/es-LA/step_7.md new file mode 100644 index 000000000..55f5dc3d0 --- /dev/null +++ b/es-LA/step_7.md @@ -0,0 +1,22 @@ +## Upgrade your project + +
+
+If you have time you can upgrade your project. +
+
+![](images/upgrade-image.png){:width="300px"} +
+
+ +Here are some ideas you could try: +- Add more items to sell +- Add more graphic and sound effects +- Paint your own scenery and other costumes +- Make another business and allow players to visit them both + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/es-LA/step_8.md b/es-LA/step_8.md new file mode 100644 index 000000000..928b81ad0 --- /dev/null +++ b/es-LA/step_8.md @@ -0,0 +1,55 @@ +## Share + +If you are in a club, why not share your project with friends? + +If you are logged in on Scratch, you can create a studio and add your **Next customer please** project. You can also add your friends' **Next customer please** projects to create a mall of different shops and businesses. + +--- collapse --- + +--- + +title: Build a shopping market + +--- + +Save your project, then click on your username and select **My Stuff**. + +![the pop up menu under your account name in the top right.](images/my-stuff-menu.png) + +From your **My Stuff** page, click on the **+ New Studio** button. + +![The grey 'New Studio' button on the 'My Stuff' page.](images/create-studio.png) + +Give your new studio a name and description. + +![The name box at the top of the studio and the description box on the left of the studio.](images/naming-studio.png) + +Click on the **Add projects** button. You can add yor own project by selecting it from the list at the bottom of the page. + +![The 'Add Projects' pop up at the bottom of the page with a gallery of project thumbnails. ](images/add-your-projects.png) + +You can also add projects your friends have created. Ask them to share their project and give you the link. Type or paste the link into the url box, then click the **Add by url** button. + +![The url box underneath the 'Add projects' button and the 'Add by url' button.](images/path.png) + +--- /collapse --- + +Share your project and send a link to people you know. The whole Scratch community will also be able to find your project and try it out. + +[[[share-scratch]]] + +Why not invite your friends to create a project? Let them know how you had fun. + +If you have a Scratch account, and have shared your **Next customer please** project, keep an eye out for comments that others may make about your creation. Feedback is a great way to reflect on your work. Ignore any comments that are unhelpful or irrelevant. + +[[[comments-feedback-scratch]]] + +--- task --- + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) + +--- /task --- diff --git a/es-LA/step_9.md b/es-LA/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/es-LA/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/fr-FR/images/add-friend-projects.png b/fr-FR/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/fr-FR/images/add-friend-projects.png differ diff --git a/fr-FR/images/add-sound.png b/fr-FR/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/fr-FR/images/add-sound.png differ diff --git a/fr-FR/images/add-your-projects.png b/fr-FR/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/fr-FR/images/add-your-projects.png differ diff --git a/fr-FR/images/banner.png b/fr-FR/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/fr-FR/images/banner.png differ diff --git a/fr-FR/images/choose-backdrop-icon.png b/fr-FR/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/fr-FR/images/choose-backdrop-icon.png differ diff --git a/fr-FR/images/choose-sprite-icon.png b/fr-FR/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/fr-FR/images/choose-sprite-icon.png differ diff --git a/fr-FR/images/create-studio.png b/fr-FR/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/fr-FR/images/create-studio.png differ diff --git a/fr-FR/images/customer-count.png b/fr-FR/images/customer-count.png new file mode 100644 index 000000000..01e0b9dae Binary files /dev/null and b/fr-FR/images/customer-count.png differ diff --git a/fr-FR/images/dont-fall-in-project.png b/fr-FR/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/fr-FR/images/dont-fall-in-project.png differ diff --git a/fr-FR/images/example-strip.png b/fr-FR/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/fr-FR/images/example-strip.png differ diff --git a/fr-FR/images/fruit.png b/fr-FR/images/fruit.png new file mode 100644 index 000000000..adccacb6d Binary files /dev/null and b/fr-FR/images/fruit.png differ diff --git a/fr-FR/images/icecream.png b/fr-FR/images/icecream.png new file mode 100644 index 000000000..9e5076d84 Binary files /dev/null and b/fr-FR/images/icecream.png differ diff --git a/fr-FR/images/item-amounts.png b/fr-FR/images/item-amounts.png new file mode 100644 index 000000000..381688e7f Binary files /dev/null and b/fr-FR/images/item-amounts.png differ diff --git a/fr-FR/images/large-readout.png b/fr-FR/images/large-readout.png new file mode 100644 index 000000000..2176fda55 Binary files /dev/null and b/fr-FR/images/large-readout.png differ diff --git a/fr-FR/images/my-stuff-menu.png b/fr-FR/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/fr-FR/images/my-stuff-menu.png differ diff --git a/fr-FR/images/naming-studio.png b/fr-FR/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/fr-FR/images/naming-studio.png differ diff --git a/fr-FR/images/new-variable.png b/fr-FR/images/new-variable.png new file mode 100644 index 000000000..5f170c8d5 Binary files /dev/null and b/fr-FR/images/new-variable.png differ diff --git a/fr-FR/images/quiz2.png b/fr-FR/images/quiz2.png new file mode 100644 index 000000000..82642c9e4 Binary files /dev/null and b/fr-FR/images/quiz2.png differ diff --git a/fr-FR/images/sprite-pane-size.png b/fr-FR/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/fr-FR/images/sprite-pane-size.png differ diff --git a/fr-FR/images/step2-image.png b/fr-FR/images/step2-image.png new file mode 100644 index 000000000..0c0f84513 Binary files /dev/null and b/fr-FR/images/step2-image.png differ diff --git a/fr-FR/images/step3-image.png b/fr-FR/images/step3-image.png new file mode 100644 index 000000000..fe76c7ac7 Binary files /dev/null and b/fr-FR/images/step3-image.png differ diff --git a/fr-FR/images/step4-image.png b/fr-FR/images/step4-image.png new file mode 100644 index 000000000..126ce9c62 Binary files /dev/null and b/fr-FR/images/step4-image.png differ diff --git a/fr-FR/images/studio-example.png b/fr-FR/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/fr-FR/images/studio-example.png differ diff --git a/fr-FR/images/tshirt.png b/fr-FR/images/tshirt.png new file mode 100644 index 000000000..b07b17d85 Binary files /dev/null and b/fr-FR/images/tshirt.png differ diff --git a/fr-FR/images/upgrade-image.png b/fr-FR/images/upgrade-image.png new file mode 100644 index 000000000..be0966a44 Binary files /dev/null and b/fr-FR/images/upgrade-image.png differ diff --git a/fr-FR/images/vending.png b/fr-FR/images/vending.png new file mode 100644 index 000000000..ea3f8cf88 Binary files /dev/null and b/fr-FR/images/vending.png differ diff --git a/fr-FR/meta.yml b/fr-FR/meta.yml new file mode 100644 index 000000000..9bfa16cdf --- /dev/null +++ b/fr-FR/meta.yml @@ -0,0 +1,39 @@ +--- +title: Client suivant, s'il vous plaît +hero_image: images/banner.png +description: Un projet de simulation de boutique où le client peut acheter des articles. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Articles en vente + completion: + - engaged + - + title: Achats + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/fr-FR/quiz1/question_1.md b/fr-FR/quiz1/question_1.md new file mode 100644 index 000000000..bad90cd81 --- /dev/null +++ b/fr-FR/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Questionnaire rapide + +Réponds aux trois questions. Il y a des indices pour te guider vers la bonne réponse. + +Lorsque tu as répondu à chaque question, clique sur **Vérifier ma réponse**. + +Amuse-toi bien ! + +--- question --- + +--- +legend: Question 1 sur 3 +--- + +Un projet de boutique utilise une variable `total`{:class="block3variables"} pour stocker le total pour chaque client. + ++ Un client ajoute des articles pour un total de `50` et paie ++ Un nouveau client ajoute des articles pour un total de `40`, mais le `total`{:class="block3variables"} est maintenant de `90` pour le deuxième client + +Quel bloc dois-tu ajouter au script de paiement pour que le total revienne à `0` lorsque chaque client paie ? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Pas tout à fait, cela fonctionnerait pour le deuxième client mais le `total`{:class="block3variables"} serait faux pour les autres clients. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Pas tout à fait, `total`{:class="block3variables"} devrait être `0` après le paiement d'un client, mais ce n'est pas le bloc `ajouter`{:class="block3variables"} dont tu as besoin. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Oui c'est correct. Tu dois `mettre`{:class="block3variables"} le `total`{:class="block3variables"} sur `0` après le paiement de chaque client. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +Cela fonctionnerait pour cet exemple, mais que se passerait-il si le premier client dépensait un montant différent ? Ta solution doit fonctionner lorsque le client précédent dépense des montants différents. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/fr-FR/quiz1/question_2.md b/fr-FR/quiz1/question_2.md new file mode 100644 index 000000000..b15805425 --- /dev/null +++ b/fr-FR/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 sur 3 +--- + +Dans une boutique, le **vendeur** a ce code dans le script de paiement : + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +Lorsque le code s'exécute, l'utilisateur tape la réponse « super ». Que dira le sprite **vendeur** ? + +![Une case "demander" avec le mot "super" tapé.](images/quiz2.png) + +--- choices --- + +- (x) Le **vendeur** dira `Je suis désolé.` + + --- feedback --- + + Oui. Les humains savent que « super » signifie la même chose que « bien », mais le « = » vérifie si les lettres sont les mêmes. + + La **condition** `réponse`{:class="block3sensing"} = `bien` est « faux » donc le bloc `dire`{:class="block3looks"} dans la partie `sinon`{:class="block3control"} s'exécutera. + + --- /feedback --- + +- ( ) Le **vendeur** dira `C'est fantastique !` + + --- feedback --- + +Non, seule la réponse exacte `bien` fera dire au **vendeur** `C'est fantastique !`. Regarde à nouveau le code pour voir quel message le **vendeur** dira pour toutes les réponses qui ne sont pas `bien`. + +**Astuce :** « Bien » ou « BIEN » correspondrait à « bien ». + + --- /feedback --- + +- ( ) Le **vendeur** ne dira rien. + + --- feedback --- + +Non, le **vendeur** dira toujours quelque chose. Regarde attentivement le code pour voir quel sera le message. + + --- /feedback --- + +- ( ) Le **vendeur** dira `super`. + + --- feedback --- + +Non, le **client** a tapé la réponse « super » mais le **vendeur** ne dit pas la réponse. Regarde attentivement le code pour voir quel sera le message. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/fr-FR/quiz1/question_3.md b/fr-FR/quiz1/question_3.md new file mode 100644 index 000000000..465cac22e --- /dev/null +++ b/fr-FR/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 sur 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Paniquer ! + + --- feedback --- + + Ça ne va pas aider. Tu dois penser clairement pour résoudre les problèmes de codage. + + --- /feedback --- + +- ( ) Abandonner + + --- feedback --- + + There are lots of things you could try. Les bons codeurs se trompent souvent la première fois et apprennent beaucoup de leurs erreurs. + + --- /feedback --- + +- (x) Lis attentivement le code et essaie de le déboguer. + + --- feedback --- + + Oui. La correction des bogues fait partie du codage. Plus tu pratiques, plus tu gagnes en expérience et plus il devient facile de trouver et de corriger les bogues. + + --- /feedback --- + +- ( ) S'énerver contre l'ordinateur + + --- feedback --- + +Un ordinateur ne fait que ce que nous lui disons de faire, donc ce n'est pas logique de s'énerver contre lui. + +S'énerver n'aidera pas à résoudre le problème, car il sera plus difficile de penser clairement. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/fr-FR/scratch-comments.txt b/fr-FR/scratch-comments.txt new file mode 100644 index 000000000..c53546c97 --- /dev/null +++ b/fr-FR/scratch-comments.txt @@ -0,0 +1,9 @@ +tape le nom de ton commerce + +le nom de ton commerce + +utiliser le nom du sprite du conteneur + +position de départ + +le client précédent prend le sac diff --git a/fr-FR/scratch-translatable.txt b/fr-FR/scratch-translatable.txt new file mode 100644 index 000000000..4f217b617 --- /dev/null +++ b/fr-FR/scratch-translatable.txt @@ -0,0 +1,49 @@ +nom + +ma boutique + +client suivant + +Client suivant, s'il vous plaît ! + +total + +Cela fera + +Merci d'avoir acheté chez + +Voulez-vous payer ou annuler ? + +payer + +annuler + +D'accord. Pas de problème + +Cliquez sur les articles que vous souhaitez + +Avez-vous trouvé tout ce que vous vouliez aujourd'hui ? + +oui + +C'est fantastique ! + +Peut-être que je devrais ajouter plus d'articles à ma boutique + +Sac + +1 boule + +cône + +boutique + +vrai + +faux + +Comment allez-vous aujourd'hui ? + +bien + +Je suis désolé. diff --git a/fr-FR/solutions/Cool Shirts.sb3 b/fr-FR/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..d156614c8 Binary files /dev/null and b/fr-FR/solutions/Cool Shirts.sb3 differ diff --git a/fr-FR/solutions/Fresh Space Fruit.sb3 b/fr-FR/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..a157c3232 Binary files /dev/null and b/fr-FR/solutions/Fresh Space Fruit.sb3 differ diff --git a/fr-FR/solutions/Vending machine.sb3 b/fr-FR/solutions/Vending machine.sb3 new file mode 100644 index 000000000..54eb1382c Binary files /dev/null and b/fr-FR/solutions/Vending machine.sb3 differ diff --git a/fr-FR/solutions/ice cream shop.sb3 b/fr-FR/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..aca98999e Binary files /dev/null and b/fr-FR/solutions/ice cream shop.sb3 differ diff --git a/fr-FR/step_1.md b/fr-FR/step_1.md new file mode 100644 index 000000000..855c7e1b6 --- /dev/null +++ b/fr-FR/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Crée une application de boutique où le client peut acheter des articles dans ta boutique. Le projet sera en vue à la première personne où le joueur est un client. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. Lorsque tu es prêt, clique sur Kiran pour passer à la caisse. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Trouve l'inspiration + +Clique sur le sprite **vendeur** pour acheter des articles : + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Badges de fierté** (projet communauté en vedette) + +Clique sur les badges de la fierté pour les ajouter à ton panier : + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Trouve l'inspiration + +Tu vas prendre des décisions de conception pour créer ton personnage. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Exemple de projet](images/fruit.png) ![Exemple de projet](images/tshirt.png) ![Exemple de projet](images/icecream.png) ![Exemple de projet](images/vending.png) + +--- /print-only --- + diff --git a/fr-FR/step_2.md b/fr-FR/step_2.md new file mode 100644 index 000000000..3da99b349 --- /dev/null +++ b/fr-FR/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? Il peut s'agir de quelque chose de réaliste, de quelque chose tiré d'un livre ou d'un film que tu aimes, ou de quelque chose de complètement loufoque. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Ouvre un [nouveau projet Scratch](http://rpf.io/scratch-new){:target="_blank"} et examine la collection de sprites et d'arrière-plans que tu peux utiliser. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ Une étagère ou une bibliothèque pour mettre des articles, tu peux peindre ceci sur l'arrière-plan + +--- /task --- + +--- task --- + +Ajoute un sprite pour représenter le vendeur. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/fr-FR/step_3.md b/fr-FR/step_3.md new file mode 100644 index 000000000..fae11efd8 --- /dev/null +++ b/fr-FR/step_3.md @@ -0,0 +1,128 @@ +## Articles en vente + +
+
+Ta boutique a besoin d'articles à vendre. Chaque article aura un prix qui sera ajouté à une variable « total »{:class="block3variables"}. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +Tu devrais garder une trace de ce que ton client dépense. + +--- task --- + +Ajoute une nouvelle variable appelée `total`{:class="block3variables"} pour tous les sprites. + +Clique sur ton sprite **vendeur** et ajoute un script à `mettre`{:class="block3variables"} le `total`{:class="block3variables"} à `0` lorsque le projet démarre. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +Quels **articles** tes clients vont-ils acheter ? ++ Un aliment ou une boisson ++ Équipement de sport, jouets ou gadgets ++ Baguettes magiques, potions ou livres de sorts ++ Vêtements ou autres articles de mode ++ Your own idea + +--- task --- + +Ajoute un sprite pour le premier **article** que tu vas vendre dans ta boutique. + +Si tu veux, tu peux ajouter un prix au costume à l'aide de l'outil de texte dans l'éditeur de peinture. Ou ajoute un prix à l'arrière-plan et placer l'article à côté. + +![Exemples d'articles avec des montants écrits à côté d'eux.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Ajoute un script pour `ajouter`{:class="block3variables"} le `total`{:class="block3variables"} au prix de ton article lorsque le client clique sur le sprite. + +--- collapse --- +--- +title: Clique pour ajouter un article +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +C'est aussi une bonne idée de `jouer un son`{:class="block3sound"} pour indiquer au client qu'il a ajouté un article. + +![L'icône ajouter un son](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test :** Clique sur ton article et vérifie que la valeur de la variable `total`{:class="block3variables"} augmente du prix de l'article, et que tu entends l'effet sonore. Clique plusieurs fois pour voir le total augmenter. + +Clique sur le drapeau vert pour démarrer ton projet et assure-toi que le `total`{:class="block3variables"} commence à `0`. + +--- /task --- + +--- task --- + +Ajoute plus d'articles à ta boutique. + +Tu peux soit : ++ Dupliquer le premier article, puis ajouter un nouveau costume dans l'éditeur de peinture ++ Ajouter un sprite, puis faire glisser le script `quand le drapeau est cliqué`{:class="block3events"} du premier article vers ton nouvel article + +Ajouter une étiquette de prix au costume ou à l'arrière-plan si tu les utilises. + +--- /task --- + +--- task --- + +Clique sur ton nouveau sprite **Article** dans la liste Sprite puis clique sur l'onglet **Code**. + +Modifie le montant dont le `total`{:class="block3variables"} change en fonction du prix de ton nouvel article. + +--- /task --- + +--- task --- + +**Test :** Clique sur le drapeau vert pour démarrer ton projet et clique sur les articles pour les ajouter. Vérifie que le total augmente du montant correct chaque fois que tu cliques sur un article. + +Si tu as ajouté des étiquettes de prix, assure-toi qu'elles correspondent au montant ajouté au `total`{:class="block3variables"}, sinon tes clients seront confus ! + +--- /task --- + +--- task --- + +**Débogage :** Il est possible que tu trouves des bogues dans ton projet que tu dois corriger. Voici quelques bogues assez courants. + +--- collapse --- +--- +title: Le total ne va pas à 0 lorsque je clique sur le drapeau vert +--- + +Vérifie que tu as défini la valeur de départ de la variable `total`{:class="block3variables"} dans le script `quand le drapeau est cliqué`{:class="block3events"} sur ton sprite **vendeur**. + +--- /collapse --- + +--- collapse --- +--- +title: Le total n'augmente pas du montant correct lorsque je clique sur un article +--- + +Vérifie que chaque article a un script `quand ce sprite est cliqué`{:class="block3events"} qui modifie le `total`{:class="block3variables"} du montant correct pour cet article, tu as peut-être modifié le prix du mauvais sprite. + +Vérifie que tu as bien utilisé le bloc `ajouter`{:class="block3variables"} et non le bloc `mettre`{:class="block3variables"} pour modifier le `total`{:class="block3variables"}. Tu dois utiliser `ajouter`{:class="block3variables"} pour ajouter le prix au total, tu ne veux pas mettre le total sur le prix de l'article qui vient d'être ajouté. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/fr-FR/step_4.md b/fr-FR/step_4.md new file mode 100644 index 000000000..f5b952749 --- /dev/null +++ b/fr-FR/step_4.md @@ -0,0 +1,141 @@ +## Achats + +
+
+ +Le sprite **vendeur** doit : +- demander si le client est prêt à payer les articles +- accepter le paiement +- se préparer pour le client suivant +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +Lorsqu'il aura fini de choisir les articles, le client cliquera sur le sprite **vendeur** pour payer. + +--- task --- + + Dis au client combien coûteront ses articles. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Ajoute un son de paiement à ton sprite **vendeur** pour que le client sache que le paiement est en cours. + +![L'icône ajouter un son](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Ajoute le bloc `jouer le son jusqu'au bout`{:class="block3sound"} à ton script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Termine la vente. Mets `total`{:class="block3variables"} à `0` après le paiement, `dire`{:class="block3looks"} au revoir et `envoyer à tous`{:class="block3control"} `client suivant`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test :** teste ton projet et assure-toi que : +- Le client peut acheter avec les effets sonores corrects +- Le `total`{:class="block3variables"} est remis à `0` après qu'un client a payé ou annulé. + +--- /task --- + + +--- task --- + +**Débogage :** Il est possible que tu trouves des bogues dans ton projet que tu dois corriger. + +Voici quelques bogues assez courants : + +--- collapse --- +--- +title: Le vendeur ne fait rien lorsque je clique dessus +--- + +Tu as pas mal de sprites dans ton projet. Assure-toi que le script `quand ce sprite est cliqué`{:class="block3events"} est sur ton sprite **vendeur**. + +**Astuce :** Si tu l'as ajouté au mauvais sprite, tu peux faire glisser le code vers le sprite **vendeur**, puis le supprimer de l'autre sprite. + +--- /collapse --- + +--- collapse --- +--- +title: Les mots des blocs de mots fusionnent +--- + +Lorsque tu `joins`{:class="block3operators"} deux morceaux ensemble, tu dois ajouter un espace à la fin de ton premier morceau de texte ou au début du deuxième. + +Ceux-ci ont un espace à la fin de la première partie de la jointure : + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: Le total ne se réinitialise pas après une vente +--- + +Vérifie que tu as utilisé : + +```blocks3 +set [total v] to (0) +``` + +**et pas** : + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: Le vendeur ne répond pas +--- + +Assure-toi que l'`opérateur`{:class="block3operators"} dans la condition `si`{:class="block3control"} est supérieur au symbole `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Astuce :** Compare ton code avec les exemples de code. Y a-t-il des différences qui ne devraient pas exister ? + +--- /task --- + +--- save --- diff --git a/fr-FR/step_5.md b/fr-FR/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/fr-FR/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/fr-FR/step_6.md b/fr-FR/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/fr-FR/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/fr-FR/step_7.md b/fr-FR/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/fr-FR/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/fr-FR/step_8.md b/fr-FR/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/fr-FR/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/fr-FR/step_9.md b/fr-FR/step_9.md new file mode 100644 index 000000000..696e41813 --- /dev/null +++ b/fr-FR/step_9.md @@ -0,0 +1,21 @@ +## Et ensuite ? + +Si tu suis le parcours [Plus de Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch), tu peux passer au projet [Ne tombe pas dedans !](https://projects.raspberrypi.org/en/projects/dont-fall-in). Dans ce projet, tu vas créer un jeu qui défile de haut en bas où tu dois sauter de plateforme en plateforme et ne pas tomber dedans. + +--- print-only --- + +![Projet Ne tombe pas dedans !](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions :** appuie sur la barre d'espace ou appuie sur la scène pour sauter. + +--- /no-print --- + +Si tu veux t'amuser davantage à explorer Scratch, tu peux essayer l'un de [ces projets](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/hi-IN/images/add-friend-projects.png b/hi-IN/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/hi-IN/images/add-friend-projects.png differ diff --git a/hi-IN/images/add-sound.png b/hi-IN/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/hi-IN/images/add-sound.png differ diff --git a/hi-IN/images/add-your-projects.png b/hi-IN/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/hi-IN/images/add-your-projects.png differ diff --git a/hi-IN/images/banner.png b/hi-IN/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/hi-IN/images/banner.png differ diff --git a/hi-IN/images/choose-backdrop-icon.png b/hi-IN/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/hi-IN/images/choose-backdrop-icon.png differ diff --git a/hi-IN/images/choose-sprite-icon.png b/hi-IN/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/hi-IN/images/choose-sprite-icon.png differ diff --git a/hi-IN/images/create-studio.png b/hi-IN/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/hi-IN/images/create-studio.png differ diff --git a/hi-IN/images/customer-count.png b/hi-IN/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/hi-IN/images/customer-count.png differ diff --git a/hi-IN/images/dont-fall-in-project.png b/hi-IN/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/hi-IN/images/dont-fall-in-project.png differ diff --git a/hi-IN/images/example-strip.png b/hi-IN/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/hi-IN/images/example-strip.png differ diff --git a/hi-IN/images/fruit.png b/hi-IN/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/hi-IN/images/fruit.png differ diff --git a/hi-IN/images/icecream.png b/hi-IN/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/hi-IN/images/icecream.png differ diff --git a/hi-IN/images/item-amounts.png b/hi-IN/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/hi-IN/images/item-amounts.png differ diff --git a/hi-IN/images/large-readout.png b/hi-IN/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/hi-IN/images/large-readout.png differ diff --git a/hi-IN/images/my-stuff-menu.png b/hi-IN/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/hi-IN/images/my-stuff-menu.png differ diff --git a/hi-IN/images/naming-studio.png b/hi-IN/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/hi-IN/images/naming-studio.png differ diff --git a/hi-IN/images/new-variable.png b/hi-IN/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/hi-IN/images/new-variable.png differ diff --git a/hi-IN/images/quiz2.png b/hi-IN/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/hi-IN/images/quiz2.png differ diff --git a/hi-IN/images/sprite-pane-size.png b/hi-IN/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/hi-IN/images/sprite-pane-size.png differ diff --git a/hi-IN/images/step2-image.png b/hi-IN/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/hi-IN/images/step2-image.png differ diff --git a/hi-IN/images/step3-image.png b/hi-IN/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/hi-IN/images/step3-image.png differ diff --git a/hi-IN/images/step4-image.png b/hi-IN/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/hi-IN/images/step4-image.png differ diff --git a/hi-IN/images/studio-example.png b/hi-IN/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/hi-IN/images/studio-example.png differ diff --git a/hi-IN/images/tshirt.png b/hi-IN/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/hi-IN/images/tshirt.png differ diff --git a/hi-IN/images/upgrade-image.png b/hi-IN/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/hi-IN/images/upgrade-image.png differ diff --git a/hi-IN/images/vending.png b/hi-IN/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/hi-IN/images/vending.png differ diff --git a/hi-IN/meta.yml b/hi-IN/meta.yml new file mode 100644 index 000000000..8df1f3d0d --- /dev/null +++ b/hi-IN/meta.yml @@ -0,0 +1,39 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Items for sale + completion: + - engaged + - + title: Purchases + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/hi-IN/quiz1/question_1.md b/hi-IN/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/hi-IN/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/hi-IN/quiz1/question_2.md b/hi-IN/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/hi-IN/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/hi-IN/quiz1/question_3.md b/hi-IN/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/hi-IN/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/hi-IN/scratch-comments.txt b/hi-IN/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/hi-IN/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/hi-IN/scratch-translatable.txt b/hi-IN/scratch-translatable.txt new file mode 100644 index 000000000..06cc175a3 --- /dev/null +++ b/hi-IN/scratch-translatable.txt @@ -0,0 +1,49 @@ +name + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +yes + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +true + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/hi-IN/solutions/Cool Shirts.sb3 b/hi-IN/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/hi-IN/solutions/Cool Shirts.sb3 differ diff --git a/hi-IN/solutions/Fresh Space Fruit.sb3 b/hi-IN/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/hi-IN/solutions/Fresh Space Fruit.sb3 differ diff --git a/hi-IN/solutions/Vending machine.sb3 b/hi-IN/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/hi-IN/solutions/Vending machine.sb3 differ diff --git a/hi-IN/solutions/ice cream shop.sb3 b/hi-IN/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/hi-IN/solutions/ice cream shop.sb3 differ diff --git a/hi-IN/step_1.md b/hi-IN/step_1.md new file mode 100644 index 000000000..e41514d8a --- /dev/null +++ b/hi-IN/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/hi-IN/step_2.md b/hi-IN/step_2.md new file mode 100644 index 000000000..fb48837ea --- /dev/null +++ b/hi-IN/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/hi-IN/step_3.md b/hi-IN/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/hi-IN/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/hi-IN/step_4.md b/hi-IN/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/hi-IN/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/hi-IN/step_5.md b/hi-IN/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/hi-IN/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/hi-IN/step_6.md b/hi-IN/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/hi-IN/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/hi-IN/step_7.md b/hi-IN/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/hi-IN/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/hi-IN/step_8.md b/hi-IN/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/hi-IN/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/hi-IN/step_9.md b/hi-IN/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/hi-IN/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/it-IT/images/add-friend-projects.png b/it-IT/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/it-IT/images/add-friend-projects.png differ diff --git a/it-IT/images/add-sound.png b/it-IT/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/it-IT/images/add-sound.png differ diff --git a/it-IT/images/add-your-projects.png b/it-IT/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/it-IT/images/add-your-projects.png differ diff --git a/it-IT/images/banner.png b/it-IT/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/it-IT/images/banner.png differ diff --git a/it-IT/images/choose-backdrop-icon.png b/it-IT/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/it-IT/images/choose-backdrop-icon.png differ diff --git a/it-IT/images/choose-sprite-icon.png b/it-IT/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/it-IT/images/choose-sprite-icon.png differ diff --git a/it-IT/images/create-studio.png b/it-IT/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/it-IT/images/create-studio.png differ diff --git a/it-IT/images/customer-count.png b/it-IT/images/customer-count.png new file mode 100644 index 000000000..2829358ff Binary files /dev/null and b/it-IT/images/customer-count.png differ diff --git a/it-IT/images/dont-fall-in-project.png b/it-IT/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/it-IT/images/dont-fall-in-project.png differ diff --git a/it-IT/images/example-strip.png b/it-IT/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/it-IT/images/example-strip.png differ diff --git a/it-IT/images/fruit.png b/it-IT/images/fruit.png new file mode 100644 index 000000000..1cc6ffe7b Binary files /dev/null and b/it-IT/images/fruit.png differ diff --git a/it-IT/images/icecream.png b/it-IT/images/icecream.png new file mode 100644 index 000000000..f3e985b90 Binary files /dev/null and b/it-IT/images/icecream.png differ diff --git a/it-IT/images/item-amounts.png b/it-IT/images/item-amounts.png new file mode 100644 index 000000000..b6fd69673 Binary files /dev/null and b/it-IT/images/item-amounts.png differ diff --git a/it-IT/images/large-readout.png b/it-IT/images/large-readout.png new file mode 100644 index 000000000..194f726d4 Binary files /dev/null and b/it-IT/images/large-readout.png differ diff --git a/it-IT/images/my-stuff-menu.png b/it-IT/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/it-IT/images/my-stuff-menu.png differ diff --git a/it-IT/images/naming-studio.png b/it-IT/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/it-IT/images/naming-studio.png differ diff --git a/it-IT/images/new-variable.png b/it-IT/images/new-variable.png new file mode 100644 index 000000000..b03e7a105 Binary files /dev/null and b/it-IT/images/new-variable.png differ diff --git a/it-IT/images/quiz2.png b/it-IT/images/quiz2.png new file mode 100644 index 000000000..95d9bc17f Binary files /dev/null and b/it-IT/images/quiz2.png differ diff --git a/it-IT/images/sprite-pane-size.png b/it-IT/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/it-IT/images/sprite-pane-size.png differ diff --git a/it-IT/images/step2-image.png b/it-IT/images/step2-image.png new file mode 100644 index 000000000..2594d98d7 Binary files /dev/null and b/it-IT/images/step2-image.png differ diff --git a/it-IT/images/step3-image.png b/it-IT/images/step3-image.png new file mode 100644 index 000000000..b05c52ee9 Binary files /dev/null and b/it-IT/images/step3-image.png differ diff --git a/it-IT/images/step4-image.png b/it-IT/images/step4-image.png new file mode 100644 index 000000000..20cdf7822 Binary files /dev/null and b/it-IT/images/step4-image.png differ diff --git a/it-IT/images/studio-example.png b/it-IT/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/it-IT/images/studio-example.png differ diff --git a/it-IT/images/tshirt.png b/it-IT/images/tshirt.png new file mode 100644 index 000000000..d0c926d6a Binary files /dev/null and b/it-IT/images/tshirt.png differ diff --git a/it-IT/images/upgrade-image.png b/it-IT/images/upgrade-image.png new file mode 100644 index 000000000..5fde45735 Binary files /dev/null and b/it-IT/images/upgrade-image.png differ diff --git a/it-IT/images/vending.png b/it-IT/images/vending.png new file mode 100644 index 000000000..06efdb8fe Binary files /dev/null and b/it-IT/images/vending.png differ diff --git a/it-IT/meta.yml b/it-IT/meta.yml new file mode 100644 index 000000000..85a304a6b --- /dev/null +++ b/it-IT/meta.yml @@ -0,0 +1,39 @@ +--- +title: Il prossimo cliente per favore +hero_image: images/banner.png +description: Un progetto di simulazione di un negozio in cui il cliente può acquistare articoli. +meta_title: Progetti di programmazione con Scratch per bambini e ragazzi | Introduzione a Scratch +meta_description: Impara Scratch con i progetti di coding della Raspberry Pi Foundation per bambini e adolescenti. Crea un'app Scratch in cui il cliente può acquistare articoli dal tuo negozio. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: Cosa creerai + - + title: Il tuo negozio + - + title: Articoli in vendita + completion: + - engaged + - + title: Acquisti + completion: + - internal + - + title: Quiz veloce + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Sfida + challenge: true + - + title: Condividi + - + title: What can you do now? diff --git a/it-IT/quiz1/question_1.md b/it-IT/quiz1/question_1.md new file mode 100644 index 000000000..a77273a7b --- /dev/null +++ b/it-IT/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quiz veloce + +Rispondi alle tre domande. Alcuni suggerimenti ti aiuteranno a trovare la risposta corretta. + +Dopo aver risposto a ciascuna domanda, fai clic su **Controlla la mia risposta**. + +Divertiti! + +--- question --- + +--- +legend: Domanda 1 di 3 +--- + +Un progetto di negozio utilizza una variabile `total`{:class="block3variables"} per memorizzare il totale per ciascun cliente. + ++ Un cliente aggiunge articoli per un totale di `50` e paga ++ Un nuovo cliente aggiunge articoli per un totale di `40` ma il totale di <0>{:class="block3variables"} viene ora visualizzato come <0>90 per il secondo cliente + +Quale blocco dovresti aggiungere allo script di pagamento per far sì che il totale torni a `0` quando ogni cliente paga? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Non esattamente, `totale`{:class="block3variables"} dovrebbe essere `0` dopo che un cliente paga, ma non è il blocco di modifica ``{:class="block3variables"} di cui hai bisogno. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Non proprio, questo funzionerebbe per il secondo cliente, ma il `totale`{:class="block3variables"} sarebbe sbagliato per gli altri clienti. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Sì, è corretto. Devi impostare ``{:class="block3variables"} sul totale ``{:class="block3variables"} a `0` dopo che ogni cliente ha pagato. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +Questo potrebbe funzionare per questo esempio, ma cosa succederebbe se il primo cliente spendesse un importo diverso? La soluzione deve funzionare quando il cliente precedente spende importi diversi. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/it-IT/quiz1/question_2.md b/it-IT/quiz1/question_2.md new file mode 100644 index 000000000..3d27537e8 --- /dev/null +++ b/it-IT/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Domanda 2 di 3 +--- + +In un negozio, il venditore <0> ha questo codice nello script di pagamento: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +Quando il codice viene eseguito, l'utente digita la risposta "ottimo". Cosa dirà lo sprite **venditore** ? + +![Una casella "chiedi" con la parola "fantastico" digitata.](images/quiz2.png) + +--- choices --- + +- (x) Il <0>Venditore dirà <1>Mi dispiace sentirlo. + + --- feedback --- + + Sì. Gli esseri umani sanno che "grande" ha lo stesso significato di "bene", ma il simbolo "=" controlla se le lettere sono uguali. + + La condizione **** `risposta`{:class="block3sensing"} = `buona` è 'falsa' quindi il blocco `dire`{:class="block3looks"} nella parte `altrimenti`{:class="block3control"} verrà eseguito. + + --- /feedback --- + +- ( ) Il venditore **** dirà `È fantastico!` + + --- feedback --- + +No, solo la risposta esatta `bene` farà sì che il venditore **** dica `Fantastico!`. Osserva nuovamente il codice per vedere quale messaggio dirà il venditore **** per tutte le risposte che non sono `buone`. + +**Suggerimento:** 'Bene' o 'BENE' corrisponderebbero a 'bene'. + + --- /feedback --- + +- ( ) Il venditore **** non dirà nulla. + + --- feedback --- + +No, il venditore **** dirà sempre qualcosa. Osserva attentamente il codice per vedere quale sarà il messaggio. + + --- /feedback --- + +- ( ) Il venditore **** dirà `ottimo`. + + --- feedback --- + +No, il **cliente** ha digitato la risposta "ottimo", ma il **venditore** non dice la risposta. Osserva attentamente il codice per vedere quale sarà il messaggio. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/it-IT/quiz1/question_3.md b/it-IT/quiz1/question_3.md new file mode 100644 index 000000000..08dd7fa66 --- /dev/null +++ b/it-IT/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Domanda 3 di 3 +--- + +Il tuo progetto non funziona. Cosa dovresti fare? + +--- choices --- + +- ( ) Panico! + + --- feedback --- + + Non servirà a niente. Per risolvere i problemi di codifica è necessario pensare lucidamente. + + --- /feedback --- + +- ( ) Abbandonare + + --- feedback --- + + Ci sono molte cose che potresti provare. I grandi programmatori spesso sbagliano la prima volta e imparano molto dai loro errori. + + --- /feedback --- + +- (x) Leggi attentamente il codice e prova a eseguirne il debug. + + --- feedback --- + + Sì. Correggere i bug fa parte della codifica. Più ti eserciti, più esperienza acquisisci e più diventa facile trovare e correggere i bug. + + --- /feedback --- + +- ( ) Arrabbiarsi con il computer + + --- feedback --- + +Un computer fa solo quello che gli diciamo di fare, quindi non è logico irritarsi. + +Essere infastiditi non aiuterà a risolvere il problema, poiché renderà più difficile pensare lucidamente. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/it-IT/scratch-comments.txt b/it-IT/scratch-comments.txt new file mode 100644 index 000000000..65ecf0f19 --- /dev/null +++ b/it-IT/scratch-comments.txt @@ -0,0 +1,9 @@ +digita il nome della tua attività + +il nome della tua attività + +usa il nome del tuo contenitore sprite + +posizione iniziale + +il cliente precedente prende la borsa diff --git a/it-IT/scratch-translatable.txt b/it-IT/scratch-translatable.txt new file mode 100644 index 000000000..c5ec285f8 --- /dev/null +++ b/it-IT/scratch-translatable.txt @@ -0,0 +1,49 @@ +nome + +il mio negozio + +prossimo cliente + +Il prossimo cliente, per favore! + +totale + +Il totale è + +Grazie per aver fatto acquisti + +Vuoi pagare o annullare? + +paga + +annulla + +Ok. Nessun problema + +Clicca sugli articoli che desideri + +Hai trovato tutto quello che volevi oggi? + +sì + +È fantastico! + +Forse dovrei aggiungere più articoli al mio negozio + +Borsa + +un misurino + +cono + +negozio + +vero + +falso + +Come stai oggi? + +bene + +Mi dispiace. diff --git a/it-IT/solutions/Cool Shirts.sb3 b/it-IT/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..9548facf9 Binary files /dev/null and b/it-IT/solutions/Cool Shirts.sb3 differ diff --git a/it-IT/solutions/Fresh Space Fruit.sb3 b/it-IT/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..5359adb3e Binary files /dev/null and b/it-IT/solutions/Fresh Space Fruit.sb3 differ diff --git a/it-IT/solutions/Vending machine.sb3 b/it-IT/solutions/Vending machine.sb3 new file mode 100644 index 000000000..40c75dd2d Binary files /dev/null and b/it-IT/solutions/Vending machine.sb3 differ diff --git a/it-IT/solutions/ice cream shop.sb3 b/it-IT/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..805067303 Binary files /dev/null and b/it-IT/solutions/ice cream shop.sb3 differ diff --git a/it-IT/step_1.md b/it-IT/step_1.md new file mode 100644 index 000000000..7da2d0ea0 --- /dev/null +++ b/it-IT/step_1.md @@ -0,0 +1,52 @@ +## Quello che farai + +Crea un'app del tuo negozio, tramite il quale i clienti possono acquistare articoli. Il progetto sarà in prima persona e il giocatore sarà un cliente. + +--- no-print --- + +Gioca ▶️ Fai clic sulla frutta spaziale per acquistarla e guarda il totale aumentare. Quando sei pronto, clicca su Kiran per procedere al pagamento. + ++ Cosa succede se provi a pagare prima di aver scelto un frutto? ++ Come pensi che il progetto sappia che non hai ancora aggiunto frutta? + +
+**Frutta fresca dello spazio**: [Vedi all'interno](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Lasciati ispirare 💭 + +Clicca sugli sprite del **venditore** per acquistare oggetti: + +**Magliette fantastiche**: [Guarda dentro](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Gelateria**: [Guarda dentro](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Spille Pride** (progetto della comunità in evidenza) + +Clicca sulle spille dell'orgoglio per aggiungerle al tuo carrello: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Lasciati ispirare 💭 + +Dovrai prendere alcune decisioni di progettazione per creare il tuo personaggio. Guarda gli esempi di progetti in Scratch 2: Prossimo cliente, per favore! Su Scratch al link https://scratch.mit.edu/studios/29611454 + +![Progetti di esempio](images/fruit.png) ![Progetti di esempio](images/tshirt.png) ![Progetti di esempio](images/icecream.png) ![Progetti di esempio](images/vending.png) + +--- /print-only --- + diff --git a/it-IT/step_2.md b/it-IT/step_2.md new file mode 100644 index 000000000..04871e713 --- /dev/null +++ b/it-IT/step_2.md @@ -0,0 +1,80 @@ +## Il tuo negozio + +
+
+Qual è l'idea del tuo negozio? Potrebbe essere qualcosa di realistico, qualcosa tratto da un libro o da un film che ti piace, o qualcosa di completamente sciocco. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Apri un [nuovo progetto Scratch](http://rpf.io/scratch-new){:target="_blank"} e guarda la gamma di sprite e sfondi che puoi utilizzare. Prenditi del tempo per riflettere sulla tua idea di negozio. + +--- /task --- + +--- task --- + +Fai clic su **Scegli uno sfondo** o dipingi il tuo sfondo. + +![](images/choose-backdrop-icon.png) + ++ Uno sfondo dalla libreria Scratch o uno sfondo colorato semplice + +--- /task --- + +--- task --- + +Fai clic su **scegli uno sprite** e aggiungi o colora altri sprite dello scenario. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Aggiungi altri scenari. ++ Una scrivania, un bancone o una finestra da cui vendere ++ Uno scaffale o una libreria su cui appoggiare gli oggetti - potresti dipingerlo sullo sfondo + +--- /task --- + +--- task --- + +Aggiungi uno sprite per rappresentare il venditore. + +Potresti scegliere: ++ Una persona o un personaggio non giocante, come un negoziante, un contadino o un bibliotecario ++ Un macchinario come un distributore automatico, un jukebox o un registratore di cassa + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Dai il benvenuto al tuo primo cliente. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Crea un nuovo messaggio chiamato `prossimo cliente`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/it-IT/step_3.md b/it-IT/step_3.md new file mode 100644 index 000000000..737261838 --- /dev/null +++ b/it-IT/step_3.md @@ -0,0 +1,128 @@ +## Articoli in vendita + +
+
+Il tuo negozio ha bisogno di articoli da vendere. Ogni articolo avrà un prezzo che verrà aggiunto alla variabile `total`{:class="block3variables"}. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +Dovrai tenere traccia di quanto spende il tuo cliente. + +--- task --- + +Aggiungi una nuova variabile chiamata **total**{:class="block3variables"} per tutti gli sprite. + +Fai clic sul tuo sprite **venditore** e aggiungi uno script a `imposta`{:class="block3variables"} il totale ``{:class="block3variables"} a `0` quando il progetto inizia. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +Quali **articoli** acquisteranno i tuoi clienti? ++ Un qualche tipo di cibo o bevanda ++ Attrezzature sportive, giocattoli o gadget ++ Bacchette magiche, pozioni o libri di incantesimi ++ Abbigliamento o altri articoli di moda ++ La tua idea + +--- task --- + +Aggiungi uno sprite per il primo **oggetto** che venderai nel tuo negozio. + +Se vuoi, puoi aggiungere un prezzo al costume utilizzando lo strumento di testo nell'editor Paint. Oppure aggiungi un prezzo allo sfondo e posiziona l'articolo accanto. + +![Esempi di elementi con importi scritti accanto.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Aggiungi uno script per modificare `il valore di`{:class="block3variables"} nel totale ``{:class="block3variables"} in base al prezzo del tuo articolo quando il cliente clicca sullo sprite. + +--- collapse --- +--- +title: Clicca per aggiungere un elemento +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +È anche una buona idea `riprodurre un suono`{:class="block3sound"} per far sapere al cliente che ha aggiunto un articolo. + +![L'icona Aggiungi un Suono](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Fai clic sul tuo oggetto e controlla che il valore della variabile totale ``{:class="block3variables"} aumenti in base al prezzo dell'oggetto e che tu senta l'effetto sonoro. Clicca più volte per vedere aumentare il totale. + +Fai clic sulla bandiera verde per avviare il progetto e assicurati che il totale ``{:class="block3variables"} inizi da `0`. + +--- /task --- + +--- task --- + +Aggiungi altri articoli al tuo negozio. + +Puoi: ++ Duplica il primo oggetto e poi aggiungi un nuovo costume nell'editor Paint ++ Aggiungi uno sprite e quindi trascina lo script `quando si fa clic sulla bandiera`{:class="block3events"} dal primo elemento al nuovo elemento + +Se intendi utilizzarli, aggiungi un'etichetta con il prezzo al costume o allo sfondo. + +--- /task --- + +--- task --- + +Fai clic sul tuo nuovo sprite **Oggetto** nell'elenco Sprite, quindi fai clic sulla scheda **Codice** . + +Sostituisci l'importo di cui cambia il totale di ****{:class="block3variables"} con il prezzo del tuo nuovo articolo. + +--- /task --- + +--- task --- + +**Test:** Fai clic sulla bandiera verde per avviare il progetto e fai clic sugli elementi per aggiungerli. Controlla che il totale aumenti dell'importo corretto ogni volta che clicchi su un elemento. + +Se hai aggiunto etichette dei prezzi, assicurati che corrispondano all'importo che viene aggiunto al totale ``{:class="block3variables"}, altrimenti i tuoi clienti saranno confusi! + +--- /task --- + +--- task --- + +**Debug:** Potresti trovare alcuni bug nel tuo progetto, che dovrai correggere. Ecco alcuni bug comuni. + +--- collapse --- +--- +title: Il totale non va a 0 quando clicco sulla bandiera verde +--- + +Verifica di aver impostato il valore iniziale della variabile `totale`{:class="block3variables"} nello script `quando si fa clic sulla bandiera`{:class="block3events"} sullo sprite **venditore**. + +--- /collapse --- + +--- collapse --- +--- +tittle: Il totale non aumenta dell'importo corretto quando clicco su un elemento +--- + +Controlla che ogni oggetto abbia un valore `quando questo sprite è cliccato`{:class="block3events"} lo script modifica il totale ``{:class="block3variables"} della quantità corretta per quell'oggetto: potresti aver cambiato il prezzo per lo sprite sbagliato. + +Verifica di aver utilizzato il blocco `modifica`{:class="block3variables"} e non il blocco `imposta`{:class="block3variables"} per modificare il totale ``{:class="block3variables"}. Devi usare `cambia`{:class="block3variables"} per aggiungere il prezzo al totale; non vuoi impostare il totale sul prezzo dell'articolo appena aggiunto. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/it-IT/step_4.md b/it-IT/step_4.md new file mode 100644 index 000000000..a298fedef --- /dev/null +++ b/it-IT/step_4.md @@ -0,0 +1,141 @@ +## Acquisti + +
+
+ +Lo sprite **venditore** deve: +- chiedere se il cliente è pronto a pagare gli articoli +- accettare il pagamento +- prepararsi per il prossimo cliente +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +Una volta terminata la scelta degli articoli, il cliente cliccherà sullo sprite **venditore** per pagare. + +--- task --- + + Comunica al cliente quanto costeranno i suoi articoli. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Aggiungi un suono di pagamento al tuo sprite <0>venditore in modo che il cliente sappia che il pagamento è in corso. + +![L'icona Aggiungi un Suono](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Aggiungi il blocco `riproduci suono finché non viene completato`{:class="block3sound"} al tuo script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Concludi la vendita. Ripristina `il totale`{:class="block3variables"} a `0` dopo il pagamento, `saluta`{:class="block3looks"} e `trasmetti`{:class="block3control"} `il prossimo cliente`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Prova il tuo progetto e assicurati che: +- Il cliente può effettuare il check-out con gli effetti sonori corretti +- Il totale di ``{:class="block3variables"} viene riportato a `0` dopo che un cliente paga o annulla. + +--- /task --- + + +--- task --- + +**Debug:** Potresti trovare alcuni bug nel tuo progetto, che dovrai correggere. + +Ecco alcuni bug comuni: + +--- collapse --- +--- +title: Il venditore non fa nulla quando clicco su di lui +--- + +Hai un bel po' di sprite nel tuo progetto. Assicurati che lo script `quando questo sprite è cliccato`{:class="block3events"} sia sul tuo sprite venditore ****. + +**Suggerimento:** Se l'hai aggiunto allo sprite sbagliato, puoi trascinare il codice nello sprite del venditore **** , quindi eliminarlo dall'altro sprite. + +--- /collapse --- + +--- collapse --- +--- +title: Le parole nei blocchi dire si fondono insieme +--- + +Quando unisci ``{:class="block3operators"} due pezzi insieme, devi aggiungere uno spazio alla fine del primo pezzo di testo o all'inizio del secondo pezzo di testo. + +Questi hanno uno spazio alla fine della prima parte dell'unione: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: Il totale non si azzera dopo una vendita +--- + +Controlla di aver utilizzato: + +```blocks3 +set [total v] to (0) +``` + +<0>non: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: Il venditore non risponde +--- + +Assicurati che l'operatore ``{:class="block3operators"} nella condizione `se`{:class="block3control"} sia il simbolo maggiore di `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +<0>Suggerimento: Confronta il tuo codice con gli esempi di codice. Ci sono differenze che non dovrebbero esserci? + +--- /task --- + +--- save --- diff --git a/it-IT/step_5.md b/it-IT/step_5.md new file mode 100644 index 000000000..8ce2e3363 --- /dev/null +++ b/it-IT/step_5.md @@ -0,0 +1 @@ +## Quiz veloce \ No newline at end of file diff --git a/it-IT/step_6.md b/it-IT/step_6.md new file mode 100644 index 000000000..97efc3b57 --- /dev/null +++ b/it-IT/step_6.md @@ -0,0 +1,234 @@ +## Sfida + +
+
+Sono tante le funzionalità che potresti aggiungere per migliorare l'esperienza di acquisto dei tuoi clienti. Non è necessario aggiungere tutto. Aggiungi semplicemente i miglioramenti che ritieni importanti. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Aggiungi altri articoli da vendere. + +--- /task --- + +--- task --- + +Aggiungi musica ed effetti sonori. + +--- /task --- + +--- task --- + +Dipingi il tuo scenario e altri costumi. + +--- /task --- + +--- task --- + +Crea un'altra attività e consenti ai giocatori di visitarle entrambe. + +--- /task --- + +Ogni progetto di esempio nell'Introduzione [](https://scratch. mit. edu/studios/29662180) ha un collegamento "Guarda all'interno" che ti consente di aprire il progetto in Scratch e di guardare il codice per prendere spunto e vedere come funziona. Puoi "Guardare all'interno" dei progetti di esempio per vedere come funzionano. + +Progetti di esempio: **Frutta fresca spaziale**: [Guarda all'interno](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Magliette fantastiche**: [Guarda all'interno](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Gelateria**: [Guarda all'interno](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Distributore automatico**: [Guarda all'interno](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Suggerimento:** se hai effettuato l'accesso a un account Scratch, puoi usare il **Backpack** per copiare script o sprite nel tuo progetto. + +[[[scratch-backpack]]] + +### Paga, chiacchierone! + +Il cassiere (o la cassa automatica) potrebbe chiedere se il servizio è stato buono o se il cliente sta avendo una bella giornata. + +--- task --- + +Puoi aggiungere blocchi `chiedi`{:class="block3sensing"} allo script del tuo **venditore** `quando si clicca questo sprite`{:class="block3events"} e `dire`{:class="block3looks"} cose diverse a seconda della risposta del cliente. + +--- collapse --- + +--- + +title: Fai e rispondi alle domande + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** controlla di aver scritto correttamente le opzioni nel tuo codice e nella tua risposta. Va bene anche usare le lettere maiuscole, quindi "Yes" e "YES" corrisponderanno a "yes". + +Aggiungi più domande per creare un chatbot o un personaggio non giocante con cui puoi parlare. + +--- /collapse --- + +--- /task --- + +### Metti gli oggetti in un sacchetto + +--- task --- + +Il progetto "Magliette fantastiche" propone magliette che scivolano in una borsa. + +--- collapse --- + +--- + +title: Fai scivolare gli oggetti in un contenitore + +--- + +Aggiungere uno sprite **Contenitore**. Potresti usare uno sprite esistente come **Gift** o **Take out**, oppure colorarne uno tuo con forme semplici. + +Aggiungi uno script per far sì che il contenitore **** appaia sempre in primo piano: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Quindi dovrai aggiungere del codice a ciascun **oggetto** in vendita per farli scivolare verso il contenitore quando vengono cliccati: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +Se non vuoi che il contenitore sia sempre presente, puoi aggiungere degli script per visualizzarlo e nasconderlo al momento giusto: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Prova il tuo progetto e assicurati che gli oggetti scivolino verso il contenitore e si nascondano. + +**Debug:** Controlla attentamente i tuoi script e assicurati di aver aggiornato tutti i tuoi **sprite degli oggetti**. Se hai bisogno di un esempio funzionante, puoi dare un'occhiata a [Magliette fantastiche](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"}. + +--- /collapse --- + +--- /task --- + +###  Interrompi l'aggiunta di articoli quando il cliente è alla cassa + +--- task --- + +Aggiungi una variabile `shop`{:class="block3variables"} e usala per controllare quando possono essere aggiunti gli articoli. + +--- collapse --- + +--- +title: Consenti gli acquisti solo quando il cliente non è alla cassa + +--- + +Aggiungi una `variabile`{:class="block3variables"} chiamata `shop` per tutti gli sprite. Imposterai questo valore su **true** quando il cliente è nel negozio e su <0>false quando è alla cassa. + +Seleziona il tuo sprite **venditore**. Aggiorna lo script `quando si fa clic sulla bandiera`{:class="block3events"} per consentire lo shopping all'avvio del progetto: + +```blocks3 ++set [shop v] to [true] +``` + +Ora aggiungi un blocco per modificare il negozio ``{:class="block3variables"} in `falso` all'inizio dello script del tuo **venditore** `quando si clicca sprite`{:class="block3events"}: + +```blocks3 ++set [shop v] to [false] +``` + +E un blocco per impostare la variabile `shop`{:class="block3variables"} di nuovo su `true` alla fine dello stesso script: + +```blocks3 ++set [shop v] to [true] +``` + +Ora devi aggiornare gli oggetti che vendi per controllare la variabile del negozio ``{:class="block3variables"}: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +Dovrai fare questa operazione per ogni articolo che vendi nel tuo negozio. + +**Test:** Fai clic sulla bandiera verde, quindi prova a fare acquisti. Verifica che sia ancora possibile aggiungere articoli e procedere al pagamento, ma che non sia possibile aggiungere articoli una volta avviato il pagamento. + +**Debug:** Controlla il tuo codice molto attentamente. Se hai bisogno di vedere un esempio funzionante, puoi dare un'occhiata al progetto [Frutta fresca spaziale](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"}. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Potresti dare al cliente la possibilità di annullare l'acquisto. + +--- collapse --- +--- +title: Imposta le opzioni di pagamento e annullamento +--- + +`Chiedi`{:class="block3sensing"} `Vuoi pagare o annullare?`. Aggiungi un blocco `Se`{:class="block3control"} per `rispondi`{:class="block3sensing"} `=`{:class="block3operators"} `paga` e al suo interno inserisci i tuoi blocchi di pagamento esistenti. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Aggiungi un secondo blocco `Se`{:class="block3control"} per `rispondi`{:class="block3sensing"} `=`{:class="block3operators"} `annulla` e al suo interno aggiungi il codice per annullare l'ordine. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Dai un'occhiata al nostro ['Mercato dello shopping intergalattico'](https://scratch.mit.edu/studios/29662180){:target="_blank"} studio Scratch per vedere i progetti creati dai membri della community. + +--- save --- diff --git a/it-IT/step_7.md b/it-IT/step_7.md new file mode 100644 index 000000000..86dd58b8b --- /dev/null +++ b/it-IT/step_7.md @@ -0,0 +1,9 @@ +## Condividi + +Se fai parte di un club, perché non condividi il tuo progetto con gli amici? + +Ispira la comunità della Raspberry Pi Foundation con il tuo progetto! + +Per inviare il tuo progetto al nostro studio Scratch ['Mercato dello shopping intergalattico'](https://scratch.mit.edu/studios/29662180){:target="_blank"}, compila [questo modulo](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Esempi di progetti di negozi nello studio Scratch "Mercato commerciale intergalattico".](images/studio-example.png) diff --git a/it-IT/step_8.md b/it-IT/step_8.md new file mode 100644 index 000000000..2e5f2b9b0 --- /dev/null +++ b/it-IT/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +Se stai seguendo il percorso [Più Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch), puoi passare al progetto [Non caderci](https://projects.raspberrypi.org/en/projects/dont-fall-in). In questo progetto, creerai un gioco dall'alto verso il basso in cui dovrai saltare da una piattaforma all'altra senza caderci dentro. + +--- print-only --- + +![Progetto Non caderci](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Istruzioni:** Premi spazio o tocca il palco per saltare. + +--- /no-print --- + +Se vuoi divertirti di più esplorando Scratch, puoi provare uno qualsiasi di [questi progetti](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/it-IT/step_9.md b/it-IT/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/it-IT/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/ja-JP/images/add-friend-projects.png b/ja-JP/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/ja-JP/images/add-friend-projects.png differ diff --git a/ja-JP/images/add-sound.png b/ja-JP/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/ja-JP/images/add-sound.png differ diff --git a/ja-JP/images/add-your-projects.png b/ja-JP/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/ja-JP/images/add-your-projects.png differ diff --git a/ja-JP/images/banner.png b/ja-JP/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/ja-JP/images/banner.png differ diff --git a/ja-JP/images/choose-backdrop-icon.png b/ja-JP/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/ja-JP/images/choose-backdrop-icon.png differ diff --git a/ja-JP/images/choose-sprite-icon.png b/ja-JP/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/ja-JP/images/choose-sprite-icon.png differ diff --git a/ja-JP/images/create-studio.png b/ja-JP/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/ja-JP/images/create-studio.png differ diff --git a/ja-JP/images/customer-count.png b/ja-JP/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/ja-JP/images/customer-count.png differ diff --git a/ja-JP/images/dont-fall-in-project.png b/ja-JP/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/ja-JP/images/dont-fall-in-project.png differ diff --git a/ja-JP/images/example-strip.png b/ja-JP/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/ja-JP/images/example-strip.png differ diff --git a/ja-JP/images/fruit.png b/ja-JP/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/ja-JP/images/fruit.png differ diff --git a/ja-JP/images/icecream.png b/ja-JP/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/ja-JP/images/icecream.png differ diff --git a/ja-JP/images/item-amounts.png b/ja-JP/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/ja-JP/images/item-amounts.png differ diff --git a/ja-JP/images/large-readout.png b/ja-JP/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/ja-JP/images/large-readout.png differ diff --git a/ja-JP/images/my-stuff-menu.png b/ja-JP/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/ja-JP/images/my-stuff-menu.png differ diff --git a/ja-JP/images/naming-studio.png b/ja-JP/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/ja-JP/images/naming-studio.png differ diff --git a/ja-JP/images/new-variable.png b/ja-JP/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/ja-JP/images/new-variable.png differ diff --git a/ja-JP/images/quiz2.png b/ja-JP/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/ja-JP/images/quiz2.png differ diff --git a/ja-JP/images/sprite-pane-size.png b/ja-JP/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/ja-JP/images/sprite-pane-size.png differ diff --git a/ja-JP/images/step2-image.png b/ja-JP/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/ja-JP/images/step2-image.png differ diff --git a/ja-JP/images/step3-image.png b/ja-JP/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/ja-JP/images/step3-image.png differ diff --git a/ja-JP/images/step4-image.png b/ja-JP/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/ja-JP/images/step4-image.png differ diff --git a/ja-JP/images/studio-example.png b/ja-JP/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/ja-JP/images/studio-example.png differ diff --git a/ja-JP/images/tshirt.png b/ja-JP/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/ja-JP/images/tshirt.png differ diff --git a/ja-JP/images/upgrade-image.png b/ja-JP/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/ja-JP/images/upgrade-image.png differ diff --git a/ja-JP/images/vending.png b/ja-JP/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/ja-JP/images/vending.png differ diff --git a/ja-JP/meta.yml b/ja-JP/meta.yml new file mode 100644 index 000000000..8df1f3d0d --- /dev/null +++ b/ja-JP/meta.yml @@ -0,0 +1,39 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Items for sale + completion: + - engaged + - + title: Purchases + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/ja-JP/quiz1/question_1.md b/ja-JP/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/ja-JP/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ja-JP/quiz1/question_2.md b/ja-JP/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/ja-JP/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ja-JP/quiz1/question_3.md b/ja-JP/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/ja-JP/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ja-JP/scratch-comments.txt b/ja-JP/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/ja-JP/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/ja-JP/scratch-translatable.txt b/ja-JP/scratch-translatable.txt new file mode 100644 index 000000000..06cc175a3 --- /dev/null +++ b/ja-JP/scratch-translatable.txt @@ -0,0 +1,49 @@ +name + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +yes + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +true + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/ja-JP/solutions/Cool Shirts.sb3 b/ja-JP/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/ja-JP/solutions/Cool Shirts.sb3 differ diff --git a/ja-JP/solutions/Fresh Space Fruit.sb3 b/ja-JP/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/ja-JP/solutions/Fresh Space Fruit.sb3 differ diff --git a/ja-JP/solutions/Vending machine.sb3 b/ja-JP/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/ja-JP/solutions/Vending machine.sb3 differ diff --git a/ja-JP/solutions/ice cream shop.sb3 b/ja-JP/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/ja-JP/solutions/ice cream shop.sb3 differ diff --git a/ja-JP/step_1.md b/ja-JP/step_1.md new file mode 100644 index 000000000..e41514d8a --- /dev/null +++ b/ja-JP/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/ja-JP/step_2.md b/ja-JP/step_2.md new file mode 100644 index 000000000..fb48837ea --- /dev/null +++ b/ja-JP/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/ja-JP/step_3.md b/ja-JP/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/ja-JP/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/ja-JP/step_4.md b/ja-JP/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/ja-JP/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/ja-JP/step_5.md b/ja-JP/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/ja-JP/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/ja-JP/step_6.md b/ja-JP/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/ja-JP/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/ja-JP/step_7.md b/ja-JP/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/ja-JP/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/ja-JP/step_8.md b/ja-JP/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/ja-JP/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/ja-JP/step_9.md b/ja-JP/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/ja-JP/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/kn-IN/images/add-friend-projects.png b/kn-IN/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/kn-IN/images/add-friend-projects.png differ diff --git a/kn-IN/images/add-sound.png b/kn-IN/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/kn-IN/images/add-sound.png differ diff --git a/kn-IN/images/add-your-projects.png b/kn-IN/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/kn-IN/images/add-your-projects.png differ diff --git a/kn-IN/images/banner.png b/kn-IN/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/kn-IN/images/banner.png differ diff --git a/kn-IN/images/choose-backdrop-icon.png b/kn-IN/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/kn-IN/images/choose-backdrop-icon.png differ diff --git a/kn-IN/images/choose-sprite-icon.png b/kn-IN/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/kn-IN/images/choose-sprite-icon.png differ diff --git a/kn-IN/images/create-studio.png b/kn-IN/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/kn-IN/images/create-studio.png differ diff --git a/kn-IN/images/customer-count.png b/kn-IN/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/kn-IN/images/customer-count.png differ diff --git a/kn-IN/images/dont-fall-in-project.png b/kn-IN/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/kn-IN/images/dont-fall-in-project.png differ diff --git a/kn-IN/images/example-strip.png b/kn-IN/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/kn-IN/images/example-strip.png differ diff --git a/kn-IN/images/fruit.png b/kn-IN/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/kn-IN/images/fruit.png differ diff --git a/kn-IN/images/icecream.png b/kn-IN/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/kn-IN/images/icecream.png differ diff --git a/kn-IN/images/item-amounts.png b/kn-IN/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/kn-IN/images/item-amounts.png differ diff --git a/kn-IN/images/large-readout.png b/kn-IN/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/kn-IN/images/large-readout.png differ diff --git a/kn-IN/images/my-stuff-menu.png b/kn-IN/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/kn-IN/images/my-stuff-menu.png differ diff --git a/kn-IN/images/naming-studio.png b/kn-IN/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/kn-IN/images/naming-studio.png differ diff --git a/kn-IN/images/new-variable.png b/kn-IN/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/kn-IN/images/new-variable.png differ diff --git a/kn-IN/images/quiz2.png b/kn-IN/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/kn-IN/images/quiz2.png differ diff --git a/kn-IN/images/sprite-pane-size.png b/kn-IN/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/kn-IN/images/sprite-pane-size.png differ diff --git a/kn-IN/images/step2-image.png b/kn-IN/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/kn-IN/images/step2-image.png differ diff --git a/kn-IN/images/step3-image.png b/kn-IN/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/kn-IN/images/step3-image.png differ diff --git a/kn-IN/images/step4-image.png b/kn-IN/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/kn-IN/images/step4-image.png differ diff --git a/kn-IN/images/studio-example.png b/kn-IN/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/kn-IN/images/studio-example.png differ diff --git a/kn-IN/images/tshirt.png b/kn-IN/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/kn-IN/images/tshirt.png differ diff --git a/kn-IN/images/upgrade-image.png b/kn-IN/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/kn-IN/images/upgrade-image.png differ diff --git a/kn-IN/images/vending.png b/kn-IN/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/kn-IN/images/vending.png differ diff --git a/kn-IN/meta.yml b/kn-IN/meta.yml new file mode 100644 index 000000000..8df1f3d0d --- /dev/null +++ b/kn-IN/meta.yml @@ -0,0 +1,39 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Items for sale + completion: + - engaged + - + title: Purchases + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/kn-IN/quiz1/question_1.md b/kn-IN/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/kn-IN/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/kn-IN/quiz1/question_2.md b/kn-IN/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/kn-IN/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/kn-IN/quiz1/question_3.md b/kn-IN/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/kn-IN/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/kn-IN/scratch-comments.txt b/kn-IN/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/kn-IN/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/kn-IN/scratch-translatable.txt b/kn-IN/scratch-translatable.txt new file mode 100644 index 000000000..06cc175a3 --- /dev/null +++ b/kn-IN/scratch-translatable.txt @@ -0,0 +1,49 @@ +name + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +yes + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +true + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/kn-IN/solutions/Cool Shirts.sb3 b/kn-IN/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/kn-IN/solutions/Cool Shirts.sb3 differ diff --git a/kn-IN/solutions/Fresh Space Fruit.sb3 b/kn-IN/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/kn-IN/solutions/Fresh Space Fruit.sb3 differ diff --git a/kn-IN/solutions/Vending machine.sb3 b/kn-IN/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/kn-IN/solutions/Vending machine.sb3 differ diff --git a/kn-IN/solutions/ice cream shop.sb3 b/kn-IN/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/kn-IN/solutions/ice cream shop.sb3 differ diff --git a/kn-IN/step_1.md b/kn-IN/step_1.md new file mode 100644 index 000000000..e41514d8a --- /dev/null +++ b/kn-IN/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/kn-IN/step_2.md b/kn-IN/step_2.md new file mode 100644 index 000000000..fb48837ea --- /dev/null +++ b/kn-IN/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/kn-IN/step_3.md b/kn-IN/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/kn-IN/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/kn-IN/step_4.md b/kn-IN/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/kn-IN/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/kn-IN/step_5.md b/kn-IN/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/kn-IN/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/kn-IN/step_6.md b/kn-IN/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/kn-IN/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/kn-IN/step_7.md b/kn-IN/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/kn-IN/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/kn-IN/step_8.md b/kn-IN/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/kn-IN/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/kn-IN/step_9.md b/kn-IN/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/kn-IN/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/mr-IN/images/add-friend-projects.png b/mr-IN/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/mr-IN/images/add-friend-projects.png differ diff --git a/mr-IN/images/add-sound.png b/mr-IN/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/mr-IN/images/add-sound.png differ diff --git a/mr-IN/images/add-your-projects.png b/mr-IN/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/mr-IN/images/add-your-projects.png differ diff --git a/mr-IN/images/banner.png b/mr-IN/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/mr-IN/images/banner.png differ diff --git a/mr-IN/images/choose-backdrop-icon.png b/mr-IN/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/mr-IN/images/choose-backdrop-icon.png differ diff --git a/mr-IN/images/choose-sprite-icon.png b/mr-IN/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/mr-IN/images/choose-sprite-icon.png differ diff --git a/mr-IN/images/create-studio.png b/mr-IN/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/mr-IN/images/create-studio.png differ diff --git a/mr-IN/images/customer-count.png b/mr-IN/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/mr-IN/images/customer-count.png differ diff --git a/mr-IN/images/dont-fall-in-project.png b/mr-IN/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/mr-IN/images/dont-fall-in-project.png differ diff --git a/mr-IN/images/example-strip.png b/mr-IN/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/mr-IN/images/example-strip.png differ diff --git a/mr-IN/images/fruit.png b/mr-IN/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/mr-IN/images/fruit.png differ diff --git a/mr-IN/images/icecream.png b/mr-IN/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/mr-IN/images/icecream.png differ diff --git a/mr-IN/images/item-amounts.png b/mr-IN/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/mr-IN/images/item-amounts.png differ diff --git a/mr-IN/images/large-readout.png b/mr-IN/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/mr-IN/images/large-readout.png differ diff --git a/mr-IN/images/my-stuff-menu.png b/mr-IN/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/mr-IN/images/my-stuff-menu.png differ diff --git a/mr-IN/images/naming-studio.png b/mr-IN/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/mr-IN/images/naming-studio.png differ diff --git a/mr-IN/images/new-variable.png b/mr-IN/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/mr-IN/images/new-variable.png differ diff --git a/mr-IN/images/quiz2.png b/mr-IN/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/mr-IN/images/quiz2.png differ diff --git a/mr-IN/images/sprite-pane-size.png b/mr-IN/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/mr-IN/images/sprite-pane-size.png differ diff --git a/mr-IN/images/step2-image.png b/mr-IN/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/mr-IN/images/step2-image.png differ diff --git a/mr-IN/images/step3-image.png b/mr-IN/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/mr-IN/images/step3-image.png differ diff --git a/mr-IN/images/step4-image.png b/mr-IN/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/mr-IN/images/step4-image.png differ diff --git a/mr-IN/images/studio-example.png b/mr-IN/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/mr-IN/images/studio-example.png differ diff --git a/mr-IN/images/tshirt.png b/mr-IN/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/mr-IN/images/tshirt.png differ diff --git a/mr-IN/images/upgrade-image.png b/mr-IN/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/mr-IN/images/upgrade-image.png differ diff --git a/mr-IN/images/vending.png b/mr-IN/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/mr-IN/images/vending.png differ diff --git a/mr-IN/meta.yml b/mr-IN/meta.yml new file mode 100644 index 000000000..8df1f3d0d --- /dev/null +++ b/mr-IN/meta.yml @@ -0,0 +1,39 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Items for sale + completion: + - engaged + - + title: Purchases + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/mr-IN/quiz1/question_1.md b/mr-IN/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/mr-IN/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/mr-IN/quiz1/question_2.md b/mr-IN/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/mr-IN/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/mr-IN/quiz1/question_3.md b/mr-IN/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/mr-IN/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/mr-IN/scratch-comments.txt b/mr-IN/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/mr-IN/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/mr-IN/scratch-translatable.txt b/mr-IN/scratch-translatable.txt new file mode 100644 index 000000000..06cc175a3 --- /dev/null +++ b/mr-IN/scratch-translatable.txt @@ -0,0 +1,49 @@ +name + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +yes + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +true + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/mr-IN/solutions/Cool Shirts.sb3 b/mr-IN/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/mr-IN/solutions/Cool Shirts.sb3 differ diff --git a/mr-IN/solutions/Fresh Space Fruit.sb3 b/mr-IN/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/mr-IN/solutions/Fresh Space Fruit.sb3 differ diff --git a/mr-IN/solutions/Vending machine.sb3 b/mr-IN/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/mr-IN/solutions/Vending machine.sb3 differ diff --git a/mr-IN/solutions/ice cream shop.sb3 b/mr-IN/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/mr-IN/solutions/ice cream shop.sb3 differ diff --git a/mr-IN/step_1.md b/mr-IN/step_1.md new file mode 100644 index 000000000..e41514d8a --- /dev/null +++ b/mr-IN/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/mr-IN/step_2.md b/mr-IN/step_2.md new file mode 100644 index 000000000..fb48837ea --- /dev/null +++ b/mr-IN/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/mr-IN/step_3.md b/mr-IN/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/mr-IN/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/mr-IN/step_4.md b/mr-IN/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/mr-IN/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/mr-IN/step_5.md b/mr-IN/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/mr-IN/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/mr-IN/step_6.md b/mr-IN/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/mr-IN/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/mr-IN/step_7.md b/mr-IN/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/mr-IN/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/mr-IN/step_8.md b/mr-IN/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/mr-IN/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/mr-IN/step_9.md b/mr-IN/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/mr-IN/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/nl-NL/images/add-friend-projects.png b/nl-NL/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/nl-NL/images/add-friend-projects.png differ diff --git a/nl-NL/images/add-sound.png b/nl-NL/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/nl-NL/images/add-sound.png differ diff --git a/nl-NL/images/add-your-projects.png b/nl-NL/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/nl-NL/images/add-your-projects.png differ diff --git a/nl-NL/images/banner.png b/nl-NL/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/nl-NL/images/banner.png differ diff --git a/nl-NL/images/choose-backdrop-icon.png b/nl-NL/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/nl-NL/images/choose-backdrop-icon.png differ diff --git a/nl-NL/images/choose-sprite-icon.png b/nl-NL/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/nl-NL/images/choose-sprite-icon.png differ diff --git a/nl-NL/images/create-studio.png b/nl-NL/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/nl-NL/images/create-studio.png differ diff --git a/nl-NL/images/customer-count.png b/nl-NL/images/customer-count.png new file mode 100644 index 000000000..c6c008605 Binary files /dev/null and b/nl-NL/images/customer-count.png differ diff --git a/nl-NL/images/dont-fall-in-project.png b/nl-NL/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/nl-NL/images/dont-fall-in-project.png differ diff --git a/nl-NL/images/example-strip.png b/nl-NL/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/nl-NL/images/example-strip.png differ diff --git a/nl-NL/images/fruit.png b/nl-NL/images/fruit.png new file mode 100644 index 000000000..1c8aa748a Binary files /dev/null and b/nl-NL/images/fruit.png differ diff --git a/nl-NL/images/icecream.png b/nl-NL/images/icecream.png new file mode 100644 index 000000000..b7c1b52d8 Binary files /dev/null and b/nl-NL/images/icecream.png differ diff --git a/nl-NL/images/item-amounts.png b/nl-NL/images/item-amounts.png new file mode 100644 index 000000000..1bbbd95d9 Binary files /dev/null and b/nl-NL/images/item-amounts.png differ diff --git a/nl-NL/images/large-readout.png b/nl-NL/images/large-readout.png new file mode 100644 index 000000000..44427fe99 Binary files /dev/null and b/nl-NL/images/large-readout.png differ diff --git a/nl-NL/images/my-stuff-menu.png b/nl-NL/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/nl-NL/images/my-stuff-menu.png differ diff --git a/nl-NL/images/naming-studio.png b/nl-NL/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/nl-NL/images/naming-studio.png differ diff --git a/nl-NL/images/new-variable.png b/nl-NL/images/new-variable.png new file mode 100644 index 000000000..52c05e130 Binary files /dev/null and b/nl-NL/images/new-variable.png differ diff --git a/nl-NL/images/quiz2.png b/nl-NL/images/quiz2.png new file mode 100644 index 000000000..455562eba Binary files /dev/null and b/nl-NL/images/quiz2.png differ diff --git a/nl-NL/images/sprite-pane-size.png b/nl-NL/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/nl-NL/images/sprite-pane-size.png differ diff --git a/nl-NL/images/step2-image.png b/nl-NL/images/step2-image.png new file mode 100644 index 000000000..3c5754e82 Binary files /dev/null and b/nl-NL/images/step2-image.png differ diff --git a/nl-NL/images/step3-image.png b/nl-NL/images/step3-image.png new file mode 100644 index 000000000..1b8c3be53 Binary files /dev/null and b/nl-NL/images/step3-image.png differ diff --git a/nl-NL/images/step4-image.png b/nl-NL/images/step4-image.png new file mode 100644 index 000000000..8965113b3 Binary files /dev/null and b/nl-NL/images/step4-image.png differ diff --git a/nl-NL/images/studio-example.png b/nl-NL/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/nl-NL/images/studio-example.png differ diff --git a/nl-NL/images/tshirt.png b/nl-NL/images/tshirt.png new file mode 100644 index 000000000..66723e24d Binary files /dev/null and b/nl-NL/images/tshirt.png differ diff --git a/nl-NL/images/upgrade-image.png b/nl-NL/images/upgrade-image.png new file mode 100644 index 000000000..a82cfc5a5 Binary files /dev/null and b/nl-NL/images/upgrade-image.png differ diff --git a/nl-NL/images/vending.png b/nl-NL/images/vending.png new file mode 100644 index 000000000..d5bb3e4a7 Binary files /dev/null and b/nl-NL/images/vending.png differ diff --git a/nl-NL/meta.yml b/nl-NL/meta.yml new file mode 100644 index 000000000..42ede02e5 --- /dev/null +++ b/nl-NL/meta.yml @@ -0,0 +1,39 @@ +--- +title: Volgende klant alsjeblieft +hero_image: images/banner.png +description: Een winkel simulatie project waar de klant voorwerpen kan kopen. +meta_title: Scratch-programmeerprojecten voor kinderen en tieners | Volgende klant alsjeblieft +meta_description: Leer Scratch met de programmeerprojecten van de Raspberry Pi Foundation voor kinderen en tieners. Maak een Scratch-app waar de klant voorwerpen kan kopen. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Producten te koop + completion: + - engaged + - + title: Aankopen + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/nl-NL/quiz1/question_1.md b/nl-NL/quiz1/question_1.md new file mode 100644 index 000000000..ca85fb8c5 --- /dev/null +++ b/nl-NL/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Snelle quiz + +Beantwoord de drie vragen. Je wordt naar het juiste antwoord geleid. + +Klik na het beantwoorden van elke vraag op **Controleer mijn antwoord**. + +Veel plezier! + +--- question --- + +--- +legend: Vraag 1 van 3 +--- + +Een winkelproject gebruikt een `totaal`{:class="block3variables"} variabele om het totaal voor elke klant op te slaan. + ++ Een klant voegt items toe die in totaal `50` bedragen en betaalt ++ Een nieuwe klant voegt items toe die in totaal `40` bedragen, maar het `totaal`{:class="block3variables"} wordt nu weergegeven als `90` voor de tweede klant + +Welk blok zou je aan het betalingsscript moeten toevoegen om het totaal terug te laten gaan naar `0` nadat elke klant heeft betaald? + +--- choices --- + +- ( ) +```blocks3 +wijzig [total v] met [0] +``` + + --- feedback --- + +Niet helemaal, dit zou voor de tweede klant werken, maar het `totaal`{:class="block3variables"} zou verkeerd zijn voor andere klanten. + + --- /feedback --- + +- ( ) +```blocks3 +stel [total v] in op [40] +``` + + --- feedback --- + + Niet helemaal, `totaal`{:class="block3variables"} moet `0` zijn nadat een klant betaalt, maar het is niet het `verander`{:class="block3variables"} blok dat je nodig hebt. + + --- /feedback --- + +- (x) + +```blocks3 +stel [total v] in op [0] +``` + + --- feedback --- + +Ja dat is goed. Je moet `maak`{:class="block3variables"} het `totaal`{:class="block3variables"} `0` maken nadat elke klant betaalt. + + --- /feedback --- + +- ( ) + +```blocks3 +wijzig [total v] met [-50] +``` + + --- feedback --- + +Dat zou voor dit voorbeeld werken, maar wat als de eerste klant een ander bedrag besteedde? Je oplossing moet werken wanneer de vorige klant verschillende bedragen uitgeeft. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/nl-NL/quiz1/question_2.md b/nl-NL/quiz1/question_2.md new file mode 100644 index 000000000..7fc94cf2c --- /dev/null +++ b/nl-NL/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Vraag 2 van 3 +--- + +In een winkel heeft de **verkoper** deze code in het afrekenscript: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +Wanneer de code wordt uitgevoerd, typt de gebruiker het antwoord 'geweldig'. Wat zal de **verkoper** sprite zeggen? + +![Een 'vraag' vak met het woord 'geweldig' ingetypt.](images/quiz2.png) + +--- choices --- + +- (X) de **Verkoper** zal `Sorry om dat te horen zeggen.` + + --- feedback --- + + Ja. Mensen weten dat 'geweldig' hetzelfde betekent als 'goed', maar de '=' controleert of de letters hetzelfde zijn. + + De **voorwaarde** `antwoord`{:class="block3sensing"} = `goed` is 'niet juist', dus het `zeg`{:class="block3looks"} blok in het `anders`{:class="block3control"} gedeelte zal worden uitgevoerd. + + --- /feedback --- + +- ( ) de **verkoper** zal zeggen `dat is fantastisch!` + + --- feedback --- + +Nee, alleen het exacte antwoord `goed` zal ervoor zorgen dat de **verkoper** zegt `dat is fantastisch!`. Kijk opnieuw naar de code om te zien welk bericht de **verkoper** zal zeggen voor alle antwoorden die niet `goed` zijn. + +**Tip:** 'goed' of 'GOED' zou overeenkomen met 'goed'. + + --- /feedback --- + +- ( ) de **verkoper** zal niets zeggen. + + --- feedback --- + +Nee, de **verkoper** zal altijd iets zeggen. Kijk goed naar de code om te zien wat het bericht zal zijn. + + --- /feedback --- + +- ( ) de **verkoper** zal `geweldig` zeggen. + + --- feedback --- + +Nee, de **klant** heeft het antwoord 'geweldig' getypt, maar de **verkoper** zegt het antwoord niet. Kijk goed naar de code om te zien wat het bericht zal zijn. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/nl-NL/quiz1/question_3.md b/nl-NL/quiz1/question_3.md new file mode 100644 index 000000000..07280a44d --- /dev/null +++ b/nl-NL/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Vraag 3 van 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) paniek! + + --- feedback --- + + Dat gaat niet helpen. Je moet goed nadenken om codeerproblemen op te lossen. + + --- /feedback --- + +- ( ) Opgeven + + --- feedback --- + + There are lots of things you could try. Zelfs ervaren coders doen het ook niet altijd de eerste keer goed en leren veel van hun fouten. + + --- /feedback --- + +- (X) Lees de code zorgvuldig en probeer deze te debuggen. + + --- feedback --- + + Ja. Het repareren van bugs is een onderdeel van coderen. Hoe meer je oefent, hoe meer ervaring je krijgt, en hoe gemakkelijker het wordt om bugs te vinden en te repareren. + + --- /feedback --- + +- ( ) Word boos op de computer + + --- feedback --- + +Een computer doet alleen wat we hem vertellen te doen, dus het is niet logisch om er boos op te worden. + +Geïrriteerd raken helpt niet om het probleem op te lossen, omdat het het moeilijker zal maken om helder te denken. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/nl-NL/scratch-comments.txt b/nl-NL/scratch-comments.txt new file mode 100644 index 000000000..1d485912b --- /dev/null +++ b/nl-NL/scratch-comments.txt @@ -0,0 +1,9 @@ +type de naam van je bedrijf + +je bedrijfsnaam + +gebruik de naam van je Container sprite + +beginpositie + +vorige klant neemt de tas diff --git a/nl-NL/scratch-translatable.txt b/nl-NL/scratch-translatable.txt new file mode 100644 index 000000000..87870bbe3 --- /dev/null +++ b/nl-NL/scratch-translatable.txt @@ -0,0 +1,49 @@ +naam + +mijn winkel + +volgende klant + +Volgende klant alsjeblieft! + +totaal + +Dat is dan + +Bedankt voor het winkelen bij + +Wil je betalen of annuleren? + +betalen + +annuleren + +Ok. Geen probleem + +Klik op de producten die je wilt + +Heb je alles gevonden wat je vandaag nodig hebt? + +ja + +Dat is fantastisch! + +Misschien moet ik meer producten aan mijn winkel toevoegen + +Tas + +1 lepel + +ijshoorntje + +winkel + +waar + +niet waar + +Hoe gaat het vandaag? + +goed + +Het spijt me om dat te horen. diff --git a/nl-NL/solutions/Cool Shirts.sb3 b/nl-NL/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..2b37992c8 Binary files /dev/null and b/nl-NL/solutions/Cool Shirts.sb3 differ diff --git a/nl-NL/solutions/Fresh Space Fruit.sb3 b/nl-NL/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..e9c7ce6d3 Binary files /dev/null and b/nl-NL/solutions/Fresh Space Fruit.sb3 differ diff --git a/nl-NL/solutions/Vending machine.sb3 b/nl-NL/solutions/Vending machine.sb3 new file mode 100644 index 000000000..1ae1545e5 Binary files /dev/null and b/nl-NL/solutions/Vending machine.sb3 differ diff --git a/nl-NL/solutions/ice cream shop.sb3 b/nl-NL/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..2b6c3be99 Binary files /dev/null and b/nl-NL/solutions/ice cream shop.sb3 differ diff --git a/nl-NL/step_1.md b/nl-NL/step_1.md new file mode 100644 index 000000000..befe93a65 --- /dev/null +++ b/nl-NL/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Maak een winkel-app waar de klant producten in je winkel kan kopen. Het project zal in de ik-persoon weergave zijn waar de speler een klant is. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. Als je klaar bent, klik je op Kiran om uit te checken. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Doe inspiratie op 💭 + +Klik op de **verkoper** sprites om producten te kopen: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (uitgelicht gemeenschapsproject) + +Klik op de Pride Pin-badges om ze aan je winkelmandje toe te voegen: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Doe inspiratie op 💭 + +Je gaat een aantal ontwerpbeslissingen nemen om je personage te creëren. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Voorbeeldproject](images/fruit.png) ![Voorbeeldproject](images/tshirt.png) ![Voorbeeldproject](images/icecream.png) ![Voorbeeldproject](images/vending.png) + +--- /print-only --- + diff --git a/nl-NL/step_2.md b/nl-NL/step_2.md new file mode 100644 index 000000000..f95e9d248 --- /dev/null +++ b/nl-NL/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? Het zou iets realistisch kunnen zijn, iets uit een boek of film die je leuk vindt, of iets heel geks. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open een [nieuw Scratch project](http://rpf.io/scratch-new){:target="_blank"} en kijk naar de sprites en achtergronden die je kunt gebruiken. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ Een plank of boekenkast om producten op te zetten; je zou dit op de achtergrond kunnen tekenen + +--- /task --- + +--- task --- + +Voeg een sprite toe voor de verkoper. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/nl-NL/step_3.md b/nl-NL/step_3.md new file mode 100644 index 000000000..cefde21e1 --- /dev/null +++ b/nl-NL/step_3.md @@ -0,0 +1,128 @@ +## Producten te koop + +
+
+Je winkel heeft producten nodig om te verkopen. Elk item heeft een prijs die wordt toegevoegd aan een 'totaal'{:class="block3variables"} variabele. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +Je moet bijhouden hoeveel je klant uitgeeft. + +--- task --- + +Task ---Voeg een nieuwe variabele toe met de naam `totaal`{:class="block3variables"} voor alle sprites. + +Klik op je **verkoper** sprite en voeg een script toe aan `maak`{:class="block3variables"} het `totaal`{:class="block3variables"} `0` wanneer het project begint. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +Welke **producten** gaat je klant(en) kopen? ++ Eten of drinken ++ Sportuitrusting, speelgoed of gadgets ++ Toverstokken, drankjes of boeken met toverspreuken ++ Kleding of andere mode-items ++ Your own idea + +--- task --- + +Voeg een sprite toe voor het eerste **product** dat je in je winkel gaat verkopen. + +Als je wilt, kun je een prijs aan het uiterlijk toevoegen met behulp van het tekstgereedschap in de Paint editor. Of voeg een prijs toe aan de achtergrond en plaats het item ernaast. + +![Voorbeelden van producten met bedragen ernaast geschreven.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Voeg een script toe aan `verander`{:class="block3variables"} het `totaal`{:class="block3variables"} met de prijs van je product wanneer de klant op de sprite klikt. + +--- collapse --- +--- +title: Klik om een product toe te voegen +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +Het is ook een goed idee om `een geluid`{:class="block3sound"} af te spelen om de klant te laten weten dat hij een product heeft toegevoegd. + +![Het pictogram geluid toevoegen](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Klik op je product en controleer of de waarde van de `totaal`{:class="block3variables"} variabele toeneemt met de prijs van het product, en controleer ook of je het geluidseffect hoort. Klik meerdere keren om het totaal te zien toenemen. + +Klik op de groene vlag om je project te starten en zorg ervoor dat het `totaal`{:class="block3variables"} begint op `0`. + +--- /task --- + +--- task --- + +Voeg meer producten toe aan je winkel. + +Je kunt: ++ Het eerste product kopiëren en vervolgens een nieuw uiterlijk toevoegen in de Paint editor ++ Voeg een sprite toe en sleep vervolgens het `wanneer op de groene vlag wordt geklikt`{:class="block3events"} script van het eerste product naar je nieuwe product + +Voeg een prijslabel toe aan het uiterlijk of de achtergrond als je die gebruikt. + +--- /task --- + +--- task --- + +Task ---Klik op je nieuwe **product** sprite in de Sprite-lijst en klik vervolgens op het tabblad **Code**. + +Wijzig het bedrag zodat het `totaal`{:class="block3variables"} verandert met de prijs van je nieuwe product. + +--- /task --- + +--- task --- + +**Test:** Klik op de groene vlag om je project te starten en klik op producten om ze toe te voegen. Controleer of het totaal met de juiste hoeveelheid toeneemt telkens wanneer je op een producten klikt. + +Als je prijslabels hebt toegevoegd, zorg er dan voor dat ze overeenkomen met het bedrag dat wordt toegevoegd aan het `totaal`{:class="block3variables"}, anders snappen je klanten het niet! + +--- /task --- + +--- task --- + +**Debug:** Mogelijk vindt je enkele fouten in jouw project die je moet oplossen. Hier zijn enkele veelvoorkomende fouten. + +--- collapse --- +--- +title: Het totaal gaat niet naar 0 wanneer ik op de groene vlag klik +--- + +Controleer of je de beginwaarde van de `totaal`{:class="block3variables"} variabele hebt ingesteld in het `wanneer op de groene vlag wordt geklikt`{:class="block3events"} script op je **verkoper** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: Het totaal stijgt niet met het juiste bedrag wanneer ik op een product klik +--- + +Controleer of elk product een `wanneer op deze sprite wordt geklikt`{:class="block3events"} script heeft dat het `totaal`{:class="block3variables"} wijzigt met het juiste bedrag voor dat product; je hebt mogelijk de prijs voor de verkeerde sprite gewijzigd. + +Controleer of je het `verander`{:class="block3variables"} blok en niet het `maak`{:class="block3variables"} blok hebt gebruikt om het `totaal`{:class="block3variables"} te veranderen. Je moet het `verander`{:class="block3variables"} blok gebruiken om de prijs toe te voegen aan het totaal, je wilt het totaal niet instellen op de prijs van het product dat zojuist is toegevoegd. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/nl-NL/step_4.md b/nl-NL/step_4.md new file mode 100644 index 000000000..a63cf4898 --- /dev/null +++ b/nl-NL/step_4.md @@ -0,0 +1,141 @@ +## Aankopen + +
+
+ +De **verkoper** sprite moet: +- vragen of de klant klaar is om te betalen voor de producten +- betaling aannemen +- zich klaar maken voor de volgende klant +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +Wanneer ze klaar zijn met het kiezen van producten, zal de klant op de **verkoper** sprite klikken om te betalen. + +--- task --- + + Vertel de klant hoeveel zijn producten gaan kosten. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Voeg een betalingsgeluid toe aan je **verkoper** sprite, zodat de klant weet dat de betaling plaatsvindt. + +![Het pictogram geluid toevoegen](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Voeg het `start geluid en wacht`{:class="block3sound"} blok toe aan je script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Maak de verkoop af. Zet `totaal`{:class="block3variables"} terug naar `0` na betaling, `zeg`{:class="block3looks"} tot ziens en `zend`{:class="block3control"} het `volgende klant`{:class="block3control"} bericht. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test je project en zorg ervoor dat: +- De klant kan betalen met de juiste geluidseffecten +- Het `totaal`{:class="block3variables"} weer op `0` wordt ingesteld nadat een klant betaalt of annuleert. + +--- /task --- + + +--- task --- + +**Debug:** Mogelijk vindt je enkele fouten in jouw project die je moet oplossen. + +Hier zijn enkele veelvoorkomende fouten: + +--- collapse --- +--- +title: De verkoper doet niets wanneer ik erop klik +--- + +Je hebt heel veel sprites in je project. Zorg ervoor dat het `wanneer op deze sprite wordt geklikt`{:class="block3events"} script op je **verkoper** sprite staat. + +**Tip:** als je het aan de verkeerde sprite hebt toegevoegd, kun je de code naar de **verkoper** sprite slepen en vervolgens uit de andere sprite verwijderen. + +--- /collapse --- + +--- collapse --- +--- +title: De woorden in de zeg blokken worden aan elkaar geplakt +--- + +Wanneer je `twee stukken aan elkaar toevoegt`{:class="block3operators"}, moet je een spatie toevoegen aan het einde van je eerste stuk tekst of aan het begin van je tweede stuk tekst. + +Deze hebben een spatie aan het einde van het eerste deel: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: Het totaal wordt niet op 0 gezet na een verkoop +--- + +Controleer of je het volgende hebt gebruikt: + +```blocks3 +set [total v] to (0) +``` + +**niet**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: De verkoper reageert niet +--- + +Zorg ervoor dat de `functie`{:class="block3operators"} in de `als`{:class="block3control"} voorwaarde groter is dan het symbool `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Vergelijk je code met de voorbeelden. Zijn er verschillen die er niet zouden moeten zijn? + +--- /task --- + +--- save --- diff --git a/nl-NL/step_5.md b/nl-NL/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/nl-NL/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/nl-NL/step_6.md b/nl-NL/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/nl-NL/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/nl-NL/step_7.md b/nl-NL/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/nl-NL/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/nl-NL/step_8.md b/nl-NL/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/nl-NL/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/nl-NL/step_9.md b/nl-NL/step_9.md new file mode 100644 index 000000000..649bb0105 --- /dev/null +++ b/nl-NL/step_9.md @@ -0,0 +1,21 @@ +## Wat kun je verder nog doen? + +Als je het [Meer Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) pad volgt, kun je naar het [Val er niet in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project gaan. In dit project maak je een top-down spel waar je van platform naar platform moet springen zonder te vallen. + +--- print-only --- + +![Val er niet in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructies:** Druk op spatiebalk of tik op het speelveld om te springen. + +--- /no-print --- + +Wil je nog meer plezier hebben met het verkennen van Scratch, dan kun je één van [deze projecten](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201) proberen. diff --git a/pl-PL/images/add-friend-projects.png b/pl-PL/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/pl-PL/images/add-friend-projects.png differ diff --git a/pl-PL/images/add-sound.png b/pl-PL/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/pl-PL/images/add-sound.png differ diff --git a/pl-PL/images/add-your-projects.png b/pl-PL/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/pl-PL/images/add-your-projects.png differ diff --git a/pl-PL/images/banner.png b/pl-PL/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/pl-PL/images/banner.png differ diff --git a/pl-PL/images/choose-backdrop-icon.png b/pl-PL/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/pl-PL/images/choose-backdrop-icon.png differ diff --git a/pl-PL/images/choose-sprite-icon.png b/pl-PL/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/pl-PL/images/choose-sprite-icon.png differ diff --git a/pl-PL/images/create-studio.png b/pl-PL/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/pl-PL/images/create-studio.png differ diff --git a/pl-PL/images/customer-count.png b/pl-PL/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/pl-PL/images/customer-count.png differ diff --git a/pl-PL/images/dont-fall-in-project.png b/pl-PL/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/pl-PL/images/dont-fall-in-project.png differ diff --git a/pl-PL/images/example-strip.png b/pl-PL/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/pl-PL/images/example-strip.png differ diff --git a/pl-PL/images/fruit.png b/pl-PL/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/pl-PL/images/fruit.png differ diff --git a/pl-PL/images/icecream.png b/pl-PL/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/pl-PL/images/icecream.png differ diff --git a/pl-PL/images/item-amounts.png b/pl-PL/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/pl-PL/images/item-amounts.png differ diff --git a/pl-PL/images/large-readout.png b/pl-PL/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/pl-PL/images/large-readout.png differ diff --git a/pl-PL/images/my-stuff-menu.png b/pl-PL/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/pl-PL/images/my-stuff-menu.png differ diff --git a/pl-PL/images/naming-studio.png b/pl-PL/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/pl-PL/images/naming-studio.png differ diff --git a/pl-PL/images/new-variable.png b/pl-PL/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/pl-PL/images/new-variable.png differ diff --git a/pl-PL/images/quiz2.png b/pl-PL/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/pl-PL/images/quiz2.png differ diff --git a/pl-PL/images/sprite-pane-size.png b/pl-PL/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/pl-PL/images/sprite-pane-size.png differ diff --git a/pl-PL/images/step2-image.png b/pl-PL/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/pl-PL/images/step2-image.png differ diff --git a/pl-PL/images/step3-image.png b/pl-PL/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/pl-PL/images/step3-image.png differ diff --git a/pl-PL/images/step4-image.png b/pl-PL/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/pl-PL/images/step4-image.png differ diff --git a/pl-PL/images/studio-example.png b/pl-PL/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/pl-PL/images/studio-example.png differ diff --git a/pl-PL/images/tshirt.png b/pl-PL/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/pl-PL/images/tshirt.png differ diff --git a/pl-PL/images/upgrade-image.png b/pl-PL/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/pl-PL/images/upgrade-image.png differ diff --git a/pl-PL/images/vending.png b/pl-PL/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/pl-PL/images/vending.png differ diff --git a/pl-PL/meta.yml b/pl-PL/meta.yml new file mode 100644 index 000000000..8df1f3d0d --- /dev/null +++ b/pl-PL/meta.yml @@ -0,0 +1,39 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Items for sale + completion: + - engaged + - + title: Purchases + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/pl-PL/quiz1/question_1.md b/pl-PL/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/pl-PL/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/pl-PL/quiz1/question_2.md b/pl-PL/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/pl-PL/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/pl-PL/quiz1/question_3.md b/pl-PL/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/pl-PL/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/pl-PL/scratch-comments.txt b/pl-PL/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/pl-PL/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/pl-PL/scratch-translatable.txt b/pl-PL/scratch-translatable.txt new file mode 100644 index 000000000..06cc175a3 --- /dev/null +++ b/pl-PL/scratch-translatable.txt @@ -0,0 +1,49 @@ +name + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +yes + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +true + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/pl-PL/solutions/Cool Shirts.sb3 b/pl-PL/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/pl-PL/solutions/Cool Shirts.sb3 differ diff --git a/pl-PL/solutions/Fresh Space Fruit.sb3 b/pl-PL/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/pl-PL/solutions/Fresh Space Fruit.sb3 differ diff --git a/pl-PL/solutions/Vending machine.sb3 b/pl-PL/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/pl-PL/solutions/Vending machine.sb3 differ diff --git a/pl-PL/solutions/ice cream shop.sb3 b/pl-PL/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/pl-PL/solutions/ice cream shop.sb3 differ diff --git a/pl-PL/step_1.md b/pl-PL/step_1.md new file mode 100644 index 000000000..e41514d8a --- /dev/null +++ b/pl-PL/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/pl-PL/step_2.md b/pl-PL/step_2.md new file mode 100644 index 000000000..fb48837ea --- /dev/null +++ b/pl-PL/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/pl-PL/step_3.md b/pl-PL/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/pl-PL/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/pl-PL/step_4.md b/pl-PL/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/pl-PL/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/pl-PL/step_5.md b/pl-PL/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/pl-PL/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/pl-PL/step_6.md b/pl-PL/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/pl-PL/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/pl-PL/step_7.md b/pl-PL/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/pl-PL/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/pl-PL/step_8.md b/pl-PL/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/pl-PL/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/pl-PL/step_9.md b/pl-PL/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/pl-PL/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/pt-BR/images/add-friend-projects.png b/pt-BR/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/pt-BR/images/add-friend-projects.png differ diff --git a/pt-BR/images/add-sound.png b/pt-BR/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/pt-BR/images/add-sound.png differ diff --git a/pt-BR/images/add-your-projects.png b/pt-BR/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/pt-BR/images/add-your-projects.png differ diff --git a/pt-BR/images/banner.png b/pt-BR/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/pt-BR/images/banner.png differ diff --git a/pt-BR/images/choose-backdrop-icon.png b/pt-BR/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/pt-BR/images/choose-backdrop-icon.png differ diff --git a/pt-BR/images/choose-sprite-icon.png b/pt-BR/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/pt-BR/images/choose-sprite-icon.png differ diff --git a/pt-BR/images/create-studio.png b/pt-BR/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/pt-BR/images/create-studio.png differ diff --git a/pt-BR/images/customer-count.png b/pt-BR/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/pt-BR/images/customer-count.png differ diff --git a/pt-BR/images/dont-fall-in-project.png b/pt-BR/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/pt-BR/images/dont-fall-in-project.png differ diff --git a/pt-BR/images/example-strip.png b/pt-BR/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/pt-BR/images/example-strip.png differ diff --git a/pt-BR/images/fruit.png b/pt-BR/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/pt-BR/images/fruit.png differ diff --git a/pt-BR/images/icecream.png b/pt-BR/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/pt-BR/images/icecream.png differ diff --git a/pt-BR/images/item-amounts.png b/pt-BR/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/pt-BR/images/item-amounts.png differ diff --git a/pt-BR/images/large-readout.png b/pt-BR/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/pt-BR/images/large-readout.png differ diff --git a/pt-BR/images/my-stuff-menu.png b/pt-BR/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/pt-BR/images/my-stuff-menu.png differ diff --git a/pt-BR/images/naming-studio.png b/pt-BR/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/pt-BR/images/naming-studio.png differ diff --git a/pt-BR/images/new-variable.png b/pt-BR/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/pt-BR/images/new-variable.png differ diff --git a/pt-BR/images/quiz2.png b/pt-BR/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/pt-BR/images/quiz2.png differ diff --git a/pt-BR/images/sprite-pane-size.png b/pt-BR/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/pt-BR/images/sprite-pane-size.png differ diff --git a/pt-BR/images/step2-image.png b/pt-BR/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/pt-BR/images/step2-image.png differ diff --git a/pt-BR/images/step3-image.png b/pt-BR/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/pt-BR/images/step3-image.png differ diff --git a/pt-BR/images/step4-image.png b/pt-BR/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/pt-BR/images/step4-image.png differ diff --git a/pt-BR/images/studio-example.png b/pt-BR/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/pt-BR/images/studio-example.png differ diff --git a/pt-BR/images/tshirt.png b/pt-BR/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/pt-BR/images/tshirt.png differ diff --git a/pt-BR/images/upgrade-image.png b/pt-BR/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/pt-BR/images/upgrade-image.png differ diff --git a/pt-BR/images/vending.png b/pt-BR/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/pt-BR/images/vending.png differ diff --git a/pt-BR/meta.yml b/pt-BR/meta.yml new file mode 100644 index 000000000..8df1f3d0d --- /dev/null +++ b/pt-BR/meta.yml @@ -0,0 +1,39 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: What you will make + - + title: Your shop + - + title: Items for sale + completion: + - engaged + - + title: Purchases + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Challenge + challenge: true + - + title: Share + - + title: What can you do now? diff --git a/pt-BR/quiz1/question_1.md b/pt-BR/quiz1/question_1.md new file mode 100644 index 000000000..9f9662f16 --- /dev/null +++ b/pt-BR/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/pt-BR/quiz1/question_2.md b/pt-BR/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/pt-BR/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/pt-BR/quiz1/question_3.md b/pt-BR/quiz1/question_3.md new file mode 100644 index 000000000..9e74cc8f9 --- /dev/null +++ b/pt-BR/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Your project is not working. What should you do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things you could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/pt-BR/scratch-comments.txt b/pt-BR/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/pt-BR/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/pt-BR/scratch-translatable.txt b/pt-BR/scratch-translatable.txt new file mode 100644 index 000000000..a67f3f7a4 --- /dev/null +++ b/pt-BR/scratch-translatable.txt @@ -0,0 +1,49 @@ +nome + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +sim + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +sim + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/pt-BR/solutions/Cool Shirts.sb3 b/pt-BR/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/pt-BR/solutions/Cool Shirts.sb3 differ diff --git a/pt-BR/solutions/Fresh Space Fruit.sb3 b/pt-BR/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/pt-BR/solutions/Fresh Space Fruit.sb3 differ diff --git a/pt-BR/solutions/Vending machine.sb3 b/pt-BR/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/pt-BR/solutions/Vending machine.sb3 differ diff --git a/pt-BR/solutions/ice cream shop.sb3 b/pt-BR/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/pt-BR/solutions/ice cream shop.sb3 differ diff --git a/pt-BR/step_1.md b/pt-BR/step_1.md new file mode 100644 index 000000000..e41514d8a --- /dev/null +++ b/pt-BR/step_1.md @@ -0,0 +1,52 @@ +## What you will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +--- no-print --- + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+**Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Get ideas 💭 + +Click on the **seller** sprites to buy items: + +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in the Scratch 2: Next customer please! Scratch studio at https://scratch.mit.edu/studios/29611454 + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/pt-BR/step_2.md b/pt-BR/step_2.md new file mode 100644 index 000000000..fb48837ea --- /dev/null +++ b/pt-BR/step_2.md @@ -0,0 +1,80 @@ +## Your shop + +
+
+What is your shop idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your shop idea. + +--- /task --- + +--- task --- + +**Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + ++ A backdrop from the Scratch library, or a plain coloured backdrop + +--- /task --- + +--- task --- + +**Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Add more scenery. ++ A desk, counter, or window to sell from ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- /task --- + +--- task --- + +Add a sprite to represent the seller. + +You could choose: ++ A person or non-player character such as a shopkeeper, farmer, or librarian ++ A machine such as a vending machine, jukebox, or cash register + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Create a new message called `next customer`. + +```blocks3 +when flag clicked ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/pt-BR/step_3.md b/pt-BR/step_3.md new file mode 100644 index 000000000..8c2e88c47 --- /dev/null +++ b/pt-BR/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your own idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/pt-BR/step_4.md b/pt-BR/step_4.md new file mode 100644 index 000000000..7e8467f4a --- /dev/null +++ b/pt-BR/step_4.md @@ -0,0 +1,141 @@ +## Purchases + +
+
+ +The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/pt-BR/step_5.md b/pt-BR/step_5.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/pt-BR/step_5.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/pt-BR/step_6.md b/pt-BR/step_6.md new file mode 100644 index 000000000..c0a08138f --- /dev/null +++ b/pt-BR/step_6.md @@ -0,0 +1,234 @@ +## Challenge + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Add more items to sell. + +--- /task --- + +--- task --- + +Add more graphic and sound effects. + +--- /task --- + +--- task --- + +Paint your own scenery and other costumes. + +--- /task --- + +--- task --- + +Make another business and allow players to visit them both. + +--- /task --- + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +### Chatty checkout! + +Your checkout person (or machine) could ask whether the service was good, or if the customer is having a nice day. + +--- task --- + +Add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +### Bag the items + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +--- /task --- + +###  Stop adding items when the customer is at the checkout + +--- task --- + +Add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Stop purchases when the customer is at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/pt-BR/step_7.md b/pt-BR/step_7.md new file mode 100644 index 000000000..e2bd83321 --- /dev/null +++ b/pt-BR/step_7.md @@ -0,0 +1,9 @@ +## Share + +If you are in a club, why not share your project with friends? + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) diff --git a/pt-BR/step_8.md b/pt-BR/step_8.md new file mode 100644 index 000000000..482ba5b56 --- /dev/null +++ b/pt-BR/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/pt-BR/step_9.md b/pt-BR/step_9.md new file mode 100644 index 000000000..f4a953a53 --- /dev/null +++ b/pt-BR/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +Se você quiser se divertir mais explorando o Scratch, poderá experimentar qualquer um dos [projetos](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/ru-RU/images/add-friend-projects.png b/ru-RU/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/ru-RU/images/add-friend-projects.png differ diff --git a/ru-RU/images/add-sound.png b/ru-RU/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/ru-RU/images/add-sound.png differ diff --git a/ru-RU/images/add-your-projects.png b/ru-RU/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/ru-RU/images/add-your-projects.png differ diff --git a/ru-RU/images/banner.png b/ru-RU/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/ru-RU/images/banner.png differ diff --git a/ru-RU/images/choose-backdrop-icon.png b/ru-RU/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/ru-RU/images/choose-backdrop-icon.png differ diff --git a/ru-RU/images/choose-sprite-icon.png b/ru-RU/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/ru-RU/images/choose-sprite-icon.png differ diff --git a/ru-RU/images/create-studio.png b/ru-RU/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/ru-RU/images/create-studio.png differ diff --git a/ru-RU/images/customer-count.png b/ru-RU/images/customer-count.png new file mode 100644 index 000000000..e2c6ce61a Binary files /dev/null and b/ru-RU/images/customer-count.png differ diff --git a/ru-RU/images/example-strip.png b/ru-RU/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/ru-RU/images/example-strip.png differ diff --git a/ru-RU/images/fruit.png b/ru-RU/images/fruit.png new file mode 100644 index 000000000..74b78e59a Binary files /dev/null and b/ru-RU/images/fruit.png differ diff --git a/ru-RU/images/icecream.png b/ru-RU/images/icecream.png new file mode 100644 index 000000000..c72e20f83 Binary files /dev/null and b/ru-RU/images/icecream.png differ diff --git a/ru-RU/images/item-amounts.png b/ru-RU/images/item-amounts.png new file mode 100644 index 000000000..9e6430405 Binary files /dev/null and b/ru-RU/images/item-amounts.png differ diff --git a/ru-RU/images/large-readout.png b/ru-RU/images/large-readout.png new file mode 100644 index 000000000..a3859b991 Binary files /dev/null and b/ru-RU/images/large-readout.png differ diff --git a/ru-RU/images/my-stuff-menu.png b/ru-RU/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/ru-RU/images/my-stuff-menu.png differ diff --git a/ru-RU/images/naming-studio.png b/ru-RU/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/ru-RU/images/naming-studio.png differ diff --git a/ru-RU/images/new-variable.png b/ru-RU/images/new-variable.png new file mode 100644 index 000000000..d937fdd8a Binary files /dev/null and b/ru-RU/images/new-variable.png differ diff --git a/ru-RU/images/quiz2.png b/ru-RU/images/quiz2.png new file mode 100644 index 000000000..b5fe0cfb0 Binary files /dev/null and b/ru-RU/images/quiz2.png differ diff --git a/ru-RU/images/sprite-pane-size.png b/ru-RU/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/ru-RU/images/sprite-pane-size.png differ diff --git a/ru-RU/images/step2-image.png b/ru-RU/images/step2-image.png new file mode 100644 index 000000000..f52394751 Binary files /dev/null and b/ru-RU/images/step2-image.png differ diff --git a/ru-RU/images/step3-image.png b/ru-RU/images/step3-image.png new file mode 100644 index 000000000..441189fec Binary files /dev/null and b/ru-RU/images/step3-image.png differ diff --git a/ru-RU/images/step4-image.png b/ru-RU/images/step4-image.png new file mode 100644 index 000000000..c92bc3b0b Binary files /dev/null and b/ru-RU/images/step4-image.png differ diff --git a/ru-RU/images/studio-example.png b/ru-RU/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/ru-RU/images/studio-example.png differ diff --git a/ru-RU/images/tshirt.png b/ru-RU/images/tshirt.png new file mode 100644 index 000000000..9e5481d85 Binary files /dev/null and b/ru-RU/images/tshirt.png differ diff --git a/ru-RU/images/upgrade-image.png b/ru-RU/images/upgrade-image.png new file mode 100644 index 000000000..57b6f29d1 Binary files /dev/null and b/ru-RU/images/upgrade-image.png differ diff --git a/ru-RU/images/vending.png b/ru-RU/images/vending.png new file mode 100644 index 000000000..deb1d50d3 Binary files /dev/null and b/ru-RU/images/vending.png differ diff --git a/ru-RU/meta.yml b/ru-RU/meta.yml new file mode 100644 index 000000000..729ae58d8 --- /dev/null +++ b/ru-RU/meta.yml @@ -0,0 +1,40 @@ +--- +title: Next customer please +hero_image: images/banner.png +description: A shop simulation project where the customer can buy items. +meta_title: Scratch coding projects for kids and teens | Next customer please +meta_description: Learn Scratch with the Raspberry Pi Foundation's coding projects for kids and teens. Make a Scratch app where the customer can buy items from your shop. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: You will make + - + title: Your business idea + - + title: Items for sale + completion: + - engaged + - + title: Purchases + - + title: Additional features + completion: + - internal + - + title: Quick quiz + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Upgrade your project + - + title: Share + - + title: What next? diff --git a/ru-RU/quiz1/question_1.md b/ru-RU/quiz1/question_1.md new file mode 100644 index 000000000..c6c9a02a6 --- /dev/null +++ b/ru-RU/quiz1/question_1.md @@ -0,0 +1,83 @@ +## Quick quiz + +Answer the three questions. There are hints to guide you to the correct answer. + +When you have answered each question, click on **Check my answer**. + +Have fun! + +--- question --- + +--- +legend: Question 1 of 3 +--- + +A shop project uses a `total`{:class="block3variables"} variable to store the total for each customer. + ++ A customer adds items that total `50` and pays ++ A new customer adds items that total `40` but the `total`{:class="block3variables"} is now showing as `90` for the second customer + +Which block would you need to add to the payment script to make the total go back to `0` when each customer pays? + +```blocks3 +when this sprite clicked +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +say (join [That will be ] (total)) for (2) seconds +play sound [coin v] until done +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Not quite, `total`{:class="block3variables"} should be `0` after a customer pays, but it is not the `change`{:class="block3variables"} block you need. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Not quite, this would work for the second customer but the `total`{:class="block3variables"} would be wrong for other customers. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Yes, that's correct. You need to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` after each customer pays. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +That would work for this example, but what if the first customer spent a different amount? Your solution needs to work when the previous customer spends different amounts. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ru-RU/quiz1/question_2.md b/ru-RU/quiz1/question_2.md new file mode 100644 index 000000000..e5b43905c --- /dev/null +++ b/ru-RU/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Question 2 of 3 +--- + +In a shop, the **seller** has this code in the checkout script: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +When the code runs, the user types the answer 'great'. What will the **seller** sprite say? + +![An 'ask' box with the word 'great' typed in.](images/quiz2.png) + +--- choices --- + +- (x) The **Seller** will say `Sorry to hear that.` + + --- feedback --- + + Yes. Humans know that 'great' means the same as 'good', but the '=' checks whether the letters are the same. + + The **condition** `answer`{:class="block3sensing"} = `good` is 'false' so the `say`{:class="block3looks"} block in the `else`{:class="block3control"} part will run. + + --- /feedback --- + +- ( ) The **seller** will say `That's fantastic!` + + --- feedback --- + +No, only the exact answer `good` will make the **seller** say `That's fantastic!`. Look at the code again to see what message the **seller** will say for all answers that are not `good`. + +**Tip:** 'Good' or 'GOOD' would match 'good'. + + --- /feedback --- + +- ( ) The **seller** won't say anything. + + --- feedback --- + +No, the **seller** will always say something. Look carefully at the code to see what the message will be. + + --- /feedback --- + +- ( ) The **seller** will say `great`. + + --- feedback --- + +No, the **customer** typed the answer 'great' but the **seller** does not say the answer. Look carefully at the code to see what the message will be. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ru-RU/quiz1/question_3.md b/ru-RU/quiz1/question_3.md new file mode 100644 index 000000000..7e14dd975 --- /dev/null +++ b/ru-RU/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Question 3 of 3 +--- + +Jay's project is not working. What should they do? + +--- choices --- + +- ( ) Panic! + + --- feedback --- + + That's not going to help. You need to think clearly to fix coding problems. + + --- /feedback --- + +- ( ) Give up + + --- feedback --- + + There are lots of things Jay could try. Great coders often get things wrong the first time and learn a lot from their mistakes. + + --- /feedback --- + +- (x) Read the code carefully and try to debug it. + + --- feedback --- + + Yes. Fixing bugs is part of coding. The more you practise the more experience you get, and the easier it becomes to find and fix bugs. + + --- /feedback --- + +- ( ) Get annoyed with the computer + + --- feedback --- + +A computer only does what we tell it to do, so getting annoyed with it isn't logical. + +Being annoyed won't help to solve the problem, as it will make it harder to think clearly. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/ru-RU/scratch-comments.txt b/ru-RU/scratch-comments.txt new file mode 100644 index 000000000..c5fe4c8c8 --- /dev/null +++ b/ru-RU/scratch-comments.txt @@ -0,0 +1,9 @@ +type the name of your business + +your business name + +use the name of your Container sprite + +start position + +previous customer takes the bag diff --git a/ru-RU/scratch-translatable.txt b/ru-RU/scratch-translatable.txt new file mode 100644 index 000000000..06cc175a3 --- /dev/null +++ b/ru-RU/scratch-translatable.txt @@ -0,0 +1,49 @@ +name + +my shop + +next customer + +Next customer please! + +total + +That will be + +Thanks for shopping at + +Would you like to pay or cancel? + +pay + +cancel + +Ok. No problem + +Click on the items you'd like + +Did you find everything you wanted today? + +yes + +That's fantastic! + +Maybe I should add more items to my shop + +Bag + +1 scoop + +cone + +shop + +true + +false + +How are you today? + +good + +Sorry to hear that. diff --git a/ru-RU/solutions/Cool Shirts.sb3 b/ru-RU/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..fdc5852be Binary files /dev/null and b/ru-RU/solutions/Cool Shirts.sb3 differ diff --git a/ru-RU/solutions/Fresh Space Fruit.sb3 b/ru-RU/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..bbbe9eaac Binary files /dev/null and b/ru-RU/solutions/Fresh Space Fruit.sb3 differ diff --git a/ru-RU/solutions/Vending machine.sb3 b/ru-RU/solutions/Vending machine.sb3 new file mode 100644 index 000000000..42dec16a7 Binary files /dev/null and b/ru-RU/solutions/Vending machine.sb3 differ diff --git a/ru-RU/solutions/ice cream shop.sb3 b/ru-RU/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..d6322242c Binary files /dev/null and b/ru-RU/solutions/ice cream shop.sb3 differ diff --git a/ru-RU/step_1.md b/ru-RU/step_1.md new file mode 100644 index 000000000..d55e6e817 --- /dev/null +++ b/ru-RU/step_1.md @@ -0,0 +1,80 @@ +## You will make + +Make a shop app where the customer can buy items from your shop. The project will be in first-person view where the player is a customer. + +

+**First-person view** means that you don't see your character on the screen, instead you see what they see. +

+ +You will: ++ Create a shop app with items to buy and a checkout ++ Plan your time to get a simple version working quickly ++ Try shops made by others and share your shop so others can try it + +![](images/example-strip.png) + +--- no-print --- + +--- task --- + +
+
+ +### Play ▶️ + +Click on Space Fruit to buy them and watch the total go up. When you're ready, click on Kiran to check out. + ++ What happens if you try to checkout before you have chosen any fruit? ++ How do you think the project knows that you haven't added any fruit yet? + +
+
+
+ +
+
+ +--- /task --- + +### Get ideas 💭 + +You are going to make some design decisions to choose what items your business will offer and how the customer will check out. + +--- task --- + +Explore these example shops to get more ideas. + +⭐ Share your finished Next customer please project for a chance of it being featured here. + +Which projects allow you to buy multiple items at once? Which allow you to buy items one at a time? + +Click on the **seller** sprites to buy items: +
+ +
+
+ +
+ +**⭐ Pride pins** (featured community project) + +Click on the pride pin badges to add them to your shopping bag: + +
+ +
+ +--- /task --- + +--- /no-print --- + +--- print-only --- + +### Get ideas 💭 + +You are going to make some design decisions to create your character. See inside example projects in [Scratch 2: Next customer please! - Examples](https://scratch.mit.edu/studios/29611454/){:target="_blank"} Scratch studio. + +![Example project](images/fruit.png) ![Example project](images/tshirt.png) ![Example project](images/icecream.png) ![Example project](images/vending.png) + +--- /print-only --- + diff --git a/ru-RU/step_2.md b/ru-RU/step_2.md new file mode 100644 index 000000000..3733516ca --- /dev/null +++ b/ru-RU/step_2.md @@ -0,0 +1,160 @@ +## Your business idea + +
+
+What is your business idea? It could be something realistic, something from a book or movie you like, or something completely silly. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Open a [new Scratch project](http://rpf.io/scratch-new){:target="_blank"} and look at the range of sprites and backdrops that you can use. Spend some time thinking about your business idea. + +[[[working-offline]]] + +--- /task --- + +What backdrop and extra scenery sprites will you need? ++ A backdrop from the Scratch library, or a plain coloured backdrop? ++ A desk, counter, or window to sell from? ++ A shelf or bookcase to put items on — you could Paint this on the backdrop + +--- task --- + +Click **Choose a Backdrop** or paint your own backdrop. + +![](images/choose-backdrop-icon.png) + +Click **Choose a Sprite** and add or paint extra scenery sprites. + +![](images/choose-sprite-icon.png) + +You can always add more scenery later if you find that you need it. + +--- /task --- + +What will the **seller** sprite look like? ++ A person or non-player character such as a shopkeeper, farmer, or librarian? ++ A machine such as a vending machine, jukebox, or cash register? + +

+An **NPC** is a non-player character that you can interact with in a game or interactive story. Can you think of games you have played that have NPCs? Next time you play, think about how it was someone's job to make that character. +

+ +--- task --- + +Add a sprite to represent the seller. + +![](images/choose-sprite-icon.png) + +--- /task --- + +What is the name of your business? + +--- task --- + +Create a `variable`{:class="block3variables"} called `name`: + +--- collapse --- + +--- + +title: Create a variable + +--- + +From the `Variables`{:class="block3variables"} blocks menu click the **Make a Variable** button. + +Call your new variable `name`: + +![The New Variable pop up window with text input 'name'.](images/new-variable.png) + +**Notice:** The new `name` variable appears on the Stage and can now be used in the `Variable`{:class="block3variables"} blocks. + +--- /collapse --- + +Click on your **seller** sprite and add code to set the variable to the name of your business: + +```blocks3 +when flag clicked +set [name v] to () //type the name of your business +``` + +Create a sign on the Stage with your variable: + +--- collapse --- + +--- + +title: Change the appearance and position of variables + +--- + +Right-click on the `variable`{:class="block3variables"} on the Stage and choose large readout: + +![Pop up menu showing format options with 'large readout' selected.](images/large-readout.png) + +Drag your `variable`{:class="block3variables"} to position it on the Stage as part of the shop scenery. + +--- /collapse --- + +--- /task --- + +--- task --- + +**Test:** Make sure you can see your business name as the value of the variable on the Stage. + +--- /task --- + +Get ready to welcome your first customer. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3control"} block. Creat a new message called `next customer`. + +```blocks3 +when flag clicked +set [name v] to [my shop] // your business name ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when I receive [next customer v] +say [Next customer please!] for (2) seconds +``` + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here is a common bug. + +--- collapse --- + +--- + +title: Variable shows `0` + +--- + +You should use the `set [name v] to ()`{:class="block3variables"} block to set the variable to your name. If you have already added a script, check that you have typed your business name into the value and clicked the green flag. + +```blocks3 +when flag clicked +set [name v] to [my shop] // your business name +``` + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/ru-RU/step_3.md b/ru-RU/step_3.md new file mode 100644 index 000000000..e5c9031fe --- /dev/null +++ b/ru-RU/step_3.md @@ -0,0 +1,128 @@ +## Items for sale + +
+
+Your shop needs items for sale. Each item will have a price that will be added to a `total`{:class="block3variables"} variable. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +You will need to keep track of how much your customer is spending. + +--- task --- + +Add a new variable called `total`{:class="block3variables"} for all sprites. + +Click on your **seller** sprite and add a script to `set`{:class="block3variables"} the `total`{:class="block3variables"} to `0` when the project starts. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +What **items** will your customer(s) be buying? ++ Some kind of food or drink ++ Sports equipment, toys, or gadgets ++ Magic wands, potions, or spell books ++ Clothing or other fashion items ++ Your idea + +--- task --- + +Add a sprite for the first **item** you're going to sell in your shop. + +If you like, you can add a price to the costume using the text tool in the Paint editor. Or add a price to the backdrop and position the item next to it. + +![Examples of items with amounts written next to them.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Add a script to `change`{:class="block3variables"} the `total`{:class="block3variables"} by the price of your item when the customer clicks on the sprite. + +--- collapse --- +--- +title: Click to add an item +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +It's also a good idea to `play a sound`{:class="block3sound"} to give the customer feedback that they have added an item. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Test:** Click on your item and check that the value of the `total`{:class="block3variables"} variable increases by the price of the item, and you hear the sound effect. Click more times to see the total go up. + +Click the green flag to start your project and make sure that the `total`{:class="block3variables"} starts at `0`. + +--- /task --- + +--- task --- + +Add more items to your shop. + +You can either: ++ Duplicate the first item and then add a new costume in the Paint editor ++ Add a sprite and then drag the `when flag clicked`{:class="block3events"} script from the first item to your new item + +Add a price label to the costume or backdrop if you are using them. + +--- /task --- + +--- task --- + +Click on your new **Item** sprite in the Sprite list then click on the **Code** tab. + +Change the amount the `total`{:class="block3variables"} changes by to the price of your new item. + +--- /task --- + +--- task --- + +**Test:** Click the green flag to start your project and click on items to add them. Check that the total increases by the correct amount each time you click on an item. + +If you have added price labels, make sure they match the amount that gets added to the `total`{:class="block3variables"}, or your customers will be confused! + +--- /task --- + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. Here are some common bugs. + +--- collapse --- +--- +title: The total doesn't go to 0 when I click the green flag +--- + +Check that you have set the start value of the `total`{:class="block3variables"} variable in the `when flag clicked`{:class="block3events"} script on your **seller** sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't increase by the correct amount when I click on an item +--- + +Check that each item has a `when this sprite clicked`{:class="block3events"} script that changes the `total`{:class="block3variables"} by the correct amount for that item — you might have changed the price for the wrong sprite. + +Check that you have used the `change`{:class="block3variables"} block and not the `set`{:class="block3variables"} block to change the `total`{:class="block3variables"}. You need to use `change`{:class="block3variables"} to add the price to the total, you don't want to set the total to the price of the item that was just added. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/ru-RU/step_4.md b/ru-RU/step_4.md new file mode 100644 index 000000000..6f4f8db68 --- /dev/null +++ b/ru-RU/step_4.md @@ -0,0 +1,238 @@ +## Purchases + +
+
+The **seller** sprite needs to: +- ask if the customer is ready to pay for the items +- take payment +- get ready for the next customer +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +When they have finished choosing items, the customer will click on the **seller** sprite to pay. + +--- task --- + + Tell the customer how much their items will cost. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Add a payment sound to your **seller** sprite so the customer knows that payment is taking place. + +![The add a sound icon](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Add the `play sound until done`{:class="block3sound"} block to your script. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Finish the sale. Set `total`{:class="block3variables"} back to `0` after payment, `say`{:class="block3looks"} goodbye and `broadcast`{:class="block3control"} `next customer`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +You might want to give the customer the option to cancel their shopping. + +--- collapse --- +--- +title: Set up pay and cancel options +--- + +`Ask`{:class="block3sensing"} `Would you like to pay or cancel?`. Add an `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `pay` and inside it put your existing payment blocks. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Add a second `If`{:class="block3control"} block for `answer`{:class="block3sensing"} `=`{:class="block3operators"} `cancel` and inside it add code to cancel the order. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +--- task --- + +To make sure your customer has items in their basket before paying, you can insert an `if...else`{:class="block3control"} block. + +--- collapse --- +--- +title: Check total amount +--- + +`If`{:class="block3control"} `total`{:class="block3variables"} `>`{:class="block3operators"} `0` then insert your existing script. + +`Else`{:class="block3control"} `say`{:class="block3looks"} a helpful message. + +```blocks3 +when this sprite clicked ++ if <(total) > [0]>then +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +else +say [Click on the items you'd like] for (2) seconds +end +``` + +--- /collapse --- + +--- /task --- + +--- task --- + +**Test:** Test your project and make sure: +- The customer can check out with the correct sound effects +- The `total`{:class="block3variables"} gets set back to `0` after a customer pays or cancels. + +--- /task --- + + +--- task --- + +**Debug:** You might find some bugs in your project that you need to fix. + +Here are some common bugs: + +--- collapse --- +--- +title: The seller doesn't do anything when I click on them +--- + +You have quite a lot of sprites in your project. Make sure the `when this sprite clicked`{:class="block3events"} script is on your **seller** sprite. + +**Tip:** If you have added it to the wrong sprite, you can drag the code to the **seller** sprite, then delete it from the other sprite. + +--- /collapse --- + +--- collapse --- +--- +title: The seller says 'total' not the total amount +--- + +Make sure your `say`{:class="block3looks"} block has the `total`{:class="block3variables"} variable block, not the word `total`. + +```blocks3 + when this sprite clicked + say {join [That will be ](total)} for (2) seconds + ``` + +--- /collapse --- + +--- collapse --- +--- +title: The words in the say blocks merge together +--- + +When you `join`{:class="block3operators"} two pieces together, you need to add a space at the end of your first piece of text or at the beginning of your second piece of text. + +These have a space at the end of the first part of the join: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: The total doesn't reset after a sale +--- + +Check that you have used: + +```blocks3 +set [total v] to (0) +``` + +**not**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: The seller isn't responding +--- + +Make sure the `operator`{:class="block3operators"} in the `if`{:class="block3control"} condition is the greater than symbol `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Tip:** Compare your code with the code examples. Are there any differences that shouldn't be there? + +--- /task --- + +--- save --- diff --git a/ru-RU/step_5.md b/ru-RU/step_5.md new file mode 100644 index 000000000..afe395fca --- /dev/null +++ b/ru-RU/step_5.md @@ -0,0 +1,200 @@ +## Additional features + +
+
+There are lots of features you could add to improve your customers' shopping experience. You don't need to add everything. Just add improvements that you think are important. + +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +You can 'See inside' the example projects to look at how they work. + +Example projects: **Fresh Space Fruit**: [See inside](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Cool Shirts**: [See inside](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Ice cream shop**: [See inside](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Vending machine**: [See inside](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Tip:** If you are logged in to a Scratch account, then you can use the **Backpack** to copy scripts or sprites to your project. + +[[[scratch-backpack]]] + +--- task --- + +Do you think your checkout person (or machine) should ask more questions? + +You can add `ask`{:class="block3sensing"} blocks to your **seller**'s `when this sprite clicked`{:class="block3events"} script and `say`{:class="block3looks"} different things depending on the customer's response. + +You could ask whether the service was good, or if they're having a nice day. Or something specific to your shop, like "What are you going to cook?" + +--- collapse --- + +--- + +title: Ask and respond to questions + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Debug:** Check that you have spelled the options correctly in your code and in your answer. It's OK if you use capital letters, so "Yes" and "YES" will match "yes". + +Add multiple questions to create a chatbot or non-player character that you can talk to. + +--- /collapse --- + +--- /task --- + +Do you want something else to happen when you add an item? + +--- task --- + +The Cool Shirts project has shirts that glide into a bag. + +--- collapse --- + +--- + +title: Make items glide into a container + +--- + +Add a **Container** sprite. You could use an existing sprite like the **Gift** or **Take out** sprite, or paint your own with simple shapes. + +Add a script to make the **Container** always appear at the front: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Then you'll need to add code to each **Item** you have for sale to make them glide to the container when they are clicked: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +If you don't want the container there all the time, you can add scripts to make it show and hide at the right time: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Test:** Try your project and make sure items glide to the container and hide. + +**Debug:** Check your scripts carefully and make sure you have updated all of your **Item** sprites. You can look at [Cool Shirts](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} if you need to see a working example. + +--- /collapse --- + +The Ice cream project shows the ice cream as the customer chooses their options. + +--- collapse --- + +--- + +title: Customise and show a sprite + +--- + +Each item needs to `broadcast`{:class="block3events"} in its `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++broadcast (1 scoop v) +``` + +Then the sprite you want to show or change needs to respond to that message: + +```blocks3 +when I receive [1 scoop v] +play sound (Chomp v) until done +switch costume to (1 scoop v) +``` + +You may also want to change or hide the sprite for a new customer: + +```blocks3 +when I receive [next customer v] +switch costume to (cone v) +``` + +If you have multiple items, then you will need to add more messages and scripts to to receive them. + +--- /collapse --- + +--- /task --- + +Have you noticed that your customer can add items after they have started to check out? + +--- task --- + +If you want to stop the customer adding items when they are at the checkout, you can add a `shop`{:class="block3variables"} variable and use it to control when items can be added. + +--- collapse --- + +--- +title: Only allow purchases when the customer isn't at the checkout + +--- + +Add a `variable`{:class="block3variables"} called `shop` for all sprites. You will set this to `true` when the customer is in the shop and `false` when they are at the checkout. + +Select your **seller** sprite. Update the `when flag clicked`{:class="block3events"} script to allow shopping when your project starts: + +```blocks3 ++set [shop v] to [true] +``` + +Now add a block to change the `shop`{:class="block3variables"} to `false` at the beginning of your **seller**'s `when this sprite clicked`{:class="block3events"} script: + +```blocks3 ++set [shop v] to [false] +``` + +And a block to set the `shop`{:class="block3variables"} variable back to `true` at the end of the same script: + +```blocks3 ++set [shop v] to [true] +``` + +Now you need to update the items you sell to check the `shop`{:class="block3variables"} variable: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` + +You will need to do this for every item you sell in your shop. + +**Test:** Click the green flag then try shopping. Check that you can still add items and checkout, but you can't add items once you have started checking out. + +**Debug:** Check your code really carefully. You can look at the [Space Fruit](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} project if you need to see a working example. + +--- /collapse --- + +--- /task --- + +--- save --- + diff --git a/ru-RU/step_6.md b/ru-RU/step_6.md new file mode 100644 index 000000000..ef044b75d --- /dev/null +++ b/ru-RU/step_6.md @@ -0,0 +1 @@ +## Quick quiz \ No newline at end of file diff --git a/ru-RU/step_7.md b/ru-RU/step_7.md new file mode 100644 index 000000000..55f5dc3d0 --- /dev/null +++ b/ru-RU/step_7.md @@ -0,0 +1,22 @@ +## Upgrade your project + +
+
+If you have time you can upgrade your project. +
+
+![](images/upgrade-image.png){:width="300px"} +
+
+ +Here are some ideas you could try: +- Add more items to sell +- Add more graphic and sound effects +- Paint your own scenery and other costumes +- Make another business and allow players to visit them both + +Each example project in the [Introduction](.) has a ‘See Inside’ link for you to open the project in Scratch, and look at the code to get ideas and see how they work. + +Take a look at our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio to see projects created by community members. + +--- save --- diff --git a/ru-RU/step_8.md b/ru-RU/step_8.md new file mode 100644 index 000000000..928b81ad0 --- /dev/null +++ b/ru-RU/step_8.md @@ -0,0 +1,55 @@ +## Share + +If you are in a club, why not share your project with friends? + +If you are logged in on Scratch, you can create a studio and add your **Next customer please** project. You can also add your friends' **Next customer please** projects to create a mall of different shops and businesses. + +--- collapse --- + +--- + +title: Build a shopping market + +--- + +Save your project, then click on your username and select **My Stuff**. + +![the pop up menu under your account name in the top right.](images/my-stuff-menu.png) + +From your **My Stuff** page, click on the **+ New Studio** button. + +![The grey 'New Studio' button on the 'My Stuff' page.](images/create-studio.png) + +Give your new studio a name and description. + +![The name box at the top of the studio and the description box on the left of the studio.](images/naming-studio.png) + +Click on the **Add projects** button. You can add yor own project by selecting it from the list at the bottom of the page. + +![The 'Add Projects' pop up at the bottom of the page with a gallery of project thumbnails. ](images/add-your-projects.png) + +You can also add projects your friends have created. Ask them to share their project and give you the link. Type or paste the link into the url box, then click the **Add by url** button. + +![The url box underneath the 'Add projects' button and the 'Add by url' button.](images/path.png) + +--- /collapse --- + +Share your project and send a link to people you know. The whole Scratch community will also be able to find your project and try it out. + +[[[share-scratch]]] + +Why not invite your friends to create a project? Let them know how you had fun. + +If you have a Scratch account, and have shared your **Next customer please** project, keep an eye out for comments that others may make about your creation. Feedback is a great way to reflect on your work. Ignore any comments that are unhelpful or irrelevant. + +[[[comments-feedback-scratch]]] + +--- task --- + +Inspire the Raspberry Pi Foundation community with your project! + +To submit your project to our ['Intergalactic shopping market'](https://scratch.mit.edu/studios/29662180){:target="_blank"} Scratch studio, please complete [this form](https://form.raspberrypi.org/f/community-project-submissions){:target="_blank"}. + +![Example shop projects in the 'Intergalactic shopping market' Scratch studio.](images/studio-example.png) + +--- /task --- diff --git a/ru-RU/step_9.md b/ru-RU/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/ru-RU/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/uk-UA/images/add-friend-projects.png b/uk-UA/images/add-friend-projects.png new file mode 100644 index 000000000..3ad5bafed Binary files /dev/null and b/uk-UA/images/add-friend-projects.png differ diff --git a/uk-UA/images/add-sound.png b/uk-UA/images/add-sound.png new file mode 100644 index 000000000..123e3628f Binary files /dev/null and b/uk-UA/images/add-sound.png differ diff --git a/uk-UA/images/add-your-projects.png b/uk-UA/images/add-your-projects.png new file mode 100644 index 000000000..016bd757d Binary files /dev/null and b/uk-UA/images/add-your-projects.png differ diff --git a/uk-UA/images/banner.png b/uk-UA/images/banner.png new file mode 100644 index 000000000..f9ac6e053 Binary files /dev/null and b/uk-UA/images/banner.png differ diff --git a/uk-UA/images/choose-backdrop-icon.png b/uk-UA/images/choose-backdrop-icon.png new file mode 100644 index 000000000..6d7d7e298 Binary files /dev/null and b/uk-UA/images/choose-backdrop-icon.png differ diff --git a/uk-UA/images/choose-sprite-icon.png b/uk-UA/images/choose-sprite-icon.png new file mode 100644 index 000000000..7b04d235d Binary files /dev/null and b/uk-UA/images/choose-sprite-icon.png differ diff --git a/uk-UA/images/create-studio.png b/uk-UA/images/create-studio.png new file mode 100644 index 000000000..0ce2440f2 Binary files /dev/null and b/uk-UA/images/create-studio.png differ diff --git a/uk-UA/images/customer-count.png b/uk-UA/images/customer-count.png new file mode 100644 index 000000000..03afef3a7 Binary files /dev/null and b/uk-UA/images/customer-count.png differ diff --git a/uk-UA/images/dont-fall-in-project.png b/uk-UA/images/dont-fall-in-project.png new file mode 100644 index 000000000..003a7787c Binary files /dev/null and b/uk-UA/images/dont-fall-in-project.png differ diff --git a/uk-UA/images/example-strip.png b/uk-UA/images/example-strip.png new file mode 100644 index 000000000..cecace153 Binary files /dev/null and b/uk-UA/images/example-strip.png differ diff --git a/uk-UA/images/fruit.png b/uk-UA/images/fruit.png new file mode 100644 index 000000000..4cd760517 Binary files /dev/null and b/uk-UA/images/fruit.png differ diff --git a/uk-UA/images/icecream.png b/uk-UA/images/icecream.png new file mode 100644 index 000000000..e4417f699 Binary files /dev/null and b/uk-UA/images/icecream.png differ diff --git a/uk-UA/images/item-amounts.png b/uk-UA/images/item-amounts.png new file mode 100644 index 000000000..eb0d5f20f Binary files /dev/null and b/uk-UA/images/item-amounts.png differ diff --git a/uk-UA/images/large-readout.png b/uk-UA/images/large-readout.png new file mode 100644 index 000000000..8d21edad6 Binary files /dev/null and b/uk-UA/images/large-readout.png differ diff --git a/uk-UA/images/my-stuff-menu.png b/uk-UA/images/my-stuff-menu.png new file mode 100644 index 000000000..ad6992761 Binary files /dev/null and b/uk-UA/images/my-stuff-menu.png differ diff --git a/uk-UA/images/naming-studio.png b/uk-UA/images/naming-studio.png new file mode 100644 index 000000000..dc25e716e Binary files /dev/null and b/uk-UA/images/naming-studio.png differ diff --git a/uk-UA/images/new-variable.png b/uk-UA/images/new-variable.png new file mode 100644 index 000000000..b34221b46 Binary files /dev/null and b/uk-UA/images/new-variable.png differ diff --git a/uk-UA/images/quiz2.png b/uk-UA/images/quiz2.png new file mode 100644 index 000000000..f26d1600f Binary files /dev/null and b/uk-UA/images/quiz2.png differ diff --git a/uk-UA/images/sprite-pane-size.png b/uk-UA/images/sprite-pane-size.png new file mode 100644 index 000000000..568608788 Binary files /dev/null and b/uk-UA/images/sprite-pane-size.png differ diff --git a/uk-UA/images/step2-image.png b/uk-UA/images/step2-image.png new file mode 100644 index 000000000..774431a7f Binary files /dev/null and b/uk-UA/images/step2-image.png differ diff --git a/uk-UA/images/step3-image.png b/uk-UA/images/step3-image.png new file mode 100644 index 000000000..fc0f028ba Binary files /dev/null and b/uk-UA/images/step3-image.png differ diff --git a/uk-UA/images/step4-image.png b/uk-UA/images/step4-image.png new file mode 100644 index 000000000..745755458 Binary files /dev/null and b/uk-UA/images/step4-image.png differ diff --git a/uk-UA/images/studio-example.png b/uk-UA/images/studio-example.png new file mode 100644 index 000000000..f91ad3daa Binary files /dev/null and b/uk-UA/images/studio-example.png differ diff --git a/uk-UA/images/tshirt.png b/uk-UA/images/tshirt.png new file mode 100644 index 000000000..2e9143681 Binary files /dev/null and b/uk-UA/images/tshirt.png differ diff --git a/uk-UA/images/upgrade-image.png b/uk-UA/images/upgrade-image.png new file mode 100644 index 000000000..c2d6d5f1e Binary files /dev/null and b/uk-UA/images/upgrade-image.png differ diff --git a/uk-UA/images/vending.png b/uk-UA/images/vending.png new file mode 100644 index 000000000..15fa4c8db Binary files /dev/null and b/uk-UA/images/vending.png differ diff --git a/uk-UA/meta.yml b/uk-UA/meta.yml new file mode 100644 index 000000000..3e893c07c --- /dev/null +++ b/uk-UA/meta.yml @@ -0,0 +1,39 @@ +--- +title: Наступний покупець +hero_image: images/banner.png +description: Симулятор магазину, де покупець може купувати товари. +meta_title: Проєкти з кодування у Скретчі для дітей та підлітків | Наступний покупець +meta_description: Вивчай Скретч за допомогою проєктів Raspberry Pi Foundation для дітей і підлітків. Створи застосунок у Скретчі, де покупці можуть купувати товари у твоєму магазині. +version: 4 +listed: true +copyedit: false +last_tested: "2021-03-26" +steps: + - + title: Що ти зробиш + - + title: Твій магазин + - + title: Товари + completion: + - engaged + - + title: Купівля + completion: + - internal + - + title: Швидкий тест + knowledge_quiz: + path: quiz1 + version: 1 + questions: 3 + passing_score: 3 + completion: + - external + - + title: Додаткове завдання + challenge: true + - + title: Пошир свій проєкт + - + title: What can you do now? diff --git a/uk-UA/quiz1/question_1.md b/uk-UA/quiz1/question_1.md new file mode 100644 index 000000000..0689abcc2 --- /dev/null +++ b/uk-UA/quiz1/question_1.md @@ -0,0 +1,72 @@ +## Швидкий тест + +Дай відповідь на три запитання. Підказки допоможуть знайти правильну відповідь. + +Відповівши на кожне питання, натисни на **Перевірити мою відповідь**. + +Успіхів! + +--- question --- + +--- +legend: Питання 1 з 3 +--- + +У проєкті магазину використовується змінна `всього`{:class="block3variables"} для зберігання загальної суми для кожного покупця. + ++ Покупець додає товари загальною вартістю `50` і сплачує. ++ Наступний покупець додає товари загальною вартістю `40`, але `всього`{:class="block3variables"} тепер показує `90` для другого покупця. + +Який блок потрібно додати до скрипту оплати, щоб загальна сума знову стала `0` після того, як покупець заплатив? + +--- choices --- + +- ( ) +```blocks3 +change [total v] by [0] +``` + + --- feedback --- + +Не зовсім, `всього`{:class="block3variables"} має дорівнювати `0` після оплати, але тобі потрібен не блок `змінити`{:class="block3variables"}. + + --- /feedback --- + +- ( ) +```blocks3 +set [total v] to [40] +``` + + --- feedback --- + + Не зовсім так, це спрацює для другого покупця, але значення `всього`{:class="block3variables"} буде неправильним для наступних покупців. + + --- /feedback --- + +- (x) + +```blocks3 +set [total v] to [0] +``` + + --- feedback --- + +Так, правильно. Тобі потрібно `надати`{:class="block3variables"} змінній `всього`{:class="block3variables"} значення `0` після того, як кожен покупець сплатить за свої покупки. + + --- /feedback --- + +- ( ) + +```blocks3 +change [total v] by [-50] +``` + + --- feedback --- + +Для цього прикладу це спрацює, але якщо перший покупець витратив іншу суму? Твоє рішення має працювати незалежно від того, скільки витратив попередній покупець. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/uk-UA/quiz1/question_2.md b/uk-UA/quiz1/question_2.md new file mode 100644 index 000000000..fe669d27d --- /dev/null +++ b/uk-UA/quiz1/question_2.md @@ -0,0 +1,63 @@ + +--- question --- + +--- +legend: Питання 2 з 3 +--- + +У магазині **продавець** має цей код у скрипті оформлення замовлення: + +```blocks3 +ask [How are you today?] and wait +if <(answer) = [good]> then +say [That's fantastic!] for [2] seconds +else +say [Sorry to hear that.] for [2] seconds +end +``` + +Під час виконання коду користувач вводить відповідь «чудово». Що скаже спрайт **продавця**? + +![Блок «запитати» зі словом «чудово».](images/quiz2.png) + +--- choices --- + +- (x) **Продавець** скаже `Прикро це чути.` + + --- feedback --- + + Так. Люди знають, що «чудово» означає те саме, що й «добре», але «=» перевіряє, чи збігаються літери. + + **Умова** `відповідь`{:class="block3sensing"} = `добре` є хибною, тому буде запущено блок `говорити`{:class="block3looks"} у блоці `інакше`{:class="block3control"}. + + --- /feedback --- + +- () **Продавець** скаже `Прекрасно!` + + --- feedback --- + +Ні, лише точна відповідь `добре` змусить **продавця** сказати `Прекрасно!`. Переглянь код ще раз і подивись, що скаже **продавець**, якщо відповідь не дорівнює `добре`. + +**Порада:** «Добре» або «ДОБРЕ» вважатиметься тим самим, що й «добре». + + --- /feedback --- + +- () **Продавець** нічого не скаже. + + --- feedback --- + +Ні, **продавець** завжди щось каже. Перевір код і подивись, що це буде за повідомлення. + + --- /feedback --- + +- () **Продавець** скаже `чудово`. + + --- feedback --- + +Ні, **покупець** набрав відповідь «чудово», але **продавець** не повторюватиме відповідь. Перевір код і подивись, що це буде за повідомлення. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/uk-UA/quiz1/question_3.md b/uk-UA/quiz1/question_3.md new file mode 100644 index 000000000..0c6bd001b --- /dev/null +++ b/uk-UA/quiz1/question_3.md @@ -0,0 +1,48 @@ + +--- question --- + +--- +legend: Питання 3 з 3 +--- + +Твій проєкт не працює. Що тобі треба робити? + +--- choices --- + +- () Панікувати! + + --- feedback --- + + Це не допоможе. Щоб виправити помилки в коді, потрібно мати ясний розум. + + --- /feedback --- + +- () Здатися + + --- feedback --- + + Ти можеш спробувати багато різних варіантів. Хороші програмісти часто помиляються з першого разу та багато чому вчаться на своїх помилках. + + --- /feedback --- + +- (x) Уважно прочитати код і спробувати знайти й виправити помилку. + + --- feedback --- + + Так. Виправлення помилок є частиною кодування. Чим більше ти кодуєш, тим більше досвіду отримуєш і тим легше тобі буде знаходити та виправляти помилки. + + --- /feedback --- + +- () Розізлитися на комп’ютер + + --- feedback --- + +Комп’ютер робить лише те, що ми йому наказуємо, тому злитися на нього нелогічно. + +Злість не допоможе розв'язати проблему, оскільки буде важче мислити чітко. + + --- /feedback --- + +--- /choices --- + +--- /question --- diff --git a/uk-UA/scratch-comments.txt b/uk-UA/scratch-comments.txt new file mode 100644 index 000000000..693c7be14 --- /dev/null +++ b/uk-UA/scratch-comments.txt @@ -0,0 +1,9 @@ +введи назву свого магазину + +назва твого магазину + +використовуй назву свого спрайта-контейнера + +початкова позиція + +попередній покупець бере сумку diff --git a/uk-UA/scratch-translatable.txt b/uk-UA/scratch-translatable.txt new file mode 100644 index 000000000..99fe8badc --- /dev/null +++ b/uk-UA/scratch-translatable.txt @@ -0,0 +1,49 @@ +назва + +мій магазин + +наступний покупець + +Наступний покупець! + +всього + +З вас + +Дякуємо, що завітали в + +Бажаєте оплатити або скасувати купівлю? + +оплатити + +скасувати + +Гаразд. Жодних проблем + +Натисни на товари, які хочеш купити + +Ви знайшли все, що хотіли? + +так + +Це чудово! + +Можливо, мені варто додати більше товарів до свого магазину + +Сумка + +1 ложка + +ріжок + +магазин + +правда + +помилка + +Як справи? + +добре + +Прикро це чути. diff --git a/uk-UA/solutions/Cool Shirts.sb3 b/uk-UA/solutions/Cool Shirts.sb3 new file mode 100644 index 000000000..1e191a12a Binary files /dev/null and b/uk-UA/solutions/Cool Shirts.sb3 differ diff --git a/uk-UA/solutions/Fresh Space Fruit.sb3 b/uk-UA/solutions/Fresh Space Fruit.sb3 new file mode 100644 index 000000000..4b825ff88 Binary files /dev/null and b/uk-UA/solutions/Fresh Space Fruit.sb3 differ diff --git a/uk-UA/solutions/Vending machine.sb3 b/uk-UA/solutions/Vending machine.sb3 new file mode 100644 index 000000000..ac0c18eb7 Binary files /dev/null and b/uk-UA/solutions/Vending machine.sb3 differ diff --git a/uk-UA/solutions/ice cream shop.sb3 b/uk-UA/solutions/ice cream shop.sb3 new file mode 100644 index 000000000..eaef4276d Binary files /dev/null and b/uk-UA/solutions/ice cream shop.sb3 differ diff --git a/uk-UA/step_1.md b/uk-UA/step_1.md new file mode 100644 index 000000000..c7c52ab03 --- /dev/null +++ b/uk-UA/step_1.md @@ -0,0 +1,52 @@ +## Що ти зробиш + +Створи застосунок-магазин, де покупці можуть купляти товари. Проєкт матиме вигляд від першої особи, де гравець буде покупцем. + +--- no-print --- + +Натискай на космічні фрукти і купляй їх. Зверни увагу, що загальна сума зростає. Вибери всі фрукти, які хочеш купити, а потім натисни на Кіран, щоб розрахуватися. + ++ Що станеться, якщо ти спробуєш розрахуватися до того, як вибереш фрукт? ++ На твою думку, як проєкт дізнається, що ти ще не вибрав/-ла жодного фрукта? + +
+**Свіжі космічні фрукти**: [Переглянути код](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +
+ +
+
+ +### Отримай ідеї 💭 + +Натисни на спрайт **продавця**, щоб купити товари: + +**Круті футболки**: [Переглянути код](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +
+ +
+ +**Магазин морозива**: [Переглянути код](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +
+ +
+ +**⭐ Значки прайду** (проєкт спільноти) + +Натискай на значки прайду, щоб додати їх у свій кошик: + +
+ +
+ +--- /no-print --- + +--- print-only --- + +### Отримай ідеї 💭 + +Ти матимеш прийняти дизайнерські рішення, щоб створити свого персонажа. Переглянь приклади проєктів у студії Скретч «Наступний покупець!» за адресою: https://scratch.mit.edu/studios/29611454 + +![Приклад проєкту](images/fruit.png) ![Приклад проєкту](images/tshirt.png) ![Приклад проєкту](images/icecream.png) ![Приклад проєкту](images/vending.png) + +--- /print-only --- + diff --git a/uk-UA/step_2.md b/uk-UA/step_2.md new file mode 100644 index 000000000..29034941a --- /dev/null +++ b/uk-UA/step_2.md @@ -0,0 +1,80 @@ +## Твій магазин + +
+
+Придумай ідею магазину. Це може бути щось реалістичне, щось із книги чи фільму, який тобі подобається, або щось абсолютно безглузде. +
+
+![](images/step2-image.png){:width="300px"} +
+
+ +--- task --- + +Відкрий [новий проєкт Скретч](http://rpf.io/scratch-new){:target="_blank"} і переглянь варіанти спрайтів і тла, що можна використати. Витрать трохи часу на обмірковування ідеї свого магазину. + +--- /task --- + +--- task --- + +Натисни **Обрати тло** або намалюй своє власне тло. + +![](images/choose-backdrop-icon.png) + ++ Тло з бібліотеки Скретч чи просте одноколірне тло + +--- /task --- + +--- task --- + +Натисни **Обрати спрайт** та додай або намалюй додаткові спрайти для сцени. + +![](images/choose-sprite-icon.png) + +--- /task --- + +--- task --- + +Додай більше декорацій. ++ Стіл, прилавок чи вікно, з якого можна продавати ++ Полиця чи книжкова шафа, на якій можна розмістити товар — це можна намалювати на тлі. + +--- /task --- + +--- task --- + +Додай спрайт, який буде продавцем або продавчинею. + +Ти можеш вибрати: ++ Особу чи неігрового персонажа, як-от власницю крамниці, фермера чи бібліотекарку ++ Апарат, як-от торговельний автомат, музичний автомат чи касовий апарат + +![](images/choose-sprite-icon.png) + +--- /task --- + +### Привітай свого першого покупця. + +--- task --- + +Click on your **seller** sprite and add a `broadcast`{:class="block3events"} block. Створи нове повідомлення під назвою `наступний покупець`. + +```blocks3 +when flag clicked ++ broadcast (новий покупець v) +``` + +--- /task --- + +--- task --- + +Create a new script for your **seller** sprite to `say`{:class="block3looks"} `Next customer please` when they receive the `broadcast`{:class="block3events"} `next customer`{:class="block3events"}. + +```blocks3 +when I receive [наступний покупець v] +say [Наступний покупець!] for (2) seconds +``` + +--- /task --- + +--- save --- diff --git a/uk-UA/step_3.md b/uk-UA/step_3.md new file mode 100644 index 000000000..0907fe9c5 --- /dev/null +++ b/uk-UA/step_3.md @@ -0,0 +1,128 @@ +## Товари + +
+
+Твоєму магазину потрібні товари. Кожен товар матиме ціну, яка буде додана до змінної `всього`{:class="block3variables"}. +
+
+![](images/step3-image.png){:width="300px"} +
+
+ +Тобі потрібно буде стежити за тим, скільки витрачає покупець. + +--- task --- + +Додай нову змінну під назвою `всього`{:class="block3variables"} для всіх спрайтів. + +Натисни спрайт **продавця** та додай скрипт, який `надасть`{:class="block3variables"} змінній `всього`{:class="block3variables"} значення `0` під час запуску проєкту. + +[[[scratch3-create-set-variable]]] + +--- /task --- + +Які **товари** продаватиме твій магазин? ++ Продукти ++ Спортивне обладнання, іграшки чи гаджети ++ Чарівні палички, зілля або книги заклинань ++ Одяг або інші модні речі ++ Придумай щось своє + +--- task --- + +Додай спрайт для першого **товару**, який ти продаватимеш у своєму магазині. + +За бажанням ти можеш додати ціну до образу спрайта за допомогою текстового інструменту в редакторі малювання. Або додай ціну на тло і розташуй товар поруч із нею. + +![Приклади товарів, поруч із якими вказано ціни.](images/item-amounts.png) + +--- /task --- + +--- task --- + +Додай скрипт, який `змінюватиме`{:class="block3variables"} значення змінної `всього`{:class="block3variables"} на ціну твого товару, коли покупець натискатиме на спрайт. + +--- collapse --- +--- +title: Додавання товару +--- + +```blocks3 +when this sprite clicked +start sound (Coin v) +change [total v] by [10] +``` + +--- /collapse --- + +Також можна `відтворити звук`{:class="block3sound"}, який повідомить покупцеві, що він додав товар у свій кошик. + +![Іконка «додати звук»](images/add-sound.png) + +[[[scratch3-add-sound]]] + +--- /task --- + +--- task --- + +**Протестуй:** натисни на товар і перевір, чи значення змінної `всього`{:class="block3variables"} збільшиться на ціну товару і чи ти почуєш звуковий ефект. Натисни ще декілька разів і перевір, чи стає загальна сума ще більшою. + +Натисни зелений прапорець, щоб запустити проєкт, і переконайся, що початкове значення змінної `всього`{:class="block3variables"} дорівнює `0`. + +--- /task --- + +--- task --- + +Додай більше товарів до свого магазину. + +Ти можеш: ++ або здублювати перший товар, а потім додати новий образ у редакторі малювання, ++ або додати спрайт, а потім перетягнути скрипт `коли зелений прапорець натиснуто`{:class="block3events"} з першого товару до нового товару. + +Додай цінник до образу або на тло, якщо ти використовуєш цінники. + +--- /task --- + +--- task --- + +Натисни на новий спрайт **товару** у списку спрайтів, а потім натисни вкладку **Код**. + +Зміни величину, на яку збільшується значення змінної `всього`{:class="block3variables"}, на ціну нового товару. + +--- /task --- + +--- task --- + +**Протестуй:** натисни на зелений прапорець, щоб запустити проєкт, і натисни на товари, щоб додати їх до кошика. Переконайся, що загальна сума збільшується на правильну величину кожного разу, коли ти натискаєш на товар. + +Якщо ти використовуєш цінники, переконайся, що вони відповідають величині, яка додається до значення змінної `всього`{:class="block3variables"}, інакше покупці розгубляться! + +--- /task --- + +--- task --- + +**Налагодження:** Можливо, у твоєму проєкті знайдуться помилки, які потрібно буде виправити. Ось деякі поширені помилки. + +--- collapse --- +--- +title: Сума не перетворюється на 0, коли я натискаю зелений прапорець +--- + +Переконайся, що ти встановив/-ла початкове значення змінної `всього`{:class="block3variables"} у скрипті `коли зелений прапорець натиснуто`{:class=" block3events"} у спрайті **продавця**. + +--- /collapse --- + +--- collapse --- +--- +title: Сума збільшується на неправильну величину, коли я натискаю на товар +--- + +Переконайся, що кожен товар має скрипт `коли спрайт натиснуто`{:class="block3events"}, який змінює значення змінної `всього`{:class="block3variables"} на правильну суму для цього товару — можливо, ти змінив/-ла ціну в іншому спрайті. + +Переконайся, що ти використовуєш блок `змінити`{:class="block3variables"}, а не блок `надати значення`{:class="block3variables"} для зміни значення `всього`{:class="block3variables"}. Використовуй блок `змінити`{:class="block3variables"}, щоб додати ціну до загальної суми. Інакше сумі буде надаватися значення ціни щойно доданого товару. + +--- /collapse --- + +--- /task --- + +--- save --- diff --git a/uk-UA/step_4.md b/uk-UA/step_4.md new file mode 100644 index 000000000..b383d082f --- /dev/null +++ b/uk-UA/step_4.md @@ -0,0 +1,141 @@ +## Купівля + +
+
+ +Спрайт **продавець** має: +- запитати, чи готовий покупець розрахуватися за товари, +- прийняти платіж, +- підготуватися до наступного покупця. +
+
+![](images/step4-image.png){:width="300px"} +
+
+ +Завершивши вибір товарів, покупець натисне спрайт **продавця** для оплати. + +--- task --- + + Скажи покупцю, скільки коштуватимуть його товари. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +``` + +--- /task --- + +--- task --- + +Додай звук платежу до спрайта **продавця**, щоб покупець знав, що відбувається платіж. + +![Додати іконку звуку](images/add-sound.png) + +[[[scratch3-add-sound]]] + +Додай до свого скрипту `відтворити звук до кінця`{:class="block3sound"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ play sound [machine v] until done +``` + +--- /task --- + +--- task --- + +Заверши продаж. Знову надай змінній `всього`{:class="block3variables"} значення `0` після оплати, `скажи`{:class ="block3looks"} «до побачення» та передай `повідомлення`{:class="block3control"} `наступний покупець`{:class="block3control"}. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +play sound [machine v] until done ++ set [total v] to (0) ++ say (join [Thanks for shopping at ] (name)) for (2) seconds ++ broadcast (next customer v) +``` + +--- /task --- + +--- task --- + +**Протестуй:** перевір свій проєкт і переконайся, що: +- Покупець може зробити покупку з правильними звуковими ефектами. +- Змінна `всього`{:class="block3variables"} знову стає `0` після того, як покупець сплачує або скасовує купівлю. + +--- /task --- + + +--- task --- + +**Налагодження:** можливо, у твоєму проєкті знайдуться помилки, які потрібно буде виправити. + +Ось деякі поширені помилки: + +--- collapse --- +--- +title: Продавець нічого не робить, коли я натискаю на нього +--- + +У твоєму проєкті досить багато спрайтів. Переконайся, що у спрайті **продавця** є скрипт `коли спрайт натиснуто`{:class="block3events"}. + +**Порада:** якщо ти додав/-ла код до неправильного спрайта, ти можеш перетягнути код до спрайта **продавця**, а потім видалити його з іншого спрайта. + +--- /collapse --- + +--- collapse --- +--- +title: Слова у блоках «говорити» зливаються +--- + +Коли ти `з’єднуєш`{:class="block3operators"} два фрагменти, тобі потрібно додати пробіл у кінці першого або на початку другого фрагмента тексту. + +Ці речення мають пробіл у кінці першої частини: + +```blocks3 +say {join [That will be ](total)} for (2) seconds + +say {join [Thanks for shopping at ](name)} for (2) seconds +``` + +--- /collapse --- + +--- collapse --- +--- +title: Загальна сума не скидається після купівлі +--- + +Перевір, чи в тебе використано: + +```blocks3 +set [total v] to (0) +``` + +**а не**: + +```blocks3 +change [total v] by (0) +``` + +--- /collapse --- + +--- collapse --- +--- +title: Продавець не відповідає +--- + +Переконайся, що `оператором`{:class="block3operators"} в умові `якщо`{:class="block3control"} є знак «більше ніж» `>`{:class="block3operators"}. + +```blocks3 +if <(total) > [0]> then +``` + +--- /collapse --- + +**Порада:** порівняй свій код із прикладами. Чи є там відмінності, яких не повинно бути? + +--- /task --- + +--- save --- diff --git a/uk-UA/step_5.md b/uk-UA/step_5.md new file mode 100644 index 000000000..89468759d --- /dev/null +++ b/uk-UA/step_5.md @@ -0,0 +1 @@ +## Швидкий тест \ No newline at end of file diff --git a/uk-UA/step_6.md b/uk-UA/step_6.md new file mode 100644 index 000000000..c7c288067 --- /dev/null +++ b/uk-UA/step_6.md @@ -0,0 +1,234 @@ +## Додаткове завдання + +
+
+Ти можеш додати безліч функцій, щоб покращити процес для покупців. Тобі не потрібно додавати все. Додай лише ті функції, які вважаєш важливими. +
+
+![](images/customer-count.png){:width="300px"} +
+
+ +--- task --- + +Додай більше товарів до продажу. + +--- /task --- + +--- task --- + +Додай більше графічних і звукових ефектів. + +--- /task --- + +--- task --- + +Намалюй власні декорації та інші образи. + +--- /task --- + +--- task --- + +Зроби ще один магазин і дозволь гравцям відвідувати обидва. + +--- /task --- + +Кожен приклад проєкту у [вступі](.) має посилання «Переглянути код», за яким ти можеш відкрити проєкт у Скретчі й переглянути код, щоб отримати ідеї та побачити, як вони працюють. Ти можеш «Переглянути код» проєктів-зразків, щоб побачити, як вони працюють. + +Приклади проєктів: **Свіжі космічні фрукти**: [Переглянути код](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"} +**Круті футболки**: [Переглянути код](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"} +**Магазин морозива**: [Переглянути код](https://scratch.mit.edu/projects/525972748/editor){:target="_blank"} +**Торговий автомат**: [Переглянути код](https://scratch.mit.edu/projects/526051796/editor){:target="_blank"} + +**Порада:** якщо ти знаходишся в своєму обліковому записі Скретчу, ти можеш використовувати **Сховок**, щоб скопіювати скрипти або спрайти у свій проєкт. + +[[[scratch-backpack]]] + +### Побалакай з продавцем! + +Продавець (або автомат) може спитати, чи сподобалось покупцю обслуговування чи як у нього справи. + +--- task --- + +Додай блоки `запитати`{:class="block3sensing"} до скрипта `коли спрайт натиснуто`{:class="block3events"} свого **продавця** і `говорити`{:class="block3looks"} різні речі залежно від відповіді покупців. + +--- collapse --- + +--- + +title: Став запитання та відповідай на них + +--- + +```blocks3 +ask [Did you find everything you wanted today?] and wait +if <(answer) = [yes]> then +say [That's fantastic!] for [2] seconds +else +say [Maybe I should add more items to my shop] for [2] seconds +end +``` + +**Налагодження:** перевір, чи правильно у тебе написані параметри у коді та у відповіді. Можна використовувати великі літери, тоді «Так» і «ТАК» будуть збігатися з «так». + +Додай кілька запитань, щоб створити чат-бота або неігрового персонажа, з яким можна спілкуватися. + +--- /collapse --- + +--- /task --- + +### Поклади товари в сумку + +--- task --- + +У проєкті «Класні сорочки» товари перелітають у сумку. + +--- collapse --- + +--- + +title: Зроби так, щоб товари перелітали в контейнер + +--- + +Додай спрайт-**контейнер**. Ти можете використати готовий спрайт, як-от **Gift** або спрайт **Take out**, або намалювати свій власний спрайт за допомогою простих фігур. + +Додай скрипт, щоб **контейнер** завжди зображався зверху: + +```blocks3 +when flag clicked +forever +go to [front v] layer +end +``` + +Тоді тобі потрібно буде додати код до кожного **товару**, щоб вони перелітали в контейнер, коли на них натискають: + +```blocks3 +when this sprite clicked ++go to [front v] layer ++glide [1] secs to (Bag v) // use the name of your Container sprite ++hide +change [total v] by [12] ++go to x: [-180] y: [68] // start position ++show +``` + +Якщо ти не хочеш, щоб контейнер був там постійно, ти можеш додати скрипти, щоб він показувався й ховався у потрібний час: + +```blocks3 +when I receive [next customer v] +hide // previous customer takes the bag +wait [1] seconds +show +``` + +**Протестуй:** запусти свій проєкт і переконайся, що товари перелітають до контейнера та ховаються. + +**Налагодження:** ретельно перевір свої скрипти та переконайся, що всі спрайти **товарів** оновлено. Ти можеш переглянути проєкт [Класні сорочки](https://scratch.mit.edu/projects/528697069/editor){:target="_blank"}, якщо тобі потрібно побачити робочий приклад. + +--- /collapse --- + +--- /task --- + +###  Не дозволяй додавати товари, коли покупець на касі + +--- task --- + +Додай змінну `купівля`{:class="block3variables"}, щоб контролювати, коли можна додавати товари до кошика. + +--- collapse --- + +--- +title: Не дозволяй додавати товари, коли покупець розраховується + +--- + +Додай `змінну`{:class="block3variables"} під назвою `купівля` для всіх спрайтів. Ти встановиш значення `істина`, коли покупець у магазині, і `хиба`, коли покупець біля каси. + +Вибери спрайт **продавця**. Онови скрипт `коли прапорець натиснуто`{:class="block3events"}, щоб дозволити купувати з початком проєкту: + +```blocks3 ++set [shop v] to [true] +``` + +Тепер додай блок, щоб змінити `купівля`{:class="block3variables"} на `хиба` на початку скрипту ` коли спрайт натиснуто`{:class="block3events"} **продавця**: + +```blocks3 ++set [shop v] to [false] +``` + +Також додай блок, який поверне змінній `купівля`{:class="block3variables"} значення `істина` у кінці того самого скрипту: + +```blocks3 ++set [shop v] to [true] +``` + +Тепер тобі потрібно оновити товари на продаж, щоб перевірити змінну `купівля`{:class="block3variables"}: + +```blocks3 +when this sprite clicked ++if <(shop) = [true]> then +start sound (Coin v) +change [total v] by [10] +end +``` +Тобі потрібно буде зробити це для кожного товару у магазині. + +**Протестуй:** клацни зелений прапорець і спробуй купити щось. Переконайся, що ти все ще можеш додавати товари та розраховуватися, але не можеш додавати товари, коли ти вже на касі. + +**Налагодження:** уважно перевір свій код. Ти можеш переглянути проєкт [Космічні фрукти](https://scratch.mit.edu/projects/528696418/editor){:target="_blank"}, якщо тобі потрібно побачити робочий приклад. + +--- /collapse --- + +--- /task --- + +--- task --- + +### Дай покупцеві можливість скасувати купівлю. + +--- collapse --- +--- +title: Можливість скасування оплати +--- + +`Запитай`{:class="block3sensing"} `Бажаєте заплатити чи скасувати?`. Додай блок `якщо`{:class="block3control"} з умовою `відповідь`{:class="block3sensing"} `=`{:class="block3operators "} `оплатити` і всередині нього помісти свої наявні блоки оплати. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds ++ ask [Would you like to pay or cancel?] and wait ++ if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end +``` + +Додай другий блок `якщо`{:class="block3control"} з умовою `відповідь`{:class="block3sensing"} `=`{:class="block3operators "} `скасувати` і всередині нього додай код для скасування купівлі. + +```blocks3 +when this sprite clicked +say (join [That will be ] (total)) for (2) seconds +ask [Would you like to pay or cancel?] and wait +if {(answer) = [pay]} then +play sound [machine v] until done +set [total v] to (0) +say (join [Thanks for shopping at ] (name)) for (2) seconds +broadcast [next customer v] +end ++ if {(answer) = [cancel]} then +set [total v] to (0) +say [Ok. No problem] for (2) seconds +broadcast [next customer v] +end +``` + +--- /collapse --- + +--- /task --- + +Відвідай нашу Скретч-студію [«Міжгалактичний торговий центр»](https://scratch.mit.edu/studios/29662180){:target="_blank"}, щоб побачити проєкти, створені членами спільноти. + +--- save --- diff --git a/uk-UA/step_7.md b/uk-UA/step_7.md new file mode 100644 index 000000000..7df1304ef --- /dev/null +++ b/uk-UA/step_7.md @@ -0,0 +1,9 @@ +## Пошир свій проєкт + +Якщо ти відвідуєш клуб кодування, чому б не поділитися своїм проєктом з друзями? + +Надихай спільноту Raspberry Pi Foundation своїм проєктом! + +Щоб додати свій проєкт до Скретч-студії[«Міжгалактичний торговий центр»](https://scratch.mit.edu/studios/29662180){:target="_blank"}, заповни [цю форму](https://form.raspberrypi.org/f/community-project-submissions){:target= "_blank"} (англійською мовою). + +![Приклади проєктів магазинів у студії Скретч «Міжгалактичний торговий центр».](images/studio-example.png) diff --git a/uk-UA/step_8.md b/uk-UA/step_8.md new file mode 100644 index 000000000..70c72610c --- /dev/null +++ b/uk-UA/step_8.md @@ -0,0 +1,21 @@ +## What can you do now? + +Якщо ти йдеш напрямом [Більше Скретчу](https://projects.raspberrypi.org/en/raspberrypi/more-scratch), можеш переходити до наступного проєкту — [«Не впади»](https://projects.raspberrypi.org/en/projects/dont-fall-in). У цьому проєкті ти створиш гру із видом зверху вниз, де потрібно стрибати з платформи на платформу і не впасти. + +--- print-only --- + +![Проєкт «Не впади»](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Як грати:** для стрибка натисни пробіл або торкнися сцени. + +--- /no-print --- + +Якщо тобі подобається досліджувати Скретч, спробуй [ці проєкти](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201). diff --git a/uk-UA/step_9.md b/uk-UA/step_9.md new file mode 100644 index 000000000..1cb791977 --- /dev/null +++ b/uk-UA/step_9.md @@ -0,0 +1,21 @@ +## What next? + +If you are following the [More Scratch](https://projects.raspberrypi.org/en/raspberrypi/more-scratch) path, you can move on to the [Don't fall in](https://projects.raspberrypi.org/en/projects/dont-fall-in) project. In this project, you will make a top-down game where you have to jump from platform to platform and not fall in. + +--- print-only --- + +![Don't fall in project](images/dont-fall-in-project.png) + +--- /print-only --- + +--- no-print --- + +
+ +
+ +**Instructions:** Press space or tap the Stage to jump. + +--- /no-print --- + +If you want to have more fun exploring Scratch, then you could try out any of [these projects](https://projects.raspberrypi.org/en/projects?software%5B%5D=scratch&curriculum%5B%5D=%201).