logo

AQA A-Level Computer Science practice

Which statement about a function f: A → B is correct?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Functional programming paradigm

Exam-style question

Try this first

Which statement about a function f: A → B is correct?.

  1. A.Every member of B must be produced as an output
  2. B.Inputs may be chosen from any data type, regardless of A
  3. C.Each element in A is assigned an output chosen from B
  4. D.A and B must contain the same members

Answer and explanation

Concise answer

Each element in A is assigned an output chosen from B

Why this is correct

A function assigns an output to each element in its input set A, and that output is chosen from B. The function does not have to use every member of B.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions