AQA A Level · Computer Science 7517

Functional programming paradigm:練習問題

その場で採点される選択問題 5 問と、解説つきの記述問題 5 問。すべて「Functional programming paradigm」からの出題です。

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 秒で採点します。

同じような問題をもっと解きたい?このトピックの新しい問題を、解きながら採点。

練習を始める