As several here have alluded, there is a
botanical definition of a fruit. And I would call a
culinary (table use) definition. One idea of a vegetable is comparing it with animal or mineral. This is a broader meaning and includes
all plants (and fungi too). Similarly we have the culinary concept of vegetable. Tomato
Lycopersicon esculentum L. is a great example (also see footnote).. Botanically they are a fruit, but for culinary use, a vegetable.
The concept that
fruits are sweet and veggies are not, is a weak definition. Lemons and grapefruits are fruits, yet they tend to be rather tart.

Rhubarb and cranberry are two more tart fruits that come to mind. On the other side for veggies, if you've ever
sauteed carrot, cabbage or onion, they taste
sweet. And how about sweet potatoes?
So vegetables can be botanical fruits (tomato, olive, avocado, squash), flowers (broccoli, cauliflower), leaves (lettuce, spinach, cabbage), petioles (celery), pods (snap beans, sweet peas), seeds (dry beans, sweet corn), modified stems (white potato, kohlrabi), and roots (carrots, beets, turnip). Perhaps you can think of a few more categories.
Foot note: When tomato was introduced to Europe from Central and So America, it was embraced by Mediterranean and southern European countries as a table vegetable and in cooking, whereas when introduced to Northern Europe, it was treated as an ornamental berry. Perhaps this was because of the pungent odour of its foliage and being associated with poisonous members of its nightshade family, notably the deadly nightshade
Solanum dulcamera from which Bellidonna (hallucinogen) is obtained. Folklore in Germany expounded that tomatoes were used by witches. Witches flying on broomsticks were a means to summons wolves and the latin genus
Lycopersicon means wolf-apple. The stem of tomato is very high in a toxic alkaloid, as are potatoes that have turned green from sitting in the light. Ironically, tomato was introduced into North America from Europe not from its southern neighbors. biggrin: