← 返回资讯屏轩教育 · 行业资讯

Operators, Expressions and Control Structures in A-Level Edexcel Programming | A-Level Edexcel 编程中的运算符、表达式与控制结构

2026-08-29 15:15 · 本文部分内容由AI辅助创作

📚 Operators, Expressions and Control Structures in A-Level Edexcel Programming | A-Level Edexcel 编程中的运算符、表达式与控制结构

In the Edexcel A-Level Programming unit, candidates must be able to read, write and trace code that uses operators, expressions and control structures. These building blocks determine how values are calculated, compared and used to decide the flow of a program. This article explains arithmetic, relational and logical operators, expression evaluation, selection, iteration, and related exam skills.

在 Edexcel A-Level 编程单元中,考生必须能够阅读、编写和跟踪使用运算符、表达式和控制结构的代码。这些基本构件决定了如何计算、比较数值,以及如何决定程序的执行流程。本文解释算术、关系和逻辑运算符、表达式求值、选择结构、迭代结构以及相关考试技巧。


1. Programming Basics and Language Classification | 编程基础与语言分类

Edexcel programming questions are often written in a pseudocode style that resembles a high-level imperative language. You need to recognise assignment, arithmetic, input/output and control constructs without being tied to one specific syntax.

Edexcel 编程题通常使用类似高级命令式语言的伪代码风格。你需要识别赋值、算术运算、输入输出和控制结构,而不必局限于某一种特定语法。


2. Arithmetic Operators and Precedence | 算术运算符与优先级

eudocode also uses exponentiation (^) in some questions, so you must follow the given key.

算术运算符包括加法(+)、减法(−)、乘法(×)、除法(/ 或 ÷)、整除(DIV)和取模(MOD)。Edexcel 伪代码在某些题目中也使用指数运算(^),因此你必须遵循题目给出的符号说明。

Priority | 优先级Operator | 运算符Meaning | 含义
Highest | 最高( )Brackets | 括号
^Exponent | 指数
× / DIV MODMultiplicative | 乘除运算
Lowest | 最低+ −Additive | 加减运算

n/division/modulus, and finally addition/subtraction. For example, 3 + 4 × 2 = 11, not 14.

始终先计算括号,然后是指数,再是乘法、除法、整除和取模,最后是加法和减法。例如,3 + 4 × 2 = 11,而不是 14。

3 + 4 × 2 = 3 + 8 = 11


3. Relational and Logical Operators | 关系运算符与逻辑运算符

s combine Boolean values: AND, OR and NOT are the standard set used in Edexcel pseudocode.

关系运算符比较两个值并返回布尔结果(TRUE 或 FALSE)。常见符号有 =、≠、<、>、≤ 和 ≥。逻辑运算符用于组合布尔值:Edexcel 伪代码中常用的标准集合是 AND、OR 和 NOT。


广告 / Sponsored

4. Boolean Expressions and Truth Tables | 布尔表达式与真值表

Boolean expressions appear in IF conditions and WHILE loops. You may be asked to complete a truth table or to simplify an expression using De Morgan's laws. In Edexcel exams, truth tables usually show all combinations of two or three inputs.

布尔表达式出现在 IF 条件和 WHILE 循环中。你可能需要填写真值表,或使用德摩根定律简化表达式。在 Edexcel 考试中,真值表通常显示两个或三个输入的所有组合。

Example expression: A AND (B OR NOT C) | 示例表达式:A AND (B OR NOT C)

ABCNOT CB OR NOT CA AND (B OR NOT C)
TRUETRUETRUEFALSETRUETRUE
TRUETRUEFALSETRUETRUETRUE
TRUEFALSETRUEFALSEFALSEFALSE
FALSETRUETRUEFALSETRUEFALSE

Complete the remaining rows carefully. In exam answers, use consistent TRUE/FALSE or 1/0 notation as stated in the question.

请仔细填写其余各行。在答题时,请按照题目要求一致地使用 TRUE/FALSE 或 1/

Published by TutorHao | A-Level 编程 Revision Series | aleveler.com

广告 / Sponsored
剑桥国际 Cambridge International AS & A Level Computer Science …
计算机 备考教辅 · 正版现货 · 学习备考通用
查看详情 / View on Taobao参考价 ¥228.0
广告 / Sponsored
剑桥Cambridge AS and A-Level Computer Science Revision Guide …
计算机 备考教辅 · 正版现货 · 学习备考通用
查看详情 / View on Taobao参考价 ¥205.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao