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

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

立即練習