To make my my question simpler, is ATP formed during photosynthesis or cellular respiration?

If I can figure out that little fact I'll be able to do the rest of my worksheet...