In a program, a programmer declares a variable `temperature` to store the current temperature reading. Which of the following would be an appropriate assignment statement to store a value of 25.5 degrees Celsius into this variable, using common pseudocode syntax?
Senior Secondary (HKDSE) · Information and Communication Technology
Program Development: แบบฝึกหัด
ข้อปรนัย 5 ข้อ ตรวจให้ทันทีที่ตอบ และข้อเขียน 3 ข้อ พร้อมวิธีทำละเอียด ทั้งหมดจากเรื่อง Program Development
A programmer is developing a program to manage a list of 40 students' marks. Which data structure is most suitable for storing these marks together under a single identifier?
A logic expression is evaluated as follows: result = (NOT A OR B) AND C.
If A = True, B = True, and C = False, what is the value of result?
In the context of Program Development, what is the main purpose of using comments and indentation in source code?
Consider the following pseudocode involving an array List:List = [2, 3, 5, 2]
FOR i FROM 1 TO 3 DO
List[i] = List[i] * List[i-1]
END FOR
What is the final content of List after the loop finishes?
In program development, when a value is assigned to a variable that remains unchanged throughout the execution of the program, what is this identifier technically called?
ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ
A programmer is writing a script to process student grades. If the program uses an expression like final_score = (test1 + test2) / 2, identify the assignment statement and name the arithmetic operator used for division.
ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ
A smart city sensor records hourly noise levels (in dB) for a 10-hour period and stores them in a one-dimensional array NOISE_LEVELS. An 'unhealthy period' is defined as a sequence of consecutive hours where the noise level is strictly greater than \( 85 \) dB. You are tasked with designing an algorithm to find the duration of the longest continuous unhealthy period within that 10-hour window.
(a) Identify the input and output for this algorithm. (2 points)
(b) Using pseudocode, develop an algorithm to determine the duration of the longest continuous unhealthy period. Use the variables max_duration and current_count in your logic. (3 points)
(c) Perform a dry run for your algorithm using the following data: NOISE_LEVELS = [70, 90, 88, 92, 80, 87, 89, 95, 91, 75]. Show the final value of max_duration and the intermediate values of current_count. (2 points)
(d) State one boundary case that should be tested to ensure the logic correctly handles edge scenarios for this program. (1 point)
ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ
* เนื้อหาของ thinka สร้างโดย AI อาจไม่ถูกต้องสมบูรณ์ในทุกกรณี กรุณาใช้เป็นสื่อเสริมและตรวจสอบกับเอกสารอ้างอิงอย่างเป็นทางการ
คุณเห็นเฉลยแล้ว ทีนี้มาตรวจคำตอบของคุณบ้าง
หน้านี้บอกได้ว่าคำตอบที่ดีเป็นอย่างไร แต่บอกไม่ได้ว่าคำตอบของคุณขาดอะไร thinka ตรวจข้อเขียนของคุณตามเกณฑ์ให้คะแนนจริงในราว 15 วินาที
อยากฝึกโจทย์แบบนี้เพิ่มไหม เริ่มฝึกหัวข้อนี้ได้เลย ตรวจให้ทันทีทุกข้อ
เริ่มฝึกเลย