Planst need water, carbon dioxide and sun's energy to perform photosynthesis, and produce sugar and oxygen.