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 秒完成。

想多做幾條同類題目?立即開始練習呢個課題,即做即批改。

立即練習