Case Study Practicals for CAIE Year 7 Computing | CAIE Year 7 计算机案例分析实战演练

📚 Case Study Practicals for CAIE Year 7 Computing | CAIE Year 7 计算机案例分析实战演练

Case studies are a powerful way to learn computing because they connect abstract concepts to real-world tasks. In this article, you will follow a guided case study suitable for Year 7 CAIE Computing — designing a simple interactive quiz game. You will learn how to break down a problem, plan a solution using flowcharts, implement it in a block-based language like Scratch, and finally test and evaluate your work. By working through this practical example, you will build your computational thinking skills and gain confidence in tackling more complex projects.

案例研究是学习计算机的强大方法,因为它将抽象概念与现实任务联系起来。在本文中,你将按照一个适合 Year 7 CAIE 计算机课程的引导式案例研究——设计一个简单的互动问答游戏。你将学习如何分解问题,使用流程图规划解决方案,在像 Scratch 这样的块式语言中实现它,最后测试和评估你的作品。通过这个实践例子,你将培养计算思维能力,并获得处理更复杂项目的信心。

1. Introduction to the Case Study Method | 案例分析法简介

A case study in computing is a detailed investigation of a particular situation or problem. It requires you to apply your knowledge of computing concepts to propose and create a solution. For Year 7 students, the case study method encourages you to think like a developer: you must understand the user’s needs, plan carefully, build a working program, and reflect on what went well or could be improved.

计算机中的案例研究是对特定情境或问题的详细调查。它要求你应用计算机概念知识来提出并创建一个解决方案。对 Year 7 的学生而言,案例分析法鼓励你像开发者一样思考:你必须理解用户需求,仔细规划,构建一个可运行的程序,并反思哪些地方做得好或可以改进。


2. The Scenario: A Teacher Needs a Quiz Game | 情境:老师需要一个问答游戏

Imagine a science teacher at your school wants a short interactive quiz to test pupils on basic astronomy facts. She does not have time to create the quiz herself, so she asks your class for help. The quiz should ask three questions, one after another, and give the player a score out of 3 at the end. The questions should appear on the screen, and the player must be able to type their answer. This scenario gives you a clear goal and a real audience, which is typical of case studies.

想象一下,你学校的一位科学老师想要一个简短的互动问答游戏来测试学生们的基础天文学知识。她没有时间自己创建这个测验,因此向你们班级求助。这个测验应该一个接一个地提出三个问题,并在最后显示玩家得分(满分3分)。问题应显示在屏幕上,玩家必须能够输入答案。这个情境为你提供了一个明确的目标和真实的用户对象,这正是案例研究的典型特征。


3. Identifying Functional Requirements | 明确功能需求

Before writing any code, you need to list exactly what the program must do. For the quiz game, the functional requirements are: (1) display a welcome message; (2) ask Question 1 and wait for the user’s answer; (3) check if the answer is correct and update a score variable; (4) repeat for Question 2 and Question 3; (5) after three questions, show the final score with a message such as “You scored 2 out of 3”.

在编写任何代码之前,你需要列出程序必须完成的功能。对于这个问答游戏,功能需求是:(1) 显示欢迎信息;(2) 提出第一个问题并等待用户回答;(3) 检查答案是否正确并更新得分变量;(4) 对第二个和第三个问题重复此过程;(5) 三个问题结束后,显示最终得分并附带消息,如“你得了2分(满分3分)”。


4. Breaking Down the Problem (Decomposition) | 分解问题(问题分解)

Decomposition means breaking a complex problem into smaller, manageable parts. For our quiz, we can separate the project into three main modules: Input, Processing, and Output. Input includes receiving answers from the user. Processing involves comparing the answer to the correct answer and updating the score. Output covers displaying questions and the final result. This modular thinking makes the programming task much less overwhelming.

问题分解意味着将一个复杂问题拆分成更小、易于管理的部分。对于我们的测验,可以把项目分成三个主要模块:输入、处理和输出。输入包括接收用户的回答。处理涉及将答案与正确答案进行比较并更新得分。输出涵盖显示问题和最终结果。这种模块化思维使得编程任务不再那么令人望而生畏。


5. Algorithm Design with Flowcharts | 使用流程图设计算法

An algorithm is a step-by-step plan for solving a problem. Flowcharts use symbols to represent these steps visually. Common symbols include: a rounded rectangle for Start/End, a rectangle for a process (e.g. “set score to 0”), a diamond for a decision (e.g. “is answer correct?”), and a parallelogram for input/output (e.g. “ask question”). For our quiz, the flowchart would begin at Start, then initialise score, then loop through three questions, each with a decision symbol to check the answer and update score, and finally display the score before ending.

算法是解决问题的逐步计划。流程图使用符号来直观表示这些步骤。常见符号包括:圆角矩形表示开始/结束,矩形表示处理过程(如“将得分设为0”),菱形表示判断(如“答案是否正确?”),平行四边形表示输入/输出(如“提出问题”)。对于我们的测验,流程图将从开始开始,然后初始化得分,接着循环遍历三个问题,每个问题都用一个判断符号来检查答案并更新得分,最后在结束前显示得分。


6. Implementing the Solution: Setting Up the Scratch Stage | 实现解决方案:设置 Scratch 舞台

To build the quiz in Scratch, you first need to create a new project. Delete the default cat sprite and choose a backdrop that matches the theme, like a space background. Then add a sprite that will act as the quiz host — you can pick a friendly character or keep it simple with a text-based interface. In the Code area, you will use blocks from the “Events”, “Sensing”, “Variables”, “Looks”, and “Control” categories. Start by creating a variable called “Score” and setting it to 0 when the green flag is clicked.

