Cambridge International AS Level · Computer Science (9618)

Programming:練習問題

その場で採点される選択問題 5 問と、解説つきの記述問題 3 問。すべて「Programming」からの出題です。

8 問17 無料・登録不要
問 1
1

A programmer needs to define a constant for the maximum number of attempts allowed in a login system. Which pseudocode statement correctly performs this declaration and initialisation?

問 2
1

Consider the following pseudocode fragment:
IF Temperature > 30 THEN
  OUTPUT "Hot"
ELSE
  IF Temperature < 10 THEN
    OUTPUT "Cold"
  ELSE
    OUTPUT "Moderate"
  ENDIF
ENDIF
What is this specific structure an example of?

問 3
1

A developer is deciding between using a pre-condition loop (WHILE...ENDWHILE) and a post-condition loop (REPEAT...UNTIL) for a specific task. What is the primary functional difference that would justify using a pre-condition loop?

問 4
1

What is the main difference between a procedure and a function in structured programming?

問 5
1

A programmer uses the following pseudocode for a string manipulation task:

DECLARE MyString : STRING
MyString ← "Cambridge"
OUTPUT RIGHT(MyString, 6)

What will be the output of this code?

問 6
5

Evaluate the output of the following pseudocode expression, assuming standard string library functions:
LCASE(SUBSTR("COMPUTER SCIENCE", 10, 4)) & STR(LENGTH("9618"))

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 7
3

A program is being developed to manage scores for a competitive game.
Write pseudocode to declare a constant called MAX_PLAYERS with a value of 50 and a variable called CurrentScore that can hold decimal values. Initialise CurrentScore to 0.0.

まず自分で答えを書いてから、解説と照らし合わせましょう。

問 8
4

A string variable UserID contains a value such as "ST1234".

Write pseudocode to:
1. Extract the first two characters of the string.
2. Convert these characters to uppercase.
3. Determine the total length of the string and output it to the console.

まず自分で答えを書いてから、解説と照らし合わせましょう。

※ thinkaのコンテンツはAIにより生成されているため、内容が正確でない場合があります。補助教材としてご使用いただき、公式の教材と合わせてご確認ください。

模範解答は見ました。次はあなたの答案を採点します。

このページは良い答案の形を示せますが、あなたの答案に何が足りないかは教えられません。thinka は実際の採点基準に沿って記述答案を約 15 秒で採点します。

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

練習を始める