logo

Question detail

The function f: {a,b,c,…,z} → {0,1,2,…,25} maps a to 0, b to 1 and so on. Which statement is true?

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

The function f: {a,b,c,…,z} → {0,1,2,…,25} maps a to 0, b to 1 and so on. Which statement is true?.

  1. A.The domain contains the values 0 to 25
  2. B.The co-domain contains the letters a to z
  3. C.Every member of the co-domain is used as an output
  4. D.The function has no specified argument type

Model answer

What a good answer should say

  • Every member of the co-domain is used as an output

Explanation

Why this works

Each letter from a to z is in the domain and maps to a different value from 0 to 25. Consequently, all members of the co-domain are used.

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.