Question 2
John wrote a 4-digit number on a paper and asked Peter to guess the number.
• Peter asked, “Is the number 1234?”
• John replied, “One of the digits is correct, the position of that digit is also correct.”
• Peter asked again, “Is the number 5167?”
• John replied, “Two digits are correct, but the positions of these two digits are wrong.”
• Peter asked again, “Is the number 8691?”
• John said, “All four digits are correct, but the digits are all in the wrong places.”
What is the number written by John?
• Peter asked, “Is the number 1234?”
• John replied, “One of the digits is correct, the position of that digit is also correct.”
• Peter asked again, “Is the number 5167?”
• John replied, “Two digits are correct, but the positions of these two digits are wrong.”
• Peter asked again, “Is the number 8691?”
• John said, “All four digits are correct, but the digits are all in the wrong places.”
What is the number written by John?