YOU SAID:
i went to the grocery store to buy carrots
INTO JAPANESE
私はニンジンを買うために食料品店に行きました
BACK INTO ENGLISH
I went to the grocery store to buy carrots
INTO JAPANESE
ニンジンを買いに食料品店に行きました
BACK INTO ENGLISH
I went to the grocery store to buy carrots
Well done, yes, well done!