I saw this in a Cambridge conversation book:
A: Have you gone to school today?
B: Yes, I went to school today.
Can you please tell me why B answered in the Past Simple instead of the Present Perfect?
A might have asked the question in the Present Perfect because of today. When the period of time we are talking about is not over, we use the Present Perfect:
How much have you done today?
I haven't done anything special this year.
But if we consider some period finished and any change is unlikely, we may use the Past Simple talking about that period:
I went to school today. (perhaps, it's said in the evening and, although the day is not over yet, the kid considers it over and he knows he will not go to school on that day anyway)
Have you had lunch yet? - Yes, I had it 30 minutes ago. (again, someone uses the Present Perfect in the question and someone uses the Past Simple in the answer. But in this answer they use "30 minutes ago" and it makes the choice of the tense easier)
There are plenty of situations in which we have a choice of tenses to use. Some situations allow the present progressive and the perfect progressive, some the past progressive and the simple past, and so on over quite a few possible combinations.
If a question is asked, the answer can be in any tense that makes sense for the meaning conveyed. There is no requirement for it to match the grammar of the question.