Chestnuts are true nuts, but walnuts are not.
Why it is true
Botanically, chestnuts are classified as true nuts, as they are fruits with a hard shell that does not open to release the seed. Walnuts, on the other hand, are considered drupes.
Source: Botany
Would you rather be asked first?
This is the reading side of the site, so the answer is in the sentence above — that is the whole point of it. Test yourself works the other way round: the question comes on its own, and the fact and the explanation only appear once you have answered.