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 วินาที

อยากฝึกโจทย์แบบนี้เพิ่มไหม เริ่มฝึกหัวข้อนี้ได้เลย ตรวจให้ทันทีทุกข้อ

เริ่มฝึกเลย