Zucchini a fruit or a vegetable?

It is a fruit but is treated as a vegetable in regard to its preperation.