📚 Edexcel A-Level Programming: Core Concepts and Exam Skills | Edexcel A-Level 编程:核心概念与考试技巧
This bilingual revision guide covers the programming topics examined in the Pearson Edexcel A-Level Computer Science specification, including the skills practised in ActiveLearn programming resources. It is designed for quick review and exam preparation.
本双语复习指南涵盖 Pearson Edexcel A-Level 计算机科学考试中的编程主题,包括 ActiveLearn 编程资源中练习的技能。它旨在用于快速复习和备考。
1. Programming Paradigms and Edexcel Expectations | 编程范式与 Edexcel 要求
Edexcel A-Level Programming questions expect you to understand both procedural/imperative programming and object-oriented programming. Imperative programming uses statements that directly change the program state, such as assignment, loops and conditional branches.
Edexcel A-Level 编程题目要求你理解过程式/命令式编程和面向对象编程。命令式编程使用直接改变程序状态的语句,例如赋值、循环和条件分支。
Object-oriented programming organises code around classes and objects rather than actions alone. This distinction is important when you are asked to compare programming paradigms or select an appropriate structure for a given problem.
面向对象编程围绕类和对象而不是仅仅围绕动作来组织代码。当你被要求比较编程范式或为给定问题选择合适结构时,这种区别非常重要。
2. Sequence, Selection and Iteration | 顺序、选择和迭代
The three fundamental control structures are sequence, selection and iteration. Sequence means statements run one after another in the order they are written.
三种基本控制结构是顺序、选择和迭代。顺序意味着语句按照书写顺序一条接一条执行。
Selection uses conditions to branch: IF, ELSE IF and ELSE (or CASE/SWITCH) allow different code paths. Iteration repeats a block: definite iteration uses FOR, while indefinite iteration uses WHILE or REPEAT…UNTIL.
选择使用条件来分支:IF、ELSE IF 和 ELSE(或 CASE/SWITCH)允许不同的代码路径。迭代重复一个代码块:定次迭代使用 FOR,而不定次迭代使用 WHILE 或 REPEAT…UNTIL。
When tracing pseudocode, always record the value of the condition at each step and update a trace table after every statement.
追踪伪代码时,始终记录每一步的条件值,并在每条语句之后更新跟踪表。
3. Variables, Constants and Data Types | 变量、常量与数据类型
Variables are named storage locations whose values can change while a program runs. Constants are named values that cannot be changed after being assigned, which improves readability and prevents accidental modification.
变量是命名的存储位置,其值在程序运行时可以改变。常量是赋值后不能更改的命名值,这提高了可读性并防止意外修改。
Edexcel programming papers commonly use these data types: integer, real/float, Boolean, character and string. Knowing the difference is essential for type conversion, arithmetic and comparisons.
Edexcel 编程试卷通常使用以下数据类型:整型、实数/浮点型、布尔型、字符和字符串。理解它们之间的区别对于类型转换、算术运算和比较至关重要。
| Data type | 数据类型 | Example | 示例 |
|---|---|
| integer | 整型 | 42, -7 |
| real/float | 实数/浮点型 | 3.14, -0.5 |
| Boolean | 布尔型 | TRUE, FALSE |
| character | 字符 | ‘A’, ‘7’ |
| string | 字符串 | “hello” |
4. Functions and Procedures | 函数与过程
A procedure is a subroutine that carries out a task but does not return a value. A function is a subroutine that returns a single value using a RETURN statement.
过程是执行任务但不返回值的子程序。函数是使用 RETURN 语句返回单个值的子程序。
Using well-named subroutines makes a program modular, easier to test and reusable. In Edexcel pseudocode, functions are often written as FUNCTION name(…) RETURN … ENDFUNCTION.
使用命名良好的子程序使程序模块化、更易于测试和重用。在 Edexcel 伪代码中,函数通常写作 FUNCTION name(…) RETURN … ENDFUNCTION。
5. Parameter Passing and Scope | 参数传递与作用域
Parameters let subroutines receive data. Passing by value copies the value into the subroutine, so changes inside do not affect the original variable. Passing by reference passes the memory location, so changes inside do affect the original variable.
参数让子程序接收数据。按值传递将值复制到子程序中,因此内部的更改不会影响原始变量。按引用传递传递的是内存地址,因此内部的更改会影响原始变量。
Scope defines where a variable can be accessed. Local variables
Published by TutorHao | A-Level 编程 Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply