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

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

立即练习