AQA A Level · Computer Science 7517

資料型別、變數與運算:練習題

5 條多項選擇題即時批改,另有 5 條文字題附完整解題步驟,全部圍繞「資料型別、變數與運算」。

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

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

立即練習