logo

Question detail

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

Try the question, check the answer, then read the explanation to understand the curriculum point.

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

Model answer

What a good answer should say

  • Each element in A is assigned an output chosen from B

Explanation

Why this works

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.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.