"Agradeço pela comida."
Translation:I thank you for the food.
As Mangueura14 commented above this sentence doesn't translate directly into English. You have to use the equivalent, which is "I thank YOU for the food." That is probably the most accurate translation. However, "thanks for the food also works," as the "you" is implied.
Obrigado(a) is simply an expression, like "thanks!". But if you have to use the verb "to thank", the portuguese equivalent is agradecer. In this example, both are acceptable, but that's not usually the case.
If you're simply thanking someone, you can use "obrigado", but if you're talking about thanking someone (in the past, future, or a 3rd person thanking someone else) then you use the verb "agradecer".
In English, you have to say who you are thanking with the verb "to thank". That's why they add "you" - I thank you for the food. It's really a question of the way the verb works in English. The word-for-word translation doesn't work in this case. There are lots of other possible answers here: thank you for the food; thanks for the food; I thank you for the food; I give thanks for the food. I'm not sure how many variations Duolingo will accept.