Fun botany fact of the day: A tomato is really a fruit, but it's also really a vegetable.
You've probably heard the first half of this one before, so let me actually explain it this time. Whether something is a fruit or a vegetable all depends on who you're asking. To a botanist, a tomato is a fruit; to a cook, it's a vegetable. The botanical definition of "fruit" and the culinary definition of "vegetable" refer to completely different, unrelated properties, so it's actually possible to be both a botanical fruit and a culinary vegetable at the same time.
A botanical fruit is the part of the plant that developed from the flower's ripened ovary (which almost always means that it contains seeds). Apples, peaches, pears, raspberries, oranges, kumquats, and durian are all botanical fruits and also culinary fruits. Tomatoes, squash, olives, green beans, bell peppers, corn kernels, wheat "berries", and pumpkins are also all botanical fruits, although they're culinary vegetables. Botanically, there's no such thing as a "vegetable".
A culinary fruit is a plant part that's sweet; a vegetable is a plant part that's not very sweet. Every culinary vegetable is some other plant part as defined botanically. Carrots and radishes are roots, lettuce and spinach are leaves, potatoes and yams are tubers, onions are bulbs, celery sticks are petioles (leaf-stalks), peas are seeds, and tomatoes are fruits. All of those are also vegetables. There's no contradiction there.