📚 Interdisciplinary Integrated Problem-Solving for Year 9 Cambridge Computer Science | 九年级剑桥计算机:跨学科综合题型训练
Computer science does not exist in isolation – it intertwines with mathematics, science, geography, and even art. This article presents a set of integrated problems designed for Year 9 Cambridge learners to strengthen computational thinking while applying knowledge from other subjects. Each section introduces a scenario, unpacks the key concepts, and walks through the solution step by step.
计算机科学并非一门孤立的学科——它与数学、科学、地理乃至艺术紧密交织。本文为九年级剑桥学生设计了一系列综合题型,旨在强化计算思维,同时运用其他学科的知识。每个小节先介绍一个场景,剖析关键概念,然后逐步展示解题过程。
1. Binary Arithmetic in Biology | 生物学中的二进制运算
A biologist uses a microcontroller to count bacterial colonies on an agar plate. The sensor outputs a 4-bit binary number each hour. If the first reading is 0110₂ and the second reading is 1011₂, how many more colonies appeared in the second hour? Express your answer in decimal, and explain how binary addition can verify the result.
一位生物学家使用微控制器计数琼脂板上的细菌菌落。传感器每小时输出一个4位二进制数。若第一次读数为 0110₂,第二次为 1011₂,则第二小时比第一小时多了多少菌落?用十进制表示答案,并说明如何用二进制加法验证结果。
Convert each binary number to decimal: 0110₂ = (0×8)+(1×4)+(1×2)+(0×1) = 6. 1011₂ = (1×8)+(0×4)+(1×2)+(1×1) = 11.
将每个二进制数转为十进制: 0110₂ = 6,1011₂ = 11。
Difference: 11 − 6 = 5 colonies.
差值: 11 − 6 = 5 个菌落。
Binary addition check: lement or use subtraction: 1011₂ − 0110₂. In binary, subtraction can be done by adding two' = 1 0101₂. Ignoring the overflow carry, we get 0101₂ = 5. So the difference is confirmed.
二进制加法验证: 1011₂ − 0110₂ 可通过加补码计算。0110₂ 的二进制补码为 1010₂,1011₂ + 1010₂ = 1 0101₂,忽略进位溢出得 0101₂ = 5,确认差值为 5。
2. Logic Gates in Physics: A Safety Circuit | 物理中的逻辑门:安全电路
ed (input B = 1) OR an emergency override is pressed (input C = 1). However, if the override is pressed, the cover state must be ignored. Design a logic circuit using AND, OR, and NOT gates to control the laser (output L). Write the Boolean expression and draw a truth table.
实验室有一台激光器,仅在满足以下条件时才能开启:钥匙开关激活(输入 A = 1),并且要么防护罩闭合(输入 B = 1),要么按下紧急超控按钮(输入 C = 1)。但若按下超控按钮,防护罩状态将被忽略。使用与门、或门和非门设计一个控制激光器(输出 L)的逻辑电路。写出布尔表达式并绘制真值表。
Boolean expression: L = A AND (B OR C). The override (C) simply provides an alternative to B, so no special “ignore” logic is needed beyond the OR function.
布尔表达式: L = A AND (B OR C)。超控按钮 C 只是提供了 B 的替代选项,因此除了或功能外无需额外的“忽略”逻辑。
Truth Table | 真值表:
| A | B | C | B OR C | L (A AND (B OR C)) |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
The laser is ON only when A=1 and at least one of B or C is 1. The requirement “if override is pressed, cover state is ignored” is naturally satisfied because OR gives a 1 regardless of B’s state when C=1.
仅当 A=1 且 B 或 C 至少一个为 1 时激光器才开启。“按下超控按钮则忽略防护罩状态”的要求自然满足,因为当 C=1 时无论 B 为何值 OR 结果均为 1。
3. Data Compression in English Literature | 英语文学中的数据压缩
A student scans a page of Shakespeare’s sonnet. The raw text file contains 1400 characters, mostly letters and spaces. She applies run-length encoding (RLE) and then Huffman coding. Explain why RLE is not very effective for English text, and estimate how Huffman coding reduces file size by using variable-length codes based on letter frequency.
一名学生扫描了一页莎士比亚十四行诗。原始文本文件包含 1400 个字符,主要是字母和空格。她先后应用游程编码(RLE)和霍夫曼编码。解释为什么 RLE 对英文文本效果不佳,并估算霍夫曼编码如何利用基于字母频率的变长码减小文件大小。
RLE inefficiency: RLE works best when long runs of identical symbols occur, like in simple graphics. English text rarely has consecutive repeated characters (apart from maybe spaces in indentation), so RLE often replaces a single character with a count and the character, which can actually increase file size.
RLE 效率低的原因: RLE 最适用于存在长串相同符号的情况,比如简单图形。英文文本很少出现连续重复的字符(可能除缩进空格外),因此 RLE 往往用一个计数加字符来代替单个字符,反而可能增大文件体积。
Huffman coding benefit: Huffman assigns shorter codes to frequent letters (e.g., ‘e’, ‘t’, ‘a’) and longer codes to rare letters (e.g., ‘z’, ‘q’). In typical English, the most frequent letter ‘e’ appears about 12.7% of the time. If originally each character uses 8 bits (ASCII), after Huffman the average bits per character drops to around 4–5 bits, reducing the file size by nearly 40–50%.
霍夫曼编码优势: 霍夫曼编码为高频字母(如 ‘e’、‘t’、‘a’)分配短码,为低频字母(如 ‘z’、‘q’)分配长码。在典型英语中,最常见字母 ‘e’ 出现频率约 12.7%。若原每个字符用 8 位(ASCII),霍夫曼编码后平均每字符比特数降至约 4–5 位,文件大小减少近 40%–50%。
4. Algorithmic Thinking in Geography: Shortest Path | 地理中的算法思维:最短路径
A delivery drone needs to fly from warehouse W to destination D in a city modelled as a graph. The nodes represent waypoints and edges represent distances in kilometres. Using Dijkstra’s algorithm, find the shortest route. The graph has nodes W, A, B, C, D with weighted edges: W–A (4), W–B (3), A–B (1), A–C (5), B–C (2), B–D (6), C–D (3).
一架送货无人机需要从仓库 W 飞往目的地 D,城市被建模为一个图。节点代表航点,边代表以公里为单位的距离。使用 Dijkstra 算法找出最短路径。图中有节点 W、A、B、C、D,带权边:W–A (4),W–B (3),A–B (1),A–C (5),B–C (2),B–D (6),C–D (3)。
Step-by-step:
Initialize distances: W=0, others=∞. Unvisited: {W, A, B, C, D}.
初始化距离:W=0,其余为无穷大。未访问集:{W, A, B, C, D}。
Visit W: update A=4, B=3.
访问 W:更新 A=4,B=3。
sited: B (3). Visit B: update A=min(4, 3+1=4) → stays 4; C=min(∞, 3+2=5); D=min(∞, 3+6=9).
选择最小未访问节点:B (3)。访问 B:更新 A=min(4, 4) 保持 4;C=min(∞, 5)=5;D=min(∞, 9)=9。
Next smallest unvisited: A (4). Visit A: update C=min(5, 4+5=9) → stays 5; D via A? No direct edge.
下一个最小未访问节点:A (4)。访问 A:更新 C=min(5, 9) 保持 5;D 无直接边。
Next smallest: C (5). Visit C: update D=min(9, 5+3=8) → D=8.
下一个最小:C (5)。访问 C:更新 D=min(9, 8)=8。
All visited, shortest path to D is 8 km. Route: W → B → C → D (3+2+3).
所有节点已访问,到 D 的最短路径为 8 公里。路线:W → B → C → D (3+2+3)。
5. Spreadsheet Modelling for Business Studies | 商业研究中的电子表格建模
p. Create a spreadsheet model to calculate weekly profit. Given: selling price per snack = £1.20, cost price per snack = £0.70, weekly fixed costs (rent, electricity) = £ e Goal Seek to find the break-even point (how many snacks must be sold to make profit zero?).
你经营学校小卖部。创建一个电子表格模型计算每周利润。已知:每份零食售价 = £1.20,成本价 = £0.70,每周固定成本(租金、电费)= £30。销售数量可变。写出总收入、总成本和利润的公式。然后用单变量求解找出盈亏平衡点(必须卖出多少零食才能使利润为零?)。
Spreadsheet layout: Cell B1: Number Sold (variable). B2: Selling Price £1.20. B3: Cost Price £0.70. B4: Fixed Costs £ enue = B1*B2. B6: Total Variable Cost = B1*B3. B7: Total Cost = B6+B4. B8: Profit = B5−B7.
电子表格布局: 单元格 B1:销售数量(变量)。B2:售价 £1.20。B3:成本价 £0.70。B4:固定成本 £30。B5:总收入 = B1*B2。B6:总可变成本 = B1*B3。B7:总成本 = B6+B4。B8:利润 = B5−B7。
Break-even using algebra: 20 × quantity) − (0.70 × quantity + 30) = 0 → 0.50 × quantity = 30 → quantity = 60 snacks.
用代数求盈亏平衡: 利润 = 0 → (1.20 × 数量) − (0.70 × 数量 + 30) = 0 → 0.50 × 数量 = 30 → 数量 = 60 份零食。
Using Goal Seek: Set cell B8 to value 0 by changing cell B1. The tool will find B1=60.
用单变量求解: 将目标单元格设为 B8,目标值 0,可变单元格 B1。工具将求出 B1=60。
6. Data Representation in Music | 音乐中的数据表示
A digital audio workstation (DAW) records sound as a sequence of samples. Each sample is an 8-bit signed integer (two’s complement). The sample rate is 44.1 kHz. For a 2-second mono recording, calculate the total number of bits required and the file size in kilobytes. Then, if the sample 10010101₂ is a signed 8-bit integer, what decimal voltage does it represent if the maximum amplitude corresponds to +127? Explain the relationship between sample resolution and dynamic range.
一个数字音频工作站(DAW)以样本序列记录声音。每个样本是一个 8 位带符号整数(补码表示)。采样率为 44.1 kHz。对于一段 2 秒的单声道录音,计算所需的总比特数和以千字节为单位的文件大小。然后,若样本 10010101₂ 是一个带符号 8 位整数,当最大幅度对应 +127 时,它代表多大的十进制电压?解释样本分辨率与动态范围之间的关系。
Total bits: 00 bits. File size in bytes = 705,600 / 8 = 88,200 bytes. In KB: 88,200 / 1024 ≈ 86.13 KB.
总比特数: 样本数 = 44100 样本/秒 × 2 秒 = 88200 样本。每样本 8 位 → 总比特 = 705600 位。字节数 = 705600 / 8 = 88200 字节。以 KB 计:88200 / 1024 ≈ 86.13 KB。
Signed 8-bit conversion: 107. If max +127 corresponds to full positive voltage, then −107 represents a negative voltage proportionally.
带符号 8 位转换: 10010101₂,最高位为 1 表示负数。求补码:取反 → 01101010₂,加 1 → 01101011₂ = 107。所以值为 −107。若最大 +127 对应满幅度正电压,则 −107 代表相应比例的负电压。
Resolution and dynamic range: ., 16-bit) gives 96 dB, allowing softer sounds to be recorded without being lost in noise.
分辨率与动态范围: 8 位提供 2⁸ = 256 个级别。动态范围(dB)≈ 6.02 × 位数 = 6.02 × 8 ≈ 48 dB。更高分辨率(如 16 位)可提供 96 dB 动态范围,使更轻柔的声音也能被录制而不被噪声淹没。
7. Programming with Mathematics: Temperature Conversion | 编程与数学:温度转换
Write a Python program that converts a list of Celsius temperatures recorded in a science experiment into Fahrenheit. The formula is F = (C × 9/5) + 32. The program should also find the average temperature in Fahrenheit. Input list: [0, 25, 100, -10, 37.5].
编写一个 Python 程序,将科学实验中记录的摄氏温度列表转换为华氏度。公式为 F = (C × 9/5) + 32。程序还应求出华氏平均温度。输入列表:[0, 25, 100, -10, 37.5]。
Python pseudocode:
celsius_list = [0, 25, 100, -10, 37.5] fahrenheit_list = [] for c in celsius_list: f = (c * 9/5) + 32 fahrenheit_list.append(f) average_f = sum(fahrenheit_list) / len(fahrenheit_list) print("Fahrenheit:", fahrenheit_list) print("Average:", average_f)
12.0, 14.0, 99.5]; Average: 86.9°F. (Calculation: (32+77+212+14+99.5)/5 = 434.5/5 = 86.9).
预期输出:华氏度:[32.0, 77.0, 212.0, 14.0, 99.5];平均:86.9°F。(计算:(32+77+212+14+99.5)/5 = 434.5/5 = 86.9)
8. Database Design for Environmental Science | 环境科学中的数据库设计
An environmental monitoring station records air quality data. Design a relational database table named READINGS with fields: ReadingID (primary key, auto-increment), Date, Time, PM2.5_μgm3, CO2_ppm, Temperature_C. Write an SQL query to retrieve all readings where PM2.5 exceeds 35 μg/m³ and temperature is below 10°C, ordered by date descending. Explain why primary keys are important.
一个环境监测站记录空气质量数据。设计一个名为 READINGS 的关系型数据库表,字段包括:ReadingID(主键,自增),Date,Time,PM2.5_μgm3,CO2_ppm,Temperature_C。编写一条 SQL 查询,检索所有 PM2.5 超过 35 μg/m³ 且温度低于 10°C 的记录,按日期降序排列。解释主键为何重要。
Table creation SQL:
CREATE TABLE READINGS (
ReadingID INT AUTO_INCREMENT PRIMARY KEY,
Date DATE,
Time TIME,
PM2.5_μgm3 DECIMAL(5,1),
CO2_ppm INT,
Temperature_C DECIMAL(4,1)
);
Query:
SELECT * FROM READINGS WHERE PM2.5_μgm3 > 35 AND Temperature_C < 10 ORDER BY Date DESC;
Importance of primary key: A primary key uniquely identifies each record, preventing duplicate entries and ensuring data integrity. It also speeds up searches because the database automatically creates an index on the primary key.
主键的重要性: 主键用于唯一标识每条记录,防止重复条目,确保数据完整性。同时,数据库会自动在主键上建立索引,从而加快查询速度。
9. Cybersecurity in History: Caesar Cipher | 历史中的网络安全:凯撒密码
Julius Caesar used a shift cipher to protect military messages. The plaintext “VENI VIDI VICI” was encrypted with a shift of 3 to produce “YHQL YLGL YLFL”. Now, a ciphertext “KHOOR ZRUOG” was intercepted; it uses a shift of 3. Decrypt it. Write an algorithm in pseudocode for a general Caesar cipher decryption with any shift key. How could this cipher be broken using frequency analysis?
儒略·凯撒使用移位密码保护军事情报。明文 “VENI VIDI VICI” 经过移位 3 加密后变为 “YHQL YLGL YLFL”。现截获密文 “KHOOR ZRUOG”,它采用移位 3 加密。请解密。用伪代码编写一个通用的凯撒密码解密算法,适应任意移位数。如何使用频率分析破解该密码?
Decryption: Shift each letter backward by 3. K→H, H→E, O→L, O→L, R→O; Z→W, R→O, U→R, O→L, G→D → “HELLO WORLD”.
解密: 每个字母向后移 3 位。K→H, H→E, O→L, O→L, R→O;Z→W, R→O, U→R, O→L, G→D → “HELLO WORLD”。
Pseudocode for decryption with key k:
function caesar_decrypt(ciphertext, k): plaintext = "" for each char c in ciphertext: if c is a letter: shifted = (ASCII(c) - ASCII('A') - k) mod 26 plaintext += char(shifted + ASCII('A')) else: plaintext += c return plaintext
带密钥 k 的解密伪代码:(如上)
Frequency analysis: In English, ‘ r frequencies in the ciphertext, the most frequent ciphertext letter likely corresponds to ‘E’. Subtract the positions to find the shift key (e.g., if most frequent cipher letter is ‘H’, shift = ‘H’ - ‘E’ = 3). Then decrypt the entire message.
频率分析: 英语中 ‘E’ 是最常见字母。统计密文中各字母频率,最常出现的密文字母很可能对应 ‘E’。将位置相减即可得到移位数(例如,若最常出现的密文字母是 ‘H’,移位数 = ‘H’ - ‘E’ = 3)。然后解密整段消息。
10. Network Topologies in a School Campus | 校园中的网络拓扑
A school has four buildings: Main Hall (MH), Science Block (SB), Library (L), and Sports Complex (SC). They want to set up a local area network (LAN). Compare star and bus topologies in terms of cost, fault tolerance, and scalability. Recommend a topology if the server is placed in MH and all other buildings need reliable connections. Draw a simple diagram using text.
某学校有四栋建筑:主楼 (MH)、科学楼 (SB)、图书馆 (L) 和体育馆 (SC)。他们希望建立一个局域网 (LAN)。从成本、容错性和可扩展性三个方面比较星型拓扑和总线拓扑。若服务器置于主楼 MH,且所有其他建筑都需要可靠的连接,应该推荐哪种拓扑?用文本绘制简单示意图。
| Feature | 特性 | Star | 星型 | Bus | 总线型 |
|---|---|---|
| Cost | 成本 | High (more cable, central switch) | Low (single backbone cable) |
| Fault tolerance | 容错性 | Good – one link failure isolates only that node | Poor – backbone break downs entire network |
| Scalability | 可扩展性 | Easy to add nodes without disruption | Difficult – adding nodes may require shutting down network |
Recommendation: Star topology, with the central switch in MH. Each building connects directly to the switch. This ensures that if one link fails, others remain operational.
推荐方案: 星型拓扑,中央交换机位于主楼 MH。每栋建筑直接连接到交换机。这样即使某条链路故障,其他建筑仍能保持通信。
Text diagram | 文本示意图:
SB
|
|
MH ---- SWITCH ---- L
|
|
SC
11. Image Representation in Art | 艺术中的图像表示
grid, where each pixel can have one of four colours: White (00), Yellow (01), Red (10), Blue (11). Encode the following grid into a bit stream using row-major order. Then calculate the file size in bytes if 100 such images are stored. Grid:
Y R R B W Y W R W W B Y R Y B B
(Y=Yellow, R=Red, B=Blue, W=White)
一个数字艺术项目使用 4×4 像素网格,每个像素可以取四种颜色之一:白 (00)、黄 (01)、红 (10)、蓝 (11)。按行优先顺序将该网格编码为比特流。然后计算若存储 100 幅此类图像,文件大小为多少字节。网格如下:(如上)
Encoding: Substitute colour codes row by row:
- Row 1: Y R R B → 01 10 10 11
- Row 2: W Y W R → 00 01 00 10
- Row 3: W W B Y → 00 00 11 01
- Row 4: R Y B B → 10 01 11 11
1101 10011111. Total bits = 4×4×2 = 32 bits per image. 100 images → 3200 bits = 400 bytes.
比特流:01101011 00010010 00001101 10011111。每幅图像总比特数 = 4×4×2 = 32 位。100 幅图像 → 3200 位 = 400 字节。
12. Ethical and Legal Issues in Health Tech | 健康科技中的伦理与法律问题
A fitness app collects heart rate, GPS location, and daily step count. The data is stored on a cloud server. Discuss the ethical concerns regarding privacy, consent, and data security. Suggest two measures the company could implement to comply with data protection principles (such as GDPR).
一款健身应用收集心率、GPS 位置和每日步数。数据存储在云服务器上。讨论关于隐私、用户同意和数据安全的伦理问题。建议公司可以采取的两项措施,以遵守数据保护原则(如 GDPR)。
Privacy: Users may not realize that location data reveals where they live, work, or exercise routes. This sensitive information could be misused if accessed by third parties.
隐私: 用户可能未意识到位置数据会暴露其居住地、工作地点或运动路线。若第三方获取这些敏感信息,可能被滥用。
Consent: The app must obtain explicit, informed consent before collecting data. Pre-ticked boxes or hidden settings do not qualify as valid consent.
用户同意: 应用在收集数据前必须获得明确、知情的同意。预先勾选的复选框或隐藏设置并不构成有效同意。
Data security: Cloud storage must be encrypted both in transit and at rest. Access controls should limit who can view raw data.
数据安全: 云存储必须在传输
Published by TutorHao | Year 9 Computer Science Revision Series | aleveler.com
广告 / Sponsored现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…计算机 备考教辅 · 正版现货 · 与本文内容相关查看详情 / View on Taobao参考价 ¥467.0更多咨询请联系16621398022(同微信)
备考资讯每日更新,关注不错过考纲变化 · 科目分析 · 学习方法
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图公众号:tutorhao