📚 Year 10 CCEA Computer Science: Cross-curricular Integrated Question Practice | Year 10 CCEA 计算机:跨学科综合题型训练
This article presents a series of integrated, cross-curricular questions that connect your CCEA Year 10 Computer Science knowledge with other subjects such as Mathematics, Physics, Biology, Geography, Music, and Economics. Each question is designed to strengthen your computational thinking, problem-solving, and ability to apply concepts like binary representation, logic gates, algorithms, and data handling in real-world contexts. Work through the examples carefully, as they mirror the type of multi-step reasoning expected in modern assessments.
本文提供一系列跨学科综合题目,将 CCEA Year 10 计算机科学知识与数学、物理、生物、地理、音乐、经济学等其他学科联系起来。每道题都旨在强化你的计算思维、问题解决能力,以及将二进制表示、逻辑门、算法和数据处理等概念应用于现实场景的能力。请仔细研读这些例题,它们反映了现代考试所要求的多步骤推理方式。
1. Binary Conversion and Exponential Growth in Biology | 生物学中的二进制转换与指数增长
cterial cells. If the colony starts with 1 cell at t=0, after how many hours will the counter overflow (exceed 255)? e binary representation and suggest a simple method to handle larger numbers in a program.
一位生物学家研究一个每小时数量翻倍的细菌菌落。她在模拟软件中使用一个 8 位二进制计数器来追踪细菌细胞的数量。若菌落在 t=0 时从 1 个细胞开始,经过多少小时后计数器会溢出(超过 255)?请解释此时二进制表示会发生什么,并提出一种在程序中处理更大数字的简单方法。
irstly, the maximum value of an 8-bit unsigned binary number is 11111111₂, which equals 2⁸ – 1 = 255. The number of cells after h hours is 2ʰ. We need the smallest h such that 2ʰ s. An 8-bit register would only store the lower 8 bits (all zeros), so the counter would incorrectly show 0.
首先,8 位无符号二进制数的最大值是 11111111₂,即 2⁸ – 1 = 255。h 小时后的细胞数量为 2ʰ。我们需要找出满足 2ʰ > 255 的最小 h。检验:2⁷ = 128,2⁸ = 256。因此,8 小时后数量达到 256,导致溢出。二进制中,256 表示为 1 0000 0000₂,需要 9 位。8 位寄存器只能存储低 8 位(全零),因此计数器会错误地显示为 0。
To avoid overflow, the program could use a larger data type, such as a 16-bit integer (max 65535), or implement a floating-point representation if approximate values are acceptable. Alternatively, a second byte could be used as a 'high byte' of a 16-bit counter using bit shifting techniques, a concept often covered when studying memory and data storage.
为避免溢出,程序可以使用更大的数据类型,例如 16 位整数(最大 65535),或者在可以接受近似值的情况下采用浮点表示。另一种方法是使用第二个字节作为 16 位计数器的“高字节”,通过位移技术实现,这通常在探究内存与数据存储时涉及。
2. Logic Gates and Electrical Circuits in Physics | 物理中的逻辑门与电路
ement is detected. The alarm (A) should ring if either the door is open while the system is armed (S = 1), or if motion is detected while the system is armed but the door is not open. Draw a logic circuit for A and write the Boolean expression.
一个家庭安全系统使用两个传感器:门传感器(D),当门打开时输出逻辑 1;运动传感器(M),当检测到移动时输出逻辑 1。若系统已设防(S = 1),当门打开或检测到移动但门未开启时,警报(A)均应响起。请绘制 A 的逻辑电路并写出布尔表达式。
R M. This is because if D is false, the result depends on M; if D is true, the result is true. Therefore the complete Boolean expression is A = S AND (D OR M).
可重新表述需求:警报 = S AND (D OR (M AND NOT D))。化简,括号内的表达式变为 D OR (M AND NOT D) = D OR M。因为若 D 为假,结果取决于 M;若 D 为真,结果为真。因此完整的布尔表达式为 A = S AND (D OR M)。
raw standard gate symbols. A truth table for three inputs (S,D,M) shows that A is 1 only when S=1 and at least one of D or M is 1, confirming the expression matches the specification.
该逻辑电路由一个或门(输入 D 和 M)和一个与门(将或门的输出与 S 作为输入)组成。在 CCEA 中,可画出标准门符号。三输入(S, D, M)的真值表显示,仅当 S=1 且 D 或 M 至少有一个为 1 时,A 才为 1,这验证了表达式符合规范。
3. DNA Sequence Analysis and String Manipulation | DNA 序列分析与字符串操作
Bioinformaticians often search for patterns in DNA strings consisting of the letters A, T, C, G. Write a high-level algorithm that takes a long DNA string and counts how many times the triplet 'ATG' appears. Explain how you would modify the algorithm if the search needed to be case-insensitive.
生物信息学家常在由字母 A、T、C、G 组成的 DNA 字符串中搜索模式。请编写一个高级算法,输入一个很长的 DNA 字符串,计算其中三联体 'ATG' 出现的次数。并说明如果搜索需要区分大小写,你将如何修改算法。
A simple algorithm initialises a counter to 0. Iterate through the string from index 0 to length-3: compare the substring of length 3 starting at the current index with 'ATG'. If equal, increment counter. Pseudocode:
一个简单的算法将计数器初始化为 0。从索引 0 遍历至 length-3:将当前索引开始的长度为 3 的子串与 'ATG' 进行比较。若相等,计数器递增。伪代码:
count ← 0FOR i ← 0 TO LEN(dna)-2 IF dna[i...i+2] = 'ATG' THEN count ← count + 1ENDFOR
To make the search case-insensitive, before the loop we can convert the entire DNA string and the target pattern to uppercase (or lowercase) using a built-in function. In many languages this is UPPER() or .upper(). The comparison then becomes IF UPPER(dna[i...i+2]) = 'ATG'. This approach ensures 'atg', 'AtG' etc. are counted.
为了实现不区分大小写的搜索,在循环之前,我们可以使用内置函数将整个 DNA 字符串和目标模式转换为大写(或小写)。在许多语言中为 UPPER() 或 .upper()。比较语句则变为 IF UPPER(dna[i...i+2]) = 'ATG'。这样就能确保 'atg'、'AtG' 等形式也被计入。
This task links string indexing and algorithmic pattern matching, which are fundamental to computer science and extensively used in genetic research. The Y10 curriculum introduces string handling; extending it to biological data sharpens both algorithmic thinking and interdisciplinary awareness.
这道题将字符串索引与算法模式匹配联系起来,它们是计算机科学的基础,并在遗传研究中广泛应用。Year 10 课程引入了字符串处理;将其扩展到生物数据既能锻炼算法思维,也能增强跨学科意识。
4. Image Resolution and Map Scales in Geography | 地理中的图像分辨率与地图比例尺
A geographer uses a satellite image of a forest. The image is 2048 pixels wide and covers a ground distance of 10 km. Calculate the spatial resolution in metres per pixel. If a single tree trunk measures 0.5 m in diameter, is it possible to distinguish individual trees? Explain your reasoning and suggest a required resolution to reliably identify such trees.
一位地理学家使用一张森林的卫星图像。图像宽 2048 像素,覆盖地面距离 10 公里。请计算以米/像素为单位的地面分辨率。若单棵树干直径为 0.5 米,能否区分出单棵树?请解释你的推理,并提出可靠识别此类树木所需的分辨率。
nk of 0.5 m diameter is much smaller than one pixel, so it cannot be individually resolved — of the object size by the Nyquist principle, so about 0.25 m per pixel or better. Rearranging, the image width in pixels would need to be 10,000 m ÷ 0.25 m/px = 40,000 pixels, much higher than the original 2048.
地面宽度 = 10 公里 = 10,000 米。分辨率 = 10,000 米 ÷ 2048 像素 ≈ 4.88 米/像素。直径为 0.5 米的树干远小于一个像素,因此无法被单独分辨——它会模糊为一个像素或与周围物体混合。根据奈奎斯特原理,要可靠地识别 0.5 米的物体,分辨率应至少为物体尺寸的一半,即约 0.25 米/像素或更佳。重新计算,图像宽度的像素数需要达到 10,000 米 ÷ 0.25 米/像素 = 40,000 像素,远高于原来的 2048。
This question combines unit conversion, the concept of image resolution, and the limitations of digital sampling. In computer science, this links directly to image representation, pixel grids, and the trade-off between file size and detail — key topics in data representation.
这道题融合了单位换算、图像分辨率概念和数字采样的局限性。在计算机科学中,这直接关联到图像表示、像素网格以及文件大小与细节之间的权衡——数据表示中的关键主题。
5. Chemical Elements and Sorting Algorithms | 化学元素与排序算法
A chemist has a list of the first 20 elements with their atomic numbers and symbols stored in a 2D array: [[1,'H'], [12,'Mg'], [8,'O'], ...]. She wants to sort the list by atomic number. Trace a bubble sort on a small sample: [12, 1, 8] and show the state after each pass. What is the advantage of using a stable sort when the elements might also need to be grouped by type later?
一位化学家拥有前 20 种元素的列表,包含原子序数和符号,存储在一个二维数组中:[[1,'H'], [12,'Mg'], [8,'O'], ...]。她想按原子序数对列表进行排序。在一个小样本 [12, 1, 8] 上追踪冒泡排序的过程,并显示每趟排序后的状态。若之后还需按元素类型分组,使用稳定排序有何优势?
8, 12]. Pass 2: compare 1 and 8 → no swap; compare 8 and 12 → no swap. The list is sorted. A stable sort preserves the relative order of items with equal keys. If later we want to group elements by, say, metal/non-metal, elements with the same atomic number (impossible here) would retain their original order; more relevant when sorting by a secondary attribute after a primary sort. Stability allows compound sorting without losing previous order.
我们聚焦于原子序数的排序。原序:12, 1, 8。冒泡排序,第一趟:比较 12 和 1 → 交换 → [1, 12, 8];比较 12 和 8 → 交换 → [1, 8, 12]。第二趟:比较 1 和 8 → 无交换;比较 8 和 12 → 无交换。列表有序。稳定排序保留具有相同关键字的元素的相对顺序。如果之后我们想按金属/非金属分组,具有相同原子序数(此处不可能)的元素将保持原有顺序;在按主键排序后再按次要属性排序时,稳定性更显重要。稳定排序允许复合排序而不会丢失先前的顺序。
In computer science, efficient sorting and stability are essential for database queries. This exercise integrates atomic structure knowledge with algorithmic reasoning, reinforcing Big-O notation concepts and array manipulation.
在计算机科学中,高效排序和稳定性对于数据库查询至关重要。此练习将原子结构知识与算法推理相结合,巩固大 O 表示法概念和数组操作。
6. Encryption with Prime Numbers and Mathematics | 基于素数的加密与数学
5 and q=11. Compute n = p×q and φ(n) = (p-1)(q-1). Then choose a public exponent e=3 that is coprime with φ(n). Find the private key d such that (e×d) mod φ(n) = 1. Explain why such encryption is secure from an eavesdropper.
公钥加密依赖于大数分解的困难性。在一个简化的 RSA 示例中,学生选择两个质数 p=5 和 q=11。计算 n = p×q 以及 φ(n) = (p-1)(q-1)。接着选择一个与 φ(n) 互质的公钥指数 e=3。找出满足 (e×d) mod φ(n) = 1 的私钥 d。并解释为何这种加密对窃听者来说是安全的。
nd private key (55, 27). Encryption of message m: c = m³ mod 55; decryption: m = c²⁷ mod 55. Security arises because an attacker knows n=55 and e=3, but to compute d they need φ(n) = (p-1)(q-1), which requires knowing p and q. Factoring 55 is trivial, but for a 300-digit n it is computationally infeasible with current technology, hence the one-way trapdoor function.
计算:n = 5×11 = 55;φ(n) = 4×10 = 40。需满足 (3×d) mod 40 = 1。尝试 d=27 得到 3×27 = 81;81 mod 40 = 1。因此 d=27 满足条件。公钥为 (55, 3),私钥为 (55, 27)。加密消息 m:c = m³ mod 55;解密:m = c²⁷ mod 55。安全性在于攻击者知道 n=55 和 e=3,但为计算 d 需要 φ(n) = (p-1)(q-1),这又需要知道 p 和 q。分解 55 十分简单,但对于一个 300 位的 n,以现有技术来说在计算上是不可行的,因此形成了单向陷门函数。
This problem connects prime factorisation from maths with cybersecurity. In the CCEA network security topic, you encounter asymmetric encryption; this exercise demystifies the mathematics behind it, using modular arithmetic and algorithmic power.
这道题将数学中的质因数分解与网络安全联系起来。在 CCEA 网络安全主题中,你会接触到非对称加密;此练习通过模运算和算法效能,揭开了其背后的数学面纱。
7. Algorithmic Complexity and Financial Modelling in Economics | 经济学中算法复杂度与金融建模
complexity; Algorithm B uses a divide-and-conquer approach with O(n log n) complexity. For n=1,000,000 data points, approximately how many operations do they require (using base-2 logs)? Discuss why the economist might still choose Algorithm A in certain situations.
一位经济学家运行一个模拟,使用两种算法预测股价:算法 A 扫描所有交易日对以比较价格,复杂度为 O(n²);算法 B 采用分治法,复杂度为 O(n log n)。对于 n=1,000,000 个数据点,它们大约需要多少次运算(使用以 2 为底的对数)?并讨论为何在某些情况下经济学家仍可能选择算法 A。
tions. For B, log₂(10⁶) ≈ 19.93, so n log n ≈ 1,000,000 × 19.93 ≈ 19.93 million operations — nates). In rapid prototyping or one-off analysis of a small subset, A’s O(n²) may be acceptable.
近似运算量:对于 A,n² = (10⁶)² = 10¹²,约 1 万亿次运算。对于 B,log₂(10⁶) ≈ 19.93,因此 n log n ≈ 1,000,000 × 19.93 ≈ 1993 万次——少得多。然而,算法 A 可能更易实现、具有更低的常数因子,或者在较小数据集上运行(此时 B 的额外开销占主导)。在快速原型设计或对小规模子集进行一次性分析时,A 的 O(n²) 可能仍可接受。
This bridges the theory of algorithm efficiency with practical economic decision-making. Year 10 students explore algorithmic thinking; here, we apply complexity analysis to justify resource allocation, a real-world programming concern.
这将算法效率理论与实际经济决策联系起来。Year 10 学生探索算法思维;这里我们应用复杂度分析来证明资源分配的合理性,这是现实世界编程中关注的问题。
8. Sound Sampling and Music | 声音采样与音乐
A musician records a 3-second guitar note using a sampling rate of 44.1 kHz and 16-bit depth. Calculate the file size in kilobytes, assuming monophonic recording. The musician applies a low-pass filter to remove frequencies above 8 kHz. What is the minimum sampling rate required to accurately capture the filtered sound, according to the Nyquist theorem?
一位音乐家以 44.1 kHz 采样率和 16 位位深度录制一段 3 秒的吉他和弦,假设为单声道录音。请计算文件大小(以 KB 计)。音乐家应用低通滤波器去除 8 kHz 以上的频率。根据奈奎斯特定理,准确捕获滤波后声音所需的最小采样率是多少?
unded to 259 KB for reporting. After filtering, the highest frequency is 8 kHz. Nyquist theorem states the sampling rate must be at least twice the highest frequency, so minimum rate = 2 × 8000 Hz = 16,000 Hz (16 kHz). In practice, a slightly higher rate is used to avoid aliasing due to imperfect filters.
文件大小 = 采样率 × 时长 × 位深度 ÷ 8(字节)。因此 = 44100 × 3 × 16 ÷ 8 = 44100 × 3 × 2 = 264,600 字节。转换为 KB:264,600 ÷ 1024 ≈ 258.4 KB,通常记为 259 KB。滤波后,最高频率为 8 kHz。奈奎斯特定理指出采样率必须至少为最高频率的两倍,因此最小采样率 = 2 × 8000 Hz = 16,000 Hz(16 kHz)。在实践中,通常使用稍高的速率以避免因非理想滤波器导致的混叠。
This question links physics of sound, music production, and data representation. Students apply formulas for bit rate and sampling requirements, reinforcing the idea that computer science is fundamental to digital audio.
这道题将声音物理、音乐制作与数据表示联系起来。学生应用比特率和采样需求的公式,强化了计算机科学是数字音频基础的观念。
9. Sensor Data Logging and Environmental Science | 传感器数据记录与环境科学
A weather station uses a microcontroller to read temperature every 10 minutes. The 12-bit ADC outputs values from 0 to 4095, linearly mapped to -20 °C to 60 °C. Write a formula to convert ADC reading R to temperature T. If the memory can store 4 MB of data, and each reading is stored as a 2-byte integer plus a 4-byte timestamp, for how many days can the station log before memory is full?
一个气象站使用微控制器每 10 分钟读取一次温度。12 位 ADC 输出值范围为 0 到 4095,线性映射到 -20 °C 至 60 °C。请写出将 ADC 读数 R 转换为温度 T 的公式。若内存可存储 4 MB 数据,且每次读数存储为 2 字节整数加上 4 字节时间戳,气象站可持续记录多少天直到内存满?
Mapping formula: The range of R is 4096 steps (0–4095). Temperature range = 60 – f R=4095, T = -20 + 80 = 60. This linear equation can be used in the microcontroller code.
映射公式:R 的范围为 4096 个步进(0–4095)。温度范围 = 60 – (-20) = 80 °C。步长 = 80 / 4095。因此 T = -20 + (R × 80 / 4095)。若 R=0,T = -20;若 R=4095,T = -20 + 80 = 60。该线性方程可用于微控制器代码中。
mory = 4 MB = 4 × 1024 × 1024 = 4,194,304 bytes. Number of days = 4,194,304 / 864 ≈ 4854.5, so about 4854 days (over 13 years). In reality, memory limitations are rarely the bottleneck for such low-bandwidth sensors.
每条记录占用 2 + 4 = 6 字节。每 10 分钟读取一次 → 每小时 6 次 → 每天 144 次。每日数据量 = 144 × 6 = 864 字节。总内存 = 4 MB = 4 × 1024 × 1024 = 4,194,304 字节。天数为 4,194,304 / 864 ≈ 4854.5,因此约 4854 天(超过 13 年)。实际上,对于这种低带宽传感器,内存通常不是瓶颈。
The task integrates environmental monitoring with embedded systems. It practices ADC resolution, linear conversion, and memory budgeting — key embedded computing concepts that appear in the CCEA hardware and data representation units.
此题将环境监测与嵌入式系统结合起来。它练习了 ADC 分辨率、线性转换和内存预算——这些都是 CCEA 硬件与数据表示单元中的关键嵌入式计算概念。
10. Pathfinding Algorithms and Robotics in Engineering | 工程学中的寻路算法与机器人
id. Some cells are blocked (obstacles). The robot uses a simplified version of Dijkstra’s algorithm to find the shortest path from top-left (0,0) to bottom-right (9,9), moving only up, down, left, right. Explain how the algorithm ensures the shortest path is found and what data structure is typically used to explore nodes efficiently. Why might a heuristic like the Manhattan distance improve performance in a related algorithm?
一个清洁机器人在 10×10 网格中导航。某些单元格是障碍物。机器人使用简化版 Dijkstra 算法寻找从左上角 (0,0) 到右下角 (9,9) 的最短路径,只能上、下、左、右移动。请解释该算法如何确保找到最短路径,以及通常使用哪种数据结构来高效探索节点。为何像曼哈顿距离这样的启发式方法能在相关算法中提升性能?
Dijkstra’s algorithm maintains a priority queue (min-heap) of nodes to explore, keyed by the current shortest distance from the start. It repeatedly extracts the node with minimum distance, updates its neighbours if a shorter path is found, and inserts them into the queue. Because the first time a node is extracted, its distance is the shortest possible (due to non-negative edge weights), the algorithm guarantees an optimal path. The priority queue ensures O(log V) per extraction, efficient for large grids.
Dijkstra 算法维护一个待探索节点的优先队列(最小堆),以当前从起点出发的最短距离为键值。它反复提取距离最小的节点,若找到更短路径则更新其邻居,并将其插入队列。由于节点首次被提取时的距离即为其最短可能距离(因为边权重非负),该算法能保证最优路径。优先队列确保每次提取的复杂度为 O(log V),对大型网格非常高效。
Adding the Manhattan distance heuristic converts Dijkstra into A* search. The heuristic estimates the remaining cost to the goal, which focuses the search towards the target and often explores far fewer nodes, improving speed while still guaranteeing optimality if the heuristic is admissible (never overestimates). In grid robotics, Manhattan distance (|x1-x2| + |y1-y2|) is a natural admissible heuristic for 4-direction movement, reducing computation time significantly.
加上曼哈顿距离启发式后,Dijkstra 算法便转化为 A* 搜索。启发式估计到达目标的剩余代价,使搜索更聚焦于目标方向,通常能显著减少探索的节点数,从而提升速度,同时若启发式是可接受的(不高估),仍保证最优性。在网格机器人中,对于四方向移动,曼哈顿距离(|x1-x2| + |y1-y2|)是一种天然的可接受启发式,可大幅减少计算时间。
This scenario connects graph theory, algorithm design, and practical robotics. CCEA students encounter algorithms like Dijkstra when studying problem-solving and can appreciate how abstract data structures power real autonomous systems.
这一情景将图论、算法设计与实用机器人学联系起来。CCEA 学生在学习问题解决时会碰到 Dijkstra 等算法,并能体会抽象数据结构如何驱动真实的自主系统。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图