Pearson Edexcel GCSE (9-1) · Computer Science (1CP2)

Constructs:练习题

5 道选择题即时批改,另有 4 道文字题附完整解题步骤,全部围绕「Constructs」。

9 道题目23 免费,无需注册
第 1 题
1

Which programming construct is used to repeat a block of code a specific number of times?

第 2 题
1

Consider the following pseudocode snippet:

x = 10
y = 5
IF x > y THEN
  x = x - y
ELSE
  y = y - x
ENDIF


Which programming construct is demonstrated by the IF statement?

第 3 题
1

Which of the following is a characteristic of a subprogram (procedure or function) that uses a single entry point and a single exit point?

第 4 题
1

Which programming construct is used to execute a set of instructions multiple times until a specific condition is no longer met?

第 5 题
1

In a high-level programming language, which of the following best describes the use of a local variable within a subprogram?

第 6 题
2

Identify the programming construct used to execute a block of code only if a specific condition is met.

先自己写一遍答案,再对照解题步骤。

第 7 题
4

Describe the difference between a count-controlled loop and a condition-controlled loop.

先自己写一遍答案,再对照解题步骤。

第 8 题
6

Explain the benefit of using local variables within a subprogram instead of global variables.

先自己写一遍答案,再对照解题步骤。

第 9 题
6

A algorithm is designed to calculate the factorial of a number \(n\) (written as \(n!\)).

(a) Use pseudocode to write a count-controlled loop that calculates \(5!\) and stores it in a variable result.
(b) Explain why a condition-controlled loop (like a WHILE loop) might be used instead if the user was providing the input value.
(c) How would you modify the algorithm to ensure it doesn't crash if the user enters a negative number?

先自己写一遍答案,再对照解题步骤。

* thinka提供的内容由AI生成,可能并非总是准确或最新。请将其用作辅助资源,并与官方材料进行核实。

你已看过标准答案。现在轮到你的答案被批改。

这一页能告诉你好答案是什么样子,却无法指出你的答案缺了什么。thinka 按真实评分标准批改你的文字答案,约 15 秒完成。

想多做几道同类题目?立即开始练习这个课题,边做边批改。

立即练习