Loading…
QuynTrn
Translation changed |
|
None
String updated in the repository |
|
None
String updated in the repository |
|
None
String updated in the repository |
|
None
Source string changed |
|
None
String updated in the repository |
|
None
Source string changed |
|
None
String updated in the repository |
|
None
Source string changed |
|
None
Automatically translated |
|
Key
adventures->story->levels->5->story_textFlags
ignore-double-space, ignore-ellipsis, ignore-inconsistent, ignore-long-untranslated, ignore-same, ignore-translated, placeholders:r"`([^`\n\r]+)`|## ", python-brace-format
In the example code you can see how to make 2 different endings.
### Exercise 1
Write a new short story of at least 6 lines of code about a topic of your choosing.
No inspiration? Choose one of these topics: a superhero, a boring school day, stranded on a desert island.
Now give the player a change to choose a happy or a bad end, just like in the example code.
Program both the endings.
### Exercise 2
Copy the story you've created in your own story adventure in the previous levels.
Find a way to add at least 2 `{if}` and `{else}` commands to your story.
This can be with a happy or bad ending, but you can also try to find other ways to incoporate the commands.
In this level you can program different endings, which will make your story even more fun.
Ở cấp độ này ban có thể lập trình ra nhiều cái kết khác nhau, khiến câu chuyện của bạn trở nên thú vị hơn.### Exercise
Think of two endings for your story, for example:
- The princess is walking through the forest
- She runs into a monster
- Happy ending: She takes her sword and the monster quickly runs away
- Bad Ending: The monster eats the princess
You can also ensure that a name can be entered again. That works just like in the previous levels. You can combine that with an `{if}`, and then you have already made a whole program!
Phần code ví dụ bạn có thể thấy hai cái kết khác nhau.
###Bài tập 1
Viết một câu chuyện mới với ít nhất 6 dòng code về một chủ đề mà bạn chọn.
Không có cảm hứng? Chọn một trong những chủ đề sau đây: siêu anh hùng, một ngày đi học buồn chán, lạc trên đảo hoang.
Cho người chơi lựa chọn cái kết có hậu và cái kết buồn, như code ví dụ.
Lập trình cả hai cái kết.
###Bài tập 2
Sao chép câu chuyện trinh thám mà bạn vừa tạo nên ở những cấp độ trước.
Tìm cách thêm vào ít nhất 2 câu lệnh `{if}` và `{else}` trong câu chuyện của bạn.
Đây có thể là kết thúc vui hoặc buồn, nhưng bạn cũng có thể tìm nhiều cách khác để kết hợp các câu lệnh.