In a certain code language, ‘LEAP’ is coded as ‘9875’ and ‘LEAD’ is coded as…

2026

In a certain code language, ‘LEAP’ is coded as ‘9875’ and ‘LEAD’ is coded as ‘3897’. What is the code for ‘D’ in the given code language?

Answer: B. 3Concept: in this kind of letter-to-number coding the digits are not tied to the positions of the letters. A code is simply a jumbled collection of digits, one…

  1. A.

    5

  2. B.

    3

  3. C.

    9

  4. D.

    8

Attempted by 155 students.

Show answer & explanation

Correct answer: B

Concept: in this kind of letter-to-number coding the digits are not tied to the positions of the letters. A code is simply a jumbled collection of digits, one digit standing for each letter of the word. Two such words can therefore be compared as collections: a digit lying in both codes must stand for a letter lying in both words, while a digit lying in one code alone must stand for the letter that only that word carries.

Application: place the two given words next to their codes.

Word

Letters

Digits of its code

LEAP

L, E, A, P

9, 8, 7, 5

LEAD

L, E, A, D

3, 8, 9, 7

Now work through the comparison step by step.

  1. LEAP and LEAD begin with the same three letters L, E and A, and differ only in their last letter — P in LEAP and D in LEAD.

  2. Write each code as a collection of digits: 9875 gives 5, 7, 8 and 9, while 3897 gives 3, 7, 8 and 9.

  3. The digits lying in both collections are 7, 8 and 9 — three shared digits for exactly three shared letters, so 7, 8 and 9 stand for L, E and A in some order.

  4. That leaves 5 in the code of LEAP, and P is the letter of LEAP still without a digit, so P = 5.

  5. That leaves 3 in the code of LEAD, and D is the letter of LEAD still without a digit, so D = 3.

Cross-check: rebuild both codes from this assignment. L, E and A take 7, 8 and 9 in some order; adding P = 5 gives exactly the four digits of 9875, and adding D = 3 gives exactly the four digits of 3897. Both codes are reproduced, so the code for D is 3.

Contrast: reading the codes position by position does not work here. It would make L equal to 9 from LEAP and equal to 3 from LEAD at the same time, which is impossible, so the digits must be treated as a jumbled set rather than as a letter-by-letter list.

Explore the full course: Rssb Senior Computer Instructor

Loading lesson…