191k views
5 votes
Can you crack the code? question in attached file.​

Can you crack the code? question in attached file.​-example-1

1 Answer

2 votes

Explanation:

Given : options for key lock

2 9 1 - one number is correct and well placed

2 4 5 - one number is correct but wrong placed

4 6 3 - Two numbers are correct but wrong placed

5 7 8 nothing is correct

5 6 9 one number is correct but wrong placed

To find : code to open lock

Solution:

2 9 1 - one number is correct and well placed

2 4 5 - one number is correct but wrong placed

Hence 2 can not be correct number

5 7 8 nothing is correct

so 2 , 5 , 7 & 8 are not the number in code

2 4 5 - one number is correct but wrong placed

2 & 5 are not correct

hence 4 is correct but wrong placed

4 6 3 - Two numbers are correct but wrong placed

Hence location of 4 is defined as 1st & 2nd position are bot correct

and out of 6 & 3 one has to be correct

x x 4

2 9 1 - one number is correct and well placed

1 can not be well placed as last position is already taken

hence 9 is correct & well placed

x 9 4

5 6 9 one number is correct but wrong placed

9 is the number

hence 6 can not be correct

so

out of 6 & 3 - 3 has to be correct

3 9 4 is the code

Hope this helps.

User Rony Tesler
by
5.2k points