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

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

立即練習