Here's a simplified explanation:
* Photosynthesis: Plants use sunlight, water, and carbon dioxide to create their own food (glucose) and release oxygen as a byproduct.
* Chemical Equation: 6CO2 + 6H2O + Sunlight → C6H12O6 + 6O2
So, while plants need carbon dioxide to survive, they produce oxygen as a waste product of the process. This oxygen is essential for the survival of most living organisms on Earth, including humans.