AQA A Level · Computer Science 7517

Data types, variables and operations: แบบฝึกหัด

ข้อปรนัย 5 ข้อ ตรวจให้ทันทีที่ตอบ และข้อเขียน 5 ข้อ พร้อมวิธีทำละเอียด ทั้งหมดจากเรื่อง Data types, variables and operations

10 ข้อ22 คะแนนฟรี ไม่ต้องสมัคร
ข้อ 1
1 คะแนน

A developer uses the identifier total_interest_rate instead of x in their program code. Why is the use of meaningful identifier names considered good practice in programming?

ข้อ 2
1 คะแนน

A string S has the value "AQA_CS_2024". What is the result of the operation SUBSTRING(4, 2, S)?
(Assume the first character is at position 0, and the parameters are: start index, length)

ข้อ 3
1 คะแนน

In the context of the Unified Modelling Language (UML) for Object-Oriented Design, how are composition and aggregation relationships visually distinguished in a class diagram?

ข้อ 4
1 คะแนน

In a programming language, the operation 17 MOD 5 is performed. What is the result of this integer division remainder operation?

ข้อ 5
1 คะแนน

Consider a functional programming context. Given a list \( [4, 3, 5] \), which of the following represents the list using head:tail notation?

ข้อ 6
2 คะแนน

In a programming language, what is the result of the operation \( 17 \text{ DIV } 5 \)?

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 7
3 คะแนน

A string variable s has the value "AQA2024". What is the result of the operation SUBSTRING(s, 0, 3)? (Assume 0-based indexing and that the third parameter is length).

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 8
5 คะแนน

In Object-Oriented Programming, a class Car and a class Engine are related such that the Engine is a part of the Car, and if the Car is destroyed, the Engine is also destroyed. Name this specific type of relationship.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 9
3 คะแนน

A subroutine is defined to calculate the area of a circle using the formula \( Area = \pi \times r^2 \).

(a) Define the term subroutine.
(b) Explain the difference between a procedure and a function.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

ข้อ 10
4 คะแนน

Consider the following pseudocode snippet:
x = "AQA Computer Science"
y = 7

(a) Describe the result of the following string operations:
i. substring(0, 3) of x
ii. length of x
(b) Explain the difference between global variables and local variables, stating why using local variables is considered good practice.

ลองเขียนคำตอบด้วยตัวเองก่อน แล้วค่อยเทียบกับวิธีทำ

* เนื้อหาของ thinka สร้างโดย AI อาจไม่ถูกต้องสมบูรณ์ในทุกกรณี กรุณาใช้เป็นสื่อเสริมและตรวจสอบกับเอกสารอ้างอิงอย่างเป็นทางการ

คุณเห็นเฉลยแล้ว ทีนี้มาตรวจคำตอบของคุณบ้าง

หน้านี้บอกได้ว่าคำตอบที่ดีเป็นอย่างไร แต่บอกไม่ได้ว่าคำตอบของคุณขาดอะไร thinka ตรวจข้อเขียนของคุณตามเกณฑ์ให้คะแนนจริงในราว 15 วินาที

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

เริ่มฝึกเลย