AQA A Level · Computer Science 7517

函數式程式設計典範:練習題

5 條多項選擇題即時批改,另有 5 條文字題附完整解題步驟,全部圍繞「函數式程式設計典範」。

10 條題目22 免費,無需登記
第 1 題
1

Given a function \( f: A \rightarrow B \), what does the set \( B \) represent in functional programming terms?

第 2 題
1

Consider the function add defined as:
\( add: \text{integer} \rightarrow (\text{integer} \rightarrow \text{integer}) \)

What is the result of the partial function application add 5?

第 3 題
1

Why is the functional programming paradigm particularly well-suited for writing code for Big Data systems that require distributed processing?

第 4 題
1

In the functional programming paradigm, what is the term used to describe a function that can be passed as an argument to another function or returned as a result from a function call?

第 5 題
1

Which higher-order function is used to produce a single value by repeatedly applying a combining function to all elements of a list?

第 6 題
2

Define a first-class object within a functional programming language.

先自己寫一次答案,再對照解題步驟。

第 7 題
3

A function is defined as \(f: \text{integer} \to \text{integer}\). If the co-domain is the set of all integers, does the function necessarily have to output every value in that set? Explain your answer.

先自己寫一次答案,再對照解題步驟。

第 8 題
5

Given two functions \(f(x) = x + 5\) and \(g(y) = y^2\), determine the result of the functional composition \(g \circ f\) when \(x = 3\).

先自己寫一次答案,再對照解題步驟。

第 9 題
3

In the functional programming paradigm, functions are considered first-class objects.

(a) State three properties that define a first-class object in a programming language.
(b) A function \( f \) has the type definition \( f: \mathbb{R} \to \mathbb{Z} \). Identify the domain and the co-domain for this function.

先自己寫一次答案,再對照解題步驟。

第 10 題
4

Functional programming uses function composition to create complex logic from simple functions.

Let \( f(x) = x + 5 \) and \( g(y) = y^2 \).

(a) Write the mathematical expression for the composition \( g \circ f \).
(b) Calculate the result of \( (g \circ f)(3) \).
(c) Explain the order in which functions are applied in the composition \( g \circ f \).

先自己寫一次答案,再對照解題步驟。

* thinka提供的內容由AI生成,可能並非總是準確或最新。請將其用作輔助資源,並與官方材料進行核實。

你已看過標準答案,接下來輪到批改你的答案。

這一頁可以告訴你好答案的樣子,卻無法指出你的答案欠缺什麼。thinka 按真實評分準則批改你的文字答案,約 15 秒完成。

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

立即練習