Cambridge IGCSE · Computer Science (0478)

Algorithm design and problem-solving:练习题

5 道选择题即时批改,另有 5 道文字题附完整解题步骤,全部围绕「Algorithm design and problem-solving」。

10 道题目23 免费,无需注册
第 1 题
1

Which stage of the program development life cycle (PDLC) involves identifying and fixing logic errors or syntax errors found in the program code?

第 2 题
1

Consider the following pseudocode snippet:

Total ← 0
FOR k ← 1 TO 5 STEP 2
  TotalTotal + k
NEXT k

What is the final value of Total?

第 3 题
1

An algorithm processes an array MyArray containing the initial values [12, 5, 18, 7, 10] indexed from \(1\) to \(5\).

X ← \(0\)
FOR i ← \(1\) TO \(4\)
  IF MyArray[i] > MyArray[i+1] THEN
    MyArray[i+1]MyArray[i+1] + MyArray[i]
  ELSE
    MyArray[i+1]MyArray[i+1] DIV \(2\)
    XX + MyArray[i+1]
  ENDIF
NEXT i

What will be the final values of X and MyArray[5] after this algorithm has finished executing?

第 4 题
1

A library management system uses a database to store book details. Which of the following describes a verification method that could be used during data entry?

第 5 题
1

A program requires a user to enter a percentage value between \(0.0\) and \(100.0\) inclusive. The developer is preparing test data for the range check.

According to the syllabus definitions, which set of values represents extreme data for this range?

第 6 题
2

Identify the stage of the program development life cycle that involves the use of abstraction and decomposition to define the requirements of a problem.

先自己写一遍答案,再对照解题步骤。

第 7 题
3

Explain how a structure diagram is utilized during the design stage of the program development life cycle to visually represent the concept of decomposition.

先自己写一遍答案,再对照解题步骤。

第 8 题
5

A program accepts an input \( X \) where \( 1 \le X \le 100 \). Identify one piece of abnormal test data and the two boundary values for the lower limit.

先自己写一遍答案,再对照解题步骤。

第 9 题
4

A teacher uses a program to store student test scores. The scores are whole numbers between \(0\) and \(100\) inclusive.

(a) Identify the most appropriate basic data type for a variable used to store a single test score.
(b) During the testing phase, the teacher uses different types of test data to ensure the program handles inputs correctly. Describe Normal and Abnormal test data, providing a specific example for each using the range \(0\) to \(100\).
(c) State the name of the standard algorithm used to find if a specific score (for example, \(95\)) exists within an unsorted array of scores.

先自己写一遍答案,再对照解题步骤。

第 10 题
4

Consider the following pseudocode algorithm that processes an array of numbers named Scores[1:6] containing the initial values [12, 45, 8, 30, 50, 22]:

Total ← 0
Count ← 0
FOR Index ← 1 TO 6
  IF Scores[Index] MOD 2 = 0 THEN
    TotalTotal + Scores[Index]
    CountCount + 1
  ELSE
    TotalTotal - 2
  ENDIF
NEXT Index

(a) What is the final value of Total after the algorithm completes?
(b) What is the final value of Count?

先自己写一遍答案,再对照解题步骤。

* thinka 提供的内容由 AI 生成,未必在任何情况下都完全准确或最新,请结合官方教材与教师指导使用。

你已看过标准答案。现在轮到你的答案被批改。

这一页能告诉你好答案是什么样子,却无法指出你的答案缺了什么。thinka 按真实评分标准批改你的文字答案,约 15 秒完成。

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

立即练习