Is the coconut a nut, a fruit, or a seed?

a fruit consisting of a hard or tough shell around an edible kernel.

fruit: the sweet and fleshy product of a tree or other plant that contains seed and can be eaten as food.

a flowering plant's unit of reproduction, capable of developing into another such plant.

A nut is a fruit, so the coconut is all three.

But botanically (technically) speaking, the coconut fruit is a drupe, not a true nut. A drupe is a fruit with a hard stony covering enclosing the seed (much like a peach or olive.) Like other fruits it has three layers: exocarp, mesocarp, and endocarp. The exocarp and mesocarp together make up the husk, and the mesocarp is composed of fibers called coir. The endocarp or shell is the hardest part of the coconut. The shell has three germination pores (stoma) or eyes that are clearly visible on its outside surface once the husk is removed.