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 秒で採点します。

同じような問題をもっと解きたい?このトピックの新しい問題を、解きながら採点。

練習を始める