I got this problem from Oriel Maxime, who was inspired by the Turing Machine game. I slightly simplified the wording.
I solved it and wrote up my solution.
Alice and Bob are considering codes consisting of three digits, each 1–5.
Alice has selected a code.
Alice emails Bob the following four pieces of data:
Bob replies: "Now I know the code. Good thing you sent me all four of those; I couldn't have been certain of the code if you hadn't sent them all."
What is the code?
The code is 111.
Fact B says the code is three identical digits. Fact A says the middle digit is less than 4, reducing the possibilities to 111, 222, and 333. Fact C says the sum is odd, limiting the possibilities to 111 and 333. Finally, fact D says there are no 3s in the code, guaranteeing that the code is 111.
If fact A hadn't been given, 555 would have been another possibility.
If fact B hadn't been given, there would have been lots of other possibilities, including 115.
If fact C hadn't been given, 222 would have been another possibility.
If fact D hadn't been given, 333 would have been another possibility.