📚 GCSE Edexcel Computer Science: Practical Experiment Guide | GCSE Edexcel 计算机:实验操作指南
This guide takes you through essential hands-on experiments that reinforce every topic in the Edexcel GCSE Computer Science specification. By working through each section, you will develop programming fluency, algorithmic thinking, and practical understanding of how computer systems work — all key to achieving the highest grades.
本指南将带你完成一系列关键动手实验,这些实验覆盖了 Edexcel GCSE 计算机科学大纲的每个主题。通过逐一实践,你将培养编程流畅度、算法思维以及对计算机系统工作原理的实用理解——这些都是取得最高等级的关键。
1. Setting Up Your Programming Environment | 设置编程环境
Download and install a lightweight Python IDE such as Thonny or use an online editor like Replit. Create a new file and type the classic print("Hello, GCSE") to confirm your environment is working. Understanding how to save, run, and stop a program is the first experiment every computer scientist performs.
下载并安装一个轻量级 Python IDE,如 Thonny,或使用 Replit 等在线编辑器。新建文件并输入经典的 print("Hello, GCSE"),确认环境正常工作。理解如何保存、运行和停止程序是每位计算机科学家进行的第一个实验。
2. Understanding Algorithms and Flowcharts | 理解算法与流程图
Before writing any code, map out an algorithm for calculating the average of three numbers using a flowchart. Draw start/end ovals, parallelogram input/output symbols, rectangle process boxes, and diamond decision symbols. This visual experiment helps you break problems into logical steps.
在编写任何代码之前,先用流程图画出计算三个数平均值的算法。绘制开始/结束椭圆、平行四边形输入/输出符号、矩形处理框和菱形判断符号。这项可视化实验帮助你将问题拆分为逻辑步骤。
3. Variables, Data Types, and Input/Output | 变量、数据类型与输入/输出
Write a program that asks for a student’s name, age, and test score. Store them in a string, an integer, and a float respectively. Print a formatted message that uses all three. Experiment with type casting using int() and float() to see what happens when you enter incompatible data.
编写一个程序,要求输入学生姓名、年龄和测试分数。分别用字符串、整数和浮点数存储。打印一条使用所有三条数据的格式化消息。使用 int() 和 float() 进行类型转换实验,观察输入不兼容数据时会发生什么。
4. Selection: IF Statements and Switch Cases | 选择结构:IF 语句与开关语句
Create a grade calculator that prints ‘Fail’, ‘Pass’, ‘Merit’, or ‘Distinction’ based on a score boundary experiment. Use if-elif-else and test edge cases like 0, 39, 40, 59, 60, 79, 80, and 100. Understanding Boolean conditions and relational operators (>=, <=) is crucial for controlling program flow.
创建一个等级计算器,根据分数边界实验打印 ‘Fail’、’Pass’、’Merit’ 或 ‘Distinction’。使用 if-elif-else 并测试边界情况,如 0、39、40、59、60、79、80 和 100。理解布尔条件和关系运算符 (>=, <=) 对于控制程序流程至关重要。
5. Iteration: FOR and WHILE Loops | 迭代:FOR 与 WHILE 循环
Experiment with a for loop to print the 7 times table up to 12. Then, convert this into a while loop that keeps running until a counter reaches 12. Add a user-controlled loop that continues asking for numbers until the user types ‘stop’. These experiments reveal the difference between count-controlled and condition-controlled loops.
使用 for 循环打印 7 的乘法表至 12。然后将此转换为 while 循环,一直运行直到计数器达到 12。添加一个用户控制的循环,不断要求输入数字,直到用户输入 ‘stop’。这些实验揭示了计数控制循环与条件控制循环之间的区别。
6. Working with Strings and Validation | 字符串操作与验证
Design a program that asks for an email address and validates that it contains an ‘@’ symbol and at least one dot after the ‘@’. Experiment with string methods such as .find(), .split(), and .isalpha(). Try input with multiple spaces or uppercase characters and use .strip() and .lower() to sanitise data.
设计一个程序,要求输入电子邮件地址,并验证其包含 ‘@’ 符号以及 ‘@’ 之后至少有一个点。使用 .find()、.split() 和 .isalpha() 等字符串方法进行实验。尝试包含多个空格或大写字符的输入,并使用 .strip() 和 .lower() 清洗数据。
7. Arrays and Lists: Storing Multiple Values | 数组与列表:存储多个值
Create a list of eight temperature readings taken in a science lab. Write code to find the maximum, minimum, and average temperature. Experiment with .append(), .remove(), and indexing. Extend the experiment by writing a linear search that returns the index of a specific value chosen by the user.
创建一个包含八个实验室温度读数的列表。编写代码找出最高温、最低温和平均温度。使用 .append()、.remove() 和索引进行实验。扩展实验,编写一个线性搜索,返回用户所选特定值的索引。
8. Subprograms: Functions and Procedures | 子程序:函数与过程
Write a function calculate_area(length, width) that returns the area of a rectangle. Then write a procedure that takes a name as parameter and prints a greeting without returning a value. Experiment by calling these subprograms inside a main program and observe how parameters and return values are passed.
编写一个函数 calculate_area(length, width),返回矩形面积。然后编写一个过程,将姓名作为参数,打印问候语而不返回值。在主程序中调用这些子程序进行实验,观察参数和返回值是如何传递的。
9. File Handling: Reading and Writing Data | 文件处理:读取与写入数据
Create a text file named experiment.txt and write three lines of sensor data into it using Python. Then open the file in read mode, loop through each line, and display its content. Experiment with appending new data and handling the FileNotFoundError using a try-except block.
创建一个名为 experiment.txt 的文本文件,并用 Python 将三行传感器数据写入其中。然后以读模式打开文件,遍历每一行并显示内容。使用追加模式添加新数据,并使用 try-except 块处理 FileNotFoundError 进行实验。
10. Testing and Debugging Techniques | 测试与调试技巧
Introduce a logical error into a program that calculates 20% VAT and try to spot it using print statements. Use a trace table on paper for a short algorithm with a loop to record variable changes. Experiment with the debugger in your IDE to set breakpoints and step through code. This hands-on testing mirrors real-world quality assurance.
在一个计算 20% 增值税的程序中引入一个逻辑错误,并使用打印语句尝试找出错误。在纸上用一个简短的循环算法绘制追踪表,记录变量变化。使用 IDE 中的调试器设置断点并单步执行代码。这种动手测试模拟了现实世界的质量保证。
11. Logic Gates and Truth Tables Experiment | 逻辑门与真值表实验
Simulate an AND, OR, and NOT gate using Python functions. Write a program that takes two binary inputs and outputs the result of a NAND gate combination. Construct a full truth table for a half-adder circuit involving XOR and AND gates. This experiment bridges Boolean algebra and physical circuitry.
使用 Python 函数模拟 AND、OR 和 NOT 门。编写一个程序,接收两个二进制输入并输出 NAND 门组合的结果。为涉及 XOR 和 AND 门的半加器电路构建完整的真值表。这项实验弥合了布尔代数与物理电路之间的鸿沟。
12. Network Simulation Using a LAN Model | 使用局域网模型进行网络模拟
Use a free online tool like Cisco Packet Tracer (or a classroom simulation) to build a small star network with a switch, two PCs, and a server. Assign IP addresses, send a ping from PC1 to PC2, and capture the packet in simulation mode. Observe how MAC addresses and IP addresses work together to deliver data across a network.
使用 Cisco Packet Tracer 等免费在线工具(或课堂模拟器),搭建一个小型的星形网络,包括一台交换机、两台 PC 和一台服务器。分配 IP 地址,从 PC1 向 PC2 发送 ping,并在模拟模式下捕获数据包。观察 MAC 地址和 IP 地址如何协同工作,在网络上传输数据。
Published by TutorHao | Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导