📚 Year 8 Cambridge Computer Science: Interdisciplinary Practice | Year 8 Cambridge 计算机:跨学科综合题型训练
Interdisciplinary questions in Year 8 Cambridge Computer Science train you to apply computational thinking beyond the screen. By blending coding concepts with maths, science, geography, history and the arts, you learn how algorithms model the real world. This article walks through eight multi‑subject practice problems, showing you step‑by‑step how to break them down, spot patterns and design solutions.
在 Year 8 剑桥计算机课程中,跨学科题目要求你把计算思维用到数学、科学、地理、历史等真实情境里。通过把编程概念与其他学科融合,你能看到算法如何模拟现实世界。本文精选了八道跨学科训练题,一步步教你如何拆解问题、发现规律并设计解决方案。
1. Mathematics: Sum of a Number Sequence | 数学:数列求和
Problem: Write an algorithm that asks for a positive integer N and then calculates the sum 1 + 2 + 3 + … + N. The output should show the total.
问题:编写一个算法,输入一个正整数 N,然后计算 1 + 2 + 3 + … + N 的和,并将总和输出。
A loop can add each number to a running total. You need a variable to store the sum and a counter that goes from 1 to N.
可以使用循环,让一个计数变量从 1 逐步增加到 N,同时将每个数累加到一个总和变量里。
SET total TO 0
FOR i FROM 1 TO N
total = total + i
END FOR
OUTPUT total
The same result can be obtained instantly with the formula below—spotting this pattern shows deeper computational thinking.
如果能直接使用下面的公式,就能瞬间得到结果,体现出更高一层的模式识别能力。
Sum = N × (N + 1) ÷ 2
Both approaches are correct. Using the formula shows you have analysed the pattern instead of just repeating steps.
两种方法都正确。使用公式说明你分析了规律,而不仅仅是机械重复步骤。
2. Science: Modelling a Cooling Cup of Tea | 科学:模拟一杯茶冷却
Problem: A cup of tea starts at 95 °C. Every minute it cools down by 8% of the difference between its current temperature and the room temperature (22 °C). After how many minutes does the tea drop below 40 °C?
问题:一杯茶初始温度 95 °C。每分钟它会降低当前温度与室温(22 °C)之差的 8%。问多少分钟后茶的温度会降到 40 °C 以下?
You need a loop that updates the temperature each minute using the rule temp = temp − 0.08 × (temp − 22). Count the minutes until the temperature is under 40 °C.
你需要一个循环,每过一分钟就按规则 温度 = 温度 − 0.08 × (温度 − 22) 更新温度,并记录分钟数,直到温度低于 40 °C。
SET temp TO 95
SET minutes TO 0
WHILE temp ≥ 40
temp = temp − 0.08 × (temp − 22)
minutes = minutes + 1
END WHILE
OUTPUT minutes
This task shows how a simple iterative model can mimic a physical cooling process—a core idea in scientific computing.
这个任务演示了如何用简单的迭代模型模拟物理冷却过程,这是科学计算中的一个核心思想。
3. Geography: Plotting River Lengths | 地理:绘制河流长度
Problem: You are given the lengths (in km) of five rivers: Nile 6650, Amazon 6400, Yangtze 6300, Mississippi 6275, Yenisei 5539. Write an algorithm that finds and outputs the longest river, the shortest river and the average length.
问题:现有五条河流的长度(千米):尼罗河 6650,亚马孙河 6400,长江 6300,密西西比河 6275,叶尼塞河 5539。编写算法,找出最长河流、最短河流并计算平均长度。
Store the lengths in a list. Initialise variables for max and min with sensible starting values. Loop through the list to update max, min and sum, then compute the average.
将长度存入列表。用合适的初值初始化最大值和最小值变量。遍历列表,更新最大值、最小值和总和,最后计算平均值。
SET lengths TO [6650, 6400, 6300, 6275, 5539]
SET max TO lengths[0]
SET min TO lengths[0]
SET total TO 0
FOR each value IN lengths
IF value > max THEN max = value
IF value < min THEN min = value
total = total + value
END FOR
SET average TO total / 5
OUTPUT max, min, average
Handling real‑world data with lists and statistics prepares you for geographical information systems (GIS) later on.
用列表和统计量处理真实数据,可以为将来学习地理信息系统(GIS)打下基础。
4. History: Cracking the Caesar Cipher | 历史:破解凯撒密码
Problem: a cipher where each letter was shifted three places forward in the alphabet (A → D, B → E, …, Z → C). The encrypted word is ‘FRPSXWHU’. Decode it and describe how your algorithm works.
问题:凯撒曾使用一种密码,每个字母在字母表中向后移动三位(A → D,B → E,……,Z → C)。现有一段密文‘FRPSXWHU’,请将其解码,并描述你的算法如何工作。
To decode a letter, shift it three places backward. You need to handle the wrap‑around when the letter goes before A. Build a string of decoded characters one by one.
解码时把每个字母向前移动三位。需要注意当字母跳过 A 时的回绕处理。逐个字符构建明文字符串。
SET cipher TO 'FRPSXWHU'
SET plain TO ''
FOR each char IN cipher
SET pos TO position of char in alphabet
SET new_pos TO (pos − 3) mod 26
plain = plain + alphabet_letter[new_pos]
END FOR
OUTPUT plain
The decoded word is ‘COMPUTER’. This classic encryption exercise links computing with ancient history and introduces string manipulation.
解码结果是‘COMPUTER’。这道经典加密题把计算机和古代历史联系起来,同时练习了字符串操作。
5. Art: Generating a Kaleidoscope Pattern | 艺术:生成万花筒图案
Problem: Design an algorithm that draws a circular pattern of 12 identical coloured shapes equally spaced around a centre point. Each shape should be a small square filled with a random colour.
问题:设计一个算法,在中心点周围均匀分布 12 个相同的彩色形状,构成一个万花筒图案。每个形状是一个填充了随机颜色的小正方形。
12 = 30° apart) and draw a square at that angular position, while picking a random colour.
关键在于一个重复 12 次的循环。每次迭代计算一个角度(360° ÷ 12 = 每隔 30°),在该角度位置上绘制一个正方形,并随机选择一种颜色。
SET angle_step TO 30
FOR i FROM 0 TO 11
angle = i × angle_step
SET colour TO random choice from [red, blue, green, …]
Draw square at angle distance from centre using colour
END FOR
Art and computing combine beautifully through geometric repetition and randomness. You are using iteration and coordinate maths to create symmetrical beauty.
艺术与计算机通过几何重复和随机性美妙地结合在一起。你在用循环和坐标数学创造对称之美。
6. Music: Creating a Simple Melody | 音乐:创作简单旋律
Problem: Musical notes have frequencies (in Hz): C 262, D 294, E 330, F 349, G 392, A 440, B 494. Write an algorithm that plays the melody C‑E‑G‑C (ascending) with each note lasting 0.5 seconds.
问题:音符有对应的频率(赫兹):C 262,D 294,E 330,F 349,G 392,A 440,B 494。编写算法播放旋律 C‑E‑G‑C(上行),每个音符持续 0.5 秒。
Store the note names in a list and their frequencies in a parallel list, or use simple look‑up. Loop through the note sequence and output each frequency together with a timing instruction.
将音符名称和对应频率存入列表(或使用简单查表)。遍历音符序列,逐个输出频率并附加时长指令。
SET notes TO ['C', 'E', 'G', 'C']
SET freq TO [262, 330, 392, 262]
FOR i FROM 0 TO 3
PLAY freq[i] FOR 0.5 seconds
END FOR
This task bridges sound and data, showing how a computer can represent and recreate music through simple numeric values.
这道题将声音与数据连接起来,展示计算机如何通过简单的数值表示并重现音乐。
7. Physical Education: Analysing Sprint Times | 体育:分析短跑时间
Problem: A coach recorded the 100‑metre sprint times of six athletes: 11.2, 10.8, 12.1, 10.9, 11.5, 10.7 seconds. Write an algorithm that finds the fastest time, the average time, and counts how many athletes ran under 11 seconds.
问题:教练记录了六名运动员的 100 米短跑时间:11.2,10.8,12.1,10.9,11.5,10.7 秒。编写算法找出最快时间、平均时间,并统计有多少人跑进 11 秒以内。
Initialise a variable for the fastest time with a large number. Use a loop to compare each time, update the minimum, accumulate the total and increment a counter when the time < 11.
用一个较大的数初始化最快时间变量。在循环中比较每个时间,更新最小值,累加总和,并在时间 < 11 时增加计数。
SET times TO [11.2, 10.8, 12.1, 10.9, 11.5, 10.7]
SET fastest TO 999
SET total TO 0
SET count_under11 TO 0
FOR each t IN times
IF t < fastest THEN fastest = t
total = total + t
IF t < 11 THEN count_under11 = count_under11 + 1
END FOR
SET average TO total / 6
OUTPUT fastest, average, count_under11
Sports analytics rely on exactly these kinds of computations – extracting maximums, averages and counts from performance data.
体育数据分析正是依靠这类计算——从表现数据中提取最大值、平均值和计数。
8. Environmental Science: Waste Sorting Algorithm | 环境科学:垃圾分类算法
Problem: A sensor identifies items as ‘plastic’, ‘paper’, ‘glass’ or ‘organic’. Write an algorithm that reads a list of waste items and sorts them into four separate bins, counting the total items in each bin.
问题:一个传感器能识别物品为‘塑料’、‘纸张’、‘玻璃’或‘有机’。编写算法读取一列垃圾物品,并将它们分到四个不同的垃圾桶中,同时统计每个桶的物品数量。
Use four counters initialised to 0. Iterate through the list and use a conditional structure (if‑else if) to increment the correct counter. Finally, output the four totals.
初始化四个计数器均为 0。遍历列表,用条件分支结构(如果‑否则如果)让对应的计数器加 1。最后输出四个总数。
SET waste TO ['plastic', 'paper', 'glass', 'plastic', 'organic', …]
SET count_plastic TO 0
SET count_paper TO 0
SET count_glass TO 0
SET count_organic TO 0
FOR each item IN waste
IF item = 'plastic' THEN increment count_plastic
ELSE IF item = 'paper' THEN increment count_paper
ELSE IF item = 'glass' THEN increment count_glass
ELSE increment count_organic
END FOR
OUTPUT count_plastic, count_paper, count_glass, count_organic
This classification task mimics how smart recycling systems work in the real world, using sensors and simple decision rules.
这个分类任务模拟了现实世界中智能回收系统如何通过传感器和简单决策规则运作。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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