要在 Scratch 中构建这个测验,首先需要创建一个新项目。删除默认的小猫角色,选择一个与主题匹配的背景,例如太空背景。然后添加一个角色作为测验主持人——你可以选择一个友好的角色,或者保持简洁,使用基于文本的界面。在代码区,你将使用“事件”、“侦测”、“变量”、“外观”和“控制”分类中的积木。首先创建一个名为“得分”的变量,并在点击绿旗时将其设为 0。


7. Asking Questions and Checking Answers | 提问与检查答案

To ask a question, use the “ask and wait” block from the Sensing category. This displays a speech bubble and lets the user type a response, which is stored in the sensing block “answer”. Then use an if-then-else block to compare the answer. For example, if the question is “What planet is known as the Red Planet?”, the correct answer is “Mars”. You can use an “if < (answer) = (Mars) > then” block to increase the score by 1, followed by a “say [Correct!]” block. If the answer is wrong, you can “say [Incorrect, the right answer is Mars.]”. Repeat this pattern for each of the three questions.

要提问,使用“侦测”类别中的“询问 [问题] 并等待”积木。这会显示一个气泡,让用户输入回答,回答存储在侦测积木“回答”中。然后使用如果-那么-否则积木来比较答案。例如,如果问题是“哪颗行星被称为红色星球?”,正确答案是“火星”。你可以使用“如果 < (回答) = (火星) > 那么”积木将得分增加 1,然后跟一个“说 [正确!]”积木。如果答案错误,可以“说 [不正确,正确答案是火星。]”。对三个问题中的每一个重复此模式。


8. Adding Scoring and Feedback | 添加计分与反馈

After each question, update the Score variable appropriately. At the very end of the program, after the last question, you need to display the final result. You can use a “say [join (You scored) join (Score) (out of 3!)]” block to show the total. It is a good practice to give personalised feedback: if the score is 3, say “Excellent!”; if the score is 2, say “Good job!”; and if it is 1 or 0, provide encouragement. This makes the program more user-friendly and shows you have thought about the user experience.

在每个问题之后,相应地更新得分变量。在程序的最后,即最后一个问题之后,你需要显示最终结果。你可以使用“说 [连接 (你得了) 连接 (得分) (分,满分3分!)]”积木来显示总分。一个好的做法是提供个性化反馈:如果得分是3,说“太棒了!”;如果得分是2,说“做得不错!”;如果是1或0,提供鼓励。这让程序更友好,也表明你考虑了用户体验。


9. Testing and Debugging the Program | 测试与调试程序

Testing is not something you do only at the end — you should test as you build. Run the program and deliberately enter both correct and incorrect answers to see if the score updates correctly. You may find a bug: for instance, the answer check may be case-sensitive, so if the user types “mars” instead of “Mars”, it will be marked wrong. To fix this, you can use an “or” operator to accept both “Mars” and “mars”. Debugging is about finding and fixing such issues, and it is a normal part of programming.

测试不仅仅是在最后才做的事情——你应当边构建边测试。运行程序,并有意输入正确和错误的答案,看看得分是否更新正确。你可能会发现一个 bug:例如,答案检查可能区分大小写,如果用户输入“mars”而不是“火星”,就会被标记为错误。为了解决这个问题,你可以使用“或”运算符来同时接受“Mars”和“mars”。调试就是发现并修复这类问题,它是编程中的常规环节。


10. Evaluating the Solution Against Requirements | 对照需求评估解决方案

Once the quiz works, evaluate how well it meets the original requirements. Does it ask exactly three questions? Does it display the correct final score? Is the feedback clear? You might also reflect on what could be improved. For example, the quiz currently uses fixed questions. In the future, you could store questions in a list to make them change randomly. Evaluation helps you see the strengths and weaknesses of your project and plan the next version.

一旦测验能正常运行,就要对照最初的需求评估它的完成度。它是否准确地提出了三个问题?是否显示了正确的最终得分?反馈是否清晰?你还可以反思哪些地方可以改进。例如,这个测验目前使用固定的问题。未来,你可以将问题存储在一个列表中,让它们随机变化。评估有助于你了解项目的优点和不足,并规划下一个版本。


11. Extension: Using Lists for Random Questions | 扩展:使用列表实现随机出题

To make the quiz more engaging, you can store questions and answers in two separate lists. For instance, create a list called “Questions” and another called “CorrectAnswers”. Use a variable to select a random item from the list, ask that question, and check the user’s answer against the corresponding correct answer. With lists, the quiz can have many questions and feel different each time. This extension develops your skills in data structures and abstraction, which are important in the CAIE curriculum.

为了让测验更有趣,你可以将问题和答案存储在两个单独的列表中。例如,创建一个名为“问题”的列表和另一个名为“正确答案”的列表。使用一个变量从列表中随机选取一项,提出该问题,并将用户的回答与相应的正确答案进行比较。有了列表,测验可以拥有很多问题,并且每次进行的感觉都不一样。这个扩展可以培养你在数据结构和抽象方面的技能,这些在 CAIE 课程中很重要。


12. Digital Citizenship and Online Safety in Quiz Design | 测验设计中的数字公民与在线安全

Even a simple quiz project connects to larger issues of digital citizenship. If you share your Scratch project online, never include personal information such as your full name or address. Be careful about the content of your questions — they should be appropriate and respectful. Understanding how to stay safe and respectful online is a key part of the CAIE Year 7 Computing curriculum, and this case study provides a practical context for these conversations.

即使是简单的测验项目也与数字公民这一更广泛的问题相关联。如果你在网上分享你的 Scratch 项目,永远不要包含个人信息,例如你的全名或地址。注意问题的内容——它们应该恰当且尊重他人。了解如何安全、尊重地在线交流是 CAIE Year 7 计算机课程的关键部分,而这个案例研究为这些讨论提供了实际背景。

Published by TutorHao | Computing Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading